[pkg-opensc-commit] [libp11] 46/239: improved libltdl detection. fix finding OPENSSL.

Eric Dorland eric at moszumanska.debian.org
Sat Oct 17 06:21:07 UTC 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libp11.

commit 46c8adacacb485d494e88dd28bbe19362112a5ce
Author: Andreas Jellinghaus <andreas at ionisiert.de>
Date:   Mon Sep 5 21:18:44 2005 +0000

    improved libltdl detection.
    fix finding OPENSSL.
---
 configure.ac    | 16 +++++++++++-----
 src/Makefile.am |  2 +-
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0a2ae46..cdfd552 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,18 +29,24 @@ dnl Checks for programs.
 AC_PROG_CPP
 AC_PROG_INSTALL
 
-dnl use ltdl
-AC_CHECK_LIB(ltdl, lt_dlopen,, [AC_MSG_ERROR([libltdl not found])])
-
 dnl Add libtool support.
 AC_PROG_LIBTOOL
 
 dnl Checks for header files.
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([errno.h fcntl.h malloc.h stdlib.h inttypes.h string.h strings.h sys/time.h unistd.h locale.h getopt.h dlfcn.h utmp.h ltdl.h])
+AC_CHECK_HEADERS([errno.h fcntl.h malloc.h stdlib.h inttypes.h string.h strings.h sys/time.h unistd.h locale.h getopt.h dlfcn.h utmp.h])
+
+dnl use ltdl
+AC_LIB_LINKFLAGS(ltdl)
+
+saved_LIBS="$LIBS"
+LIBS="$saved_LIBS $LIBLTDL"
+AC_CHECK_HEADER([ltdl.h], [ AC_MSG_RESULT "yes" ],
+   [ AC_MSG_ERROR([ltdl.h not found, please install libltdl and/or libtool]) ])
+LIBS="$saved_LIBS"
 
-PKG_CHECK_MODULES([OPENSSL], [openssl])
+PKG_CHECK_MODULES(OPENSSL, [openssl])
 
 AC_OUTPUT([
 Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index 14a9e99..f2826b7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,7 +15,7 @@ libp11_la_SOURCES = libpkcs11.c p11_attr.c p11_cert.c p11_err.c p11_key.c \
 	p11_load.c p11_misc.c p11_ops.c p11_rsa.c p11_slot.c 
 
 libp11_la_LDFLAGS = -version-info @LIBP11_VERSION@
-libp11_la_LIBADD = @OPENSSL_LIBS@
+libp11_la_LIBADD = @OPENSSL_LIBS@ @LIBLTDL@
 
 pkgconfigdir = @libdir@/pkgconfig
 pkgconfig_DATA = libp11.pc

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/libp11.git



More information about the pkg-opensc-commit mailing list