# Separate out the -Werror flag as some files just cannot be
# compiled with it enabled.
for w in ${build_warnings}; do
+ # GCC does not complain about -Wno-unknown-warning. Invert
+ # and test -Wunknown-warning instead.
+ case $w in
+ -Wno-*)
+ wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
+ *)
+ wtest=$w ;;
+ esac
+
case $w in
-Werr*) WERROR_CFLAGS=-Werror ;;
*)
# Check whether GCC accepts it.
saved_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $w"
+ CFLAGS="$CFLAGS $wtest"
saved_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS $w"
+ CXXFLAGS="$CXXFLAGS $wtest"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */