From 123e0536038e8838b3987fd2c393df9e5da7bf17 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 31 May 2009 11:22:58 +0000 Subject: [PATCH] Added test that checks whether the compiler supports -Wno-empty-body. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10176 --- configure.in | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/configure.in b/configure.in index e6657df6c2..a455bc76fd 100644 --- a/configure.in +++ b/configure.in @@ -1212,6 +1212,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]) -- 2.47.3