[svn-commits] qwell: trunk r72539 - in /trunk: Makefile configure configure.ac makeopts.in

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jun 28 16:31:01 CDT 2007


Author: qwell
Date: Thu Jun 28 16:31:00 2007
New Revision: 72539

URL: http://svn.digium.com/view/asterisk?view=rev&rev=72539
Log:
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.

Modified:
    trunk/Makefile
    trunk/configure
    trunk/configure.ac
    trunk/makeopts.in

Modified: trunk/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/Makefile?view=diff&rev=72539&r1=72538&r2=72539
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Thu Jun 28 16:31:00 2007
@@ -193,7 +193,7 @@
 ASTCFLAGS+=-include $(ASTTOPDIR)/include/asterisk/autoconfig.h
 
 ifeq ($(AST_DEVMODE),yes)
-  ASTCFLAGS+=-Werror -Wunused -Wundef -Wdeclaration-after-statement
+  ASTCFLAGS+=-Werror -Wunused -Wundef $(AST_DECLARATION_AFTER_STATEMENT)
 endif
 
 ifneq ($(findstring BSD,$(OSARCH)),)

Modified: trunk/configure
URL: http://svn.digium.com/view/asterisk/trunk/configure?view=diff&rev=72539&r1=72538&r2=72539
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Thu Jun 28 16:31:00 2007
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 69703 .
+# From configure.ac Revision: 71732 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61.
 #
@@ -902,6 +902,7 @@
 POW_LIB
 GC_CFLAGS
 GC_LDFLAGS
+AST_DECLARATION_AFTER_STATEMENT
 GSM_INTERNAL
 KDEINIT
 KDEDIR
@@ -15669,6 +15670,20 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 CFLAGS="${saved_CFLAGS}"
+
+
+
+{ echo "$as_me:$LINENO: checking for -Wdeclaration-after-statement support" >&5
+echo $ECHO_N "checking for -Wdeclaration-after-statement support... $ECHO_C" >&6; }
+if $(${CC} -Wdeclaration-after-statement -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
+	{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	AST_DECLARATION_AFTER_STATEMENT=-Wdeclaration-after-statement
+else
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+	AST_DECLARATION_AFTER_STATEMENT=
+fi
 
 
 
@@ -36831,6 +36846,7 @@
 POW_LIB!$POW_LIB$ac_delim
 GC_CFLAGS!$GC_CFLAGS$ac_delim
 GC_LDFLAGS!$GC_LDFLAGS$ac_delim
+AST_DECLARATION_AFTER_STATEMENT!$AST_DECLARATION_AFTER_STATEMENT$ac_delim
 GSM_INTERNAL!$GSM_INTERNAL$ac_delim
 KDEINIT!$KDEINIT$ac_delim
 KDEDIR!$KDEDIR$ac_delim
@@ -36838,7 +36854,6 @@
 PG_CONFIG!$PG_CONFIG$ac_delim
 PTLIB_CONFIG!$PTLIB_CONFIG$ac_delim
 PWLIBDIR!$PWLIBDIR$ac_delim
-PWLIB_INCDIR!$PWLIB_INCDIR$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -36880,6 +36895,7 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+PWLIB_INCDIR!$PWLIB_INCDIR$ac_delim
 PWLIB_LIBDIR!$PWLIB_LIBDIR$ac_delim
 PWLIB_PLATFORM!$PWLIB_PLATFORM$ac_delim
 OPENH323DIR!$OPENH323DIR$ac_delim
@@ -36903,7 +36919,7 @@
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 22; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

Modified: trunk/configure.ac
URL: http://svn.digium.com/view/asterisk/trunk/configure.ac?view=diff&rev=72539&r1=72538&r2=72539
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Thu Jun 28 16:31:00 2007
@@ -325,6 +325,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(

Modified: trunk/makeopts.in
URL: http://svn.digium.com/view/asterisk/trunk/makeopts.in?view=diff&rev=72539&r1=72538&r2=72539
==============================================================================
--- trunk/makeopts.in (original)
+++ trunk/makeopts.in Thu Jun 28 16:31:00 2007
@@ -62,6 +62,8 @@
 
 AST_DEVMODE=@AST_DEVMODE@
 
+AST_DECLARATION_AFTER_STATEMENT=@AST_DECLARATION_AFTER_STATEMENT@
+
 ASOUND_INCLUDE=@ALSA_INCLUDE@
 ASOUND_LIB=@ALSA_LIB@
 




More information about the svn-commits mailing list