Added configure tests for the compiler flags -Wno-nonnull and -Wno-overflow.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11757 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/configure.in b/configure.in
index f3fe575..e95b4d7 100644
--- a/configure.in
+++ b/configure.in
@@ -1282,6 +1282,52 @@
 CFLAGS=$safe_CFLAGS
 
 
+# does this compiler support -Wno-nonnull ?
+
+AC_MSG_CHECKING([if gcc accepts -Wno-nonnull])
+
+safe_CFLAGS=$CFLAGS
+CFLAGS="-Wno-nonnull"
+
+AC_TRY_COMPILE(
+[ ],
+[
+  return 0;
+],
+[
+AC_SUBST([FLAG_W_NO_NONNULL], [-Wno-nonnull])
+AC_MSG_RESULT([yes])
+],
+[
+AC_SUBST([FLAG_W_NO_NONNULL], [])
+AC_MSG_RESULT([no])
+])
+CFLAGS=$safe_CFLAGS
+
+
+# does this compiler support -Wno-overflow ?
+
+AC_MSG_CHECKING([if gcc accepts -Wno-overflow])
+
+safe_CFLAGS=$CFLAGS
+CFLAGS="-Wno-overflow"
+
+AC_TRY_COMPILE(
+[ ],
+[
+  return 0;
+],
+[
+AC_SUBST([FLAG_W_NO_OVERFLOW], [-Wno-overflow])
+AC_MSG_RESULT([yes])
+],
+[
+AC_SUBST([FLAG_W_NO_OVERFLOW], [])
+AC_MSG_RESULT([no])
+])
+CFLAGS=$safe_CFLAGS
+
+
 # does this compiler support -Wno-uninitialized ?
 
 AC_MSG_CHECKING([if gcc accepts -Wno-uninitialized])