Enabled 3DNow! intrinsic support

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402623
This commit is contained in:
Sam Lantinga 2007-08-17 03:22:03 +00:00
parent 4d9ae37508
commit 3f37bb5466
4 changed files with 44 additions and 5 deletions

View file

@ -290,6 +290,9 @@ AC_HELP_STRING([--enable-mmx], [use MMX assembly routines [[default=yes]]]),
AC_TRY_COMPILE([
#include <mmintrin.h>
#ifndef __MMX__
#error Assembler CPP flag not enabled
#endif
],[
],[
have_gcc_mmx=yes
@ -301,6 +304,32 @@ AC_HELP_STRING([--enable-mmx], [use MMX assembly routines [[default=yes]]]),
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_HELP_STRING([--enable-sse], [use SSE assembly routines [[default=yes]]]),
AC_TRY_COMPILE([
#include <xmmintrin.h>
#ifndef __SSE__
#error Assembler CPP flag not enabled
#endif
],[
],[
have_gcc_sse=yes