<p>Alexander Traud has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/8490">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">BuildSystem: Enable dladdr on non-Linux platforms like FreeBSD.<br><br>ASTERISK-27641<br><br>Change-Id: I587e8ba0123c70fc10cfd8b0ac3299551f61d84b<br>---<br>M configure<br>M configure.ac<br>2 files changed, 52 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/90/8490/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/configure b/configure<br>index 3442d57..f86b41b 100755<br>--- a/configure<br>+++ b/configure<br>@@ -19129,6 +19129,41 @@<br> conftest$ac_exeext conftest.$ac_ext<br> LIBS=${old_LIBS}<br> <br>+# re-check without -ldl<br>+# Non-Linux platforms like FreeBSD and NetBSD do not need a library libdl.so.<br>+if test "${PBX_DLADDR}" = "0"; then<br>+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dladdr in dlfcn.h without -ldl" >&5<br>+$as_echo_n "checking for dladdr in dlfcn.h without -ldl... " >&6; }<br>+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext<br>+/* end confdefs.h. */<br>+#define _GNU_SOURCE 1<br>+#include <dlfcn.h><br>+int<br>+main ()<br>+{<br>+dladdr((void *)0, (void *)0)<br>+<br>+ ;<br>+ return 0;<br>+}<br>+_ACEOF<br>+if ac_fn_c_try_link "$LINENO"; then :<br>+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5<br>+$as_echo "yes" >&6; }<br>+ PBX_DLADDR=1<br>+<br>+<br>+$as_echo "#define HAVE_DLADDR 1" >>confdefs.h<br>+<br>+else<br>+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5<br>+$as_echo "no" >&6; }<br>+<br>+fi<br>+rm -f core conftest.err conftest.$ac_objext \<br>+ conftest$ac_exeext conftest.$ac_ext<br>+fi<br>+<br> # PKGCONFIG is used in later tests<br> <br> <br>diff --git a/configure.ac b/configure.ac<br>index d9148c0..a72022a 100644<br>--- a/configure.ac<br>+++ b/configure.ac<br>@@ -1405,6 +1405,23 @@<br> )<br> LIBS=${old_LIBS}<br> <br>+# re-check without -ldl<br>+# Non-Linux platforms like FreeBSD and NetBSD do not need a library libdl.so.<br>+if test "${PBX_DLADDR}" = "0"; then<br>+ AC_MSG_CHECKING(for dladdr in dlfcn.h without -ldl)<br>+ AC_LINK_IFELSE(<br>+ [AC_LANG_PROGRAM([#define _GNU_SOURCE 1<br>+#include <dlfcn.h>],<br>+ [dladdr((void *)0, (void *)0)]<br>+ )],<br>+ AC_MSG_RESULT(yes)<br>+ PBX_DLADDR=1<br>+ AC_SUBST([PBX_DLADDR])<br>+ AC_DEFINE([HAVE_DLADDR], 1, [Define to 1 if your system has the dladdr() GNU extension]),<br>+ AC_MSG_RESULT(no)<br>+ )<br>+fi<br>+<br> # PKGCONFIG is used in later tests<br> PKG_PROG_PKG_CONFIG()<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8490">change 8490</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/8490"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I587e8ba0123c70fc10cfd8b0ac3299551f61d84b </div>
<div style="display:none"> Gerrit-Change-Number: 8490 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>