diff options
author | Jenkins2 <jenkins2@gerrit.asterisk.org> | 2018-03-19 10:02:14 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2018-03-19 10:02:14 -0500 |
commit | a12976e20ac5424ab2ad2a2cf7a47970542ee43c (patch) | |
tree | 7c1f1cc232a39e01e215739683d2a7bc093eb069 /configure | |
parent | c29b5389c546d08d9f8426f0c176b45a19a0b6d8 (diff) | |
parent | 36c8885c66fe4e40692ae1534651a03aac6a2ae8 (diff) |
Merge "BuildSystem: Enable dladdr on non-Linux platforms like FreeBSD."
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -19463,6 +19463,41 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=${old_LIBS} +# re-check without -ldl +# Non-Linux platforms like FreeBSD and NetBSD do not need a library libdl.so. +if test "${PBX_DLADDR}" = "0"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dladdr in dlfcn.h without -ldl" >&5 +$as_echo_n "checking for dladdr in dlfcn.h without -ldl... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _GNU_SOURCE 1 +#include <dlfcn.h> +int +main () +{ +dladdr((void *)0, (void *)0) + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + PBX_DLADDR=1 + + +$as_echo "#define HAVE_DLADDR 1" >>confdefs.h + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + # PKGCONFIG is used in later tests |