summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorbart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9>2011-05-15 17:05:36 +0000
committerbart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9>2011-05-15 17:05:36 +0000
commit8e2163128823551966108cb3df1f1c2f7541c6c4 (patch)
tree262c023e0a3c413c74346db265eb1c0e1806ea09 /configure.in
parent9a4fe64bae15a723bb81561debd1c55106355ac3 (diff)
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
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in46
1 files changed, 46 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index f3fe5752..e95b4d7c 100644
--- a/configure.in
+++ b/configure.in
@@ -1282,6 +1282,52 @@ AC_MSG_RESULT([no])
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])