]> git.sur5r.net Git - kconfig-frontends/commitdiff
configure: enable building with -Wall
authorYann E. MORIN" <yann.morin.1998@free.fr>
Wed, 4 Apr 2012 16:40:46 +0000 (18:40 +0200)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed, 4 Apr 2012 16:40:46 +0000 (18:40 +0200)
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
configure.ac
frontends/conf/Makefile.am
frontends/gconf/Makefile.am
frontends/mconf/Makefile.am
frontends/nconf/Makefile.am
frontends/qconf/Makefile.am
libs/lxdialog/Makefile.am
libs/parser/Makefile.am

index 2cfeefd149d2edcbcbd998805ccf7a23a30e347e..937605995a9c6ec8576dfadff863b861ddf182ce 100644 (file)
@@ -29,6 +29,18 @@ LT_INIT([disable-static])
 #---------------------------------------------------------------------------
 # Set misc options
 
+# By default, do not build with -Wall, unless the user asks for it
+AC_ARG_ENABLE(
+    [wall],
+    [AS_HELP_STRING(
+        [--enable-wall],
+        [build with -Wall (default=no)])],
+    [AS_CASE(
+        ["$enableval"],
+        [yes], [wall_CFLAGS=-Wall],
+        [*],   [wall_CFLAGS=""])])
+AC_SUBST([wall_CFLAGS],[${wall_CFLAGS}])
+
 # By default, do not build with -Werror, unless the user asks for it
 AC_ARG_ENABLE(
     [werror],
@@ -124,6 +136,10 @@ AC_ARG_ENABLE(
      done])
 AC_SUBST([enable_frontends])
 
+#----------------------------------------
+# What extra CFLAGS we will be using
+AC_SUBST([kf_CFLAGS], ["$wall_CFLAGS $werror_CFLAGS"])
+
 #----------------------------------------
 # Dependencies that will be needed, depending on the frontends
 AS_CASE(
@@ -385,6 +401,9 @@ AC_OUTPUT
 
 AC_MSG_NOTICE()
 AC_MSG_NOTICE([Configured with:])
+AS_IF([test "$enable_wall" = "yes"],
+      [AC_MSG_NOTICE([- catch all warnings      : yes])],
+      [AC_MSG_NOTICE([- catch all warnings      : no])])
 AS_IF([test "$enable_werror" = "yes"],
       [AC_MSG_NOTICE([- treat warnings as errors: yes])],
       [AC_MSG_NOTICE([- treat warnings as errors: no])])
index 4c3ce1f6f329ec0ec846c84a0a2f5908d56c1ec2..310f41a16eb58c0cf319d798b5ce8b4598dc5c59 100644 (file)
@@ -4,6 +4,6 @@ conf_SOURCES = conf.c
 conf_CPPFLAGS = $(AM_CPPFLAGS)  \
                 $(GETTEXT)      \
                 -I$(top_srcdir)/libs/parser
-conf_CFLAGS = $(AM_CFLAGS) $(werror_CFLAGS)
+conf_CFLAGS = $(AM_CFLAGS) $(kf_CFLAGS)
 conf_LDADD = $(top_builddir)/libs/parser/libkconfigparser.la  \
              $(conf_EXTRA_LIBS)
index 2aa1a5538f99c0a672cd06dcc99757a32a55074b..ff70aadb9453d6ceecd9c5a7f6a667054be02ad8 100644 (file)
@@ -6,8 +6,8 @@ gconf_CPPFLAGS = $(AM_CPPFLAGS)         \
                  -I$(top_srcdir)/libs/parser    \
                  -I$(top_srcdir)/libs/images    \
                  -DGUI_PATH='"$(pkgdatadir)/gconf.glade"'
-gconf_CFLAGS = $(AM_CFLAGS)     \
-               $(werror_CFLAGS) \
+gconf_CFLAGS = $(AM_CFLAGS) \
+               $(kf_CFLAGS) \
                $(gtk_CFLAGS)
 gconf_LDADD = $(top_builddir)/libs/parser/libkconfigparser.la \
               $(gtk_LIBS) $(gconf_EXTRA_LIBS)
index c107ec9cc9a6fe48ed0e3da0c3a121931564d54b..ea34964e626356d04cb0b3d7e8cbf28125d40186 100644 (file)
@@ -6,8 +6,8 @@ mconf_CPPFLAGS = $(AM_CPPFLAGS)                 \
                  $(GETTEXT)                     \
                  -I$(top_srcdir)/libs                   \
                  -I$(top_srcdir)/libs/parser
-mconf_CFLAGS = $(AM_CFLAGS)     \
-               $(werror_CFLAGS)
+mconf_CFLAGS = $(AM_CFLAGS) \
+               $(kf_CFLAGS)
 mconf_LDADD = $(top_builddir)/libs/parser/libkconfigparser.la \
               $(top_builddir)/libs/lxdialog/liblxdialog.a     \
               $(ncurses_LIBS) $(mconf_EXTRA_LIBS)
index 87402e24b5448ed865594d83e78a852c9f973d6d..4a8341c71ef44e5c2eeed0363814067334d56cd8 100644 (file)
@@ -5,7 +5,7 @@ nconf_CPPFLAGS = $(AM_CPPFLAGS)     \
                  $(GETTEXT)         \
                  -I$(top_srcdir)/libs/parser
 nconf_CFLAGS = $(AM_CFLAGS)     \
-               $(werror_CFLAGS)
+               $(kf_CFLAGS)
 nconf_LDADD = $(top_builddir)/libs/parser/libkconfigparser.la \
               $(ncurses_extra_LIBS) $(ncurses_LIBS) \
               $(nconf_EXTRA_LIBS)
index 616d3d4803418dd945f32e8036bf5ffafff19808..b0ba091fed8d653b954e52fb0722638b55200ced 100644 (file)
@@ -6,8 +6,8 @@ qconf_CPPFLAGS = $(AM_CPPFLAGS)         \
                  $(GETTEXT)             \
                  -I$(top_srcdir)/libs/parser    \
                  -I$(top_srcdir)/libs/images
-qconf_CXXFLAGS = $(AM_CXXFLAGS)     \
-                 $(werror_CFLAGS)   \
+qconf_CXXFLAGS = $(AM_CXXFLAGS) \
+                 $(kf_CFLAGS)   \
                  $(qt4_CFLAGS)
 qconf_LDADD = $(top_builddir)/libs/parser/libkconfigparser.la \
               $(qt4_LIBS) $(qconf_EXTRA_LIBS)
index fa2358c2e89051d0c9f4ecb0eb29bf46860b98a0..2808a697b91d66fe5b68a572007679b800a52638 100644 (file)
@@ -12,4 +12,4 @@ liblxdialog_a_SOURCES = \
 liblxdialog_a_CPPFLAGS = $(AM_CPPFLAGS)                   \
                          -DCURSES_LOC='"${CURSES_LOC}"'   \
                          $(GETTEXT)
-liblxdialog_a_CFLAGS = $(AM_CFLAGS) $(werror_CFLAGS)
+liblxdialog_a_CFLAGS = $(AM_CFLAGS) $(kf_CFLAGS)
index 92bcf1e54c6fc124e2ca78b3fecd8d7de2c21a44..d5b4a04c9633c0aebe0795a05f3ec86e157aa9ba 100644 (file)
@@ -8,7 +8,7 @@ dist_EXTRA_libkconfigparser_la_SOURCES =  \
     expr.c expr.h lkc.h lkc_proto.h
 libkconfigparser_la_CPPFLAGS = -DROOTMENU="\"$(root_menu)\""    \
                                -DCONFIG_=\"$(config_prefix)\"
-libkconfigparser_la_CFLAGS = $(AM_CFLAGS) $(werror_CFLAGS)
+libkconfigparser_la_CFLAGS = $(AM_CFLAGS) $(kf_CFLAGS)
 libkconfigparser_la_LDFLAGS = -release $(KCONFIGPARSER_LIB_VERSION)
 
 kconfig_includedir = $(includedir)/kconfig