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
])
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>
#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@
* @{
*/
-#if AP_HAS_LDAP
-
#include "ap_ldap.h"
+#if AP_HAS_LDAP
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
* @{
*/
-#if AP_HAS_LDAP
-
#include "ap_ldap.h"
+#if AP_HAS_LDAP
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
* @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
*
/** @} */
-#endif /* AP_LDAP_REBIND_H */
+#endif /* APU_LDAP_REBIND_H */
* @{
*/
+#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 */
#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)
#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
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)
])
"
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)
])