]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
--with-module can now take more than one module to be statically
authorJustin Erenkrantz <jerenkrantz@apache.org>
Fri, 4 Feb 2005 17:14:12 +0000 (17:14 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Fri, 4 Feb 2005 17:14:12 +0000 (17:14 +0000)
linked: --with-module=<modtype>:<modfile>,<modtype>:<modfile>,...
If the <modtype>-subdirectory doesn't exist it will be created and
populated with a standard Makefile.in.

MFC: 124600
Reviewed by: erikabele, jerenkrantz, fielding

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@151372 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
docs/manual/programs/configure.xml
modules/config5.m4

diff --git a/CHANGES b/CHANGES
index 8f44dab63ae7b6772a0005d80142537f3f040153..d9fb8bed6bd61c574723e6cf30e0ef19bb23a074 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,10 @@
 Changes with Apache 2.0.53
 
+  *) --with-module can now take more than one module to be statically
+     linked: --with-module=<modtype>:<modfile>,<modtype>:<modfile>,...
+     If the <modtype>-subdirectory doesn't exist it will be created and
+     populated with a standard Makefile.in.  [Erik Abele]
+
   *) Fix the RPM spec file so that an RPM build now works. An RPM
      build now requires system installations of APR and APR-util.
      Remove some arbitrary moving around of binaries - the RPM now
index 2f82114473147940641b79c871afd9e6a5188308..347f727d8e94b80eb8543b4d23042e432decf5af 100644 (file)
         modules use the following options:</p>
 
       <dl>
-        <dt><code>--with-module=<var>module-type</var>:<var>module-file</var>
-          </code></dt>
-        <dd><p>Add a third-party module to the list of statically linked
+        <dt><code>--with-module=<var>module-type</var>:<var>module-file</var>[,
+          <var>module-type</var>:<var>module-file</var>]</code></dt>
+        <dd><p>Add one or more third-party modules to the list of statically linked
             modules. The module source file <code><var>module-file</var></code>
             will be searched in the <code>modules/<var>module-type</var></code>
-            subdirectory of your Apache HTTP server source tree so it has to be
-            placed there before. If it is not found here 
-            <code>configure</code> is considering <var>module-file</var> to be
+            subdirectory of your Apache HTTP server source tree. If it is not found
+            there <code>configure</code> is considering <var>module-file</var> to be
             an absolute file path and tries to copy the source file into the
-            <var>module-type</var> subdirectory.</p>
+            <var>module-type</var> subdirectory. If the subdirectory doesn't
+            exist it will be created and populated with a standard
+            <code>Makefile.in</code>.</p>
           <p>This option is useful to add small external modules consisting of
             one source file. For more complex modules you should read the
             vendor's documentation.</p>
index eec9ec4f77e2f80dc605b052963b1c75cc1cd289..5e38c951ae6529ceafc17a726cb90d50053e8ccb 100644 (file)
@@ -3,18 +3,24 @@ AC_ARG_WITH(module,
   APACHE_HELP_STRING(--with-module=module-type:module-file,
                      Enable module-file in the modules/<module-type> directory.),
   [
-    modtype=`echo $withval | sed -e's/\(.*\):.*/\1/'`
-    pkg=`echo $withval | sed -e's/.*:\(.*\)/\1/'`
+    as_save_IFS="$IFS"; IFS=","
+    for mod in $withval
+    do
+    modtype=`echo $mod | sed -e's/\(.*\):.*/\1/'`
+    pkg=`echo $mod | sed -e's/.*:\(.*\)/\1/'`
     modfilec=`echo $pkg | sed -e 's;^.*/;;'`
     modfileo=`echo $pkg | sed -e 's;^.*/;;' -e 's;\.c$;.o;'`
-
-    if test "x$withval" != "xmodules/$modtype/$modfilec"; then
-        cp $pkg modules/$modtype/$modfilec
+    modpath_current="modules/$modtype"
+    if test "x$mod" != "x$modpath_current/$modfilec"; then
+      if test ! -d "$modpath_current"; then
+        mkdir $modpath_current
+        echo 'include $(top_srcdir)/build/special.mk' > $modpath_current/Makefile.in
+      fi
+      cp $pkg $modpath_current/$modfilec
     fi
-    module=`echo $pkg | sed -e 's;.*/mod_\(.*\).c;\1;'`
+    module=`echo $pkg | sed -e 's;\(.*/\)*mod_\(.*\).c;\2;'`
     objects="mod_$module.lo"
     libname="mod_$module.la"
-    modpath_current="modules/$modtype"
     BUILTIN_LIBS="$BUILTIN_LIBS $modpath_current/$libname"
     if test ! -s "$modpath_current/modules.mk"; then
       cat >>$modpath_current/modules.mk<<EOF
@@ -37,9 +43,14 @@ EOF
       mv $modpath_current/modules.mk.tmp $modpath_current/modules.mk
     fi
     MODLIST="$MODLIST $module"
+    EXTRA_MODLIST="$EXTRA_MODLIST $modtype:$modfilec"
     MODULE_DIRS="$MODULE_DIRS $modtype"
     APACHE_FAST_OUTPUT($modpath_current/Makefile)
-  AC_MSG_RESULT(added $withval)
+    done
+    if test ! -z "$EXTRA_MODLIST"; then
+      AC_MSG_RESULT(added:$EXTRA_MODLIST)
+    fi
+    IFS="$as_save_IFS"
   ],
-  [ AC_MSG_RESULT(no extra modules
+  [ AC_MSG_RESULT(none
   ])