summaryrefslogtreecommitdiffstats
path: root/server/mpm/config2.m4
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 06:33:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 06:33:50 +0000
commitfe39ffb8b90ae4e002ed73fe98617cd590abb467 (patch)
treeb80e5956907d8aeaaffe4e4f0c068c0e6157ce8b /server/mpm/config2.m4
parentInitial commit. (diff)
downloadapache2-fe39ffb8b90ae4e002ed73fe98617cd590abb467.tar.xz
apache2-fe39ffb8b90ae4e002ed73fe98617cd590abb467.zip
Adding upstream version 2.4.56.upstream/2.4.56upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'server/mpm/config2.m4')
-rw-r--r--server/mpm/config2.m489
1 files changed, 89 insertions, 0 deletions
diff --git a/server/mpm/config2.m4 b/server/mpm/config2.m4
new file mode 100644
index 0000000..d7e73ec
--- /dev/null
+++ b/server/mpm/config2.m4
@@ -0,0 +1,89 @@
+AC_MSG_CHECKING(which MPM to use by default)
+AC_ARG_WITH(mpm,
+APACHE_HELP_STRING(--with-mpm=MPM,Choose the process model for Apache to use by default.
+ MPM={event|worker|prefork|winnt}
+ This will be statically linked as the only available MPM unless
+ --enable-mpms-shared is also specified.
+),[
+ default_mpm=$withval
+ AC_MSG_RESULT($withval);
+],[
+ dnl Order of preference for default MPM:
+ dnl The Windows and OS/2 MPMs are used on those platforms.
+ dnl Everywhere else: event, worker, prefork
+ if ap_mpm_is_supported "winnt"; then
+ default_mpm=winnt
+ AC_MSG_RESULT(winnt)
+ elif ap_mpm_is_supported "mpmt_os2"; then
+ default_mpm=mpmt_os2
+ AC_MSG_RESULT(mpmt_os2)
+ elif ap_mpm_is_supported "event"; then
+ default_mpm=event
+ AC_MSG_RESULT(event)
+ elif ap_mpm_is_supported "worker"; then
+ default_mpm=worker
+ AC_MSG_RESULT(worker - event is not supported)
+ else
+ default_mpm=prefork
+ AC_MSG_RESULT(prefork - event and worker are not supported)
+ fi
+])
+
+APACHE_MPM_ENABLED($default_mpm)
+
+AC_ARG_ENABLE(mpms-shared,
+APACHE_HELP_STRING(--enable-mpms-shared=MPM-LIST,Space-separated list of MPM modules to enable for dynamic loading. MPM-LIST=list | "all"),[
+ if test "$enableval" = "no"; then
+ mpm_build=static
+ else
+ mpm_build=shared
+dnl Build just the default MPM if --enable-mpms-shared has no argument.
+ if test "$enableval" = "yes"; then
+ enableval=$default_mpm
+ fi
+ for i in $enableval; do
+ if test "$i" = "all"; then
+ for j in $ap_supported_shared_mpms; do
+ eval "enable_mpm_$j=shared"
+ APACHE_MPM_ENABLED($j)
+ done
+ else
+ i=`echo $i | sed 's/-/_/g'`
+ if ap_mpm_supports_shared $i; then
+ eval "enable_mpm_$i=shared"
+ APACHE_MPM_ENABLED($i)
+ else
+ AC_MSG_ERROR([MPM $i does not support dynamic loading.])
+ fi
+ fi
+ done
+ fi
+], [mpm_build=static])
+
+for i in $ap_enabled_mpms; do
+ if ap_mpm_is_supported $i; then
+ :
+ else
+ AC_MSG_ERROR([MPM $i is not supported on this platform.])
+ fi
+done
+
+if test $mpm_build = "shared"; then
+ eval "tmp=\$enable_mpm_$default_mpm"
+ if test "$tmp" != "shared"; then
+ AC_MSG_ERROR([The default MPM ($default_mpm) must be included in --enable-mpms-shared. Use --with-mpm to change the default MPM.])
+ fi
+fi
+
+APACHE_FAST_OUTPUT(server/mpm/Makefile)
+
+if test $mpm_build = "shared"; then
+ MPM_LIB=""
+else
+ MPM_LIB=server/mpm/$default_mpm/lib${default_mpm}.la
+ MODLIST="$MODLIST mpm_${default_mpm}"
+fi
+
+MPM_SUBDIRS=$ap_enabled_mpms
+APACHE_SUBST(MPM_SUBDIRS)
+APACHE_SUBST(MPM_LIB)