configure.in
changeset 2820 33ddad305f3d
parent 2810 27cb878a278e
child 2856 c765f5fa4a2c
     1.1 --- a/configure.in	Mon Dec 01 09:45:01 2008 +0000
     1.2 +++ b/configure.in	Mon Dec 01 23:09:09 2008 +0000
     1.3 @@ -394,6 +394,30 @@
     1.4          fi
     1.5      fi
     1.6  
     1.7 +    # Make sure that we don't generate floating point code that would
     1.8 +    # cause illegal instruction exceptions on older processors
     1.9 +    case "$host" in
    1.10 +        *-*-darwin*)
    1.11 +            # Don't need to worry about Apple hardware, it's all SSE capable
    1.12 +            default_ssemath=yes
    1.13 +            ;;
    1.14 +        *64-*-*)
    1.15 +            # x86 64-bit architectures all have SSE instructions
    1.16 +            default_ssemath=yes
    1.17 +            ;;
    1.18 +	*)
    1.19 +            default_ssemath=no
    1.20 +            ;;
    1.21 +    esac
    1.22 +    AC_ARG_ENABLE(ssemath,
    1.23 +AC_HELP_STRING([--enable-ssemath], [Allow GCC to use SSE floating point math [[default=no]]]),
    1.24 +                  , enable_ssemath=$default_ssemath)
    1.25 +    if test x$enable_ssemath = xno; then
    1.26 +        if test x$have_gcc_sse = xyes -o x$have_gcc_sse2 = xyes; then
    1.27 +            EXTRA_CFLAGS="$EXTRA_CFLAGS -mfpmath=387"
    1.28 +        fi
    1.29 +    fi
    1.30 +
    1.31      AC_ARG_ENABLE(altivec,
    1.32  AC_HELP_STRING([--enable-altivec], [use Altivec assembly routines [[default=yes]]]),
    1.33                    , enable_altivec=yes)