From aa9584c1cff4b1ea799b6d1013230eaf7a7aa4e5 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sat, 25 Jul 2015 16:05:56 -0700 Subject: [PATCH] Add --enable-werror to configure --- babeld/Makefile.am | 2 +- bgpd/Makefile.am | 2 +- buildtest.sh | 2 +- configure.ac | 7 +++++++ isisd/Makefile.am | 2 +- lib/Makefile.am | 1 + ospf6d/Makefile.am | 2 +- ospfclient/Makefile.am | 1 + ospfd/Makefile.am | 1 + ripd/Makefile.am | 2 +- ripngd/Makefile.am | 2 +- vtysh/Makefile.am | 2 +- watchquagga/Makefile.am | 2 +- zebra/Makefile.am | 2 +- 14 files changed, 20 insertions(+), 10 deletions(-) diff --git a/babeld/Makefile.am b/babeld/Makefile.am index af1201a714..ad6a33bb79 100644 --- a/babeld/Makefile.am +++ b/babeld/Makefile.am @@ -4,7 +4,7 @@ INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir) DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" INSTALL_SDATA=@INSTALL@ -m 600 -AM_CFLAGS = $(PICFLAGS) +AM_CFLAGS = $(PICFLAGS) $(WERROR) AM_LDFLAGS = $(PILDFLAGS) noinst_LIBRARIES = libbabel.a diff --git a/bgpd/Makefile.am b/bgpd/Makefile.am index e91e2aa31b..7fdaa17957 100644 --- a/bgpd/Makefile.am +++ b/bgpd/Makefile.am @@ -4,7 +4,7 @@ INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir) DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" INSTALL_SDATA=@INSTALL@ -m 600 -AM_CFLAGS = $(PICFLAGS) +AM_CFLAGS = $(PICFLAGS) $(WERROR) AM_LDFLAGS = $(PILDFLAGS) noinst_LIBRARIES = libbgp.a diff --git a/buildtest.sh b/buildtest.sh index de638f5625..b5c9360f8b 100755 --- a/buildtest.sh +++ b/buildtest.sh @@ -4,7 +4,7 @@ # builds some git commit of Quagga in some different configurations # usage: buildtest.sh [commit [configurations...]] -basecfg="--prefix=/usr --enable-user=quagga --enable-group=quagga --enable-vty-group=quagga --enable-configfile-mask=0660 --enable-logfile-mask=0640 --enable-vtysh --sysconfdir=/etc/quagga --enable-exampledir=/etc/quagga/samples --localstatedir=/var/run/quagga --libdir=/usr/lib64/quagga --enable-ipv6 --enable-ripngd --enable-ospf6d --enable-rtadv --disable-static --enable-isisd --enable-multipath=0 --enable-babeld" +basecfg="--prefix=/usr --enable-user=quagga --enable-group=quagga --enable-vty-group=quagga --enable-configfile-mask=0660 --enable-logfile-mask=0640 --enable-vtysh --sysconfdir=/etc/quagga --enable-exampledir=/etc/quagga/samples --localstatedir=/var/run/quagga --libdir=/usr/lib64/quagga --enable-ipv6 --enable-ripngd --enable-ospf6d --enable-rtadv --disable-static --enable-isisd --enable-multipath=0 --enable-babeld --enable-werror" configs_base="gcc|$basecfg" diff --git a/configure.ac b/configure.ac index 309604eb30..a2cd6ad2f8 100755 --- a/configure.ac +++ b/configure.ac @@ -166,6 +166,11 @@ else AC_MSG_RESULT([CFLAGS supplied by user]) fi +if test x"${enable_werror}" = x"yes" ; then + WERROR="-Werror" +fi +AC_SUBST(WERROR) + dnl -------------- dnl Check programs dnl -------------- @@ -293,6 +298,8 @@ AC_ARG_ENABLE(pcreposix, [ --enable-pcreposix enable using PCRE Posix libs for regex functions]) AC_ARG_ENABLE(fpm, [ --enable-fpm enable Forwarding Plane Manager support]) +AC_ARG_ENABLE(werror, + AS_HELP_STRING([--enable-werror], [enable -Werror (recommended for developers only)])) if test x"${enable_gcc_ultra_verbose}" = x"yes" ; then CFLAGS="${CFLAGS} -W -Wcast-qual -Wstrict-prototypes" diff --git a/isisd/Makefile.am b/isisd/Makefile.am index 4e9b2441e0..89f7cd4c12 100644 --- a/isisd/Makefile.am +++ b/isisd/Makefile.am @@ -6,7 +6,7 @@ DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" INSTALL_SDATA=@INSTALL@ -m 600 LIBS = @LIBS@ -AM_CFLAGS = $(PICFLAGS) +AM_CFLAGS = $(PICFLAGS) $(WERROR) AM_LDFLAGS = $(PILDFLAGS) noinst_LIBRARIES = libisis.a diff --git a/lib/Makefile.am b/lib/Makefile.am index 76aedf2c0b..19ae8f96df 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,6 +1,7 @@ ## Process this file with automake to produce Makefile.in. INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib +AM_CFLAGS = $(WERROR) DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" lib_LTLIBRARIES = libzebra.la diff --git a/ospf6d/Makefile.am b/ospf6d/Makefile.am index ec729d899c..12d9864ab8 100644 --- a/ospf6d/Makefile.am +++ b/ospf6d/Makefile.am @@ -4,7 +4,7 @@ INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir) DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" INSTALL_SDATA=@INSTALL@ -m 600 -AM_CFLAGS = $(PICFLAGS) +AM_CFLAGS = $(PICFLAGS) $(WERROR) AM_LDFLAGS = $(PILDFLAGS) noinst_LIBRARIES = libospf6.a diff --git a/ospfclient/Makefile.am b/ospfclient/Makefile.am index 0f37aa9884..ae43816f64 100644 --- a/ospfclient/Makefile.am +++ b/ospfclient/Makefile.am @@ -1,6 +1,7 @@ ## Automake.am for OSPF API client INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib +AM_CFLAGS = $(WERROR) lib_LTLIBRARIES = libospfapiclient.la libospfapiclient_la_LDFLAGS = -version-info 0:0:0 diff --git a/ospfd/Makefile.am b/ospfd/Makefile.am index 8a325ed7d3..3ff1ebfc14 100644 --- a/ospfd/Makefile.am +++ b/ospfd/Makefile.am @@ -1,6 +1,7 @@ ## Process this file with automake to produce Makefile.in. INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib +AM_CFLAGS = $(WERROR) DEFS = @DEFS@ $(LOCAL_OPTS) -DSYSCONFDIR=\"$(sysconfdir)/\" INSTALL_SDATA=@INSTALL@ -m 600 diff --git a/ripd/Makefile.am b/ripd/Makefile.am index b0bc7a8750..c07f665efb 100644 --- a/ripd/Makefile.am +++ b/ripd/Makefile.am @@ -4,7 +4,7 @@ INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir) DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" INSTALL_SDATA=@INSTALL@ -m 600 -AM_CFLAGS = $(PICFLAGS) +AM_CFLAGS = $(PICFLAGS) $(WERROR) AM_LDFLAGS = $(PILDFLAGS) noinst_LIBRARIES = librip.a diff --git a/ripngd/Makefile.am b/ripngd/Makefile.am index de5bebaefc..7e4c1004f2 100644 --- a/ripngd/Makefile.am +++ b/ripngd/Makefile.am @@ -4,7 +4,7 @@ INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir) DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" INSTALL_SDATA=@INSTALL@ -m 600 -AM_CFLAGS = $(PICFLAGS) +AM_CFLAGS = $(PICFLAGS) $(WERROR) AM_LDFLAGS = $(PILDFLAGS) noinst_LIBRARIES = libripng.a diff --git a/vtysh/Makefile.am b/vtysh/Makefile.am index 9652a92e0a..473e830b62 100644 --- a/vtysh/Makefile.am +++ b/vtysh/Makefile.am @@ -5,7 +5,7 @@ DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" LIBS = @LIBS@ @CURSES@ @LIBPAM@ -AM_CFLAGS = $(PICFLAGS) +AM_CFLAGS = $(PICFLAGS) $(WERROR) AM_LDFLAGS = $(PILDFLAGS) bin_PROGRAMS = vtysh diff --git a/watchquagga/Makefile.am b/watchquagga/Makefile.am index badaa5b5d0..5842f99ef9 100644 --- a/watchquagga/Makefile.am +++ b/watchquagga/Makefile.am @@ -3,7 +3,7 @@ INCLUDES = @INCLUDES@ -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib DEFS = @DEFS@ -DSTATEDIR=\"$(localstatedir)/\" -AM_CFLAGS = $(PICFLAGS) +AM_CFLAGS = $(PICFLAGS) $(WERROR) AM_LDFLAGS = $(PILDFLAGS) sbin_PROGRAMS = watchquagga diff --git a/zebra/Makefile.am b/zebra/Makefile.am index a4e6f2c186..1526a9772a 100644 --- a/zebra/Makefile.am +++ b/zebra/Makefile.am @@ -23,7 +23,7 @@ if HAVE_NETLINK othersrc = zebra_fpm_netlink.c endif -AM_CFLAGS = $(PICFLAGS) +AM_CFLAGS = $(PICFLAGS) $(WERROR) AM_LDFLAGS = $(PILDFLAGS) sbin_PROGRAMS = zebra -- 2.39.5