]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Several fixes for the ap_ldap build logic. This should fix compilation
authorStefan Fritsch <sf@apache.org>
Sat, 4 Jun 2011 13:31:49 +0000 (13:31 +0000)
committerStefan Fritsch <sf@apache.org>
Sat, 4 Jun 2011 13:31:49 +0000 (13:31 +0000)
without --with-ldap.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1131393 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 a0e6a066a0ebf232532013e1f1d262b85528e103..b23417d18cad63a467ae7d1118893399045831ee 100644 (file)
@@ -39,6 +39,7 @@ 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 0d9a19150a93131e4b354877e838e57e61cd9741..891e26696a124b0c1afdd78da7b36e6ab397a523 100644 (file)
@@ -446,6 +446,9 @@ fopen64
 dnl confirm that a void pointer is large enough to store a long integer
 APACHE_CHECK_VOID_PTR_LEN
 
+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 b847db3da37751551662fe1da7c3460882e9dbc1..130c6dd016cc61096cfb926e66f2824b8b50408c 100644 (file)
@@ -51,9 +51,6 @@
 #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 ce2ae2c0a6f3b5f392607f6a47366c9730042680..0fe0bcc6c1c3593649da924a5140c4baaac2411b 100644 (file)
  * @{
  */
 
-#include "ap_ldap.h"
-
 #if AP_HAS_LDAP
 
+#include "ap_ldap.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */
index 9c4898a2251cc225cca48e7a85a9ccb96ad414e9..6e73e5044fe5fc59b30f63695a77ed2683d8dbd6 100644 (file)
  * @{
  */
 
-#include "ap_ldap.h"
-
 #if AP_HAS_LDAP
 
+#include "ap_ldap.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */
index 5601a861eab7a38d89dd3785310d45aa4ed647c5..7bc5a5cda963c43880238e775fb2fbde761c59b4 100644 (file)
  * @brief Apache LDAP library
  */
 
-#ifndef APU_LDAP_REBIND_H
-#define APU_LDAP_REBIND_H
+#ifndef AP_LDAP_REBIND_H
+#define AP_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 /* APU_LDAP_REBIND_H */
+#endif /* AP_LDAP_REBIND_H */
 
index d8c409582264cbb7a72b3d86daf1f80db7a28be3..996b4b5a9aea622fa0160b1eeea619d3c4fdfac3 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 5ee3fb604347bb1d596ba0d4d7b68dbcfc59058d..d5e5b3d1ccde7a5ce3ef1cefed3c546533fadeaf 100644 (file)
@@ -28,9 +28,6 @@
 #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)
@@ -43,9 +40,6 @@
 #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 d2041dd7b0a8c9934b141f26fcb7c33acc0cb869..a7f653bfa51d209e89dc16d7f9275fec98366694 100644 (file)
@@ -39,12 +39,11 @@ 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 -z "$apu_config" ; then
-      MOD_AUTHNZ_LDAP_LDADD="$LDADD_ldap"
+  if test "$ap_has_ldap" = "1" ; then
+    MOD_AUTHNZ_LDAP_LDADD="$LDADD_ldap"
   else
-      MOD_AUTHNZ_LDAP_LDADD="$LDADD_ldap"
+    enable_authnz_ldap=no
   fi
   AC_SUBST(MOD_AUTHNZ_LDAP_LDADD)
 ])
index 014560dbbdb7774a4593bc3ea88bd81cc62a537d..170adb64cc7e46bbdb0cc926ee66020e946ca8a5 100644 (file)
@@ -14,11 +14,10 @@ ap_ldap_url.lo dnl
 "
 
 APACHE_MODULE(ldap, LDAP caching and connection pooling services, $ldap_objects, , no, [
-  AP_FIND_LDAP
-  if test -z "$apu_config" ; then
-      MOD_LDAP_LDADD="$LDADD_ldap"
+  if test "$ap_has_ldap" = "1" ; then
+    MOD_LDAP_LDADD="$LDADD_ldap"
   else
-      MOD_LDAP_LDADD="$LDADD_ldap"
+    enable_ldap=no
   fi
   AC_SUBST(MOD_LDAP_LDADD)
 ])