--- a/configure.in Thu Jan 15 04:15:11 2009 +0000 +++ b/configure.in Mon Jan 26 03:09:53 2009 +0000 @@ -25,7 +25,9 @@ AC_ARG_ENABLE( strict-warn, AS_HELP_STRING( [--enable-strict-warn], [Enable strict compilation warnings]), - [CFLAGS="$CFLAGS -Werror -Wall -Wno-unused"], []) + [if test "$enableval" == "yes"; then + enable_strictwarn=yes + fi] ) AC_ARG_ENABLE( translator, AS_HELP_STRING( [--disable-translator], [Disable the SH4 translator (Enabled by default)]), [true], [enable_translator=yes] ) @@ -77,10 +79,11 @@ if test "x$enable_optimized" = "xyes"; then CFLAGS="$CFLAGS $CCOPT" - OBJCFLAGS="$OBJCFLAGS $CCOPT" + OBJCFLAGS="$OBJCFLAGS $OBJCOPT" if test "x$enable_profiled" != "xyes"; then dnl -fomit-frame-pointer can't be used with -pg CFLAGS="$CFLAGS -fomit-frame-pointer" + OBJCFLAGS="$OBJCFLAGS -fomit-frame-pointer" fi else CFLAGS="$CFLAGS -g3" @@ -93,6 +96,11 @@ OBJCFLAGS="$OBJCFLAGS -pg"; fi +if test "x$enable_strictwarn" = "xyes"; then + CFLAGS="$CFLAGS -Wall -Werror -Wno-unused" + OBJCFLAGS="$OBJCFLAGS -Wall -Werror -Wno-unused" +fi + AC_CHECK_FASTCALL([ AC_DEFINE(HAVE_FASTCALL, [1], [Use fast register-passing calling conventions]) ])