mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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: https://origsvn.digium.com/svn/asterisk/trunk@72539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
11
configure.ac
11
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>],
|
||||
|
Reference in New Issue
Block a user