Check for -libmldap too when looking for ldap libs, which is the

Tivoli Directory Server client library.
This commit is contained in:
Todd C. Miller
2011-09-16 09:04:27 -04:00
parent dacb1e47f3
commit ba331ebfb6
2 changed files with 37 additions and 0 deletions

26
configure vendored
View File

@@ -19437,6 +19437,32 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
done
if test "$found" = "no"; then
LDAP_LIBS=""
LIBS="$_LIBS"
for l in -libmldap -lidsldif; do
LIBS="${LIBS} $l"
LDAP_LIBS="${LDAP_LIBS} $l"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <lber.h>
#include <ldap.h>
int
main ()
{
(void)ldap_init(0, 0)
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
found=yes; break
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
done
fi
if test "$found" = "no"; then
LIBS="${_LIBS} -lldap"
LDAP_LIBS="-lldap"

View File

@@ -2844,6 +2844,17 @@ if test ${with_ldap-'no'} != "no"; then
#include <lber.h>
#include <ldap.h>]], [[(void)ldap_init(0, 0)]])], [found=yes; break])
done
if test "$found" = "no"; then
LDAP_LIBS=""
LIBS="$_LIBS"
for l in -libmldap -lidsldif; do
LIBS="${LIBS} $l"
LDAP_LIBS="${LDAP_LIBS} $l"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
#include <lber.h>
#include <ldap.h>]], [[(void)ldap_init(0, 0)]])], [found=yes; break])
done
fi
dnl if nothing linked just try with -lldap
if test "$found" = "no"; then
LIBS="${_LIBS} -lldap"