diff options
-rw-r--r-- | build/find_ldap.m4 | 1 | ||||
-rw-r--r-- | configure.in | 3 | ||||
-rw-r--r-- | include/ap_ldap.h.in | 3 | ||||
-rw-r--r-- | include/ap_ldap_init.h | 4 | ||||
-rw-r--r-- | include/ap_ldap_option.h | 4 | ||||
-rw-r--r-- | include/ap_ldap_rebind.h | 14 | ||||
-rw-r--r-- | include/ap_ldap_url.h | 8 | ||||
-rw-r--r-- | include/util_ldap.h | 12 | ||||
-rw-r--r-- | modules/aaa/config.m4 | 7 | ||||
-rw-r--r-- | modules/ldap/config.m4 | 7 |
10 files changed, 31 insertions, 32 deletions
diff --git a/build/find_ldap.m4 b/build/find_ldap.m4 index a0e6a066a0..b23417d18c 100644 --- a/build/find_ldap.m4 +++ b/build/find_ldap.m4 @@ -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 ]) diff --git a/configure.in b/configure.in index 0d9a19150a..891e26696a 100644 --- a/configure.in +++ b/configure.in @@ -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> diff --git a/include/ap_ldap.h.in b/include/ap_ldap.h.in index b847db3da3..130c6dd016 100644 --- a/include/ap_ldap.h.in +++ b/include/ap_ldap.h.in @@ -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@ diff --git a/include/ap_ldap_init.h b/include/ap_ldap_init.h index ce2ae2c0a6..0fe0bcc6c1 100644 --- a/include/ap_ldap_init.h +++ b/include/ap_ldap_init.h @@ -26,10 +26,10 @@ * @{ */ -#include "ap_ldap.h" - #if AP_HAS_LDAP +#include "ap_ldap.h" + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ diff --git a/include/ap_ldap_option.h b/include/ap_ldap_option.h index 9c4898a225..6e73e5044f 100644 --- a/include/ap_ldap_option.h +++ b/include/ap_ldap_option.h @@ -26,10 +26,10 @@ * @{ */ -#include "ap_ldap.h" - #if AP_HAS_LDAP +#include "ap_ldap.h" + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ diff --git a/include/ap_ldap_rebind.h b/include/ap_ldap_rebind.h index 5601a861ea..7bc5a5cda9 100644 --- a/include/ap_ldap_rebind.h +++ b/include/ap_ldap_rebind.h @@ -25,23 +25,23 @@ * @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 */ diff --git a/include/ap_ldap_url.h b/include/ap_ldap_url.h index d8c4095822..996b4b5a9a 100644 --- a/include/ap_ldap_url.h +++ b/include/ap_ldap_url.h @@ -26,15 +26,15 @@ * @{ */ -#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 */ diff --git a/include/util_ldap.h b/include/util_ldap.h index 5ee3fb6043..d5e5b3d1cc 100644 --- a/include/util_ldap.h +++ b/include/util_ldap.h @@ -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" @@ -56,6 +50,12 @@ #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 diff --git a/modules/aaa/config.m4 b/modules/aaa/config.m4 index d2041dd7b0..a7f653bfa5 100644 --- a/modules/aaa/config.m4 +++ b/modules/aaa/config.m4 @@ -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) ]) diff --git a/modules/ldap/config.m4 b/modules/ldap/config.m4 index 014560dbbd..170adb64cc 100644 --- a/modules/ldap/config.m4 +++ b/modules/ldap/config.m4 @@ -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) ]) |