Add additional flags for maintainer mode
authorJulien Lavergne <julien.lavergne@gmail.com>
Tue, 17 May 2011 21:12:49 +0000 (23:12 +0200)
committerJulien Lavergne <julien.lavergne@gmail.com>
Tue, 17 May 2011 21:12:49 +0000 (23:12 +0200)
configure.in
src/Makefile.am

index 48c3776..c0d52a6 100644 (file)
@@ -26,6 +26,12 @@ PKG_CHECK_MODULES(XLIB, "x11")
 AC_SUBST(XLIB_CFLAGS)
 AC_SUBST(XLIB_LIBS)
 
+# Pass --enable-maintainer-mode to enable more CFLAGS
+if test "$USE_MAINTAINER_MODE" = "yes"; then
+  ADDITIONAL_FLAGS="-Wall -Werror=all -Werror=format -Werror=implicit-function-declaration -Werror=implicit-int -Werror=missing-braces -Werror=parentheses -Werror=return-type -Werror=strict-aliasing -Werror=switch -Wuninitialized -Werror=unused-label -Werror=unused-value -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Werror=missing-declarations -Wredundant-decls -Wmissing-noreturn -Wpointer-arith -Wcast-align -Wwrite-strings -Werror=inline -Werror=format-nonliteral -Wformat-nonliteral -Werror=format-security -Wformat-security -Winit-self -Werror=missing-include-dirs -Werror=undef -Werror=aggregate-return -Wmissing-format-attribute -Werror=nested-externs -fno-strict-aliasing -fmessage-length=0 -Wp,-D_FORTIFY_SOURCE=2 -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES"
+fi
+AC_SUBST(ADDITIONAL_FLAGS)
+
 AC_ARG_ENABLE(man,
        [AC_HELP_STRING([--enable-man],
                [regenerate roff man pages from Docbook @<:@default=no@:>@])],
index 5719b09..a7d1e8f 100644 (file)
@@ -2,7 +2,8 @@ INCLUDES = \
        -DPACKAGE_DATA_DIR=\""$(datadir)"/lxinput\" \
        -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
        $(GTK_CFLAGS) \
-       $(XLIB_CFLAGS)
+       $(XLIB_CFLAGS) \
+    $(ADDITIONAL_FLAGS) \
        -Werror-implicit-function-declaration
 
 bin_PROGRAMS = lxinput