XEmacs 21.2.17 "Chiyoda".
[chise/xemacs-chise.git.1] / configure.in
index f4e0904..aed40d4 100644 (file)
@@ -2670,23 +2670,20 @@ AC_CHECKING(for LDAP)
 test -z "$with_ldap" && { AC_CHECK_HEADER(ldap.h, ,with_ldap=no) }
 test -z "$with_ldap" && { AC_CHECK_HEADER(lber.h, ,with_ldap=no) }
 if test "$with_ldap" != "no"; then
-  test -z "$with_umich_ldap" && { AC_CHECK_LIB(ldap, ldap_open, with_umich_ldap=yes, with_umich_ldap=no, -llber) }
-  test "$with_umich_ldap" = "no" && { AC_CHECK_LIB(ldap10, ldap_set_option, with_ns_ldap=yes, with_ns_ldap=no) }
-  test -z "$with_ldap" -a \( "$with_umich_ldap" = "yes" -o "$with_ns_ldap" = "yes" \) && with_ldap=yes
+  AC_CHECK_LIB(ldap, ldap_search, with_ldap_nolber=yes, with_ldap_nolber=no)
+  test "$with_ldap_nolber" = "no" && { AC_CHECK_LIB(ldap, ldap_open, with_ldap_lber=yes, with_ldap_lber=no, -llber) }
+  test -z "$with_ldap" -a \( "$with_ldap_lber" = "yes" -o "$with_ldap_nolber" = "yes" \) && with_ldap=yes
 fi
 if test "$with_ldap" = "yes"; then
   AC_DEFINE(HAVE_LDAP)
   XE_ADD_OBJS(eldap.o)
-  if test "$with_umich_ldap" = "yes" ; then
-    AC_DEFINE(HAVE_UMICH_LDAP)
-    XE_PREPEND(-llber, LIBS)
+  if test "$with_ldap_nolber" = "yes" ; then
     XE_PREPEND(-lldap, LIBS)
-  elif test "$with_ldap" = "yes" -a "$with_ns_ldap" = "yes" ; then
-    AC_DEFINE(HAVE_NS_LDAP)
-    XE_PREPEND(-lldap10, LIBS)
-  elif test "$with_ldap" = "yes" ; then
+  else
+    XE_PREPEND(-llber, LIBS)
     XE_PREPEND(-lldap, LIBS)
   fi
+  AC_CHECK_FUNCS(ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result)
 fi
 
 dnl ----------------------
@@ -4061,9 +4058,7 @@ test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley
 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
 test "$with_database_gnudbm" = yes && echo "  Compiling in support for GNU DBM."
 
-test "$with_umich_ldap"             = yes && echo "  Compiling in support for LDAP (UMich libs)."
-test "$with_ns_ldap"        = yes && echo "  Compiling in support for LDAP (Netscape SDK)."
-test "$with_ldap" = yes -a "$with_umich_ldap" = no -a "$with_ns_ldap" = no && echo "  Compiling in support for LDAP (Generic)."
+test "$with_ldap"           = yes && echo "  Compiling in support for LDAP."
 
 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
 test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."