[asterisk-commits] tilghman: trunk r276731 - in /trunk: ./ autoconf/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 15 13:44:25 CDT 2010


Author: tilghman
Date: Thu Jul 15 13:44:20 2010
New Revision: 276731

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=276731
Log:
Fix linking asterisk on CentOS 5, which is using gcc 4.1.1.  Gcc 4.1.2 has the real fix.

Review: https://reviewboard.asterisk.org/r/790/

Modified:
    trunk/autoconf/ast_gcc_attribute.m4
    trunk/configure
    trunk/configure.ac
    trunk/main/Makefile
    trunk/makeopts.in

Modified: trunk/autoconf/ast_gcc_attribute.m4
URL: http://svnview.digium.com/svn/asterisk/trunk/autoconf/ast_gcc_attribute.m4?view=diff&rev=276731&r1=276730&r2=276731
==============================================================================
--- trunk/autoconf/ast_gcc_attribute.m4 (original)
+++ trunk/autoconf/ast_gcc_attribute.m4 Thu Jul 15 13:44:20 2010
@@ -1,11 +1,12 @@
 # Helper function to check for gcc attributes.
-# AST_GCC_ATTRIBUTE([attribute name], [attribute syntax], [attribute scope])
+# AST_GCC_ATTRIBUTE([attribute name], [attribute syntax], [attribute scope], [makeopts flag])
 
 AC_DEFUN([AST_GCC_ATTRIBUTE],
 [
 AC_MSG_CHECKING(for compiler 'attribute $1' support)
 saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
+m4_ifval([$4],$4=0)
 
 if test "x$2" = "x"
 then
@@ -13,6 +14,7 @@
 	AC_LANG_PROGRAM([$3 void __attribute__(($1)) *test(void *muffin, ...) {return (void *) 0;}],
 			[]),
 	AC_MSG_RESULT(yes)
+	m4_ifval([$4],$4=1)
 	AC_DEFINE_UNQUOTED([HAVE_ATTRIBUTE_$1], 1, [Define to 1 if your GCC C compiler supports the '$1' attribute.]),
 	AC_MSG_RESULT(no)
 )
@@ -21,11 +23,13 @@
 	AC_LANG_PROGRAM([$3 void __attribute__(($2)) *test(void *muffin, ...) {return (void *) 0;}],
 			[]),
 	AC_MSG_RESULT(yes)
+	m4_ifval([$4],$4=1)
 	AC_DEFINE_UNQUOTED([HAVE_ATTRIBUTE_$1], 1, [Define to 1 if your GCC C compiler supports the '$1' attribute.]),
 	AC_MSG_RESULT(no)
 )
 fi
 
+m4_ifval([$4],AC_SUBST($4))
 CFLAGS="$saved_CFLAGS"
 ]
 )

Modified: trunk/configure.ac
URL: http://svnview.digium.com/svn/asterisk/trunk/configure.ac?view=diff&rev=276731&r1=276730&r2=276731
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Thu Jul 15 13:44:20 2010
@@ -703,8 +703,8 @@
 AST_GCC_ATTRIBUTE(deprecated)
 AST_GCC_ATTRIBUTE(sentinel)
 AST_GCC_ATTRIBUTE(warn_unused_result)
-AST_GCC_ATTRIBUTE(weakref, [weakref("foo")], static)
-AST_GCC_ATTRIBUTE(weak_import)
+AST_GCC_ATTRIBUTE(weak_import, [], [], PBX_WEAKREF)
+AST_GCC_ATTRIBUTE(weakref, [weakref("foo")], static, PBX_WEAKREF)
 
 AC_MSG_CHECKING(for -ffunction-sections support)
 saved_CFLAGS="${CFLAGS}"

Modified: trunk/main/Makefile
URL: http://svnview.digium.com/svn/asterisk/trunk/main/Makefile?view=diff&rev=276731&r1=276730&r2=276731
==============================================================================
--- trunk/main/Makefile (original)
+++ trunk/main/Makefile Thu Jul 15 13:44:20 2010
@@ -26,6 +26,9 @@
 # otherwise modules will not have them available if none of the static
 # objects use it.
 OBJS+=stdtime/localtime.o
+ifneq ($(WEAKREF),1:1)
+OBJS+=../res/res_adsi.o
+endif
 
 AST_LIBS += $(OPENSSL_LIB)
 AST_LIBS += $(BKTR_LIB)

Modified: trunk/makeopts.in
URL: http://svnview.digium.com/svn/asterisk/trunk/makeopts.in?view=diff&rev=276731&r1=276730&r2=276731
==============================================================================
--- trunk/makeopts.in (original)
+++ trunk/makeopts.in Thu Jul 15 13:44:20 2010
@@ -57,6 +57,7 @@
 CONFIG_LDFLAGS=@CONFIG_LDFLAGS@
 
 GNU_LD=@GNU_LD@
+WEAKREF=@PBX_WEAKREF@
 
 prefix = @prefix@
 exec_prefix = @exec_prefix@




More information about the asterisk-commits mailing list