Fixed 3DNow! detection for clang llvm
authorSam Lantinga <slouken@libsdl.org>
Thu, 20 Sep 2012 21:16:02 -0700
changeset 644321827b6a7cfd
parent 6442 2d3caa191dc4
child 6444 9a2b329dbd0e
Fixed 3DNow! detection for clang llvm
configure
configure.in
     1.1 --- a/configure	Thu Sep 20 21:13:10 2012 -0700
     1.2 +++ b/configure	Thu Sep 20 21:16:02 2012 -0700
     1.3 @@ -17219,17 +17219,20 @@
     1.4  main ()
     1.5  {
     1.6  
     1.7 -
     1.8 -  ;
     1.9 -  return 0;
    1.10 -}
    1.11 -_ACEOF
    1.12 -if ac_fn_c_try_compile "$LINENO"; then :
    1.13 +        void *p = 0;
    1.14 +        _m_prefetch(p);
    1.15 +
    1.16 +  ;
    1.17 +  return 0;
    1.18 +}
    1.19 +_ACEOF
    1.20 +if ac_fn_c_try_link "$LINENO"; then :
    1.21  
    1.22          have_gcc_3dnow=yes
    1.23  
    1.24  fi
    1.25 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    1.26 +rm -f core conftest.err conftest.$ac_objext \
    1.27 +    conftest$ac_exeext conftest.$ac_ext
    1.28          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_3dnow" >&5
    1.29  $as_echo "$have_gcc_3dnow" >&6; }
    1.30          CFLAGS="$save_CFLAGS"
     2.1 --- a/configure.in	Thu Sep 20 21:13:10 2012 -0700
     2.2 +++ b/configure.in	Thu Sep 20 21:16:02 2012 -0700
     2.3 @@ -459,12 +459,14 @@
     2.4          amd3dnow_CFLAGS="-m3dnow"
     2.5          CFLAGS="$save_CFLAGS $amd3dnow_CFLAGS"
     2.6  
     2.7 -        AC_TRY_COMPILE([
     2.8 +        AC_TRY_LINK([
     2.9          #include <mm3dnow.h>
    2.10          #ifndef __3dNOW__
    2.11          #error Assembler CPP flag not enabled
    2.12          #endif
    2.13          ],[
    2.14 +        void *p = 0;
    2.15 +        _m_prefetch(p);
    2.16          ],[
    2.17          have_gcc_3dnow=yes
    2.18          ])