Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asterisk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
asterisk
Commits
a12976e2
Commit
a12976e2
authored
7 years ago
by
Jenkins2
Committed by
Gerrit Code Review
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "BuildSystem: Enable dladdr on non-Linux platforms like FreeBSD."
parents
c29b5389
36c8885c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configure
+35
-0
35 additions, 0 deletions
configure
configure.ac
+17
-0
17 additions, 0 deletions
configure.ac
with
52 additions
and
0 deletions
configure
+
35
−
0
View file @
a12976e2
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
configure.ac
+
17
−
0
View file @
a12976e2
...
...
@@ -1460,6 +1460,23 @@ AC_LINK_IFELSE(
)
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
AC_MSG_CHECKING(for dladdr in dlfcn.h without -ldl)
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#define _GNU_SOURCE 1
#include <dlfcn.h>],
[dladdr((void *)0, (void *)0)]
)],
AC_MSG_RESULT(yes)
PBX_DLADDR=1
AC_SUBST([PBX_DLADDR])
AC_DEFINE([HAVE_DLADDR], 1, [Define to 1 if your system has the dladdr() GNU extension]),
AC_MSG_RESULT(no)
)
fi
# PKGCONFIG is used in later tests
PKG_PROG_PKG_CONFIG()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment