apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r122963 - /apr/apr-util/branches/1.0.x/build/apu-conf.m4
Date Tue, 21 Dec 2004 11:03:40 GMT
Author: minfrin
Date: Tue Dec 21 03:03:38 2004
New Revision: 122963

URL: http://svn.apache.org/viewcvs?view=rev&rev=122963
Log:
Fix the detection of ldap.h so that it works again on autoconf v2.13

Modified:
   apr/apr-util/branches/1.0.x/build/apu-conf.m4

Modified: apr/apr-util/branches/1.0.x/build/apu-conf.m4
Url: http://svn.apache.org/viewcvs/apr/apr-util/branches/1.0.x/build/apu-conf.m4?view=diff&rev=122963&p1=apr/apr-util/branches/1.0.x/build/apu-conf.m4&r1=122962&p2=apr/apr-util/branches/1.0.x/build/apu-conf.m4&r2=122963
==============================================================================
--- apr/apr-util/branches/1.0.x/build/apu-conf.m4	(original)
+++ apr/apr-util/branches/1.0.x/build/apu-conf.m4	Tue Dec 21 03:03:38 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

Mime
View raw message