[xmlsec] use external ltdl



commit bc933e1dccbf3b11d27c2ac7af7d1e259e28d65d
Author: Aleksey Sanin <aleksey aleksey com>
Date:   Fri Nov 6 16:18:42 2009 -0800

    use external ltdl

 MAINTAINERS     |    5 +-
 Makefile.am     |    3 +
 autogen.sh      |    7 +-
 config.h.in     |  116 +--------
 configure.in    |   62 +++--
 m4/argz.m4      |   79 ------
 m4/ltdl.m4      |  804 -------------------------------------------------------
 src/Makefile.am |   24 --
 src/dl.c        |   87 +++----
 xmlsec.spec.in  |    1 +
 10 files changed, 95 insertions(+), 1093 deletions(-)
---
diff --git a/MAINTAINERS b/MAINTAINERS
index bcd72b9..b179ab9 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1,3 +1,4 @@
 Aleksey Sanin
-E-mail: aleksey aleksey com
-Userid: aleksey
+E-mail:		aleksey aleksey com
+Userid:		aleksey
+Mailing list:	xmlsec aleksey com
\ No newline at end of file
diff --git a/Makefile.am b/Makefile.am
index 778bc45..25ae5f2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,6 +13,8 @@ confexec_DATA 	= xmlsec1Conf.sh
 m4datadir	= $(datadir)/aclocal
 m4data_DATA	= xmlsec1.m4
 
+ACLOCAL_AMFLAGS	= -I m4
+
 DISTCLEANFILES = \
 	xmlsec1Conf.sh \
 	xmlsec1.pc xmlsec1-openssl.pc xmlsec1-gnutls.pc xmlsec1-nss.pc \
@@ -25,6 +27,7 @@ DISTCLEANFILES = \
 	$NULL
 
 EXTRA_DIST = \
+	m4 \
 	examples \
 	scripts \
 	tests \
diff --git a/autogen.sh b/autogen.sh
index ffc9cac..169d6c9 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -16,7 +16,7 @@ DIE=0
 	DIE=1
 }
 
-(libtoolize --version) < /dev/null > /dev/null 2>&1 || {
+(libtool --version) < /dev/null > /dev/null 2>&1 || {
 	echo
 	echo "You must have libtool installed to compile xmlsec."
 	echo "Get ftp://alpha.gnu.org/gnu/libtool-1.0h.tar.gz";
@@ -51,7 +51,7 @@ libtoolize --copy --force
 echo "Running aclocal..."
 aclocal $ACLOCAL_FLAGS
 echo "Running automake..."
-automake --add-missing
+automake --gnu --add-missing
 echo "Running autoconf..."
 autoconf
 
@@ -62,8 +62,7 @@ if test x$OBJ_DIR != x; then
     cd "$OBJ_DIR"
 fi
 
-conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
-
+conf_flags="--enable-maintainer-mode" #--enable-iso-c
 echo Running configure $conf_flags "$@" ...
 $srcdir/configure $conf_flags "$@"
 
diff --git a/config.h.in b/config.h.in
index f8c7de2..b67643f 100644
--- a/config.h.in
+++ b/config.h.in
@@ -3,33 +3,6 @@
 /* Define to 1 if you have the <ansidecl.h> header file. */
 #undef HAVE_ANSIDECL_H
 
-/* Define to 1 if you have the `argz_append' function. */
-#undef HAVE_ARGZ_APPEND
-
-/* Define to 1 if you have the `argz_create_sep' function. */
-#undef HAVE_ARGZ_CREATE_SEP
-
-/* Define to 1 if you have the <argz.h> header file. */
-#undef HAVE_ARGZ_H
-
-/* Define to 1 if you have the `argz_insert' function. */
-#undef HAVE_ARGZ_INSERT
-
-/* Define to 1 if you have the `argz_next' function. */
-#undef HAVE_ARGZ_NEXT
-
-/* Define to 1 if you have the `argz_stringify' function. */
-#undef HAVE_ARGZ_STRINGIFY
-
-/* Define to 1 if you have the <assert.h> header file. */
-#undef HAVE_ASSERT_H
-
-/* Define to 1 if you have the `bcopy' function. */
-#undef HAVE_BCOPY
-
-/* Define to 1 if you have the `closedir' function. */
-#undef HAVE_CLOSEDIR
-
 /* Define to 1 if you have the <ctype.h> header file. */
 #undef HAVE_CTYPE_H
 
@@ -37,78 +10,27 @@
    */
 #undef HAVE_DIRENT_H
 
-/* Define if you have the GNU dld library. */
-#undef HAVE_DLD
-
-/* Define to 1 if you have the <dld.h> header file. */
-#undef HAVE_DLD_H
-
-/* Define to 1 if you have the `dlerror' function. */
-#undef HAVE_DLERROR
-
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the <dl.h> header file. */
-#undef HAVE_DL_H
-
-/* Define if you have the _dyld_func_lookup function. */
-#undef HAVE_DYLD
-
 /* Define to 1 if you have the <errno.h> header file. */
 #undef HAVE_ERRNO_H
 
-/* Define to 1 if the system has the type `error_t'. */
-#undef HAVE_ERROR_T
-
 /* Define to 1 if you have the `fprintf' function. */
 #undef HAVE_FPRINTF
 
-/* Define to 1 if you have the `index' function. */
-#undef HAVE_INDEX
-
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
-/* Define if you have the libdl library or equivalent. */
-#undef HAVE_LIBDL
-
-/* Define to 1 if you have the <mach-o/dyld.h> header file. */
-#undef HAVE_MACH_O_DYLD_H
-
-/* Define to 1 if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
-
-/* Define to 1 if you have the `memcpy' function. */
-#undef HAVE_MEMCPY
-
-/* Define to 1 if you have the `memmove' function. */
-#undef HAVE_MEMMOVE
-
 /* Define to 1 if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H
 
 /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
 #undef HAVE_NDIR_H
 
-/* Define to 1 if you have the `opendir' function. */
-#undef HAVE_OPENDIR
-
-/* Define if libtool can extract symbol lists from object files. */
-#undef HAVE_PRELOADED_SYMBOLS
-
 /* Define to 1 if you have the `printf' function. */
 #undef HAVE_PRINTF
 
-/* Define to 1 if you have the `readdir' function. */
-#undef HAVE_READDIR
-
-/* Define to 1 if you have the `rindex' function. */
-#undef HAVE_RINDEX
-
-/* Define if you have the shl_load function. */
-#undef HAVE_SHL_LOAD
-
 /* Define to 1 if you have the `snprintf' function. */
 #undef HAVE_SNPRINTF
 
@@ -130,9 +52,6 @@
 /* Define to 1 if you have the `strchr' function. */
 #undef HAVE_STRCHR
 
-/* Define to 1 if you have the `strcmp' function. */
-#undef HAVE_STRCMP
-
 /* Define to 1 if you have the <strings.h> header file. */
 #undef HAVE_STRINGS_H
 
@@ -146,9 +65,6 @@
    */
 #undef HAVE_SYS_DIR_H
 
-/* Define to 1 if you have the <sys/dl.h> header file. */
-#undef HAVE_SYS_DL_H
-
 /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
    */
 #undef HAVE_SYS_NDIR_H
@@ -177,25 +93,9 @@
 /* Define to 1 if you have the `vsprintf' function. */
 #undef HAVE_VSPRINTF
 
-/* Define if the OS needs help to load dependent libraries for dlopen(). */
-#undef LTDL_DLOPEN_DEPLIBS
-
 /* Define to the sub-directory in which libtool stores uninstalled libraries.
    */
-#undef LTDL_OBJDIR
-
-/* Define to the name of the environment variable that determines the dynamic
-   library search path. */
-#undef LTDL_SHLIBPATH_VAR
-
-/* Define to the extension used for shared libraries, say, ".so". */
-#undef LTDL_SHLIB_EXT
-
-/* Define to the system default library search path. */
-#undef LTDL_SYSSEARCHPATH
-
-/* Define if dlsym() requires a leading underscore in symbol names. */
-#undef NEED_USCORE
+#undef LT_OBJDIR
 
 /* Name of package */
 #undef PACKAGE
@@ -212,13 +112,16 @@
 /* Define to the one symbol short name of this package. */
 #undef PACKAGE_TARNAME
 
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
-/* Define if compiler has function prototypes */
+/* Define to 1 if the C compiler supports function prototypes. */
 #undef PROTOTYPES
 
-/* The size of a `size_t', as computed by sizeof. */
+/* The size of `size_t', as computed by sizeof. */
 #undef SIZEOF_SIZE_T
 
 /* Define to 1 if you have the ANSI C header files. */
@@ -227,8 +130,5 @@
 /* Version number of package */
 #undef VERSION
 
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define to a type to use for `error_t' if it is not otherwise available. */
-#undef error_t
+/* Define like PROTOTYPES; this can be used by system headers. */
+#undef __PROTOTYPES
diff --git a/configure.in b/configure.in
index f892fd7..9bd9cdf 100644
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT([xmlsec1], 1.2.13, [http://www.aleksey.com/xmlsec])
+AC_INIT([xmlsec1],[1.2.13],[http://www.aleksey.com/xmlsec])
 
 XMLSEC_PACKAGE=xmlsec1
 XMLSEC_VERSION_MAJOR=1
@@ -9,8 +9,7 @@ XMLSEC_VERSION="$XMLSEC_VERSION_MAJOR.$XMLSEC_VERSION_MINOR.$XMLSEC_VERSION_SUBM
 XMLSEC_VERSION_INFO=`echo $XMLSEC_VERSION | awk -F. '{ printf "%d:%d:%d", $1+$2, $3, $2 }'`
 XMLSEC_VERSION_SAFE=`echo $XMLSEC_VERSION | sed 's/\./_/g'`
 
-AC_PREREQ(2.2)
-AM_CONFIG_HEADER(config.h)
+AC_PREREQ(2.64)
 AC_CANONICAL_HOST
 
 AC_SUBST(XMLSEC_VERSION)
@@ -21,18 +20,26 @@ AC_SUBST(XMLSEC_VERSION_MINOR)
 AC_SUBST(XMLSEC_VERSION_SUBMINOR)
 AC_SUBST(XMLSEC_VERSION_INFO)
 
+AC_CONFIG_MACRO_DIR(m4)
 AM_INIT_AUTOMAKE([1.7])
+AC_CONFIG_HEADERS([config.h])
 AM_MAINTAINER_MODE
 
 dnl
 dnl Check the environment
 dnl
 AC_PROG_CC
-AC_LIBTOOL_DLOPEN
-AC_PROG_LIBTOOL
 AC_PROG_INSTALL
-AC_STDC_HEADERS
-AC_PATH_PROG(RM, rm, /bin/rm)
+AC_HEADER_STDC
+
+LT_INIT
+
+dnl
+dnl Find programs
+dnl
+if test "z$RM" == "z" ; then 
+    AC_PATH_PROG(RM, rm, /bin/rm)
+fi
 AC_PATH_PROG(CP, cp, /bin/cp)
 AC_PATH_PROG(MV, mv, /bin/mv)
 AC_PATH_PROG(TAR, tar, /bin/tar)
@@ -53,9 +60,7 @@ AC_CHECK_HEADERS([ctype.h])
 AC_CHECK_HEADERS([errno.h])
 AC_CHECK_HEADERS([ansidecl.h])
 AC_CHECK_HEADERS([time.h])
-AC_CHECK_FUNCS(printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf timegm)
-
-AC_LIB_LTDL
+AC_CHECK_FUNCS(strchr strrchr printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf timegm)
 
 XMLSEC_DEFINES=""
 
@@ -1235,12 +1240,24 @@ if test "z$enable_crypto_dl" = "zno" ; then
     XMLSEC_DEFINES="$XMLSEC_DEFINES -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1"
     XMLSEC_NO_CRYPTO_DYNAMIC_LOADING="1"
     AC_MSG_RESULT(no)
-else 
+else
+    AC_CHECK_HEADER([ltdl.h], 
+	[
+	XMLSEC_DEFINES="$XMLSEC_DEFINES -DXMLSEC_DL_LIBLTDL=1",
+	AC_CHECK_LIB(
+	    [ltdl], 
+	    [lt_dlopenext],
+	    [LIBLTDL=-lltdl], 
+	    [LIBLTDL=]
+	)],
+	[LIBLTDL=]
+    )
+
     XMLSEC_DL_INCLUDES="$INCLTDL"
-    XMLSEC_DL_LIBS="$LIBLTDL $LIBADD_DL"
+    XMLSEC_DL_LIBS="$LIBLTDL"
     XMLSEC_NO_CRYPTO_DYNAMIC_LOADING="0"
     AC_MSG_RESULT(yes)
-fi    
+fi
 AM_CONDITIONAL(XMLSEC_NO_CRYPTO_DYNAMIC_LOADING, test "z$XMLSEC_NO_CRYPTO_DYNAMIC_LOADING" = "z1")
 AC_SUBST(XMLSEC_NO_CRYPTO_DYNAMIC_LOADING)
 AC_SUBST(XMLSEC_DL_INCLUDES)
@@ -1444,7 +1461,7 @@ else
 AC_CONFIG_FILES([xmlsec1.pc:xmlsec.pc.in])
 fi
 
-AC_OUTPUT([
+AC_CONFIG_FILES([
 include/xmlsec/version.h
 Makefile
 include/Makefile
@@ -1455,14 +1472,15 @@ apps/Makefile
 docs/Makefile
 docs/api/Makefile
 man/Makefile
-]
-[xmlsec1Conf.sh:xmlsecConf.sh.in]
-[xmlsec1-config:xmlsec-config.in]
-[xmlsec1-openssl.pc:xmlsec-openssl.pc.in]
-[xmlsec1-gnutls.pc:xmlsec-gnutls.pc.in]
-[xmlsec1-nss.pc:xmlsec-nss.pc.in]
-[xmlsec1.spec:xmlsec.spec.in]
-)
+
+xmlsec1Conf.sh:xmlsecConf.sh.in
+xmlsec1-config:xmlsec-config.in
+xmlsec1-openssl.pc:xmlsec-openssl.pc.in
+xmlsec1-gnutls.pc:xmlsec-gnutls.pc.in
+xmlsec1-nss.pc:xmlsec-nss.pc.in
+xmlsec1.spec:xmlsec.spec.in
+])
+AC_OUTPUT
 
 
 dnl COPYING should be in "srcdir" not in "builddir"
diff --git a/src/Makefile.am b/src/Makefile.am
index 5dd901e..7472625 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -13,8 +13,6 @@ INCLUDES = \
 
 EXTRA_DIST = \
 	globals.h \
-	ltdl.h ltdl.c \
-	xmlsec-ltdl.h xmlsec-ltdl.c xmlsec-ltdl.patch \
 	skeleton \
 	mscrypto \
 	$(XMLSEC_CRYPTO_DISABLED_LIST) \
@@ -68,25 +66,3 @@ libxmlsec1_la_LDFLAGS = \
 	-version-info @XMLSEC_VERSION_INFO@ \
 	$(NULL)
 
-if XMLSEC_NO_CRYPTO_DYNAMIC_LOADING
-LTDL_SOURCE_FILES = \
-	$(NULL)
-else 
-LTDL_SOURCE_FILES = \
-	xmlsec-ltdl.c \
-	$(NULL)
-
-LTDL_PARSE = \
-	sed s/ltdl.h/xmlsec-ltdl.h/g | \
-	sed s/lt_/xmlsec_lt_/g | \
-	sed s/ltdl_/xmlsec_ltdl_/g \
-	$(NULL)	
-
-xmlsec-ltdl.c: xmlsec-ltdl.h 
-
-xmlsec-ltdl.h: ltdl.c ltdl.h xmlsec-ltdl.patch
-	@(cat ltdl.c | $(LTDL_PARSE) > xmlsec-ltdl.c && \
-	  cat ltdl.h | $(LTDL_PARSE) > xmlsec-ltdl.h && \
-	  patch -p0 < xmlsec-ltdl.patch)
-
-endif
diff --git a/src/dl.c b/src/dl.c
index 0de7b33..cf267d7 100644
--- a/src/dl.c
+++ b/src/dl.c
@@ -9,12 +9,13 @@
  */
 #include "globals.h"
 
+#ifndef XMLSEC_NO_CRYPTO_DYNAMIC_LOADING
 
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdarg.h>
 #include <string.h>
-#include <time.h>  
+#include <time.h>
 
 #include <libxml/tree.h>
 
@@ -30,9 +31,11 @@
 #include <xmlsec/errors.h>
 #include <xmlsec/dl.h>
 
-#ifndef XMLSEC_NO_CRYPTO_DYNAMIC_LOADING
 
-#include "xmlsec-ltdl.h"
+#ifdef XMLSEC_DL_LIBLTDL
+#include <ltdl.h>
+#endif /* XMLSEC_DL_LIBLTDL */
+
 
 /***********************************************************************
  *
@@ -47,7 +50,9 @@ struct _xmlSecCryptoDLLibrary {
     xmlChar* 	getFunctionsName;
     xmlSecCryptoDLFunctionsPtr functions;
 
-    xmlsec_lt_dlhandle handle;
+#ifdef XMLSEC_DL_LIBLTDL
+    lt_dlhandle handle;
+#endif /* XMLSEC_DL_LIBLTDL */
 };
 
 static xmlSecCryptoDLLibraryPtr	xmlSecCryptoDLLibraryCreate		(const xmlChar* name);
@@ -124,11 +129,11 @@ xmlSecCryptoDLLibraryCreate(const xmlChar* name) {
 	return(NULL);
     }
 
-
-    lib->handle = xmlsec_lt_dlopen((char*)lib->filename);
+#ifdef XMLSEC_DL_LIBLTDL
+    lib->handle = lt_dlopenext((char*)lib->filename);
     if(lib->handle == NULL) {
 	xmlSecError(XMLSEC_ERRORS_HERE,
-		    "xmlsec_lt_dlopen",
+		    "lt_dlopenext",
 		    NULL,
 		    XMLSEC_ERRORS_R_IO_FAILED,
 		    "filename=%s",
@@ -137,11 +142,10 @@ xmlSecCryptoDLLibraryCreate(const xmlChar* name) {
 	return(NULL);
     }
 
-    
-    getFunctions = (xmlSecCryptoGetFunctionsCallback)xmlsec_lt_dlsym(lib->handle, (char*)lib->getFunctionsName);
+    getFunctions = (xmlSecCryptoGetFunctionsCallback)lt_dlsym(lib->handle, (char*)lib->getFunctionsName);
     if(getFunctions == NULL) {
 	xmlSecError(XMLSEC_ERRORS_HERE,
-		    "xmlsec_lt_dlsym",
+		    "lt_dlsym",
 		    NULL,
 		    XMLSEC_ERRORS_R_IO_FAILED,
 		    "function=%s",
@@ -149,6 +153,7 @@ xmlSecCryptoDLLibraryCreate(const xmlChar* name) {
 	xmlSecCryptoDLLibraryDestroy(lib);
 	return(NULL);
     }
+#endif /* XMLSEC_DL_LIBLTDL */
 
     if(getFunctions == NULL) {
 	xmlSecError(XMLSEC_ERRORS_HERE,
@@ -193,16 +198,19 @@ xmlSecCryptoDLLibraryDestroy(xmlSecCryptoDLLibraryPtr lib) {
     }
 
     if(lib->handle != NULL) {	
+#ifdef XMLSEC_DL_LIBLTDL
 	int ret;
-
-	ret = xmlsec_lt_dlclose(lib->handle);
+	
+	ret = lt_dlclose(lib->handle);
 	if(ret != 0) {
 	    xmlSecError(XMLSEC_ERRORS_HERE,
-		        "xmlsec_lt_dlclose",
+			"lt_dlclose",
 			NULL,
-		        XMLSEC_ERRORS_R_IO_FAILED,
-                        XMLSEC_ERRORS_NO_MESSAGE);
+			XMLSEC_ERRORS_R_IO_FAILED,
+			XMLSEC_ERRORS_NO_MESSAGE);
 	}
+#endif /* XMLSEC_DL_LIBLTDL */
+
     }
 
     memset(lib, 0, sizeof(xmlSecCryptoDLLibrary));
@@ -219,12 +227,12 @@ xmlSecCryptoDLLibraryDuplicate(xmlSecCryptoDLLibraryPtr lib) {
 
 static xmlChar*	
 xmlSecCryptoDLLibraryConstructFilename(const xmlChar* name) {
-    static xmlChar tmpl[] = "lib%s-%s" LTDL_SHLIB_EXT;
+    static xmlChar tmpl[] = "lib%s-%s";
     xmlChar* res;
     int len;
-    
+
     xmlSecAssert2(name != NULL, NULL);
-    
+
     /* TODO */
     len = xmlStrlen(BAD_CAST PACKAGE) + xmlStrlen(name) + xmlStrlen(tmpl) + 1;
     res = (xmlChar*)xmlMalloc(len + 1);
@@ -295,28 +303,6 @@ xmlSecCryptoDLLibrariesListFindByName(xmlSecPtrListPtr list, const xmlChar* name
 static xmlSecCryptoDLFunctionsPtr gXmlSecCryptoDLFunctions = NULL;
 static xmlSecPtrList gXmlSecCryptoDLLibraries;
 
-static xmlsec_lt_ptr xmlSecCryptoDLMalloc(size_t size) {
-    xmlsec_lt_ptr res;
-
-    res = (xmlsec_lt_ptr)xmlMalloc(size);
-    if(res == NULL) {
-	xmlSecError(XMLSEC_ERRORS_HERE,
-		    NULL,
-		    NULL,
-		    XMLSEC_ERRORS_R_MALLOC_FAILED,
-		    "size=%d", size);
-        return(NULL);
-    }
-    memset(res, 0, size);
-    return(res);
-}
-
-static void xmlSecCryptoDLFree(xmlsec_lt_ptr ptr) {
-    if(ptr != NULL) {
-	xmlFree(ptr);
-    }
-}
-
 /**
  * xmlSecCryptoDLInit:
  * 
@@ -339,20 +325,18 @@ xmlSecCryptoDLInit(void) {
         return(-1);
     }
 
-    /* use xmlMalloc/xmlFree */
-    xmlsec_lt_dlmalloc	= xmlSecCryptoDLMalloc;
-    xmlsec_lt_dlfree	= xmlSecCryptoDLFree;
-    ret = xmlsec_lt_dlinit ();
+#ifdef XMLSEC_DL_LIBLTDL
+    ret = lt_dlinit ();
     if(ret != 0) {
 	xmlSecError(XMLSEC_ERRORS_HERE,
 		    NULL,
-		    "xmlsec_lt_dlinit",
+		    "lt_dlinit",
 		    XMLSEC_ERRORS_R_IO_FAILED,
 		    XMLSEC_ERRORS_NO_MESSAGE);
         return(-1);
     }
-    /* TODO: LTDL_SET_PRELOADED_SYMBOLS(); */
-    
+#endif /* XMLSEC_DL_LIBLTDL */
+
     return(0);
 }
 
@@ -368,17 +352,20 @@ xmlSecCryptoDLInit(void) {
 int 
 xmlSecCryptoDLShutdown(void) {
     int ret;
-    
+
     xmlSecPtrListFinalize(&gXmlSecCryptoDLLibraries);
 
-    ret = xmlsec_lt_dlexit ();
+#ifdef XMLSEC_DL_LIBLTDL
+    ret = lt_dlexit ();
     if(ret != 0) {
 	xmlSecError(XMLSEC_ERRORS_HERE,
 		    NULL,
-		    "xmlsec_lt_dlexit",
+		    "lt_dlexit",
 		    XMLSEC_ERRORS_R_IO_FAILED,
 		    XMLSEC_ERRORS_NO_MESSAGE);
     }
+#endif /* XMLSEC_DL_LIBLTDL */
+
     return(0);
 }
 
diff --git a/xmlsec.spec.in b/xmlsec.spec.in
index 20c3a5d..102555a 100644
--- a/xmlsec.spec.in
+++ b/xmlsec.spec.in
@@ -12,6 +12,7 @@ BuildRoot: %{_tmppath}/@PACKAGE -%{version}-root
 URL: http://www.aleksey.com/xmlsec
 Requires: libxml2 >= @LIBXML_MIN_VERSION@
 Requires: libxslt >= @LIBXSLT_MIN_VERSION@
+Requires: ltdl
 BuildRequires: libxml2-devel >= @LIBXML_MIN_VERSION@
 BuildRequires: libxslt-devel >= @LIBXSLT_MIN_VERSION@
 Prefix: %{_prefix}



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