[Pkg-voip-commits] r9181 - /asterisk/trunk/debian/patches/menuselect_weakref

tzafrir at alioth.debian.org tzafrir at alioth.debian.org
Wed Jul 27 22:04:25 UTC 2011


Author: tzafrir
Date: Wed Jul 27 22:04:24 2011
New Revision: 9181

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=9181
Log:
Patch menuselect_weakref: fixes '<use>' attribure

Fixes detection of 'weakref' and hence makes '<use>' different from
'<depend>' once again.

Added:
    asterisk/trunk/debian/patches/menuselect_weakref

Added: asterisk/trunk/debian/patches/menuselect_weakref
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/menuselect_weakref?rev=9181&op=file
==============================================================================
--- asterisk/trunk/debian/patches/menuselect_weakref (added)
+++ asterisk/trunk/debian/patches/menuselect_weakref Wed Jul 27 22:04:24 2011
@@ -1,0 +1,67 @@
+Bug: https://reviewboard.asterisk.org/r/1330/
+Author: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Description: fix detection of weakref attribute in menuselect
+
+Asterisk relies on weakref symbols for optional dependencies. Their
+detection broke with gcc 4.6. This fixes their detection. Requires
+re-running autoconf in menuselect.
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index 9410608..3517918 100644
+--- a/menuselect/acinclude.m4
++++ b/menuselect/acinclude.m4
+@@ -1,35 +1,20 @@
+ # Helper function to check for gcc attributes.
+-# AST_GCC_ATTRIBUTE([attribute name], [attribute syntax], [attribute scope], [makeopts flag])
++# AST_GCC_TYPE_ATTRIBUTE([attribute name], [attribute extra], [attribute scope])
+ 
+-AC_DEFUN([AST_GCC_ATTRIBUTE],
++AC_DEFUN([AST_GCC_TYPE_ATTRIBUTE],
+ [
+ AC_MSG_CHECKING(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
+ AC_COMPILE_IFELSE(
+-	AC_LANG_PROGRAM([$3 void __attribute__(($1)) *test(void *muffin, ...) {return (void *) 0;}],
++	AC_LANG_PROGRAM([$3 __attribute__(($1 $2)) int muffin;],
+ 			[]),
+ 	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)
+ )
+-else
+-AC_COMPILE_IFELSE(
+-	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"
+ ])
+ 
+diff --git a/configure.ac b/configure.ac
+index d04aeb7..d4472a5 100644
+--- a/menuselect/configure.ac
++++ b/menuselect/configure.ac
+@@ -51,9 +51,8 @@ AC_ARG_ENABLE([debug],
+     esac])
+ AC_SUBST(MENUSELECT_DEBUG)
+ 
+-AST_GCC_ATTRIBUTE(weak_import)
+-AST_GCC_ATTRIBUTE(weakref)
+-AST_GCC_ATTRIBUTE(weak)
++AST_GCC_TYPE_ATTRIBUTE(weak_import)
++AST_GCC_TYPE_ATTRIBUTE(weakref, ("foo"), static)
+ 
+ AC_FUNC_ALLOCA
+ AC_CHECK_FUNCS([asprintf getloadavg setenv strcasestr strndup strnlen strsep unsetenv vasprintf])




More information about the Pkg-voip-commits mailing list