From 347bdbc8362bf1a5b952acf9b76e36cf91092483 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Tue, 24 Jul 2018 12:38:26 +0200 Subject: [PATCH 2/2] Add an --enable-pedantic option to prevent --enable-debugging to fail on warnings (fixes #24771) --- configure.ac | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b06bdef4..0c52ca97 100644 --- a/configure.ac +++ b/configure.ac @@ -700,7 +700,7 @@ AC_ARG_ENABLE(debugging, [ --enable-debugging enable debuging optimizati if test "z$enable_debugging" = "zyes" ; then enable_debugging=yes LASSO_DEFINES="$LASSO_DEFINES -DLASSO_DEBUG" - CFLAGS="$CFLAGS -O0 -g -Wall -Wextra -Werror" + CFLAGS="$CFLAGS -O0 -g -Wall -Wextra" else enable_debugging=no fi @@ -708,6 +708,22 @@ AM_CONDITIONAL([DEBUGGING],[test "x$enable_debugging" = "xyes"]) AC_MSG_RESULT($enable_debugging) AC_SUBST(DEBUGGING) +dnl Pedantic debug +AC_MSG_CHECKING(for pedantic) +if test "z$enable_pedantic" = "zyes" ; then + enable_pedantic=yes + if test "z$enable_debugging" "!=" "zyes" ; then + LASSO_DEFINES="$LASSO_DEFINES -DLASSO_DEBUG" + CFLAGS="$CFLAGS -O0 -g -Wall -Wextra" + fi + CFLAGS="$CFLAGS -Werror" +else + enable_pedantic=no +fi +AM_CONDITIONAL([PEDANTIC],[test "x$enable_pedantic" = "xyes"]) +AC_MSG_RESULT($enable_pedandic) +AC_SUBST(PEDANTIC) + dnl Profiling AC_MSG_CHECKING(for profiling) AC_ARG_ENABLE(profiling, [ --enable-profiling enable profiling compilation flags (no)]) -- 2.18.0