From 8713e0457b9ce2993d04d33e9eae715826850269 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 24 Dec 2013 18:43:42 +0000 Subject: Some warning options are, for reasons not entirely obvious to me, not supported by some versions of g++ even though the corresponding version of gcc supports them. Other versions of g++, and clang, support them. Check, before adding a -W option for C++, whether the compiler supports it; that check must be done with -Werror, at least with g++, in order to get a non-zero exit status from the compiler. svn path=/trunk/; revision=54447 --- configure.ac | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 8fec259059..2505ac1a27 100644 --- a/configure.ac +++ b/configure.ac @@ -750,11 +750,17 @@ fi AC_SUBST(HAVE_OSX_PACKAGING) # -# Some compilers have to be told to fail on unknown warning errors; +# Some compilers have to be told to fail when passed an unknown -W flag; # make sure we do that. # AC_WIRESHARK_CHECK_UNKNOWN_WARNING_OPTION_ERROR +# +# Some C++ compilers have to be told to fail when passed a -W flag that +# they don't think should apply to C++; make sure we do that. +# +AC_WIRESHARK_CHECK_NON_CXX_WARNING_OPTION_ERROR + # # Try to add some additional gcc checks to CFLAGS # @@ -801,7 +807,7 @@ AC_ARG_ENABLE(extra-gcc-checks, # # All the registration functions block these for now. # - AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wmissing-prototypes, C) + AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wmissing-prototypes) AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wmissing-declarations) # # A bunch of "that might not work on SPARC" code blocks -- cgit v1.2.3