configure.in
changeset 2856 c765f5fa4a2c
parent 2820 33ddad305f3d
child 2857 5e04bdd79479
     1.1 --- a/configure.in	Sun Dec 07 22:56:18 2008 +0000
     1.2 +++ b/configure.in	Sun Dec 07 23:25:39 2008 +0000
     1.3 @@ -285,6 +285,30 @@
     1.4  if test x$enable_assembly = xyes; then
     1.5      AC_DEFINE(SDL_ASSEMBLY_ROUTINES)
     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      dnl Check for various instruction support
    1.32      AC_ARG_ENABLE(mmx,
    1.33  AC_HELP_STRING([--enable-mmx], [use MMX assembly routines [[default=yes]]]),
    1.34 @@ -368,8 +392,8 @@
    1.35      fi
    1.36  
    1.37      AC_ARG_ENABLE(sse2,
    1.38 -AC_HELP_STRING([--enable-sse2], [use SSE2 assembly routines [[default=yes]]]),
    1.39 -                  , enable_sse2=yes)
    1.40 +AC_HELP_STRING([--enable-sse2], [use SSE2 assembly routines [[default=no]]]),
    1.41 +                  , enable_sse2=$default_ssemath)
    1.42      if test x$enable_sse2 = xyes; then
    1.43          save_CFLAGS="$CFLAGS"
    1.44          have_gcc_sse2=no
    1.45 @@ -394,30 +418,6 @@
    1.46          fi
    1.47      fi
    1.48  
    1.49 -    # Make sure that we don't generate floating point code that would
    1.50 -    # cause illegal instruction exceptions on older processors
    1.51 -    case "$host" in
    1.52 -        *-*-darwin*)
    1.53 -            # Don't need to worry about Apple hardware, it's all SSE capable
    1.54 -            default_ssemath=yes
    1.55 -            ;;
    1.56 -        *64-*-*)
    1.57 -            # x86 64-bit architectures all have SSE instructions
    1.58 -            default_ssemath=yes
    1.59 -            ;;
    1.60 -	*)
    1.61 -            default_ssemath=no
    1.62 -            ;;
    1.63 -    esac
    1.64 -    AC_ARG_ENABLE(ssemath,
    1.65 -AC_HELP_STRING([--enable-ssemath], [Allow GCC to use SSE floating point math [[default=no]]]),
    1.66 -                  , enable_ssemath=$default_ssemath)
    1.67 -    if test x$enable_ssemath = xno; then
    1.68 -        if test x$have_gcc_sse = xyes -o x$have_gcc_sse2 = xyes; then
    1.69 -            EXTRA_CFLAGS="$EXTRA_CFLAGS -mfpmath=387"
    1.70 -        fi
    1.71 -    fi
    1.72 -
    1.73      AC_ARG_ENABLE(altivec,
    1.74  AC_HELP_STRING([--enable-altivec], [use Altivec assembly routines [[default=yes]]]),
    1.75                    , enable_altivec=yes)