comparison configure.in @ 2820:33ddad305f3d

Make sure that we don't generate floating point code that would cause illegal instruction exceptions on older processors, unless someone passes --enable-ssemath to configure.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 01 Dec 2008 23:09:09 +0000
parents 27cb878a278e
children c765f5fa4a2c
comparison
equal deleted inserted replaced
2819:222aa027e650 2820:33ddad305f3d
392 if test x$have_gcc_sse2 = xyes; then 392 if test x$have_gcc_sse2 = xyes; then
393 EXTRA_CFLAGS="$EXTRA_CFLAGS $sse2_CFLAGS" 393 EXTRA_CFLAGS="$EXTRA_CFLAGS $sse2_CFLAGS"
394 fi 394 fi
395 fi 395 fi
396 396
397 # Make sure that we don't generate floating point code that would
398 # cause illegal instruction exceptions on older processors
399 case "$host" in
400 *-*-darwin*)
401 # Don't need to worry about Apple hardware, it's all SSE capable
402 default_ssemath=yes
403 ;;
404 *64-*-*)
405 # x86 64-bit architectures all have SSE instructions
406 default_ssemath=yes
407 ;;
408 *)
409 default_ssemath=no
410 ;;
411 esac
412 AC_ARG_ENABLE(ssemath,
413 AC_HELP_STRING([--enable-ssemath], [Allow GCC to use SSE floating point math [[default=no]]]),
414 , enable_ssemath=$default_ssemath)
415 if test x$enable_ssemath = xno; then
416 if test x$have_gcc_sse = xyes -o x$have_gcc_sse2 = xyes; then
417 EXTRA_CFLAGS="$EXTRA_CFLAGS -mfpmath=387"
418 fi
419 fi
420
397 AC_ARG_ENABLE(altivec, 421 AC_ARG_ENABLE(altivec,
398 AC_HELP_STRING([--enable-altivec], [use Altivec assembly routines [[default=yes]]]), 422 AC_HELP_STRING([--enable-altivec], [use Altivec assembly routines [[default=yes]]]),
399 , enable_altivec=yes) 423 , enable_altivec=yes)
400 if test x$enable_altivec = xyes; then 424 if test x$enable_altivec = xyes; then
401 have_altivec_h_hdr=no 425 have_altivec_h_hdr=no