summaryrefslogtreecommitdiffstats
path: root/acinclude.m4
diff options
context:
space:
mode:
authorRainer Jung <rjung@apache.org>2010-06-07 00:05:17 +0200
committerRainer Jung <rjung@apache.org>2010-06-07 00:05:17 +0200
commite715e9cef22cb96ea8fb04394f1b0485076fbabe (patch)
tree7f45dd190595c28cd3cc65e3c3f21ccd690113dc /acinclude.m4
parentRebuild recent contributions. (diff)
downloadapache2-e715e9cef22cb96ea8fb04394f1b0485076fbabe.tar.xz
apache2-e715e9cef22cb96ea8fb04394f1b0485076fbabe.zip
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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@952007 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--acinclude.m458
1 files changed, 40 insertions, 18 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index c7a5d895c6..6f7fe7466c 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -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,[