configure.in
changeset 2264 f7f80b822c1f
parent 2261 c20476d7d7b3
child 2271 60b4c52a7906
     1.1 --- a/configure.in	Fri Aug 17 06:40:12 2007 +0000
     1.2 +++ b/configure.in	Fri Aug 17 06:41:20 2007 +0000
     1.3 @@ -356,6 +356,32 @@
     1.4          fi
     1.5      fi
     1.6  
     1.7 +    AC_ARG_ENABLE(sse2,
     1.8 +AC_HELP_STRING([--enable-sse2], [use SSE2 assembly routines [[default=yes]]]),
     1.9 +                  , enable_sse2=yes)
    1.10 +    if test x$enable_sse2 = xyes; then
    1.11 +        save_CFLAGS="$CFLAGS"
    1.12 +        have_gcc_sse2=no
    1.13 +        AC_MSG_CHECKING(for GCC -msse2 option)
    1.14 +        sse2_CFLAGS="-msse2"
    1.15 +        CFLAGS="$save_CFLAGS $sse2_CFLAGS"
    1.16 +
    1.17 +        AC_TRY_COMPILE([
    1.18 +        #include <emmintrin.h>
    1.19 +        #ifndef __SSE2__
    1.20 +        #error Assembler CPP flag not enabled
    1.21 +        #endif
    1.22 +        ],[
    1.23 +        ],[
    1.24 +        have_gcc_sse2=yes
    1.25 +        ])
    1.26 +        AC_MSG_RESULT($have_gcc_sse2)
    1.27 +
    1.28 +        if test x$have_gcc_sse2 = xyes; then
    1.29 +            EXTRA_CFLAGS="$EXTRA_CFLAGS $sse2_CFLAGS"
    1.30 +        fi
    1.31 +    fi
    1.32 +
    1.33      AC_ARG_ENABLE(altivec,
    1.34  AC_HELP_STRING([--enable-altivec], [use Altivec assembly routines [[default=yes]]]),
    1.35                    , enable_altivec=yes)