]> granicus.if.org Git - apache/commitdiff
Fix usage of MOD_* variables for MPM modules
authorStefan Fritsch <sf@apache.org>
Sun, 7 Oct 2012 08:56:45 +0000 (08:56 +0000)
committerStefan Fritsch <sf@apache.org>
Sun, 7 Oct 2012 08:56:45 +0000 (08:56 +0000)
r1385216 broke building of mpm event with serf support. To fix,

* introduce APACHE_MPMPATH_INIT/FINISH similar to
  APACHE_MODPATH_INIT/FINISH to create modules.mk and add
  MOD_* vars to it.
* change APACHE_MPM_MODULE to only append to modules.mk, not
  overwrite
* add APACHE_MPMPATH_INIT/FINISH to all MPMs

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1395252 13f79535-47bb-0310-9956-ffa450edef68

acinclude.m4
server/mpm/event/config3.m4
server/mpm/mpmt_os2/config5.m4
server/mpm/prefork/config3.m4
server/mpm/simple/config3.m4
server/mpm/winnt/config3.m4
server/mpm/worker/config3.m4

index 444f385e196536e373e556758f991423083dd345..86d2e08c51712d0779e44926bfd0af5874aa3952 100644 (file)
@@ -217,6 +217,27 @@ EOF
     fi
   fi
 ])dnl
+dnl Same as APACHE_MODPATH_INIT/FINISH but for MPMs
+dnl APACHE_MPMPATH_INIT(mpmpath)
+AC_DEFUN(APACHE_MPMPATH_INIT,[
+  current_dir=$1
+  modpath_current=server/mpm/$1
+  modpath_static=
+  modpath_shared=
+  for var in mod_buildvars; do
+    eval MOD_$var=
+  done
+  test -d $1 || $srcdir/build/mkdir.sh $modpath_current
+  > $modpath_current/modules.mk
+])dnl
+dnl
+AC_DEFUN(APACHE_MPMPATH_FINISH,[
+  for var in mod_buildvars; do
+    if eval val=\"\$MOD_$var\"; test -n "$val"; then
+      echo "MOD_$var = $val" >> $modpath_current/modules.mk
+    fi
+  done
+])dnl
 
 dnl
 dnl APACHE_MPM_MODULE(name[, shared[, objects[, config[, path[, libs]]]]])
@@ -253,7 +274,7 @@ AC_DEFUN(APACHE_MPM_MODULE,[
         if test -z "$2"; then
             APR_ADDTO(AP_LIBS, [$6])
             libname="lib$1.la"
-            cat >$mpmpath/modules.mk<<EOF
+            cat >>$mpmpath/modules.mk<<EOF
 $libname: $objects
        \$(MOD_LINK) $objects
 DISTCLEAN_TARGETS = modules.mk
@@ -264,7 +285,7 @@ EOF
             apache_need_shared=yes
             libname="mod_mpm_$1.la"
             shobjects=`echo $objects | sed 's/\.lo/.slo/g'`
-            cat >$mpmpath/modules.mk<<EOF
+            cat >>$mpmpath/modules.mk<<EOF
 $libname: $shobjects
        \$(SH_LINK) -rpath \$(libexecdir) -module -avoid-version $objects $6
 DISTCLEAN_TARGETS = modules.mk
index 5c96fe3c30df811f9249b464dc5214f4ca295435..abce9a4f2a43f3d183d4568b920c99ea4318d0e4 100644 (file)
@@ -1,3 +1,5 @@
+APACHE_MPMPATH_INIT(event)
+
 dnl ## XXX - Need a more thorough check of the proper flags to use
 
 APACHE_CHECK_SERF
@@ -9,3 +11,5 @@ APACHE_SUBST(MOD_MPM_EVENT_LDADD)
 APACHE_MPM_MODULE(event, $enable_mpm_event, event.lo fdqueue.lo pod.lo,[
     AC_CHECK_FUNCS(pthread_kill)
 ], , [\$(MOD_MPM_EVENT_LDADD)])
+
+APACHE_MPMPATH_FINISH
index c74f1452bbc24125b90dab4d594cf1a8ff974479..e7ce84e6f8c8f3c2df1627845f8ba0a247c8d186 100644 (file)
@@ -1,3 +1,7 @@
+APACHE_MPMPATH_INIT(mpmt_os2)
+
 APACHE_MPM_MODULE(mpmt_os2, $enable_mpm_mpmt_os2, mpmt_os2.lo mpmt_os2_child.lo,[
     APR_ADDTO(CFLAGS,-Zmt)
 ])
+
+APACHE_MPMPATH_FINISH
index 25fd8df3397d8e1681628364e091e5e988ab757c..76a559b9bc75c2fb7460f4f5ea92868be28e4394 100644 (file)
@@ -1 +1,5 @@
+APACHE_MPMPATH_INIT(prefork)
+
 APACHE_MPM_MODULE(prefork, $enable_mpm_prefork)
+
+APACHE_MPMPATH_FINISH
index e518119518cc6fe5ba5ae3d6a5365a1b50349ca2..e6207b01a445f9dd1f351ac996aa9edc1a7cc592 100644 (file)
@@ -1,3 +1,7 @@
+APACHE_MPMPATH_INIT(simple)
+
 simple_objects="simple_api.lo simple_children.lo simple_core.lo \
 simple_event.lo simple_run.lo simple_io.lo"
 APACHE_MPM_MODULE(simple, $enable_mpm_simple, $simple_objects)
+
+APACHE_MPMPATH_FINISH
index f937e404950be9aace5dfeda9039d5d20046ed55..c9499569e61545238c5c1a69b23ac9a3a34e63a0 100644 (file)
@@ -1,2 +1,6 @@
+APACHE_MPMPATH_INIT(winnt)
+
 winnt_objects="child.lo mpm_winnt.lo nt_eventlog.lo service.lo"
 APACHE_MPM_MODULE(winnt, $enable_mpm_winnt, $winnt_objects)
+
+APACHE_MPMPATH_FINISH
index dc2bccb554292bfaf810ea31edc9d25cb42a46ae..7d7ab3dd662a787f18813a8cec1d5a67f63a83ae 100644 (file)
@@ -1,5 +1,8 @@
-dnl ## XXX - Need a more thorough check of the proper flags to use
+APACHE_MPMPATH_INIT(worker)
 
+dnl ## XXX - Need a more thorough check of the proper flags to use
 APACHE_MPM_MODULE(worker, $enable_mpm_worker, worker.lo fdqueue.lo pod.lo,[
     AC_CHECK_FUNCS(pthread_kill)
 ])
+
+APACHE_MPMPATH_FINISH