Browse Source

m4: fix c++ check for -f flags

Both gcc and clang generate warnings for unsupported -f$FLAG by
default, meaning that the previous implementation would consider
unsupported flags as supported (as a warning is not an error that
fails compilation).

The addition of -Werror treats warnings as errors, and will prevent
false-positives in terms of -f$FLAG support.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
pull/55/head
Filip Roséen 9 years ago
committed by Jean-Baptiste Kempf
parent
commit
c1ec873403
  1. 2
      m4/flags.m4

2
m4/flags.m4

@ -48,7 +48,7 @@ AC_DEFUN([RDC_PROG_CXX_FLAGS_IFELSE],
CXXFLAGS_save="${CXXFLAGS}"
as_ac_var=`echo "ac_cv_prog_cxx_flags_$1" | $as_tr_sh`
AC_CACHE_CHECK([if $CXX accepts $1], [$as_ac_var], [
CXXFLAGS="${CXXFLAGS} $1"
CXXFLAGS="${CXXFLAGS} -Werror $1"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
eval "$as_ac_var=yes"
],[

Loading…
Cancel
Save