Add additional flags for maintainer mode.
authorJulien Lavergne <julien.lavergne@gmail.com>
Mon, 20 Dec 2010 17:41:46 +0000 (18:41 +0100)
committerJulien Lavergne <julien.lavergne@gmail.com>
Mon, 20 Dec 2010 17:41:46 +0000 (18:41 +0100)
configure.ac
lxsession-logout/Makefile.am
lxsession/Makefile.am

index e7031e2..21ef9cb 100644 (file)
@@ -30,9 +30,11 @@ AC_ARG_ENABLE(man,
        [enable_man=no]
 )
 
-#Don't use deprecated GTK and Glib functions 
-DISABLE_DEPRECATED_FLAGS="-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 -DGSEAL_ENABLE"
-AC_SUBST(DISABLE_DEPRECATED_FLAGS)
+# 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)
 
 PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.6.0])
 AC_SUBST(GTK_CFLAGS)
index a03726a..93ed103 100644 (file)
@@ -1,6 +1,7 @@
 bin_PROGRAMS = lxsession-logout
 
 lxsession_logout_CFLAGS =  $(GTK_CFLAGS) $(SM_CFLAGS) $(DBUS_CFLAGS) \
+                       $(ADDITIONAL_FLAGS) \
                        -DPACKAGE_LOCALE_DIR=\"$(datadir)/locale\" \
                        -DPACKAGE_DATA_DIR=\"$(datadir)\"
 
index 9c783d9..3f2bb20 100644 (file)
@@ -3,6 +3,7 @@ NULL=
 bin_PROGRAMS = lxsession
 
 lxsession_CFLAGS = $(GLIB_CFLAGS) \
+                               $(ADDITIONAL_FLAGS) \
                                -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
                                -Werror-implicit-function-declaration
                                $(NULL)