[gnome-keyring/gnome-2-26] Fix linking problem on FreeBSD.



commit 6ddb14eef4368d63ce7055ee52718010a8f8190a
Author: Stef Walter <stef memberwebs com>
Date:   Fri Jun 26 15:13:04 2009 +0000

    Fix linking problem on FreeBSD.
    
    The dlopen function is in libc rather than libdl, so add a check for
    that in configure.in. Fixes bug #584307

 configure.in                 |   11 +++++++++++
 pkcs11/rpc-layer/Makefile.am |    2 +-
 2 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/configure.in b/configure.in
index a0e1e9a..287a391 100644
--- a/configure.in
+++ b/configure.in
@@ -278,6 +278,17 @@ if test "$enable_pam" != "no"; then
 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])
+	)
+)
+
+AC_SUBST(DL_LIBS)
+
+# --------------------------------------------------------------------
 # Disable ACL Prompts
 
 AC_ARG_ENABLE(acl-prompts, 
diff --git a/pkcs11/rpc-layer/Makefile.am b/pkcs11/rpc-layer/Makefile.am
index 0f085f3..45da903 100644
--- a/pkcs11/rpc-layer/Makefile.am
+++ b/pkcs11/rpc-layer/Makefile.am
@@ -58,6 +58,6 @@ gck_rpc_daemon_standalone_SOURCES = \
 	gck-rpc-daemon-standalone.c
 	
 gck_rpc_daemon_standalone_LDADD = \
-	-ldl libgck-rpc-layer.la \
+	$(DL_LIBS) libgck-rpc-layer.la \
 	$(top_builddir)/common/libgkr-common.la
 	



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]