]> granicus.if.org Git - apache/commitdiff
Revert r1131393:
authorStefan Fritsch <sf@apache.org>
Sat, 23 Jul 2011 17:16:54 +0000 (17:16 +0000)
committerStefan Fritsch <sf@apache.org>
Sat, 23 Jul 2011 17:16:54 +0000 (17:16 +0000)
    Several fixes for the ap_ldap build logic. This should fix compilation
    without --with-ldap.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/revert-ap-ldap@1150165 13f79535-47bb-0310-9956-ffa450edef68

build/find_ldap.m4
configure.in
include/ap_ldap.h.in
include/ap_ldap_init.h
include/ap_ldap_option.h
include/ap_ldap_rebind.h
include/ap_ldap_url.h
include/util_ldap.h
modules/aaa/config.m4
modules/ldap/config.m4

index b23417d18cad63a467ae7d1118893399045831ee..a0e6a066a0ebf232532013e1f1d262b85528e103 100644 (file)
@@ -39,7 +39,6 @@ AC_DEFUN([AP_FIND_LDAPLIB], [
         AC_CHECK_LIB(${ldaplib}, ldapssl_init, ap_has_ldapssl_init="1", , ${extralib})
         AC_CHECK_LIB(${ldaplib}, ldapssl_install_routines, ap_has_ldapssl_install_routines="1", , ${extralib})
         ap_has_ldap="1";
-        AC_DEFINE(AP_HAS_LDAP, 1, [Defined if httpd is compiled with ldap support])
       ], , ${extralib})
   fi
 ])
index 4233a9dd9714c56d10d9bddfb8f3acc53a8da665..4fa01c2701e6e57874ea9cd39d2838594b55f011 100644 (file)
@@ -457,9 +457,6 @@ if test "$ac_cv_gettid" = "yes"; then
     AC_DEFINE(HAVE_GETTID, 1, [Define if you have gettid()])
 fi
 
-dnl check for LDAP support, needed by modules/aaa and modules/ldap
-AP_FIND_LDAP
-
 dnl ## Check for the tm_gmtoff field in struct tm to get the timezone diffs
 AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
 [AC_TRY_COMPILE([#include <sys/types.h>
index 130c6dd016cc61096cfb926e66f2824b8b50408c..b847db3da37751551662fe1da7c3460882e9dbc1 100644 (file)
@@ -51,6 +51,9 @@
 #define LDAP_DECLARE_DATA             __declspec(dllimport)
 #endif
 
+/* this will be defined if LDAP support was compiled into apr-util */
+#define AP_HAS_LDAP              @ap_has_ldap@
+
 /* identify the LDAP toolkit used */
 #define AP_HAS_NETSCAPE_LDAPSDK  @ap_has_ldap_netscape@
 #define AP_HAS_SOLARIS_LDAPSDK   @ap_has_ldap_solaris@
index 0fe0bcc6c1c3593649da924a5140c4baaac2411b..ce2ae2c0a6f3b5f392607f6a47366c9730042680 100644 (file)
  * @{
  */
 
-#if AP_HAS_LDAP
-
 #include "ap_ldap.h"
 
+#if AP_HAS_LDAP
+
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */
index 6e73e5044fe5fc59b30f63695a77ed2683d8dbd6..9c4898a2251cc225cca48e7a85a9ccb96ad414e9 100644 (file)
  * @{
  */
 
-#if AP_HAS_LDAP
-
 #include "ap_ldap.h"
 
+#if AP_HAS_LDAP
+
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */
index 7bc5a5cda963c43880238e775fb2fbde761c59b4..5601a861eab7a38d89dd3785310d45aa4ed647c5 100644 (file)
  * @brief Apache LDAP library
  */
 
-#ifndef AP_LDAP_REBIND_H
-#define AP_LDAP_REBIND_H
+#ifndef APU_LDAP_REBIND_H
+#define APU_LDAP_REBIND_H
 
 /**
  * @addtogroup AP_Util_LDAP
  * @{
  **/
 
+#if defined(DOXYGEN)
+#include "ap_ldap.h"
+#endif
+
 /*
  * Handle the case when LDAP is enabled
  */
 #if AP_HAS_LDAP
 
-#if defined(DOXYGEN)
-#include "ap_ldap.h"
-#endif
-
 /**
  * LDAP initialize rebind lock
  *
@@ -94,5 +94,5 @@ LDAP_DECLARE(apr_status_t) ap_ldap_rebind_remove(LDAP *ld);
 
 /** @} */
 
-#endif /* AP_LDAP_REBIND_H */
+#endif /* APU_LDAP_REBIND_H */
 
index 996b4b5a9aea622fa0160b1eeea619d3c4fdfac3..d8c409582264cbb7a72b3d86daf1f80db7a28be3 100644 (file)
  * @{
  */
 
+#if defined(DOXYGEN)
+#include "ap_ldap.h"
+#endif
+
 #if AP_HAS_LDAP
 
 #include "apu.h"
 #include "apr_pools.h"
 
-#if defined(DOXYGEN)
-#include "ap_ldap.h"
-#endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */
index d5e5b3d1ccde7a5ce3ef1cefed3c546533fadeaf..5ee3fb604347bb1d596ba0d4d7b68dbcfc59058d 100644 (file)
@@ -28,6 +28,9 @@
 #include "apr_thread_rwlock.h"
 #include "apr_tables.h"
 #include "apr_time.h"
+#include "ap_ldap.h"
+#include "ap_ldap_rebind.h"
+
 #if AP_HAS_MICROSOFT_LDAPSDK
 #define AP_LDAP_IS_SERVER_DOWN(s)                ((s) == LDAP_SERVER_DOWN \
                 ||(s) == LDAP_UNAVAILABLE)
@@ -40,6 +43,9 @@
 #include "apr_shm.h"
 #endif
 
+/* this whole thing disappears if LDAP is not enabled */
+#if AP_HAS_LDAP
+
 /* Apache header files */
 #include "ap_config.h"
 #include "httpd.h"
 #include "http_request.h"
 #include "apr_optional.h"
 
-/* this whole thing disappears if LDAP is not enabled */
-#if AP_HAS_LDAP
-
-#include "ap_ldap.h"
-#include "ap_ldap_rebind.h"
-
 #ifdef __cplusplus
 extern "C" {
 #endif
index 38a83cecf0feeac399d139dd3b0c16a54c6364da..7688e2a791ab00835bc2db0091631f6491fff633 100644 (file)
@@ -39,11 +39,12 @@ APACHE_MODULE(authz_core, core authorization provider vector module, , , yes)
 
 dnl LDAP authentication module. This module has both the authn and authz
 dnl modules in one, so as to share the LDAP server config directives.
+dnl XXX FIXME
 APACHE_MODULE(authnz_ldap, LDAP based authentication, , , no, [
-  if test "$ap_has_ldap" = "1" ; then
+  if test -z "$apu_config" ; then
     APR_ADDTO(MOD_AUTHNZ_LDAP_LDADD, [$LDADD_ldap])
   else
-    enable_authnz_ldap=no
+    APR_ADDTO(MOD_AUTHNZ_LDAP_LDADD, [$LDADD_ldap])
   fi
   AC_SUBST(MOD_AUTHNZ_LDAP_LDADD)
 ])
index 35921526d82d631a056d87708c55665f50ff02b3..85e3d84fc7dc21ed6c28a7998c73215cc3ab45bb 100644 (file)
@@ -14,10 +14,11 @@ ap_ldap_url.lo dnl
 "
 
 APACHE_MODULE(ldap, LDAP caching and connection pooling services, $ldap_objects, , no, [
-  if test "$ap_has_ldap" = "1" ; then
-    APR_ADDTO(MOD_LDAP_LDADD, [$LDADD_ldap])
+  AP_FIND_LDAP
+  if test -z "$apu_config" ; then
+      APR_ADDTO(MOD_LDAP_LDADD, [$LDADD_ldap])
   else
-    enable_ldap=no
+      APR_ADDTO(MOD_LDAP_LDADD, [$LDADD_ldap])
   fi
   AC_SUBST(MOD_LDAP_LDADD)
 ])