Commit a8f02069 authored by Stefan Fritsch's avatar Stefan Fritsch
Browse files

Make APACHE_MODULE() accept an optional prerequisite module for configure.

Introduce the following configure time dependencies:
  mod_proxy_* (except proxy_html) require mod_proxy
  mod_dav_* require mod_dav
  mod_session_* require mod_session


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1234180 13f79535-47bb-0310-9956-ffa450edef68
parent c7e05187
Loading
Loading
Loading
Loading
+20 −3
Original line number Diff line number Diff line
@@ -267,7 +267,7 @@ EOF
])dnl

dnl
dnl APACHE_MODULE(name, helptext[, objects[, structname[, default[, config]]]])
dnl APACHE_MODULE(name, helptext[, objects[, structname[, default[, config[, prereq_module]]]]])
dnl
dnl default is one of:
dnl   yes    -- enabled by default. user must explicitly disable.
@@ -284,6 +284,15 @@ dnl setting. otherwise, fall under the "all" setting.
dnl            explicit yes/no always overrides, except if the user selects
dnl            "reallyall".
dnl
dnl prereq_module is a module (without the "mod_" prefix) that must be enabled
dnl   if the current module is enabled.  If the current module is built
dnl   statically, prereq_module must be built statically, too.  If these
dnl   conditions are not fulfilled, configure will abort if the current module
dnl   has been enabled explicitly. Otherwise, configure will disable the
dnl   current module.
dnl   prereq_module's APACHE_MODULE() statement must have been processed
dnl   before the current APACHE_MODULE() statement.
dnl
AC_DEFUN(APACHE_MODULE,[
  AC_MSG_CHECKING(whether to enable mod_$1)
  define([optname],[--]ifelse($5,yes,disable,enable)[-]translit($1,_,-))dnl
@@ -336,8 +345,16 @@ AC_DEFUN(APACHE_MODULE,[
  if test "$enable_$1" != "no"; then
    dnl If we plan to enable it, allow the module to run some autoconf magic
    dnl that may disable it because of missing dependencies.
    ifelse([$6],,:,[AC_MSG_RESULT([checking dependencies])
                    $6
    ifelse([$6$7],,:,[AC_MSG_RESULT([checking dependencies])
                      ifelse([$7],,:,[if test "$enable_$7" = "no" ; then
                                        enable_$1=no
                                        AC_MSG_WARN("mod_$7 is disabled but required for mod_$1")
                                      elif test "$enable_$1" = "static" && test "$enable_$7" != "static" ; then
                                        enable_$1=no
                                        AC_MSG_WARN("cannot build mod_$1 statically if mod_$7 is built shared")
                                      else])
                                        ifelse([$6],,:,[$6])
                      ifelse([$7],,:,[fi])
                    AC_MSG_CHECKING(whether to enable mod_$1)
                    if test "$enable_$1" = "no"; then
                      if test "$_apmod_required" = "no"; then
+1 −1
Original line number Diff line number Diff line
@@ -18,6 +18,6 @@ case "$host" in
    ;;
esac

APACHE_MODULE(dav_fs, DAV provider for the filesystem.  --enable-dav also enables mod_dav_fs., $dav_fs_objects, , $dav_fs_enable)
APACHE_MODULE(dav_fs, DAV provider for the filesystem.  --enable-dav also enables mod_dav_fs., $dav_fs_objects, , $dav_fs_enable,,dav)

APACHE_MODPATH_FINISH
+1 −1
Original line number Diff line number Diff line
@@ -12,6 +12,6 @@ case "$host" in
    ;;
esac

APACHE_MODULE(dav_lock, DAV provider for generic locking - requires --enable-dav, $dav_lock_objects, , )
APACHE_MODULE(dav_lock, DAV provider for generic locking, $dav_lock_objects, ,,,dav)

APACHE_MODPATH_FINISH
+9 −9
Original line number Diff line number Diff line
@@ -37,11 +37,11 @@ case "$host" in
    ;;
esac

APACHE_MODULE(proxy_connect, Apache proxy CONNECT module.  Requires and is enabled by --enable-proxy., $proxy_connect_objs, , $proxy_mods_enable)
APACHE_MODULE(proxy_ftp, Apache proxy FTP module.  Requires and is enabled by --enable-proxy., $proxy_ftp_objs, , $proxy_mods_enable)
APACHE_MODULE(proxy_http, Apache proxy HTTP module.  Requires and is enabled by --enable-proxy., $proxy_http_objs, , $proxy_mods_enable)
APACHE_MODULE(proxy_fcgi, Apache proxy FastCGI module.  Requires and is enabled by --enable-proxy., $proxy_fcgi_objs, , $proxy_mods_enable)
APACHE_MODULE(proxy_scgi, Apache proxy SCGI module.  Requires and is enabled by --enable-proxy., $proxy_scgi_objs, , $proxy_mods_enable)
APACHE_MODULE(proxy_connect, Apache proxy CONNECT module.  Requires and is enabled by --enable-proxy., $proxy_connect_objs, , $proxy_mods_enable,, proxy)
APACHE_MODULE(proxy_ftp, Apache proxy FTP module.  Requires and is enabled by --enable-proxy., $proxy_ftp_objs, , $proxy_mods_enable,, proxy)
APACHE_MODULE(proxy_http, Apache proxy HTTP module.  Requires and is enabled by --enable-proxy., $proxy_http_objs, , $proxy_mods_enable,, proxy)
APACHE_MODULE(proxy_fcgi, Apache proxy FastCGI module.  Requires and is enabled by --enable-proxy., $proxy_fcgi_objs, , $proxy_mods_enable,, proxy)
APACHE_MODULE(proxy_scgi, Apache proxy SCGI module.  Requires and is enabled by --enable-proxy., $proxy_scgi_objs, , $proxy_mods_enable,, proxy)
APACHE_MODULE(proxy_fdpass, Apache proxy to Unix Daemon Socket module.  Requires --enable-proxy., $proxy_fdpass_objs, , , [
  AC_CHECK_DECL(CMSG_DATA,,, [
    #include <sys/types.h>
@@ -51,9 +51,9 @@ APACHE_MODULE(proxy_fdpass, Apache proxy to Unix Daemon Socket module. Requires
    AC_MSG_WARN([Your system does not support CMSG_DATA.])
    enable_proxy_fdpass=no
  fi
])
APACHE_MODULE(proxy_ajp, Apache proxy AJP module.  Requires and is enabled by --enable-proxy., $proxy_ajp_objs, , $proxy_mods_enable)
APACHE_MODULE(proxy_balancer, Apache proxy BALANCER module.  Requires and is enabled by --enable-proxy., $proxy_balancer_objs, , $proxy_mods_enable)
],proxy)
APACHE_MODULE(proxy_ajp, Apache proxy AJP module.  Requires and is enabled by --enable-proxy., $proxy_ajp_objs, , $proxy_mods_enable,, proxy)
APACHE_MODULE(proxy_balancer, Apache proxy BALANCER module.  Requires and is enabled by --enable-proxy., $proxy_balancer_objs, , $proxy_mods_enable,, proxy)

APACHE_MODULE(serf, [Reverse proxy module using Serf], , , no, [
    APACHE_CHECK_SERF
@@ -64,7 +64,7 @@ APACHE_MODULE(serf, [Reverse proxy module using Serf], , , no, [
    fi
])

APACHE_MODULE(proxy_express, mass reverse-proxy module. Requires --enable-proxy., , , $proxy_mods_enable)
APACHE_MODULE(proxy_express, mass reverse-proxy module. Requires --enable-proxy., , , $proxy_mods_enable,, proxy)

APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])

+3 −3
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ case "$host" in
esac

APACHE_MODULE(session, session module, , , most)
APACHE_MODULE(session_cookie, session cookie module, $session_cookie_objects, , $session_mods_enable)
APACHE_MODULE(session_cookie, session cookie module, $session_cookie_objects, , $session_mods_enable,,session)

if test "$enable_session_crypto" != ""; then
  session_mods_enable_crypto=$enable_session_crypto
@@ -58,9 +58,9 @@ APACHE_MODULE(session_crypto, session crypto module, $session_crypto_objects, ,
if test "$session_mods_enable_crypto" = "no" ; then
  enable_session_crypto=no
fi
])
],session)

APACHE_MODULE(session_dbd, session dbd module, $session_dbd_objects, , $session_mods_enable)
APACHE_MODULE(session_dbd, session dbd module, $session_dbd_objects, , $session_mods_enable,,session)

APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])