From: Steffan Karger Date: Thu, 29 May 2014 10:39:07 +0000 (+0200) Subject: Add (default disabled) --enable-werror option to configure X-Git-Tag: v2.4_alpha1~417 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51194ffd1983f67b204348686f0ea358f29fe550;p=thirdparty%2Fopenvpn.git 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 Acked-by: Gert Doering 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 --- diff --git a/configure.ac b/configure.ac index ea35d738d..107331290 100644 --- a/configure.ac +++ b/configure.ac @@ -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])