Signed-off-by: Alon Bar-Lev <alon.bar...@gmail.com> --- configure.ac | 18 -------------- src/common/Makefile.am | 1 - src/common/libpkcs11.c | 6 ---- src/common/libscdl.c | 57 +------------------------------------------ src/libopensc/Makefile.am | 5 +-- src/libopensc/ctx.c | 13 ---------- src/minidriver/Makefile.am | 2 +- src/pkcs11/Makefile.am | 4 +- src/tools/Makefile.am | 2 +- 9 files changed, 8 insertions(+), 100 deletions(-)
diff --git a/configure.ac b/configure.ac index cf373c9..4e01231 100644 --- a/configure.ac +++ b/configure.ac @@ -267,22 +267,6 @@ AC_CHECK_LIB( ] ) -dnl check for libltdl. If libltdl is not found, native dlopen/LoadLibrary is used -AC_ARG_VAR([LTLIB_CFLAGS], [C compiler flags for libltdl]) -AC_ARG_VAR([LTLIB_LIBS], [linker flags for libltdl]) -if test -z "${LTLIB_LIBS}"; then - AC_CHECK_LIB( - [ltdl], - [lt_dlopen], - [LTLIB_LIBS="-lltdl"] - ) -fi - -saved_CFLAGS="${CFLAGS}" -CFLAGS="${CFLAGS} ${LTLIB_CFLAGS}" -AC_CHECK_HEADERS([ltdl.h]) -CFLAGS="${saved_CFLAGS}" - if test "${WIN32}" = "no"; then dnl Special check for pthread support. ACX_PTHREAD( @@ -635,8 +619,6 @@ Compiler flags: ${CFLAGS} Linker flags: ${LDFLAGS} Libraries: ${LIBS} -LTLIB_CFLAGS: ${LTLIB_CFLAGS} -LTLIB_LIBS: ${LTLIB_LIBS} READLINE_CFLAGS: ${READLINE_CFLAGS} READLINE_LIBS: ${READLINE_LIBS} ZLIB_CFLAGS: ${ZLIB_CFLAGS} diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 95c915e..b2e7e15 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -9,7 +9,6 @@ dist_noinst_DATA = \ compat_getopt_main.c \ README.compat_strlcpy compat_strlcpy.3 -AM_CFLAGS = $(LTLIB_CFLAGS) INCLUDES = -I$(top_srcdir)/src libcompat_la_SOURCES = \ diff --git a/src/common/libpkcs11.c b/src/common/libpkcs11.c index 22f9bc8..35933fe 100644 --- a/src/common/libpkcs11.c +++ b/src/common/libpkcs11.c @@ -10,9 +10,6 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#ifdef HAVE_LTDL_H -#include <ltdl.h> -#endif #include "pkcs11/pkcs11.h" @@ -36,9 +33,6 @@ C_LoadModule(const char *mspec, CK_FUNCTION_LIST_PTR_PTR funcs) { sc_pkcs11_module_t *mod; CK_RV rv, (*c_get_function_list)(CK_FUNCTION_LIST_PTR_PTR); -#ifdef HAVE_LTDL_H - lt_dlinit(); -#endif mod = calloc(1, sizeof(*mod)); mod->_magic = MAGIC; diff --git a/src/common/libscdl.c b/src/common/libscdl.c index a19ccf2..e4746ab 100644 --- a/src/common/libscdl.c +++ b/src/common/libscdl.c @@ -22,34 +22,7 @@ #include "libscdl.h" -#ifdef HAVE_LTDL_H -#include <ltdl.h> -/* libltdl is present, pass all calls to it */ - -void *sc_dlopen(const char *filename) -{ - return (void *)lt_dlopen(filename); -} - -void *sc_dlsym(void *handle, const char *symbol) -{ - return lt_dlsym((lt_dlhandle)handle, symbol); -} - -const char *sc_dlerror(void) -{ - return lt_dlerror(); -} - -int sc_dlclose(void *handle) -{ - return lt_dlclose((lt_dlhandle)handle); -} - -#else -/* Small wrappers for native functions, bypassing libltdl */ -#ifdef _WIN32 -/* Use Windows calls */ +#ifdef WIN32 void *sc_dlopen(const char *filename) { return (void *)LoadLibrary(filename); @@ -69,10 +42,8 @@ int sc_dlclose(void *handle) { return FreeLibrary(handle); } - -#elif defined(HAVE_DLFCN_H) +#else #include <dlfcn.h> -/* Use native interfaces */ void *sc_dlopen(const char *filename) { return dlopen(filename, RTLD_LAZY); @@ -92,28 +63,4 @@ int sc_dlclose(void *handle) { return dlclose(handle); } - -#else -/* Dynamic loading is not available */ -void *sc_dlopen(const char *filename) -{ - return NULL; -} - -void *sc_dlsym(void *handle, const char *symbol) -{ - return NULL; -} - -const char *sc_dlerror() -{ - return "dlopen() functionality not available"; -} - -int sc_dlclose(void *handle) -{ - return 0; -} - -#endif #endif diff --git a/src/libopensc/Makefile.am b/src/libopensc/Makefile.am index 722b861..f50a002 100644 --- a/src/libopensc/Makefile.am +++ b/src/libopensc/Makefile.am @@ -14,8 +14,7 @@ noinst_HEADERS = cards.h ctbcs.h internal.h esteid.h muscle.h muscle-filesystem. AM_CPPFLAGS = -DOPENSC_CONF_PATH=\"$(sysconfdir)/opensc.conf\" AM_CFLAGS = $(OPTIONAL_OPENSSL_CFLAGS) $(OPTIONAL_OPENCT_CFLAGS) \ - $(OPTIONAL_PCSC_CFLAGS) $(OPTIONAL_ZLIB_CFLAGS) \ - $(LTLIB_CFLAGS) + $(OPTIONAL_PCSC_CFLAGS) $(OPTIONAL_ZLIB_CFLAGS) INCLUDES = -I$(top_srcdir)/src libopensc_la_SOURCES = \ @@ -51,7 +50,7 @@ if WIN32 libopensc_la_SOURCES += $(top_builddir)/win32/versioninfo.rc endif libopensc_la_LIBADD = $(OPTIONAL_OPENSSL_LIBS) $(OPTIONAL_OPENCT_LIBS) \ - $(OPTIONAL_ZLIB_LIBS) $(LTLIB_LIBS) \ + $(OPTIONAL_ZLIB_LIBS) \ $(top_builddir)/src/pkcs15init/libpkcs15init.la \ $(top_builddir)/src/scconf/libscconf.la \ $(top_builddir)/src/common/libcompat.la diff --git a/src/libopensc/ctx.c b/src/libopensc/ctx.c index b8ed8cd..92d015b 100644 --- a/src/libopensc/ctx.c +++ b/src/libopensc/ctx.c @@ -28,10 +28,6 @@ #include <sys/stat.h> #include <limits.h> -#ifdef HAVE_LTDL_H -#include <ltdl.h> -#endif - #ifdef _WIN32 #include <windows.h> #include <winreg.h> @@ -659,15 +655,6 @@ int sc_context_create(sc_context_t **ctx_out, const sc_context_param_t *parm) sc_debug(ctx, SC_LOG_DEBUG_NORMAL, "==================================="); /* first thing in the log */ sc_debug(ctx, SC_LOG_DEBUG_NORMAL, "opensc version: %s", sc_get_version()); -#ifdef HAVE_LTDL_H - /* initialize ltdl, if available. See scdl.c for more information */ - if (lt_dlinit() != 0) { - sc_debug(ctx, SC_LOG_DEBUG_NORMAL, "lt_dlinit() failed"); - sc_release_context(ctx); - return SC_ERROR_INTERNAL; - } -#endif - #ifdef ENABLE_PCSC ctx->reader_driver = sc_get_pcsc_driver(); /* XXX: remove cardmod pseudoreader driver */ diff --git a/src/minidriver/Makefile.am b/src/minidriver/Makefile.am index 7b389d0..95a04ed 100644 --- a/src/minidriver/Makefile.am +++ b/src/minidriver/Makefile.am @@ -16,7 +16,7 @@ INCLUDES = -I$(top_srcdir)/src opensc_minidriver@LIBRARY_BITNESS@_la_SOURCES = minidriver.c minidriver.exports \ $(top_builddir)/win32/versioninfo.rc -opensc_minidriver@LIBRARY_BITNESS@_la_LIBADD = $(LTLIB_LIBS) \ +opensc_minidriver@LIBRARY_BITNESS@_la_LIBADD = \ $(top_builddir)/src/libopensc/libopensc.la \ -lcrypt32 opensc_minidriver@LIBRARY_BITNESS@_la_LDFLAGS = $(AM_LDFLAGS) \ diff --git a/src/pkcs11/Makefile.am b/src/pkcs11/Makefile.am index ba5e70d..624c594 100644 --- a/src/pkcs11/Makefile.am +++ b/src/pkcs11/Makefile.am @@ -14,7 +14,7 @@ OPENSC_PKCS11_SRC = pkcs11-global.c pkcs11-session.c pkcs11-object.c misc.c slot mechanism.c openssl.c framework-pkcs15.c \ framework-pkcs15init.c debug.c opensc-pkcs11.exports \ pkcs11-display.c pkcs11-display.h -OPENSC_PKCS11_LIBS = $(OPTIONAL_OPENSSL_LIBS) $(PTHREAD_LIBS) $(LTLIB_LIBS) \ +OPENSC_PKCS11_LIBS = $(OPTIONAL_OPENSSL_LIBS) $(PTHREAD_LIBS) \ $(top_builddir)/src/common/libcompat.la \ $(top_builddir)/src/libopensc/libopensc.la @@ -31,7 +31,7 @@ onepin_opensc_pkcs11_la_LDFLAGS = $(AM_LDFLAGS) \ -module -shared -avoid-version -no-undefined pkcs11_spy_la_SOURCES = pkcs11-spy.c pkcs11-display.c pkcs11-display.h pkcs11-spy.exports -pkcs11_spy_la_LIBADD = $(OPTIONAL_OPENSSL_LIBS) $(LTLIB_LIBS) $(top_builddir)/src/common/libpkcs11.la +pkcs11_spy_la_LIBADD = $(OPTIONAL_OPENSSL_LIBS) $(top_builddir)/src/common/libpkcs11.la pkcs11_spy_la_LDFLAGS = $(AM_LDFLAGS) \ -export-symbols "$(srcdir)/pkcs11-spy.exports" \ -module -shared -avoid-version -no-undefined diff --git a/src/tools/Makefile.am b/src/tools/Makefile.am index 865eefe..6792b93 100644 --- a/src/tools/Makefile.am +++ b/src/tools/Makefile.am @@ -24,7 +24,7 @@ opensc_explorer_LDADD = $(OPTIONAL_READLINE_LIBS) pkcs15_tool_SOURCES = pkcs15-tool.c util.c pkcs15_tool_LDADD = $(OPTIONAL_OPENSSL_LIBS) pkcs11_tool_SOURCES = pkcs11-tool.c util.c -pkcs11_tool_LDADD = $(OPTIONAL_OPENSSL_LIBS) $(LTLIB_LIBS) \ +pkcs11_tool_LDADD = $(OPTIONAL_OPENSSL_LIBS) \ $(top_builddir)/src/common/libpkcs11.la pkcs15_crypt_SOURCES = pkcs15-crypt.c util.c pkcs15_crypt_LDADD = $(OPTIONAL_OPENSSL_LIBS) -- 1.7.3.4 _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel