summaryrefslogtreecommitdiffhomepage
path: root/configure.ac
diff options
context:
space:
mode:
authorMukund Sivaraman <muks@banu.com>2009-09-23 07:36:34 +0530
committerMukund Sivaraman <muks@banu.com>2009-09-27 08:09:23 +0530
commit00931dfc6870e4a5e2768e39589e19539aa00047 (patch)
tree9eb5060df71f7cbf517f007a4f4a2a2fe1c76dfc /configure.ac
parent3f0ccdef3cfd4d03c79bbead6c8b23bad87e3eee (diff)
build: Add -Werror to CFLAGS during maintainer mode builds
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 033d674..2d8baaa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -201,7 +201,11 @@ AC_CHECK_FUNCS([strlcpy strlcat])
dnl Enable extra warnings
DESIRED_FLAGS="-fdiagnostics-show-option -Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wfloat-equal -Wundef -Wformat=2 -Wlogical-op -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Waggregate-return -Winit-self -Wpacked --std=c89 -ansi -pedantic -Wc++-compat -Wno-long-long -Wno-overlength-strings -Wdeclaration-after-statement -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-qual -Wcast-align -Wwrite-strings -Wp,-D_FORTIFY_SOURCE=2 -fno-common"
-for flag in $DESIRED_FLAGS ; do
+if test -z "${MAINTAINER_MODE_TRUE}"; then
+ DESIRED_FLAGS="-Werror $DESIRED_FLAGS"
+fi
+
+for flag in $DESIRED_FLAGS; do
AS_COMPILER_FLAG([$flag], [CFLAGS="$CFLAGS $flag"])
done