From b7a635b560d880dfc475c49129b2c3d5af729a46 Mon Sep 17 00:00:00 2001 From: Ryan Bloom Date: Sun, 9 Jul 2000 18:54:08 +0000 Subject: [PATCH] Fix building the mpmt MPM. The problem was that IfModule uses the name of the C file to determine if a module is present. mpmt emulates three different MPMs though. If the default config file we have sane defaults for each of the three MPMs that mpmt emulates. To fix this, the build process creates a soft link to the original MPM name during the configure process, and the build process actually compiles that file, instead of the original mpmt.c. This allow the mpmt MPM to work just as well as mpmt_pthread. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85798 13f79535-47bb-0310-9956-ffa450edef68 --- server/mpm/config.m4 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/server/mpm/config.m4 b/server/mpm/config.m4 index 2f72ceb4cb..194f1f0963 100644 --- a/server/mpm/config.m4 +++ b/server/mpm/config.m4 @@ -50,10 +50,23 @@ if test "$mpm_explicit" = "no"; then AC_CACHE_SAVE fi +dnl The MPM_FAKE_NAME allow the mpmt MPM to emulate all of the MPMs without +dnl Apache actually knowing it. The problem is IfModule. IfModule uses +dnl the C file's name to know if the module is loaded. Without this change +dnl mpmt always shows up as mpmt.c, and we can't distinguish between all +dnl of the emulated MPMs. +dnl +dnl This fixes that by creating a soft link that has the name of the +dnl desired MPM to mpmt.c. Now, Apache can search for the specified MPM +dnl and actually find it. if test "$MPM_NAME" = "mpmt_pthread" ; then EXTRA_CFLAGS="$EXTRA_CFLAGS -DMPMT_PTHREAD" + MPM_FAKE_NAME=mpmt_pthread.c + ln -s mpmt.c modules/mpm/mpmt/mpmt_pthread.c elif test "$MPM_NAME" = "dexter" ; then EXTRA_CFLAGS="$EXTRA_CFLAGS -DDEXTER" + MPM_FAKE_NAME=dexter.c + ln -s mpmt.c modules/mpm/mpmt/dexter.c fi if test "$MPM_NAME" = "dexter" -o "$MPM_NAME" = "mpmt_pthread"; then @@ -67,6 +80,7 @@ if test "$mpm_explicit" = "no"; then fi APACHE_SUBST(MPM_NAME) +APACHE_SUBST(MPM_FAKE_NAME) MODLIST="$MODLIST mpm_${MPM_NAME}" dnl Check for pthreads and attempt to support it -- 2.40.0