From 2fc7ea47c3dd484170b68db50e3914f98c55c6a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Sun, 9 Nov 2014 00:11:02 +0100 Subject: [PATCH] Build: Added configure option --enable-werror. The configure option --enable-werror now adds -Werror to the set of WARN flags. --- src/configure.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/configure.in b/src/configure.in index 8e91694d68..c3d565d7e0 100644 --- a/src/configure.in +++ b/src/configure.in @@ -1676,6 +1676,9 @@ OPTIMIZE="${OPTFLAGS-}" AC_ARG_ENABLE(pedantic, MY_DESCR([--enable-pedantic], [enable -pedantic compilation])) +AC_ARG_ENABLE(werror, MY_DESCR([--enable-werror], + [enable -Werror compilation])) + if test "$cflags_is_set" = "no"; then if test "x$with_cdebug" = "xno" ; then CFLAGS=`echo " $CFLAGS " | sed -e 's@ -g @ @g'` @@ -1687,6 +1690,9 @@ if test "$cflags_is_set" = "no"; then AC_SYS_COMPILER_FLAG(-pedantic,pedantic,WARN) fi + if test "x$enable_werror" = "xyes"; then + AC_SYS_COMPILER_FLAG(-Werror,error,WARN) + fi if test "x${GCC-}" = xyes ; then # Do not use -Wall, since that produces a lot of warnings that are not -- GitLab