Author: minfrin Date: Tue Dec 21 03:02:44 2004 New Revision: 122962 URL: http://svn.apache.org/viewcvs?view=rev&rev=122962 Log: Fix the detection of ldap.h so that it works again on autoconf v2.13.
Modified: apr/apr-util/trunk/build/apu-conf.m4 Modified: apr/apr-util/trunk/build/apu-conf.m4 Url: http://svn.apache.org/viewcvs/apr/apr-util/trunk/build/apu-conf.m4?view=diff&rev=122962&p1=apr/apr-util/trunk/build/apu-conf.m4&r1=122961&p2=apr/apr-util/trunk/build/apu-conf.m4&r2=122962 ============================================================================== --- apr/apr-util/trunk/build/apu-conf.m4 (original) +++ apr/apr-util/trunk/build/apu-conf.m4 Tue Dec 21 03:02:44 2004 @@ -286,11 +286,22 @@ AC_CHECK_LIB(lber, ber_init) AC_CHECK_HEADERS(lber.h, lber_h=["#include <lber.h>"]) - AC_CHECK_HEADERS(ldap.h, ldap_h=["#include <ldap.h>"], [], -[#if HAVE_LBER_H -# include <lber.h> -# endif -]) + + # Solaris has a problem in <ldap.h> which prevents it from + # being included by itself. Check for <ldap.h> manually, + # including lber.h first. + AC_CACHE_CHECK([for ldap.h], [apr_cv_hdr_ldap_h], + [AC_TRY_CPP( + [#ifdef HAVE_LBER_H + #include <lber.h> + #endif + #include <ldap.h> + ], [apr_cv_hdr_ldap_h=yes], [apr_cv_hdr_ldap_h=no])]) + if test "$apr_cv_hdr_ldap_h" = "yes"; then + ldap_h=["#include <ldap.h>"] + AC_DEFINE([HAVE_LDAP_H], 1, [Defined if ldap.h is present]) + fi + AC_CHECK_HEADERS(ldap_ssl.h, ldap_ssl_h=["#include <ldap_ssl.h>"]) CPPFLAGS=$save_cppflags
