summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 736260e)
raw | patch | inline | side by side (parent: 736260e)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 14 Aug 2015 22:15:59 +0000 (00:15 +0200) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Tue, 8 Sep 2015 05:27:22 +0000 (07:27 +0200) |
I noticed various downstream distros patch out -Werror
for one reason or another. This adds an option to make that
easier. It is still on by default.
for one reason or another. This adds an option to make that
easier. It is still on by default.
configure.ac | patch | blob | history | |
src/Makefile.am | patch | blob | history | |
src/daemon/Makefile.am | patch | blob | history | |
src/libcollectdclient/Makefile.am | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index 6f65df1ebb0685f6946de492f0ded694e50aec0b..09e87e4b6fe8540c854babd97f567f3686d2c731 100644 (file)
--- a/configure.ac
+++ b/configure.ac
AC_CONFIG_FILES(src/libcollectdclient/collectd/lcc_features.h)
+AM_CFLAGS="-Wall"
+AC_ARG_ENABLE([werror],
+ AS_HELP_STRING(
+ [--disable-werror],
+ [Disable -Werror @<:@default=no@:>@)]
+ )
+)
+
+if test "x$enable_werror" != "xno"
+then
+ AM_CFLAGS="$AM_CFLAGS -Werror"
+fi
+AC_SUBST([AM_CFLAGS])
+
AC_CONFIG_FILES([Makefile src/Makefile src/daemon/Makefile src/collectd.conf src/libcollectdclient/Makefile src/libcollectdclient/libcollectdclient.pc src/liboconfig/Makefile bindings/Makefile bindings/java/Makefile])
AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
index 9493c246239e01aff76354e2bd9e5ffb8039452d..adadbbd27bef87c333bb8cdb7f0ca005c4aac15c 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
PLUGIN_LDFLAGS = -module -avoid-version -export-symbols-regex '\<module_register\>'
-if COMPILER_IS_GCC
-AM_CFLAGS = -Wall -Werror
-endif
-
AM_CPPFLAGS = -I$(srcdir)/daemon
AM_CPPFLAGS += -DPREFIX='"${prefix}"'
AM_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"'
diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am
index cd53a7bf205d48333f97d272c7f2e58d20db0628..4e383413589b6f9ef43e5a50fa91ed8f6a3bdf0c 100644 (file)
--- a/src/daemon/Makefile.am
+++ b/src/daemon/Makefile.am
-if COMPILER_IS_GCC
-AM_CFLAGS = -Wall -Werror
-endif
-
AM_CPPFLAGS = -I$(top_srcdir)/src
AM_CPPFLAGS += -DPREFIX='"${prefix}"'
AM_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"'
index 5abee2f1a44f1fd0abdce185c1cb390ffd00aeab..e81a59438394960ab8cb6b4b0c0e40a30ca6befa 100644 (file)
AUTOMAKE_OPTIONS = foreign no-dependencies
-if COMPILER_IS_GCC
-AM_CFLAGS = -Wall -Werror
-endif
-
pkginclude_HEADERS = collectd/client.h collectd/network.h collectd/network_buffer.h collectd/lcc_features.h
lib_LTLIBRARIES = libcollectdclient.la
nodist_pkgconfig_DATA = libcollectdclient.pc