[gnome-keyring] Look for both dlopen and dlsym when configuring
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring] Look for both dlopen and dlsym when configuring
- Date: Wed, 18 May 2016 12:51:25 +0000 (UTC)
commit 4e6eca91e13edcfda811f89c994ee723744afed6
Author: Iain Lane <iain orangesquash org uk>
Date: Tue May 10 12:11:31 2016 +0100
Look for both dlopen and dlsym when configuring
We use both, and they may not both be exposed by libc but by libdl
instead.
https://bugzilla.gnome.org/show_bug.cgi?id=766221
configure.ac | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 629f545..9060929 100644
--- a/configure.ac
+++ b/configure.ac
@@ -263,11 +263,26 @@ fi
# --------------------------------------------------------------------
# Find DL functionality
-AC_CHECK_LIB(c, dlopen, DL_LIBS="",
- AC_CHECK_LIB(dl, dlopen, DL_LIBS="-ldl",
- AC_MSG_ERROR([Could not find a library with the dlopen function])
- )
-)
+dnl *** dlopen() and dlsym() in system libraries
+AS_IF([ test -z "$HAVE_DL"], [
+ AC_CHECK_FUNC(dlopen,
+ [AC_CHECK_FUNC(dlsym,
+ [HAVE_DL=c],[])],
+ [])
+])
+
+dnl *** dlopen() and dlsym() in libdl
+AS_IF([ test -z "$HAVE_DL"], [
+ AC_CHECK_LIB(dl, dlopen,
+ [AC_CHECK_LIB(dl, dlsym,
+ [DL_LIBS=-ldl
+ HAVE_DL=dl],[])],
+ [])
+])
+
+AS_IF([ test -z "$HAVE_DL"], [
+ AC_MSG_ERROR([Could not find a library with the dlopen and dlsym functions])
+])
AC_SUBST(DL_LIBS)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]