Mercurial > sdl-ios-xcode
diff configure.in @ 2261:c20476d7d7b3
Enabled 3DNow! intrinsic support
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 17 Aug 2007 03:22:03 +0000 |
parents | 93994f65c74c |
children | f7f80b822c1f |
line wrap: on
line diff
--- a/configure.in Fri Aug 17 02:55:21 2007 +0000 +++ b/configure.in Fri Aug 17 03:22:03 2007 +0000 @@ -290,6 +290,9 @@ AC_TRY_COMPILE([ #include <mmintrin.h> + #ifndef __MMX__ + #error Assembler CPP flag not enabled + #endif ],[ ],[ have_gcc_mmx=yes @@ -301,6 +304,32 @@ fi fi + AC_ARG_ENABLE(3dnow, +AC_HELP_STRING([--enable-3dnow], [use MMX assembly routines [[default=yes]]]), + , enable_3dnow=yes) + if test x$enable_3dnow = xyes; then + save_CFLAGS="$CFLAGS" + have_gcc_3dnow=no + AC_MSG_CHECKING(for GCC -m3dnow option) + amd3dnow_CFLAGS="-m3dnow" + CFLAGS="$save_CFLAGS $amd3dnow_CFLAGS" + + AC_TRY_COMPILE([ + #include <mm3dnow.h> + #ifndef __3dNOW__ + #error Assembler CPP flag not enabled + #endif + ],[ + ],[ + have_gcc_3dnow=yes + ]) + AC_MSG_RESULT($have_gcc_3dnow) + + if test x$have_gcc_3dnow = xyes; then + EXTRA_CFLAGS="$EXTRA_CFLAGS $amd3dnow_CFLAGS" + fi + fi + AC_ARG_ENABLE(sse, AC_HELP_STRING([--enable-sse], [use SSE assembly routines [[default=yes]]]), , enable_sse=yes) @@ -313,6 +342,9 @@ AC_TRY_COMPILE([ #include <xmmintrin.h> + #ifndef __SSE__ + #error Assembler CPP flag not enabled + #endif ],[ ],[ have_gcc_sse=yes