Changes with Apache 2.3.15
+ *) configure: Enable ldap modules in 'all' and 'most' selections if ldap
+ is compiled into apr-util. [Stefan Fritsch]
+
*) core: Add ap_check_cmd_context()-check if a command is executed in
.htaccess file. [Stefan Fritsch]
AC_MSG_ERROR([Size of "void *" is less than size of "long"])
fi
])
+
+dnl
+dnl APACHE_CHECK_APR_HAS_LDAP
+dnl
+dnl Check if APR_HAS_LDAP is 1
+dnl Unfortunately, we can't use APR_CHECK_APR_DEFINE (because it only includes apr.h)
+dnl or APR_CHECK_DEFINE (because it only checks for defined'ness and not for 0/1).
+dnl
+AC_DEFUN([APACHE_CHECK_APR_HAS_LDAP], [
+ AC_CACHE_CHECK([for ldap support in apr/apr-util],ac_cv_APR_HAS_LDAP,[
+ apache_old_cppflags="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCLUDES"
+ AC_EGREP_CPP(YES_IS_DEFINED, [
+#include <apr_ldap.h>
+#if APR_HAS_LDAP
+YES_IS_DEFINED
+#endif
+ ], ac_cv_APR_HAS_LDAP=yes, ac_cv_APR_HAS_LDAP=no)
+ CPPFLAGS="$apache_old_cppflags"
+ ])
+])
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.
-APACHE_MODULE(authnz_ldap, LDAP based authentication, , , no, [
- if test -z "$apu_config" ; then
+APACHE_MODULE(authnz_ldap, LDAP based authentication, , , most, [
+ APACHE_CHECK_APR_HAS_LDAP
+ if test "$ac_cv_APR_HAS_LDAP" = "yes" ; then
+ if test -z "$apu_config" ; then
LDAP_LIBS="`$apr_config --ldap-libs`"
- else
+ else
LDAP_LIBS="`$apu_config --ldap-libs`"
+ fi
+ APR_ADDTO(MOD_AUTHNZ_LDAP_LDADD, [$LDAP_LIBS])
+ AC_SUBST(MOD_AUTHNZ_LDAP_LDADD)
+ else
+ AC_MSG_WARN([apr/apr-util is compiled without ldap support])
+ enable_authnz_ldap=no
fi
- APR_ADDTO(MOD_AUTHNZ_LDAP_LDADD, [$LDAP_LIBS])
- AC_SUBST(MOD_AUTHNZ_LDAP_LDADD)
])
dnl - host access control compatibility modules. Implements Order, Allow,
APACHE_MODPATH_INIT(ldap)
ldap_objects="util_ldap.lo util_ldap_cache.lo util_ldap_cache_mgr.lo"
-APACHE_MODULE(ldap, LDAP caching and connection pooling services, $ldap_objects, , no, [
- if test -z "$apu_config" ; then
+APACHE_MODULE(ldap, LDAP caching and connection pooling services, $ldap_objects, , most , [
+ APACHE_CHECK_APR_HAS_LDAP
+ if test "$ac_cv_APR_HAS_LDAP" = "yes" ; then
+ if test -z "$apu_config" ; then
LDAP_LIBS="`$apr_config --ldap-libs`"
- else
+ else
LDAP_LIBS="`$apu_config --ldap-libs`"
+ fi
+ APR_ADDTO(MOD_LDAP_LDADD, [$LDAP_LIBS])
+ AC_SUBST(MOD_LDAP_LDADD)
+ else
+ AC_MSG_WARN([apr/apr-util is compiled without ldap support])
+ enable_ldap=no
fi
- APR_ADDTO(MOD_LDAP_LDADD, [$LDAP_LIBS])
- AC_SUBST(MOD_LDAP_LDADD)
])
APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])