configure.in
changeset 2261 c20476d7d7b3
parent 2247 93994f65c74c
child 2264 f7f80b822c1f
     1.1 --- a/configure.in	Fri Aug 17 02:55:21 2007 +0000
     1.2 +++ b/configure.in	Fri Aug 17 03:22:03 2007 +0000
     1.3 @@ -290,6 +290,9 @@
     1.4  
     1.5          AC_TRY_COMPILE([
     1.6          #include <mmintrin.h>
     1.7 +        #ifndef __MMX__
     1.8 +        #error Assembler CPP flag not enabled
     1.9 +        #endif
    1.10          ],[
    1.11          ],[
    1.12          have_gcc_mmx=yes
    1.13 @@ -301,6 +304,32 @@
    1.14          fi
    1.15      fi
    1.16  
    1.17 +    AC_ARG_ENABLE(3dnow,
    1.18 +AC_HELP_STRING([--enable-3dnow], [use MMX assembly routines [[default=yes]]]),
    1.19 +                  , enable_3dnow=yes)
    1.20 +    if test x$enable_3dnow = xyes; then
    1.21 +        save_CFLAGS="$CFLAGS"
    1.22 +        have_gcc_3dnow=no
    1.23 +        AC_MSG_CHECKING(for GCC -m3dnow option)
    1.24 +        amd3dnow_CFLAGS="-m3dnow"
    1.25 +        CFLAGS="$save_CFLAGS $amd3dnow_CFLAGS"
    1.26 +
    1.27 +        AC_TRY_COMPILE([
    1.28 +        #include <mm3dnow.h>
    1.29 +        #ifndef __3dNOW__
    1.30 +        #error Assembler CPP flag not enabled
    1.31 +        #endif
    1.32 +        ],[
    1.33 +        ],[
    1.34 +        have_gcc_3dnow=yes
    1.35 +        ])
    1.36 +        AC_MSG_RESULT($have_gcc_3dnow)
    1.37 +
    1.38 +        if test x$have_gcc_3dnow = xyes; then
    1.39 +            EXTRA_CFLAGS="$EXTRA_CFLAGS $amd3dnow_CFLAGS"
    1.40 +        fi
    1.41 +    fi
    1.42 +
    1.43      AC_ARG_ENABLE(sse,
    1.44  AC_HELP_STRING([--enable-sse], [use SSE assembly routines [[default=yes]]]),
    1.45                    , enable_sse=yes)
    1.46 @@ -313,6 +342,9 @@
    1.47  
    1.48          AC_TRY_COMPILE([
    1.49          #include <xmmintrin.h>
    1.50 +        #ifndef __SSE__
    1.51 +        #error Assembler CPP flag not enabled
    1.52 +        #endif
    1.53          ],[
    1.54          ],[
    1.55          have_gcc_sse=yes