Detect the --dynamic-list flag a bit better
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 16 Jul 2010 05:38:06 +0000 (05:38 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 16 Jul 2010 05:38:06 +0000 (05:38 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276908 65c4cc65-6c06-0410-ace0-fbb531ad65f3

configure
configure.ac

index 717dbc2..3eb7f05 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 276769 .
+# From configure.ac Revision: 276871 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for asterisk trunk.
 #
@@ -18199,7 +18199,12 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 { echo "$as_me:$LINENO: checking for a version of GNU ld that supports the --dynamic-list flag" >&5
 echo $ECHO_N "checking for a version of GNU ld that supports the --dynamic-list flag... $ECHO_C" >&6; }
 old_LDFLAGS=${LDFLAGS}
-LDFLAGS+="-Wl,--dynamic-list,main/asterisk.dynamics"
+cat >conftest.dynamics <<_ACEOF
+{
+       *ast_*;
+};
+_ACEOF
+LDFLAGS="${LDFLAGS} -Wl,--dynamic-list,conftest.dynamics"
 PBX_DYNAMIC_LIST=0
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -18250,6 +18255,7 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 
 LDFLAGS=${old_LDFLAGS}
+rm -f conftest.dynamics
 
 if test "${ac_cv_header_sys_poll_h+set}" = set; then
   { echo "$as_me:$LINENO: checking for sys/poll.h" >&5
index 8d69691..c7fe306 100644 (file)
@@ -482,7 +482,12 @@ AC_LINK_IFELSE(
 
 AC_MSG_CHECKING(for a version of GNU ld that supports the --dynamic-list flag)
 old_LDFLAGS=${LDFLAGS}
-LDFLAGS+="-Wl,--dynamic-list,main/asterisk.dynamics"
+cat >conftest.dynamics <<_ACEOF
+{
+       *ast_*;
+};
+_ACEOF
+LDFLAGS="${LDFLAGS} -Wl,--dynamic-list,conftest.dynamics"
 PBX_DYNAMIC_LIST=0
 AC_LINK_IFELSE(
        AC_LANG_PROGRAM([], []),
@@ -492,6 +497,7 @@ AC_LINK_IFELSE(
 )
 AC_SUBST(PBX_DYNAMIC_LIST)
 LDFLAGS=${old_LDFLAGS}
+rm -f conftest.dynamics
 
 AC_CHECK_HEADER([sys/poll.h], 
    [HAS_POLL=1]