]> 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>
Fri, 16 Sep 2011 13:04:27 +0000 (09:04 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 16 Sep 2011 13:04:27 +0000 (09:04 -0400)
Tivoli Directory Server client library.

configure
configure.in

index 2dcc5a43847c0a59433ae235b93784c8aaa81845..c023d9443b7cd514d6640bc80e50cf895942c594 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 d7bd3ae6d098b59982aaf43d52a096526d23686c..12ea4ace7f04a7390fce925d18a2841755ae37f9 100644 (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"