--- a/configure.in Thu Oct 30 23:56:59 2008 +0000 +++ b/configure.in Thu Dec 04 09:05:56 2008 +0000 @@ -29,7 +29,7 @@ AS_HELP_STRING( [--disable-optimized], [Disable compile-time optimizations (Enabled by default)]), [true], [enable_optimized=yes] ) AC_ARG_ENABLE( profiled, - AS_HELP_STRING( [--enable-profiled], [Enable profiling build (implies disable-optimized)]), + AS_HELP_STRING( [--enable-profiled], [Enable profiling build]), [if test "$enableval" == "yes"; then enable_profiled=yes; fi] ) @@ -60,17 +60,23 @@ dnl ------------ -if test "x$enable_profiled" = "xyes"; then - CFLAGS="-g -pg -fprofile-arcs" - LDFLAGS="$LDFLAGS -pg"; -elif test "x$enable_optimized" = "xyes"; then - CFLAGS="-g -O2 -fexceptions -fomit-frame-pointer" - AC_DEFINE(HAVE_EXCEPTIONS, [1], [Have exception stack-frame information]) +if test "x$enable_optimized" = "xyes"; then + CFLAGS="-g -O2 -msse2 -mfpmath=sse" + if test "x$enable_profiled" != "xyes"; then + dnl -fomit-frame-pointer can't be used with -pg + CFLAGS="$CFLAGS -fexceptions -fomit-frame-pointer" + AC_DEFINE(HAVE_EXCEPTIONS, [1], [Have exception stack-frame information]) + fi AC_DEFINE(HAVE_FASTCALL, [1], [Use fast register-passing calling conventions]) else CFLAGS="-g3" fi +if test "x$enable_profiled" = "xyes"; then + CFLAGS="$CFLAGS -pg" + LDFLAGS="$LDFLAGS -pg"; +fi + if test "x$GCC" = "xyes"; then CFLAGS="$CFLAGS -fno-strict-aliasing" fi