1 AC_MSG_CHECKING(for extra modules)
3 APACHE_HELP_STRING(--with-module=module-type:module-file,
4 Enable module-file in the modules/<module-type> directory.),
6 modtype=`echo $withval | sed -e's/\(.*\):.*/\1/'`
7 pkg=`echo $withval | sed -e's/.*:\(.*\)/\1/'`
8 modfilec=`echo $pkg | sed -e 's;^.*/;;'`
9 modfileo=`echo $pkg | sed -e 's;^.*/;;' -e 's;\.c$;.o;'`
11 if test "x$withval" != "xmodules/$modtype/$modfilec"; then
12 cp $pkg modules/$modtype/$modfilec
14 module=`echo $pkg | sed -e 's;.*/mod_\(.*\).c;\1;'`
15 objects="mod_$module.lo"
16 libname="mod_$module.la"
17 modpath_current="modules/$modtype"
18 BUILTIN_LIBS="$BUILTIN_LIBS $modpath_current/$libname"
19 if test ! -s "$modpath_current/modules.mk"; then
20 cat >>$modpath_current/modules.mk<<EOF
23 DISTCLEAN_TARGETS = modules.mk
28 cat >>$modpath_current/modules.mk.tmp<<EOF
32 cat $modpath_current/modules.mk >> $modpath_current/modules.mk.tmp
33 rm $modpath_current/modules.mk
34 mv $modpath_current/modules.mk.tmp $modpath_current/modules.mk
35 sed -e "s/\(static =.*\)/\1 $libname/" $modpath_current/modules.mk > $modpath_current/modules.mk.tmp
36 rm $modpath_current/modules.mk
37 mv $modpath_current/modules.mk.tmp $modpath_current/modules.mk
39 MODLIST="$MODLIST $module"
40 AC_MSG_RESULT(added $withval)
42 [ AC_MSG_RESULT(no extra modules)