For Linux, engine/ was changed a while back to take -Werror (treat warnings as errors) out of the debug compile options. However, sometimes a developer may want this enabled as it's easy to miss warnings when the compiler output just rolls on by.

Also, there's an ugly duplication of various warning options (-Wall etc.) in both debug and strict modes.

I'd like to propose that we change things around so that:

  1. --enable-debug adds -g -O0 -D_DEBUG
  2. either --enable-strict or --enable-debug adds -Wall etc.
  3. --enable-strict adds -Werror

It then becomes possible to use --enable-debug and --enable-strict together to request -Werror, but if a developer doesn't want to use -Werror (eg because they're busy on the bleeding edge) they can just omit --enable-strict. (A developer will probably also want --disable-final, BTW.)

The changes look like this:

--- a/engine/
+++ b/engine/
@@ -61,15 +61,22 @@ AC_CHECK_FUNCS(fabsf)
 # Checks for library functions.
 # Setup the build compiler flags and linker flags.
 # Enable debug
 # (note: the flags here are gcc-specific and may fail with other compilers)
 if test "$enable_debug" = yes; then
-  build_flags="$build_flags -D_DEBUG -O0 -g -Wall -Wno-unknown-pragmas -Wparentheses"
-elif test "$enable_strict" = yes; then
-  build_flags="$build_flags -DNDEBUG -Wall -Wno-unknown-pragmas -Wparentheses -Werror"
-  build_flags="$build_flags -DNDEBUG"
+  build_flags="$build_flags -g -O0 -D_DEBUG"
+# Enable warnings
+if test "$enable_strict" = yes -o "$enable_debug" = yes; then
+  build_flags="$build_flags -Wall -Wextra -Wno-unknown-pragmas -Wno-unused-parameter"
+# Enable strict
+if test "$enable_strict" = yes; then
+  build_flags="$build_flags -Werror"
 # Enable Graphite Trace logs - these are only used if a 

Any comments, from fellow Linux-heads out there? If not, I will submit a complete patch in the next day or two. It would make sense to change in the other directories to match, since these all contain similar logic.