]> granicus.if.org Git - sudo/commitdiff
Check for -libmldap too when looking for ldap libs, which is the
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 17 Sep 2011 00:04:25 +0000 (20:04 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 17 Sep 2011 00:04:25 +0000 (20:04 -0400)
Tivoli Directory Server client library.

--HG--
branch : 1.7

configure
configure.in

index 6db1e9cf42348ebc38e5acb92891ed68e483d941..569b8a99ac9a0cb2d83814cf3ef6d75fa3749459 100755 (executable)
--- a/configure
+++ b/configure
 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"
index a020c81e36eb65911135a7c03157b4b52127081d..e0bf77c5aca32d5196984150d273bdedc73c569c 100644 (file)
@@ -2710,6 +2710,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"