clang, as opposed to gcc, does not terminate with a non-zero return code
in case an unrecognised command line option is encountered. configure.ac
however was assuming just that which led to compile time warnings later on.
Add -Werror to the configure bits to make clang behave like gcc in this
regard. Fixes BZ #348565.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15323 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/configure.ac b/configure.ac
index d327e6e..edc57d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1706,7 +1706,7 @@
 AC_DEFUN([AC_GCC_WARNING_SUBST_NO],[
   AC_MSG_CHECKING([if gcc accepts -W$1])
   safe_CFLAGS=$CFLAGS
-  CFLAGS="-W$1"
+  CFLAGS="-W$1 -Werror"
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[;]])], [
   AC_SUBST([$2], [-Wno-$1])
   AC_MSG_RESULT([yes])], [
@@ -1720,7 +1720,7 @@
 AC_DEFUN([AC_GCC_WARNING_SUBST],[
   AC_MSG_CHECKING([if gcc accepts -W$1])
   safe_CFLAGS=$CFLAGS
-  CFLAGS="-W$1"
+  CFLAGS="-W$1 -Werror"
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[;]])], [
   AC_SUBST([$2], [-W$1])
   AC_MSG_RESULT([yes])], [