if test x$CURL_DISABLE_LDAP != x1 ; then
- AC_CHECK_HEADERS(ldap.h)
+ AC_CHECK_HEADERS(lber.h)
+
+ AC_CHECK_HEADERS(ldap.h,
+ [],[],[
+#if HAVE_LBER_H
+#include <lber.h>
+#endif
+])
+
+ AC_CHECK_HEADERS(ldap_ssl.h,
+ [],[],[
+#if HAVE_LBER_H
+#include <lber.h>
+#endif
+#if HAVE_LDAP_H
+#include <ldap.h>
+#endif
+])
if test -z "$LDAPLIBNAME" ; then
case $host in
if test x$CURL_DISABLE_LDAP != x1 ; then
- AC_CHECK_HEADERS(lber.h)
-
if test "$LBERLIBNAME" ; then
dnl If name is "no" then don't define this library at all
dnl (it's only needed if libldap.so's dependencies are broken).
assert.h \
unistd.h \
stdlib.h \
- ldap_ssl.h \
limits.h \
arpa/inet.h \
net/if.h \