From 0aaef1d808475ad6d48ed6e27725aa360589a581 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 16 Sep 2011 20:04:25 -0400 Subject: [PATCH] Check for -libmldap too when looking for ldap libs, which is the Tivoli Directory Server client library. --HG-- branch : 1.7 --- configure | 26 ++++++++++++++++++++++++++ configure.in | 11 +++++++++++ 2 files changed, 37 insertions(+) diff --git a/configure b/configure index 6db1e9cf4..569b8a99a 100755 --- a/configure +++ b/configure @@ -19249,6 +19249,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 + #include + #include +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" diff --git a/configure.in b/configure.in index a020c81e3..e0bf77c5a 100644 --- a/configure.in +++ b/configure.in @@ -2710,6 +2710,17 @@ if test ${with_ldap-'no'} != "no"; then #include #include ]], [[(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 + #include + #include ]], [[(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" -- 2.40.0