You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rj...@apache.org on 2010/06/07 00:05:18 UTC

svn commit: r952007 - /httpd/httpd/trunk/acinclude.m4

Author: rjung
Date: Sun Jun  6 22:05:17 2010
New Revision: 952007

URL: http://svn.apache.org/viewvc?rev=952007&view=rev
Log:
make shared moduled and module set "most" the default.

Static building can be achieved with --enable-mods-static
or as previously using --enable-MODULE=static.
The existing --enable-mods-shared still works for
compatibility with existing build scripts.

Modules build with --with-module=... will still be build static.
For dynamic builds of external modules there is apxs.

The default set of modules os now "most". To build a small
set of modules use the new "few".

If APR doesn't support DSOs we fall back to static binding.

Modified:
    httpd/httpd/trunk/acinclude.m4

Modified: httpd/httpd/trunk/acinclude.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/acinclude.m4?rev=952007&r1=952006&r2=952007&view=diff
==============================================================================
--- httpd/httpd/trunk/acinclude.m4 (original)
+++ httpd/httpd/trunk/acinclude.m4 Sun Jun  6 22:05:17 2010
@@ -288,17 +288,16 @@ AC_DEFUN(APACHE_MODULE,[
     _apmod_error_fatal="yes"
   fi
   if test "$enable_$1" = "static"; then
-    enable_$1=yes
+    enable_$1=static
   elif test "$enable_$1" = "yes"; then
     enable_$1=$module_default
-    _apmod_extra_msg=" ($module_selection)"
   elif test "$enable_$1" = "most"; then
     if test "$module_selection" = "most" -o "$module_selection" = "all"; then
       enable_$1=$module_default
-      _apmod_extra_msg=" ($module_selection)"
-    elif test "$enable_$1" != "yes"; then
+    elif test "$module_selection" = "few" -o "$module_selection" = "none"; then
       enable_$1=no
     fi
+    _apmod_extra_msg=" ($module_selection)"
   elif test "$enable_$1" = "maybe-all"; then
     if test "$module_selection" = "all"; then
       enable_$1=$module_default
@@ -324,18 +323,18 @@ AC_DEFUN(APACHE_MODULE,[
   AC_MSG_RESULT($enable_$1$_apmod_extra_msg)
   if test "$enable_$1" != "no"; then
     case "$enable_$1" in
-    shared*)
-      enable_$1=`echo $enable_$1|sed 's/shared,*//'`
-      sharedobjs=yes
-      shared=yes
-      DSO_MODULES="$DSO_MODULES $1"
-      ;;
-    *)
+    static*)
       MODLIST="$MODLIST ifelse($4,,$1,$4)"
       if test "$1" = "so"; then
           sharedobjs=yes
       fi
       shared="";;
+    *)
+      enable_$1=`echo $enable_$1|sed 's/shared,*//'`
+      sharedobjs=yes
+      shared=yes
+      DSO_MODULES="$DSO_MODULES $1"
+      ;;
     esac
     define([modprefix], [MOD_]translit($1, [a-z-], [A-Z_]))
     APACHE_MODPATH_ADD($1, $shared, $3,, [\$(]modprefix[_LDADD)])
@@ -348,30 +347,40 @@ dnl
 dnl APACHE_ENABLE_MODULES
 dnl
 AC_DEFUN(APACHE_ENABLE_MODULES,[
-  module_selection=default
-  module_default=yes
+  module_selection=most
+  module_default=shared
+
+  dnl Check whether we have DSO support.
+  dnl If "yes", we build shared modules by default.
+  APR_CHECK_APR_DEFINE(APR_HAS_DSO)
+
+  if test $ac_cv_define_APR_HAS_DSO = "no"; then
+    AC_MSG_WARN([Missing DSO support - building static modules by default.])
+    module_default=static
+  fi
+
 
   AC_ARG_ENABLE(modules,
-  APACHE_HELP_STRING(--enable-modules=MODULE-LIST,Space-separated list of modules to enable | "all" | "most" | "none"),[
+  APACHE_HELP_STRING(--enable-modules=MODULE-LIST,Space-separated list of modules to enable | "all" | "most" | "few" | "none"),[
     if test "$enableval" = "none"; then
        module_default=no
        module_selection=none
     else
       for i in $enableval; do
-        if test "$i" = "all" -o "$i" = "most"; then
+        if test "$i" = "all" -o "$i" = "most" -o "$i" = "few"; then
           module_selection=$i
         else
           i=`echo $i | sed 's/-/_/g'`
-          eval "enable_$i=yes"
+          eval "enable_$i=shared"
         fi
       done
     fi
   ])
   
   AC_ARG_ENABLE(mods-shared,
-  APACHE_HELP_STRING(--enable-mods-shared=MODULE-LIST,Space-separated list of shared modules to enable | "all" | "most"),[
+  APACHE_HELP_STRING(--enable-mods-shared=MODULE-LIST,Space-separated list of shared modules to enable | "all" | "most" | "few"),[
     for i in $enableval; do
-      if test "$i" = "all" -o "$i" = "most"; then
+      if test "$i" = "all" -o "$i" = "most" -o "$i" = "few"; then
         module_selection=$i
         module_default=shared
       else
@@ -380,6 +389,19 @@ AC_DEFUN(APACHE_ENABLE_MODULES,[
       fi
     done
   ])
+  
+  AC_ARG_ENABLE(mods-static,
+  APACHE_HELP_STRING(--enable-mods-static=MODULE-LIST,Space-separated list of static modules to enable | "all" | "most" | "few"),[
+    for i in $enableval; do
+      if test "$i" = "all" -o "$i" = "most" -o "$i" = "few"; then
+        module_selection=$i
+        module_default=static
+      else
+        i=`echo $i | sed 's/-/_/g'`
+    	eval "enable_$i=static"
+      fi
+    done
+  ])
 ])
 
 AC_DEFUN(APACHE_REQUIRE_CXX,[



Re: svn commit: r952007 - /httpd/httpd/trunk/acinclude.m4

Posted by Rainer Jung <ra...@kippdata.de>.
On 22.06.2013 15:26, Eric Covener wrote:
> On Sun, Jun 6, 2010 at 6:05 PM,  <rj...@apache.org> wrote:
>> Author: rjung
>> Date: Sun Jun  6 22:05:17 2010
>> New Revision: 952007
>>
>> URL: http://svn.apache.org/viewvc?rev=952007&view=rev
>> Log:
>> make shared moduled and module set "most" the default.
>>
>> Static building can be achieved with --enable-mods-static
>> or as previously using --enable-MODULE=static.
>> The existing --enable-mods-shared still works for
>> compatibility with existing build scripts.
> 
> I just stumbled on this 2.4 difference. If someone passes
> --enable-mods-shared="foo bar baz" do you think module_selection
> should be reset? Currently you get the union of "most" and what you
> selected.

Configure docs page currently says:

====
Choosing modules to compile

Most modules are compiled by default and have to be disabled explicitly
or by using the keywords few or none (see --enable-modules,
--enable-mods-shared and --enable-mods-static below for further
explanation) to be removed.
====

So I'd say if one uses a plain --enable-MODULE=shared then the list
should not get reset. That's what I would find logical behavior.

Further down that page it says:

====
--enable-mods-shared=MODULE-LIST

    Defines a list of modules to be enabled and build as dynamic shared
modules. This mean, these module have to be loaded dynamically by using
the LoadModule directive.

    MODULE-LIST is a space separated list of modulenames enclosed by
quotation marks. The module names are given without the preceding mod_.
For example:

    --enable-mods-shared='headers rewrite dav'

    Additionally you can use the special keywords reallyall, all, most,
few and none.
====

And here I would say if you only give a list of modules, then the list
should be reset, ie. "most" should no longer be active.

Now what would we expect if you start mixing "most", "few" etc. and
module sets? I guest it would be best to only allow one occurrence of
--enable-mods-shared, hopefully that's already true.

The same docs page has a very outdated

====
Caveat: --enable-mods-shared=all does not actually build all modules. To
build all modules then, one might use:

./configure \
--with-ldap \
--enable-mods-shared="all ssl ldap cache proxy authn_alias file_cache
authnz_ldap charset_lite dav_lock cache_disk"
====

I hope the following statement is correct for 2.4: module set "all"
contains all modules except for experimental and debugging modules.
Module set "reallyall" also includes experimental and debugging modules.
That both wont build modules which have their build dependencies not
fulfilled (can't be build) should be obvious.

Regards,

Rainer



Re: svn commit: r952007 - /httpd/httpd/trunk/acinclude.m4

Posted by Eric Covener <co...@gmail.com>.
On Sun, Jun 6, 2010 at 6:05 PM,  <rj...@apache.org> wrote:
> Author: rjung
> Date: Sun Jun  6 22:05:17 2010
> New Revision: 952007
>
> URL: http://svn.apache.org/viewvc?rev=952007&view=rev
> Log:
> make shared moduled and module set "most" the default.
>
> Static building can be achieved with --enable-mods-static
> or as previously using --enable-MODULE=static.
> The existing --enable-mods-shared still works for
> compatibility with existing build scripts.

I just stumbled on this 2.4 difference. If someone passes
--enable-mods-shared="foo bar baz" do you think module_selection
should be reset? Currently you get the union of "most" and what you
selected.