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

By default, only load those modules that are either required

or explicitly selected by a configure --enable-foo argument. The
LoadModule statements for modules enabled by --enable-mods-shared=most
and friends will be commented out.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1199027 13f79535-47bb-0310-9956-ffa450edef68
parent 1ba5f0bc
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -16,6 +16,11 @@ Changes with Apache 2.3.15
     core: Fix integer overflow in ap_pregsub. This can be triggered e.g.
     with mod_setenvif via a malicious .htaccess. [Stefan Fritsch]

  *) configure: By default, only load those modules that are either required
     or explicitly selected by a configure --enable-foo argument. The
     LoadModule statements for modules enabled by --enable-mods-shared=most
     and friends will be commented out. [Stefan Fritsch]

  *) mod_lua: Prevent early Lua hooks (LuaHookTranslateName and 
     LuaHookQuickHandler) from being configured in <Directory>, <Files>, 
     and htaccess where the configuration would have been ignored.
+5 −1
Original line number Diff line number Diff line
@@ -60,7 +60,11 @@ install-conf:
	    				< $$i; \
	    			for j in $(DSO_MODULES) "^EOL^"; do \
	    				if test $$j != "^EOL^"; then \
	    					if echo "$(ENABLED_DSO_MODULES)"|$(EGREP) "\<$$j\>" > /dev/null ; then \
	    						echo "LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
	    					else \
	    						echo "#LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
	    					fi; \
	    				fi; \
	    			done; \
	    			sed -e '1,/@@LoadModule@@/d' \
+9 −4
Original line number Diff line number Diff line
@@ -89,6 +89,7 @@ AC_DEFUN(APACHE_GEN_CONFIG_VARS,[
  APACHE_SUBST(MKDEP)
  APACHE_SUBST(INSTALL_PROG_FLAGS)
  APACHE_SUBST(DSO_MODULES)
  APACHE_SUBST(ENABLED_DSO_MODULES)
  APACHE_SUBST(APR_BINDIR)
  APACHE_SUBST(APR_INCLUDEDIR)
  APACHE_SUBST(APR_VERSION)
@@ -255,6 +256,7 @@ EOF
            # add default MPM to LoadModule list
            if test $1 = $default_mpm; then
                DSO_MODULES="$DSO_MODULES mpm_$1"
                ENABLED_DSO_MODULES="$ENABLED_DSO_MODULES mpm_$1"
            fi
        fi
        $4
@@ -290,15 +292,15 @@ AC_DEFUN(APACHE_MODULE,[
  dnl its pre-reqs fail.
  case "$enable_$1" in
    yes|static|shared)
      _apmod_error_fatal="yes"
      _apmod_required="yes"
      ;;
    *)
      case "$module_selection" in
      reallyall|all|most)
        _apmod_error_fatal="no"
        _apmod_required="no"
        ;;
      *)
        _apmod_error_fatal="yes"
        _apmod_required="yes"
        ;;
      esac
  esac
@@ -335,7 +337,7 @@ AC_DEFUN(APACHE_MODULE,[
                    $6
                    AC_MSG_CHECKING(whether to enable mod_$1)
                    if test "$enable_$1" = "no"; then
                      if test "$_apmod_error_fatal" = "no"; then
                      if test "$_apmod_required" = "no"; then
                        _apmod_extra_msg=" (disabled)"
                      else
                        AC_MSG_ERROR([mod_$1 has been requested but can not be built due to prerequisite failures])
@@ -356,6 +358,9 @@ AC_DEFUN(APACHE_MODULE,[
      sharedobjs=yes
      shared=yes
      DSO_MODULES="$DSO_MODULES $1"
      if test "$_apmod_required" = "yes" ; then
        ENABLED_DSO_MODULES="$ENABLED_DSO_MODULES $1"
      fi
      ;;
    esac
    define([modprefix], [MOD_]translit($1, [a-z-], [A-Z_]))
+4 −0
Original line number Diff line number Diff line
@@ -59,6 +59,10 @@ nl='
dnl Check that mkdir -p works
APR_MKDIR_P_CHECK($top_srcdir/build/mkdir.sh)

dnl get an EGREP to use in the Makefiles
AC_PROG_EGREP
APACHE_SUBST(EGREP)

dnl ## Run configure for packages Apache uses

dnl shared library support for these packages doesn't currently