aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-28 21:31:00 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-28 21:31:00 +0000
commit5ca2bc32537ac4fd086d3ae1f62f37344ebcc66d (patch)
tree0febf5617c2e83f8e122673ee15d9b2e19edf087 /configure.ac
parentf1d65bfb7d65264ef398c5d4acf8f7615ad51ef6 (diff)
Apparently some builds of gcc don't have declaration-after-statement.
This checks for it in configure, and only uses it if it's available. If it's wrong, somebody please yell at me and tell me why. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72539 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 936dc54f4..4c4a48c7a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -326,6 +326,17 @@ CFLAGS="${saved_CFLAGS}"
AC_SUBST(GC_CFLAGS)
AC_SUBST(GC_LDFLAGS)
+AC_MSG_CHECKING(for -Wdeclaration-after-statement support)
+if $(${CC} -Wdeclaration-after-statement -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
+ AC_MSG_RESULT(yes)
+ AST_DECLARATION_AFTER_STATEMENT=-Wdeclaration-after-statement
+else
+ AC_MSG_RESULT(no)
+ AST_DECLARATION_AFTER_STATEMENT=
+fi
+AC_SUBST(AST_DECLARATION_AFTER_STATEMENT)
+
+
AC_MSG_CHECKING(for sysinfo)
AC_LINK_IFELSE(
AC_LANG_PROGRAM([#include <sys/sysinfo.h>],