Fixed 3DNow! detection for clang llvm
authorSam Lantinga <slouken@libsdl.org>
Thu, 20 Sep 2012 21:16:02 -0700
changeset 6443 21827b6a7cfd
parent 6442 2d3caa191dc4
child 6444 9a2b329dbd0e
Fixed 3DNow! detection for clang llvm
configure
configure.in
--- a/configure	Thu Sep 20 21:13:10 2012 -0700
+++ b/configure	Thu Sep 20 21:16:02 2012 -0700
@@ -17219,17 +17219,20 @@
 main ()
 {
 
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+        void *p = 0;
+        _m_prefetch(p);
+
+  ;
+  return 0;
+}
+_ACEOF
+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"
--- a/configure.in	Thu Sep 20 21:13:10 2012 -0700
+++ b/configure.in	Thu Sep 20 21:16:02 2012 -0700
@@ -459,12 +459,14 @@
         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
         ])