configure.in
changeset 10835 0e9e7a128391
parent 10797 c23bdf7436b3
child 10847 425040bd82be
     1.1 --- a/configure.in	Sun Jan 22 20:27:48 2017 -0500
     1.2 +++ b/configure.in	Mon Jan 23 01:05:44 2017 -0500
     1.3 @@ -593,7 +593,7 @@
     1.4      fi
     1.5  
     1.6      AC_ARG_ENABLE(sse2,
     1.7 -AC_HELP_STRING([--enable-sse2], [use SSE2 assembly routines [[default=no]]]),
     1.8 +AC_HELP_STRING([--enable-sse2], [use SSE2 assembly routines [[default=maybe]]]),
     1.9                    , enable_sse2=$default_ssemath)
    1.10      if test x$enable_sse2 = xyes; then
    1.11          save_CFLAGS="$CFLAGS"
    1.12 @@ -629,6 +629,43 @@
    1.13          fi
    1.14      fi
    1.15  
    1.16 +    AC_ARG_ENABLE(sse3,
    1.17 +AC_HELP_STRING([--enable-sse3], [use SSE3 assembly routines [[default=maybe]]]),
    1.18 +                  , enable_sse3=$default_ssemath)
    1.19 +    if test x$enable_sse3 = xyes; then
    1.20 +        save_CFLAGS="$CFLAGS"
    1.21 +        have_gcc_sse3=no
    1.22 +        AC_MSG_CHECKING(for GCC -msse3 option)
    1.23 +        sse3_CFLAGS="-msse3"
    1.24 +        CFLAGS="$save_CFLAGS $sse3_CFLAGS"
    1.25 +
    1.26 +        AC_TRY_COMPILE([
    1.27 +        #ifdef __MINGW32__
    1.28 +        #include <_mingw.h>
    1.29 +        #ifdef __MINGW64_VERSION_MAJOR
    1.30 +        #include <intrin.h>
    1.31 +        #else
    1.32 +        #include <pmmintrin.h>
    1.33 +        #endif
    1.34 +        #else
    1.35 +        #include <pmmintrin.h>
    1.36 +        #endif
    1.37 +        #ifndef __SSE2__
    1.38 +        #error Assembler CPP flag not enabled
    1.39 +        #endif
    1.40 +        ],[
    1.41 +        ],[
    1.42 +        have_gcc_sse3=yes
    1.43 +        ])
    1.44 +        AC_MSG_RESULT($have_gcc_sse3)
    1.45 +        CFLAGS="$save_CFLAGS"
    1.46 +
    1.47 +        if test x$have_gcc_sse3 = xyes; then
    1.48 +            EXTRA_CFLAGS="$EXTRA_CFLAGS $sse3_CFLAGS"
    1.49 +            SUMMARY_math="${SUMMARY_math} sse3"
    1.50 +        fi
    1.51 +    fi
    1.52 +
    1.53      AC_ARG_ENABLE(altivec,
    1.54  AC_HELP_STRING([--enable-altivec], [use Altivec assembly routines [[default=yes]]]),
    1.55                    , enable_altivec=yes)