From 0fbd55ee9144e0a8fe66009355d77aa989e5bad1 Mon Sep 17 00:00:00 2001 From: Stefan Pöschel Date: Sat, 1 Dec 2018 14:33:40 +0100 Subject: Use -pedantic, if -Wpedantic not available --- configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 10ace14..e4747ae 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,9 @@ AX_CHECK_COMPILE_FLAG([-Wduplicated-cond], [CXXFLAGS="$CXXFLAGS -Wduplicated-con AX_CHECK_COMPILE_FLAG([-Wduplicated-branches], [CXXFLAGS="$CXXFLAGS -Wduplicated-branches"], [], ["-Werror"]) AX_CHECK_COMPILE_FLAG([-Wlogical-op], [CXXFLAGS="$CXXFLAGS -Wlogical-op"], [], ["-Werror"]) AX_CHECK_COMPILE_FLAG([-Wrestrict], [CXXFLAGS="$CXXFLAGS -Wrestrict"], [], ["-Werror"]) -AX_CHECK_COMPILE_FLAG([-Wpedantic], [CXXFLAGS="$CXXFLAGS -Wpedantic"], [], ["-Werror"]) +AX_CHECK_COMPILE_FLAG([-pedantic], [CXXFLAG_PEDANTIC="-pedantic"], [], ["-Werror"]) +AX_CHECK_COMPILE_FLAG([-Wpedantic], [CXXFLAG_PEDANTIC="-Wpedantic"], [], ["-Werror"]) +CXXFLAGS="$CXXFLAGS $CXXFLAG_PEDANTIC" AX_CHECK_COMPILE_FLAG(["-Wformat=2"], [CXXFLAGS="$CXXFLAGS -Wformat=2"], [], ["-Werror"]) AC_LANG_POP([C++]) -- cgit v1.2.3