Added --with-sse2 configure flag for SSE2 heuristic optimizations
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user