From f54bb77a6508b307a5b711730fa83d75bd80bcd4 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 15 Oct 2019 13:55:04 +0300 Subject: Add configure option to build with -Werror -Werror is a bit tricky as it'll cause autoconf tests fail left and right if it's just passed normally via CFLAGS, so we need to sneak it in by some other means. Note that while developers should always enable this, -Werror must never ever be a default as it'll eventually just cause bogus build failures when old releases get built with newer compilers. (cherry picked from commit a84a33816ac4a791da184c81fbc40aa110c3c7ac) --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure.ac b/configure.ac index cf6674c58..e40f71a44 100644 --- a/configure.ac +++ b/configure.ac @@ -52,6 +52,8 @@ if test "$GCC" = yes; then done RPMCFLAGS="-D_REENTRANT -Wall -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes $RPMCFLAGS" fi +AC_ARG_ENABLE(werror, [AS_HELP_STRING([--enable-werror], [build with -Werror])], + [RPMCFLAGS="$RPMCFLAGS -Werror"], []) AC_SUBST(RPMCFLAGS) AC_SYS_LARGEFILE -- cgit v1.2.1