From: Greg Stein Date: Sat, 17 Feb 2001 23:58:30 +0000 (+0000) Subject: implement ability to do --enable-modules and --enable-mods-shared for "all" X-Git-Tag: 2.0.12~66 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b230ed6ca24139ae925d11f877bb4d35c00c5779;p=apache implement ability to do --enable-modules and --enable-mods-shared for "all" and "most". still need to tweak various config.m4 files to sort them out. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88219 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index d023d73cff..04a4de5b07 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 2.0.12-dev + *) implement --enable-modules and --enable-mods-shared for "all" and + "most". [Greg Stein] + *) Move the threaded MPM to use APR locks instead of pthread locks. [Ryan Bloom] diff --git a/acinclude.m4 b/acinclude.m4 index 0179b38583..bcd88a7272 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -260,14 +260,42 @@ EOF fi fi ])dnl + dnl dnl APACHE_MODULE(name, helptext[, objects[, structname[, default[, config]]]]) +dnl +dnl default is one of: +dnl yes -- enabled by default. user must explicitly disable. +dnl no -- disabled under default, most, all. user must explicitly enable. +dnl most -- disabled by default. enabled explicitly or with most or all. +dnl "" -- disabled under default, most. enabled explicitly or with all. +dnl +dnl basically: yes/no is a hard setting. "most" means follow the "most" +dnl setting. otherwise, fall under the "all" setting. +dnl explicit yes/no always overrides. +dnl AC_DEFUN(APACHE_MODULE,[ AC_MSG_CHECKING(whether to enable mod_$1) define([optname],[ --]ifelse($5,yes,disable,enable)[-]translit($1,_,-))dnl - AC_ARG_ENABLE(translit($1,_,-),optname() substr([ ],len(optname()))$2,,enable_$1=ifelse($5,,no,$5)) + AC_ARG_ENABLE(translit($1,_,-),optname() substr([ ],len(optname()))$2,,enable_$1=ifelse($5,,maybe-all,$5)) undefine([optname])dnl - AC_MSG_RESULT($enable_$1) + _apmod_extra_msg="" + if test "$enable_$1" = "most"; then + if "$module_selection" = "most"; then + $enable_$1=$module_default + _apmod_extra_msg=" (most)" + else + $enable_$1=no + fi + elif test "$enable_$1" = "maybe-all"; then + if "$module_selection" = "all"; then + $enable_$1=$module_default + _apmod_extra_msg=" (all)" + else + $enable_$1=no + fi + fi + AC_MSG_RESULT($enable_$1$_apmod_extra_msg) if test "$enable_$1" != "no"; then case "$enable_$1" in shared*) @@ -357,29 +385,38 @@ fi AC_MSG_CHECKING(for chosen layout) AC_MSG_RESULT($layout_name) -])dnl -dnl -dnl APACHE_ENABLE_SHARED -dnl -AC_DEFUN(APACHE_ENABLE_SHARED,[ -AC_ARG_ENABLE(mods-shared, -[ --enable-mods-shared=MODULE-LIST],[ - for i in $enableval; do - eval "enable_$i=shared" - done ]) -])dnl + dnl dnl APACHE_ENABLE_MODULES dnl AC_DEFUN(APACHE_ENABLE_MODULES,[ -AC_ARG_ENABLE(modules, -[ --enable-modules=MODULE-LIST],[ - for i in $enableval; do - eval "enable_$i=yes" - done + module_selection=default + module_default=yes + + AC_ARG_ENABLE(modules, + [ --enable-modules=MODULE-LIST],[ + for i in $enableval; do + if test "$i" = "all" -o "$i" = "most"; then + module_selection=$i + else + eval "enable_$i=yes" + fi + done + ]) + + AC_ARG_ENABLE(mods-shared, + [ --enable-mods-shared=MODULE-LIST],[ + for i in $enableval; do + if test "$i" = "all" -o "$i" = "most"; then + module_selection=$i + module_default=shared + else + eval "enable_$i=shared" + fi + done + ]) ]) -])dnl AC_DEFUN(APACHE_REQUIRE_CXX,[ if test -z "$apache_cxx_done"; then diff --git a/configure.in b/configure.in index f9b0287936..c7488fc603 100644 --- a/configure.in +++ b/configure.in @@ -119,7 +119,6 @@ AC_ARG_WITH(maintainer-mode,[ --with-maintainer-mode Turn on debugging and com APACHE_ENABLE_LAYOUT APACHE_ENABLE_MODULES -APACHE_ENABLE_SHARED INCLUDES="-I\$(top_srcdir)/include -I\$(top_srcdir)/srclib/apr/include -I\$(top_srcdir)/srclib/apr-util/include" if test -n "$USE_VPATH"; then