Added --with-sse2 configure flag for SSE2 heuristic optimizations

This commit is contained in:
Mark Cannon
2010-12-12 03:27:16 -05:00
parent 00e9f7c0b3
commit d330514856
+11
View File
@@ -122,6 +122,17 @@ AC_C_BIGENDIAN(
AC_DEFINE(ENDIAN_LITTLE, 1, [Little endian]),
AC_MSG_ERROR([Can't determine endianness]) )
# If we're compiling with the SSE2 build flag, add that flag to CFLAGS and CXXFLAGS.
# (Handwritten SSE/SSE2 code isn't in the binary, but GCC's heuristics optimize enough
# vector arithmetic in Rage that this produces a noticeable speedup on SSE2 processors.)
AC_ARG_WITH(sse2, AC_HELP_STRING([--with-sse2], [Enable SSE2 optimization]), with_sse2=$withval, with_sse2=no)
if test "$with_sse2" = "yes"; then
CFLAGS="$CFLAGS -msse2"
CXXFLAGS="$CXXFLAGS -msse2"
fi
AC_ARG_WITH(prof, AS_HELP_STRING([--with-prof],[Enable profiling]), with_prof=$withval, with_prof=no)
if test "$with_prof" = "yes"; then
test "$DEFAULT_CFLAGS" = "yes" && CFLAGS="$CFLAGS -pg"