#---------------------------------------------------------------------------
# Set misc options
+
+# By default, do not build with -Werror, unless the user asks for it
+AC_ARG_ENABLE(
+ [werror],
+ [AS_HELP_STRING(
+ [--enable-werror],
+ [build with -Werror (default=no)])],
+ [AS_CASE(
+ ["$enableval"],
+ [yes], [werror_CFLAGS=-Werror],
+ [*], [werror_CFLAGS=""])])
+AC_SUBST([werror_CFLAGS],[${werror_CFLAGS}])
+
# Although there is a default (="linux") in the code, we do provide
# a default here, to get a consistent autostuff behavior
AC_ARG_ENABLE(
AC_MSG_NOTICE()
AC_MSG_NOTICE([Configured with:])
-AC_MSG_NOTICE([- root-menu prompt: '$root_menu'])
-AC_MSG_NOTICE([- config prefix: '$config_prefix'])
+AS_IF([test "$enable_werror" = "yes"],
+ [AC_MSG_NOTICE([- treat warnings as errors: yes])],
+ [AC_MSG_NOTICE([- treat warnings as errors: no])])
+AC_MSG_NOTICE([- root-menu prompt: '$root_menu'])
+AC_MSG_NOTICE([- config prefix: '$config_prefix'])
AC_MSG_NOTICE([- frontends:])
AS_IF([test "$enable_conf" = "yes"],
[AC_MSG_NOTICE([ - conf: yes])],
conf_CPPFLAGS = $(AM_CPPFLAGS) \
$(GETTEXT) \
-I$(top_srcdir)/libs/parser
+conf_CFLAGS = $(AM_CFLAGS) $(werror_CFLAGS)
conf_LDADD = $(top_builddir)/libs/parser/libkconfigparser.la \
$(conf_EXTRA_LIBS)
-I$(top_srcdir)/libs/parser \
-I$(top_srcdir)/libs/images \
-DGUI_PATH='"$(pkgdatadir)/gconf.glade"'
-gconf_CFLAGS = $(AM_CFLAGS) \
+gconf_CFLAGS = $(AM_CFLAGS) \
+ $(werror_CFLAGS) \
$(gtk_CFLAGS)
gconf_LDADD = $(top_builddir)/libs/parser/libkconfigparser.la \
$(gtk_LIBS) $(gconf_EXTRA_LIBS)
$(GETTEXT) \
-I$(top_srcdir)/libs \
-I$(top_srcdir)/libs/parser
+mconf_CFLAGS = $(AM_CFLAGS) \
+ $(werror_CFLAGS)
mconf_LDADD = $(top_builddir)/libs/parser/libkconfigparser.la \
$(top_builddir)/libs/lxdialog/liblxdialog.a \
$(ncurses_LIBS) $(mconf_EXTRA_LIBS)
nconf_CPPFLAGS = $(AM_CPPFLAGS) \
$(GETTEXT) \
-I$(top_srcdir)/libs/parser
+nconf_CFLAGS = $(AM_CFLAGS) \
+ $(werror_CFLAGS)
nconf_LDADD = $(top_builddir)/libs/parser/libkconfigparser.la \
$(ncurses_extra_LIBS) $(ncurses_LIBS) \
$(nconf_EXTRA_LIBS)
$(GETTEXT) \
-I$(top_srcdir)/libs/parser \
-I$(top_srcdir)/libs/images
-qconf_CXXFLAGS = $(AM_CXXFLAGS) \
+qconf_CXXFLAGS = $(AM_CXXFLAGS) \
+ $(werror_CFLAGS) \
$(qt4_CFLAGS)
qconf_LDADD = $(top_builddir)/libs/parser/libkconfigparser.la \
$(qt4_LIBS) $(qconf_EXTRA_LIBS)
liblxdialog_a_CPPFLAGS = $(AM_CPPFLAGS) \
-DCURSES_LOC='"${CURSES_LOC}"' \
$(GETTEXT)
+liblxdialog_a_CFLAGS = $(AM_CFLAGS) $(werror_CFLAGS)
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_LDFLAGS = -release $(KCONFIGPARSER_LIB_VERSION)
kconfig_includedir = $(includedir)/kconfig