Commit 21f3d07c2cb7e7eba26e525a17ccbfd3e929f745

sammy 2008-04-23T21:23:22

* Add loads of C/C++ warning flags to the build process: -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wsign-compare * Add C-specific warning flags, too: -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs

diff --git a/configure.ac b/configure.ac
index 88c7af3..899b229 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,6 +6,7 @@ AM_INIT_AUTOMAKE([no-define tar-ustar])
 FTGL_PROG_CXX
 
 AC_PROG_LIBTOOL
+AC_PROG_INSTALL
 
 # Checks for typedefs, structures, and compiler characteristics.
 
@@ -33,15 +34,14 @@ CPPUNIT="no"
 PKG_CHECK_MODULES(CPPUNIT, cppunit, [CPPUNIT="yes"], [AC_MSG_RESULT(no)])
 AM_CONDITIONAL(HAVE_CPPUNIT, test "$CPPUNIT" != "no")
 
-# Checks for library functions
-dnl This isn't really used at the moment
-
+# Checks for library functions -- this isn't really used at the moment
 AC_CHECK_FUNCS([memset])
 
-# Utility programs
-
-AC_PROG_INSTALL
+# Warning flags
+CPPFLAGS="${CPPFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wsign-compare"
+CFLAGS="${CFLAGS} -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs"
 
+# Utility programs
 AC_PATH_PROG(DOXYGEN, doxygen, no)
 AM_CONDITIONAL(HAVE_DOXYGEN, test "$DOXYGEN" != "no")