mirror of
https://github.com/apache/httpd.git
synced 2026-01-26 19:01:35 +03:00
- substr used in APACHE_MODULE for the help string did not parse correctly with autoconf 2.50+ so we had to punt there anyway and use AC_HELP_STRING. - Add APACHE_HELP_STRING define that will call AC_HELP_STRING on 2.50+ (actually not 2.13 - look at the regex call) or do our custom variation of it. This function can't have any extra spaces or it will be returned in the help string. So noted. If anyone can figure out how to insert a line break like 2.50+ does when we go over the 26th column, I'd appreciate it. I tried and I'm way too tired to figure it out now. Adding this would greatly simplify two or three HELP_STRING uses. - Switch all of those annoying WITH and ENABLE functions to use the APACHE_HELP_STRING. This makes everything consistent now. I've always had to go through and keep aligning everything every few months or so because I'm the only one who cares. No more. I refuse to do it any more! Use APACHE_HELP_STRING or be crucified. Looks decent with autoconf-2.13 and autoconf-2.52. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91211 13f79535-47bb-0310-9956-ffa450edef68
44 lines
1.5 KiB
Plaintext
44 lines
1.5 KiB
Plaintext
AC_MSG_CHECKING(for extra modules)
|
|
AC_ARG_WITH(module,
|
|
APACHE_HELP_STRING(--with-module=location,Include the specified module. location is the
|
|
path to the new module.),
|
|
[
|
|
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"
|
|
AC_MSG_RESULT(added $withval)
|
|
],
|
|
[ AC_MSG_RESULT(no extra modules)
|
|
])
|