1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-23 22:49:01 +03:00
Files
apache/modules/config5.m4
Jim Jagielski f5097accfb Allow for the use of --with-module=foo:bar where the ./modules/foo
directory is local only. Assumes, of course, that the required
files are in ./modules/foo, but makes it easier to statically
build/log "external" modules.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104934 13f79535-47bb-0310-9956-ffa450edef68
2004-09-02 13:18:13 +00:00

46 lines
1.6 KiB
Plaintext

AC_MSG_CHECKING(for extra modules)
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/'`
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
fi
module=`echo $pkg | sed -e 's;.*/mod_\(.*\).c;\1;'`
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
$libname: $objects
\$(MOD_LINK) $objects
DISTCLEAN_TARGETS = modules.mk
static = $libname
shared =
EOF
else
cat >>$modpath_current/modules.mk.tmp<<EOF
$libname: $objects
\$(MOD_LINK) $objects
EOF
cat $modpath_current/modules.mk >> $modpath_current/modules.mk.tmp
rm $modpath_current/modules.mk
mv $modpath_current/modules.mk.tmp $modpath_current/modules.mk
sed -e "s/\(static =.*\)/\1 $libname/" $modpath_current/modules.mk > $modpath_current/modules.mk.tmp
rm $modpath_current/modules.mk
mv $modpath_current/modules.mk.tmp $modpath_current/modules.mk
fi
MODLIST="$MODLIST $module"
MODULE_DIRS="$MODULE_DIRS $modtype"
APACHE_FAST_OUTPUT($modpath_current/Makefile)
AC_MSG_RESULT(added $withval)
],
[ AC_MSG_RESULT(no extra modules)
])