From 812fe29bff42cf7dbd07e0becc55b2ada340dd97 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 24 Oct 2017 18:42:37 +0200 Subject: [PATCH] build: New configure option --enable-werror * configure.ac: Implement that option. -- This can be used as a workaround in case of bogus autoconf tests. GnuPG-bug-id: 2423 Signed-off-by: Werner Koch --- configure.ac | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/configure.ac b/configure.ac index 1f933a729..551c970b3 100644 --- a/configure.ac +++ b/configure.ac @@ -1665,6 +1665,17 @@ AC_ARG_ENABLE(optimization, CFLAGS=`echo $CFLAGS | sed s/-O[[1-9]]\ /-O0\ /g` fi]) +# +# Add -Werror to CFLAGS. This hack can be used to avoid problems with +# misbehaving autoconf tests in case the user supplied -Werror. +# +AC_ARG_ENABLE(werror, + AC_HELP_STRING([--enable-werror], + [append -Werror to CFLAGS]), + [if test $enableval = yes ; then + CFLAGS="$CFLAGS -Werror" + fi]) + # # Configure option --enable-all-tests #