comparison configure.in @ 2856:c765f5fa4a2c

Default SSE2 off on iX86, since gcc will use it for floating point operations even if -mfpmath=387 is set. Grr...
author Sam Lantinga <slouken@libsdl.org>
date Sun, 07 Dec 2008 23:25:39 +0000
parents 33ddad305f3d
children 5e04bdd79479
comparison
equal deleted inserted replaced
2855:422452508c76 2856:c765f5fa4a2c
283 AC_HELP_STRING([--enable-assembly], [Enable assembly routines [[default=yes]]]), 283 AC_HELP_STRING([--enable-assembly], [Enable assembly routines [[default=yes]]]),
284 , enable_assembly=yes) 284 , enable_assembly=yes)
285 if test x$enable_assembly = xyes; then 285 if test x$enable_assembly = xyes; then
286 AC_DEFINE(SDL_ASSEMBLY_ROUTINES) 286 AC_DEFINE(SDL_ASSEMBLY_ROUTINES)
287 287
288 # Make sure that we don't generate floating point code that would
289 # cause illegal instruction exceptions on older processors
290 case "$host" in
291 *-*-darwin*)
292 # Don't need to worry about Apple hardware, it's all SSE capable
293 default_ssemath=yes
294 ;;
295 *64-*-*)
296 # x86 64-bit architectures all have SSE instructions
297 default_ssemath=yes
298 ;;
299 *)
300 default_ssemath=no
301 ;;
302 esac
303 AC_ARG_ENABLE(ssemath,
304 AC_HELP_STRING([--enable-ssemath], [Allow GCC to use SSE floating point math [[default=no]]]),
305 , enable_ssemath=$default_ssemath)
306 if test x$enable_ssemath = xno; then
307 if test x$have_gcc_sse = xyes -o x$have_gcc_sse2 = xyes; then
308 EXTRA_CFLAGS="$EXTRA_CFLAGS -mfpmath=387"
309 fi
310 fi
311
288 dnl Check for various instruction support 312 dnl Check for various instruction support
289 AC_ARG_ENABLE(mmx, 313 AC_ARG_ENABLE(mmx,
290 AC_HELP_STRING([--enable-mmx], [use MMX assembly routines [[default=yes]]]), 314 AC_HELP_STRING([--enable-mmx], [use MMX assembly routines [[default=yes]]]),
291 , enable_mmx=yes) 315 , enable_mmx=yes)
292 if test x$enable_mmx = xyes; then 316 if test x$enable_mmx = xyes; then
366 EXTRA_CFLAGS="$EXTRA_CFLAGS $sse_CFLAGS" 390 EXTRA_CFLAGS="$EXTRA_CFLAGS $sse_CFLAGS"
367 fi 391 fi
368 fi 392 fi
369 393
370 AC_ARG_ENABLE(sse2, 394 AC_ARG_ENABLE(sse2,
371 AC_HELP_STRING([--enable-sse2], [use SSE2 assembly routines [[default=yes]]]), 395 AC_HELP_STRING([--enable-sse2], [use SSE2 assembly routines [[default=no]]]),
372 , enable_sse2=yes) 396 , enable_sse2=$default_ssemath)
373 if test x$enable_sse2 = xyes; then 397 if test x$enable_sse2 = xyes; then
374 save_CFLAGS="$CFLAGS" 398 save_CFLAGS="$CFLAGS"
375 have_gcc_sse2=no 399 have_gcc_sse2=no
376 AC_MSG_CHECKING(for GCC -msse2 option) 400 AC_MSG_CHECKING(for GCC -msse2 option)
377 sse2_CFLAGS="-msse2" 401 sse2_CFLAGS="-msse2"
389 AC_MSG_RESULT($have_gcc_sse2) 413 AC_MSG_RESULT($have_gcc_sse2)
390 CFLAGS="$save_CFLAGS" 414 CFLAGS="$save_CFLAGS"
391 415
392 if test x$have_gcc_sse2 = xyes; then 416 if test x$have_gcc_sse2 = xyes; then
393 EXTRA_CFLAGS="$EXTRA_CFLAGS $sse2_CFLAGS" 417 EXTRA_CFLAGS="$EXTRA_CFLAGS $sse2_CFLAGS"
394 fi
395 fi
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 418 fi
419 fi 419 fi
420 420
421 AC_ARG_ENABLE(altivec, 421 AC_ARG_ENABLE(altivec,
422 AC_HELP_STRING([--enable-altivec], [use Altivec assembly routines [[default=yes]]]), 422 AC_HELP_STRING([--enable-altivec], [use Altivec assembly routines [[default=yes]]]),