diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-05-22 18:27:34 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-05-22 18:27:34 +0000 |
commit | df9da3806e7645861d39c542e9026de78b4e7473 (patch) | |
tree | 5aefa15894fdb3a0f4430c983d1a4f3aec67fa8a /dev-libs/opensc/files | |
parent | Stable for x86, wrt bug #417079 (diff) | |
download | historical-df9da3806e7645861d39c542e9026de78b4e7473.tar.gz historical-df9da3806e7645861d39c542e9026de78b4e7473.tar.bz2 historical-df9da3806e7645861d39c542e9026de78b4e7473.zip |
Fix linking to -ldl when USE=-libtool.
Package-Manager: portage-2.2.0_alpha102/cvs/Linux x86_64
Diffstat (limited to 'dev-libs/opensc/files')
-rw-r--r-- | dev-libs/opensc/files/opensc-0.12.2-dl.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/dev-libs/opensc/files/opensc-0.12.2-dl.patch b/dev-libs/opensc/files/opensc-0.12.2-dl.patch new file mode 100644 index 000000000000..526ef8161a89 --- /dev/null +++ b/dev-libs/opensc/files/opensc-0.12.2-dl.patch @@ -0,0 +1,42 @@ +From 1b896582a0cd74854f99e08854554807a8f1f764 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Tue, 22 May 2012 14:12:23 -0400 +Subject: [PATCH] link against -ldl when -lltdl is not available + +If ltdl isn't found, the code will use dlopen if it's available. +But it won't link to -ldl which can cause link errors like so: + + CCLD opensc-tool +../../src/libopensc/.libs/libopensc.so: error: undefined reference to 'dlopen' +../../src/libopensc/.libs/libopensc.so: error: undefined reference to 'dlsym' +../../src/libopensc/.libs/libopensc.so: error: undefined reference to 'dlerror' +../../src/libopensc/.libs/libopensc.so: error: undefined reference to 'dlclose' +collect2: ld returned 1 exit status +make[3]: *** [opensc-tool] Error 1 + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + configure.ac | 7 +++++++ + 1 files changed, 7 insertions(+), 0 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 2751f0f..123aeb1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -277,6 +277,13 @@ if test -z "${LTLIB_LIBS}"; then + [LTLIB_LIBS="-lltdl"] + ) + fi ++if test -z "${LTLIB_LIBS}"; then ++ AC_CHECK_LIB( ++ [dl], ++ [dlopen], ++ [LTLIB_LIBS="-ldl"] ++ ) ++fi + + saved_CFLAGS="${CFLAGS}" + CFLAGS="${CFLAGS} ${LTLIB_CFLAGS}" +-- +1.7.8.6 + |