]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Add (default disabled) --enable-werror option to configure
authorSteffan Karger <steffan@karger.me>
Thu, 29 May 2014 10:39:07 +0000 (12:39 +0200)
committerGert Doering <gert@greenie.muc.de>
Sun, 1 Jun 2014 19:12:33 +0000 (21:12 +0200)
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>
configure.ac

index ea35d738d74c2003eeb1832fd59aebc493bacd9c..107331290a68e0c2fb51c0da74e2c49b1d76cd1c 100644 (file)
@@ -243,6 +243,13 @@ AC_ARG_ENABLE(
        [enable_pedantic="no"]
 )
 
+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])