summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorSteffan Karger <steffan@karger.me>2014-05-29 12:39:07 +0200
committerGert Doering <gert@greenie.muc.de>2014-06-01 21:12:33 +0200
commit51194ffd1983f67b204348686f0ea358f29fe550 (patch)
treee062d6e984e5eedc0ba00422d66c4a86948e2fd5 /configure.ac
parent55af8e9a4138db0c9de6f6e29dec9839231ec798 (diff)
downloadopenvpn-51194ffd1983f67b204348686f0ea358f29fe550.tar.gz
openvpn-51194ffd1983f67b204348686f0ea358f29fe550.tar.xz
openvpn-51194ffd1983f67b204348686f0ea358f29fe550.zip
Add (default disabled) --enable-werror option to configure
Useful for example during development or automated builds, to make the build error out if new warnings are introduced. Signed-off-by: Steffan Karger <steffan@karger.me> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <1401359947-31144-1-git-send-email-steffan@karger.me> URL: http://article.gmane.org/gmane.network.openvpn.devel/8747 Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ea35d73..1073312 100644
--- a/configure.ac
+++ b/configure.ac
@@ -244,6 +244,13 @@ AC_ARG_ENABLE(
)
AC_ARG_ENABLE(
+ [werror],
+ [AS_HELP_STRING([--enable-werror], [promote compiler warnings to errors, will cause builds to fail is the compiler issues warnings (debugging option) @<:@default=no@:>@])],
+ ,
+ [enable_werror="no"]
+)
+
+AC_ARG_ENABLE(
[strict-options],
[AS_HELP_STRING([--enable-strict-options], [enable strict options check between peers (debugging option) @<:@default=no@:>@])],
,
@@ -1137,6 +1144,9 @@ fi
if test "${enable_strict}" = "yes"; then
CFLAGS="${CFLAGS} -Wall -Wno-unused-parameter -Wno-unused-function"
fi
+if test "${enable_werror}" = "yes"; then
+ CFLAGS="${CFLAGS} -Werror"
+fi
if test "${WIN32}" = "yes"; then
test -z "${MAN2HTML}" && AC_MSG_ERROR([man2html is required for win32])