From b13c96a78592ef15f2991e3a9c4399fe34b1421c Mon Sep 17 00:00:00 2001 From: Erik Abele Date: Sat, 8 Jan 2005 01:59:45 +0000 Subject: [PATCH] --with-module can now take more than one module to be statically linked: --with-module=:,:,... If the -subdirectory doesn't exist it will be created and populated with a standard Makefile.in. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@124600 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 5 +++++ docs/manual/programs/configure.xml | 15 ++++++++------- modules/config5.m4 | 29 ++++++++++++++++++++--------- 3 files changed, 33 insertions(+), 16 deletions(-) diff --git a/CHANGES b/CHANGES index ecd89f8496..6928574938 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,11 @@ Changes with Apache 2.1.3 [Remove entries to the current 2.0 section below, when backported] + *) --with-module can now take more than one module to be statically + linked: --with-module=:,:,... + If the -subdirectory doesn't exist it will be created and + populated with a standard Makefile.in. [Erik Abele] + *) Remove some compiler warnings within the LDAP modules [Graham Leggett] *) Add a build script to create a solaris package. [Graham Leggett] diff --git a/docs/manual/programs/configure.xml b/docs/manual/programs/configure.xml index ab3c7c0717..87c532ddc4 100644 --- a/docs/manual/programs/configure.xml +++ b/docs/manual/programs/configure.xml @@ -636,16 +636,17 @@ modules use the following options:

-
--with-module=module-type:module-file -
-

Add a third-party module to the list of statically linked +

--with-module=module-type:module-file[, + module-type:module-file]
+

Add one or more third-party modules to the list of statically linked modules. The module source file module-file will be searched in the modules/module-type - subdirectory of your Apache HTTP server source tree so it has to be - placed there before. If it is not found here - configure is considering module-file to be + subdirectory of your Apache HTTP server source tree. If it is not found + there configure is considering module-file to be an absolute file path and tries to copy the source file into the - module-type subdirectory.

+ module-type subdirectory. If the subdirectory doesn't + exist it will be created and populated with a standard + Makefile.in.

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.

diff --git a/modules/config5.m4 b/modules/config5.m4 index efc8ed5af0..10f525bed4 100644 --- a/modules/config5.m4 +++ b/modules/config5.m4 @@ -3,19 +3,25 @@ AC_ARG_WITH(module, APACHE_HELP_STRING(--with-module=module-type:module-file, Enable module-file in the modules/ 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" # The filename of a convenience library must have a "lib" prefix: libname="lib$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<