Fixed 3DNow! detection for clang llvm

This commit is contained in:
Sam Lantinga 2012-09-20 21:16:02 -07:00
parent 1c3d9891d2
commit ad908fa0de
2 changed files with 8 additions and 3 deletions

7
configure vendored
View file

@ -17219,17 +17219,20 @@ int
main ()
{
void *p = 0;
_m_prefetch(p);
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
if ac_fn_c_try_link "$LINENO"; then :
have_gcc_3dnow=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_3dnow" >&5
$as_echo "$have_gcc_3dnow" >&6; }
CFLAGS="$save_CFLAGS"

View file

@ -459,12 +459,14 @@ AC_HELP_STRING([--enable-3dnow], [use MMX assembly routines [[default=yes]]]),
amd3dnow_CFLAGS="-m3dnow"
CFLAGS="$save_CFLAGS $amd3dnow_CFLAGS"
AC_TRY_COMPILE([
AC_TRY_LINK([
#include <mm3dnow.h>
#ifndef __3dNOW__
#error Assembler CPP flag not enabled
#endif
],[
void *p = 0;
_m_prefetch(p);
],[
have_gcc_3dnow=yes
])