add -Werror flag to debug mode
[supertux.git] / configure.ac
index 851c492..8224c97 100644 (file)
@@ -48,7 +48,7 @@ AC_MSG_CHECKING(for debug mode)
 AC_ARG_ENABLE(debug,
               AC_HELP_STRING([--enable-debug], [enable debugging mode]),, enable_debug="yes")
 if test "x${enable_debug}" != "xno"; then
-    CXXFLAGS="$CXXFLAGS -Wall -W -DDEBUG -O0 -g3"
+    CXXFLAGS="$CXXFLAGS -Wall -Werror -DDEBUG -O0 -g3"
     AC_MSG_RESULT([enabled])
 else
     AC_MSG_RESULT([disabled])
@@ -71,6 +71,7 @@ AM_PATH_SDL($SDL_VERSION,
 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
 CFLAGS="$CFLAGS $SDL_CFLAGS"
 LIBS="$LIBS $SDL_LIBS"
+GL_LIBS="-lGL"
 
 dnl Checks for additional libraries.
 AC_CHECK_LIB(SDL_mixer, Mix_OpenAudio,,
@@ -88,7 +89,7 @@ if test "x$no_gl" = "xyes" -o "x$enable_opengl" = "xno"; then
 else
   CFLAGS="$CFLAGS $GL_CFLAGS"
   CXXFLAGS="$CXXFLAGS $GL_CFLAGS"
-  LIBS="$LIBS $GL_LIBS -lGL"
+  LIBS="$LIBS $GL_LIBS"
 fi
 
 AC_CHECK_LIB(z, gzopen,, AC_MSG_ERROR([*** zlib is missing]))