]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Restored configure test for -Wno-empty-body.
authorBart Van Assche <bvanassche@acm.org>
Sat, 4 Jul 2009 12:17:07 +0000 (12:17 +0000)
committerBart Van Assche <bvanassche@acm.org>
Sat, 4 Jul 2009 12:17:07 +0000 (12:17 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10406

configure.in

index b584f193777ccc39785e7167a65717576e01d541..c982457c46a9a0f3ea08d32a55849ae53446a0bb 100644 (file)
@@ -1196,6 +1196,29 @@ if test x$declaration_after_statement = xyes; then
 fi
 
 
+# does this compiler support -Wno-empty-body ?
+
+AC_MSG_CHECKING([if gcc accepts -Wno-empty-body])
+
+safe_CFLAGS=$CFLAGS
+CFLAGS="-Wno-empty-body"
+
+AC_TRY_COMPILE(
+[ ],
+[
+  return 0;
+],
+[
+AC_SUBST([FLAG_W_NO_EMPTY_BODY], [-Wno-empty-body])
+AC_MSG_RESULT([yes])
+],
+[
+AC_SUBST([FLAG_W_NO_EMPTY_BODY], [])
+AC_MSG_RESULT([no])
+])
+CFLAGS=$safe_CFLAGS
+
+
 # does this compiler support -Wno-format-zero-length ?
 
 AC_MSG_CHECKING([if gcc accepts -Wno-format-zero-length])