Fix for bug #1709675 ("probably not be so ISO-conformant"): The C compiler flag
authorSven Panne <sven.panne@aedion.de>
Sun, 2 Nov 2008 18:27:21 +0000 (18:27 +0000)
committerSven Panne <sven.panne@aedion.de>
Sun, 2 Nov 2008 18:27:21 +0000 (18:27 +0000)
-Werror is not used by default anymore, a separate configure flag
--enable-warnings-as-errors has been introduced for this purpose, which is off
by default.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@744 7f0cb862-5218-0410-a997-914c9d46530a

configure.ac

index 39b58aa..5aa4bf3 100644 (file)
@@ -76,7 +76,14 @@ AC_ARG_ENABLE([warnings],
 [AS_HELP_STRING([--enable-warnings],
                 [use all gcc compiler warnings @<:@default=yes@:>@])])
 if test "x$enable_warnings" != xno -a "x$GCC" = xyes; then
-  CFLAGS="$CFLAGS -Wall -pedantic -Werror"
+  CFLAGS="$CFLAGS -Wall -pedantic"
+fi
+
+AC_ARG_ENABLE([warnings-as-errors],
+[AS_HELP_STRING([--enable-warnings-as-errors],
+                [make all warnings into errors @<:@default=no@:>@])])
+if test "x$enable_warnings_as_errors" = xyes -a "x$GCC" = xyes; then
+  CFLAGS="$CFLAGS -Werror"
 fi
 
 AC_ARG_ENABLE([debug],