AS_HELP_STRING([--with-ldap],[Compile with LDAP support]),
[],[with_ldap=check])
if ( test "x$with_ldap" != "xno" ) ; then
- AC_CHECK_HEADERS(ldap.h)
- AC_CHECK_LIB(ldap, ldap_init,LIBS="-lldap ${LIBS}"; HAVE_LDAP="yes", HAVE_LDAP="")
+ AC_CHECK_HEADERS([ldap_cdefs.h] [ldap_features.h] [ldap.h],,break)
+ if ( test "x$ac_cv_header_ldap_h" = "xyes" ) ; then
+ AC_CHECK_LIB(ldap, ldap_init,LIBS="-lldap ${LIBS}"; HAVE_LDAP="yes", HAVE_LDAP="")
+ fi
else
AC_MSG_NOTICE([Not building with LDAP support as requested on the configuration command line])
fi