Skip to content

Commit

Permalink
Make building with -Werror optional.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rubenk authored and Marc Fournier committed Sep 8, 2015
1 parent 736260e commit 71e07cf
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
14 changes: 14 additions & 0 deletions configure.ac
Expand Up @@ -5915,6 +5915,20 @@ AC_SUBST(LCC_VERSION_STRING)

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

Expand Down
4 changes: 0 additions & 4 deletions src/Makefile.am
Expand Up @@ -6,10 +6,6 @@ SUBDIRS += daemon

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"'
Expand Down
4 changes: 0 additions & 4 deletions src/daemon/Makefile.am
@@ -1,7 +1,3 @@
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"'
Expand Down
4 changes: 0 additions & 4 deletions src/libcollectdclient/Makefile.am
@@ -1,9 +1,5 @@
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
Expand Down

0 comments on commit 71e07cf

Please sign in to comment.