# OpenLDAP, circa 1999, was terrible with creating weird dependencies.
# If all else fails, the user can play guess-the-dependency by using
# something like ./configure LDAPLIBS="-Lfoo -lbar"
-
+gnupg_have_ldap=no
AC_ARG_WITH(ldap,
AC_HELP_STRING([--with-ldap=DIR],[look for the LDAP library in DIR]),
[_ldap_with=$withval])
if test "$gnupg_cv_func_ldap_init" = yes || \
test "$gnupg_cv_func_ldaplber_init" = yes ; then
LDAPLIBS="$LDAP_LDFLAGS $MY_LDAPLIBS"
- GPGKEYS_LDAP="gpgkeys_ldap$EXEEXT"
+ GPGKEYS_LDAP="gpg2keys_ldap$EXEEXT"
+ gnupg_have_ldap=yes
- AC_CHECK_FUNCS(ldap_get_option ldap_set_option ldap_start_tls_s)
+ AC_CHECK_FUNCS(ldap_get_option ldap_set_option)
+ # The extra test for ldap_start_tls_sA is for W32 because
+ # that is the actual function in the library.
+ AC_CHECK_FUNCS(ldap_start_tls_s ldap_start_tls_sA)
if test "$ac_cv_func_ldap_get_option" != yes ; then
AC_MSG_CHECKING([whether LDAP supports ld_errno])