m4: fix detection of supported "-Wxxx" flags with clang
authorDavid Fuhrmann <dfuhrmann@videolan.org>
Fri, 10 Oct 2014 09:47:10 +0000 (11:47 +0200)
committerDavid Fuhrmann <dfuhrmann@videolan.org>
Sat, 18 Oct 2014 07:15:00 +0000 (09:15 +0200)
Clang does not fail, but only prints a warning by default for unknown
-W options.

m4/flags.m4

index 920fd45..7dc19b7 100644 (file)
@@ -13,7 +13,7 @@ AC_DEFUN([RDC_PROG_CC_FLAGS_IFELSE],
   CFLAGS_save="${CFLAGS}"
   as_ac_var=`echo "ac_cv_prog_cc_flags_$1" | $as_tr_sh`
   AC_CACHE_CHECK([if $CC accepts $1], [$as_ac_var], [
-    CFLAGS="${CFLAGS} $1"
+    CFLAGS="${CFLAGS} -Werror $1"
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
       eval "$as_ac_var=yes"
     ],[