Check for -libmldap too when looking for ldap libs, which is the
Tivoli Directory Server client library.
This commit is contained in:
26
configure
vendored
26
configure
vendored
@@ -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"
|
||||
|
11
configure.in
11
configure.in
@@ -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"
|
||||
|
Reference in New Issue
Block a user