From 205f8b266cfeedc18d4fad134b7fbd6d68c14ef3 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Fri, 11 Mar 2005 05:28:07 +0000 Subject: Fixed LDAP library file name bug (KNOWN_BUGS #1). configure now auto-detects the correct dynamic library names by default, and provides override switches --with-ldap-lib, --with-lber-lib and --without-lber-lib. Added CURL_DISABLE_LDAP to platform-specific config files to disable LDAP support on those platforms that probably don't have dynamic OpenLDAP libraries available to avoid compile errors. --- configure.ac | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index e04088b01..7fbb3c4f8 100644 --- a/configure.ac +++ b/configure.ac @@ -371,6 +371,55 @@ AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]), AC_MSG_RESULT(no) ) +dnl ********************************************************************** +dnl Check for the name of dynamic OpenLDAP libraries +dnl ********************************************************************** + +LDAPLIBNAME="" +AC_ARG_WITH(ldap-lib, +AC_HELP_STRING([--with-ldap-lib=libname],[Specify name of dynamic ldap lib file]), + [LDAPLIBNAME="$withval"]) + +LBERLIBNAME="" +AC_ARG_WITH(lber-lib, +AC_HELP_STRING([--with-lber-lib=libname],[Specify name of dynamic lber lib file]), + [LBERLIBNAME="$withval"]) + +if test x$CURL_DISABLE_LDAP != x1 ; then + + if test -z "$LDAPLIBNAME" ; then + case $host in + *-*-cygwin | *-*-mingw* | *-*-pw32*) + dnl Windows uses a single and unique OpenLDAP DLL name + LDAPLIBNAME="wldap32.dll" + LBERLIBNAME="no" + ;; + esac + fi + + if test "$LDAPLIBNAME" ; then + AC_DEFINE_UNQUOTED(DL_LDAP_FILE, "$LDAPLIBNAME") + AC_MSG_CHECKING([name of dynamic library ldap]) + AC_MSG_RESULT($LDAPLIBNAME) + else + dnl Try to find the right ldap library name for this system + CURL_DLLIB_NAME(DL_LDAP_FILE, ldap) + fi + + if test "$LBERLIBNAME" ; then + dnl If name is "no" then don't define this variable at all + dnl (it's only needed if libldap.so's dependencies are broken). + if test "$LBERLIBNAME" != "no" ; then + AC_DEFINE_UNQUOTED(DL_LBER_FILE, "$LBERLIBNAME") + fi + AC_MSG_CHECKING([name of dynamic library lber]) + AC_MSG_RESULT($LBERLIBNAME) + else + dnl Try to find the right lber library name for this system + CURL_DLLIB_NAME(DL_LBER_FILE, lber) + fi +fi + dnl ********************************************************************** dnl Check for the presence of the winmm library. dnl ********************************************************************** -- cgit v1.2.3