- 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
Changes with Apache 2.0.26-dev
+ *) Allow configure help strings to work with autoconf 2.50+ and 2.13.
+ [Justin Erenkrantz]
+
*) Rewrite the input filtering mechanisms to consolidate and reorganize
code. In short, core_input_filter does something now and
ap_http_filter is now only concerned with HTTP. [Justin Erenkrantz]
+dnl APACHE_HELP_STRING(LHS, RHS)
+dnl Autoconf 2.50 can not handle substr correctly. It does have
+dnl AC_HELP_STRING, so let's try to call it if we can.
+dnl Note: this define must be on one line so that it can be properly returned
+dnl as the help string.
+AC_DEFUN(APACHE_HELP_STRING,[ifelse(regexp(AC_ACVERSION, 2\.1), -1, AC_HELP_STRING($1,$2),[ ]$1 substr([ ],len($1))$2)])dnl
+
dnl APACHE_SUBST(VARIABLE)
dnl Makes VARIABLE available in generated files
dnl (do not use @variable@ in Makefiles, but $(variable))
dnl
AC_DEFUN(APACHE_MODULE,[
AC_MSG_CHECKING(whether to enable mod_$1)
- define([optname],[ --]ifelse($5,yes,disable,enable)[-]translit($1,_,-))dnl
- AC_ARG_ENABLE(translit($1,_,-),optname() substr([ ],len(optname()))$2,,enable_$1=ifelse($5,,maybe-all,$5))
+ define([optname],[--]ifelse($5,yes,disable,enable)[-]translit($1,_,-))dnl
+ AC_ARG_ENABLE(translit($1,_,-),APACHE_HELP_STRING(optname(),$2),,enable_$1=ifelse($5,,maybe-all,$5))
undefine([optname])dnl
_apmod_extra_msg=""
dnl When --enable-modules=most is set and the module was not explicitly
dnl
AC_DEFUN(APACHE_ENABLE_LAYOUT,[
AC_ARG_ENABLE(layout,
-[ --enable-layout=LAYOUT],[
+APACHE_HELP_STRING(--enable-layout=LAYOUT,Default file layout),[
LAYOUT=$enableval
])
module_default=yes
AC_ARG_ENABLE(modules,
- [ --enable-modules=MODULE-LIST],[
+ APACHE_HELP_STRING(--enable-modules=MODULE-LIST,Modules to enable),[
for i in $enableval; do
if test "$i" = "all" -o "$i" = "most"; then
module_selection=$i
])
AC_ARG_ENABLE(mods-shared,
- [ --enable-mods-shared=MODULE-LIST],[
+ APACHE_HELP_STRING(--enable-mod-shared=MODULE-LIST,Shared modules to enable),[
for i in $enableval; do
if test "$i" = "all" -o "$i" = "most"; then
module_selection=$i
if test "x$ap_ssltk_base" = "x"; then
AC_MSG_CHECKING(for SSL/TLS toolkit base)
ap_ssltk_base=""
- AC_ARG_WITH(ssl, [ --with-ssl[=DIR] SSL/TLS toolkit (OpenSSL)], [
+ AC_ARG_WITH(ssl, APACHE_HELP_STRING(--with-ssl=DIR,SSL/TLS toolkit (OpenSSL)), [
if test "x$withval" != "xyes" -a "x$withval" != "x"; then
ap_ssltk_base="$withval"
fi
bindprocessor \
)
-AC_ARG_WITH(port,[ --with-port=PORT Port on which to listen (default is 80)],
+AC_ARG_WITH(port,APACHE_HELP_STRING(--with-port=PORT,Port on which to listen (default is 80)),
[if test "$withval" = "yes"; then AC_MSG_ERROR('option --with-port requires a value (the TCP port number)'); else PORT="$withval"; fi],
[PORT=80])
-AC_ARG_ENABLE(maintainer-mode,[ --enable-maintainer-mode Turn on debugging and compile time warnings],
+AC_ARG_ENABLE(maintainer-mode,APACHE_HELP_STRING(--enable-maintainer-mode,Turn on debugging and compile time warnings),
[
APR_ADDTO(CPPFLAGS, -DAP_DEBUG)
])dnl
APACHE_SUBST(shared_build)
AC_ARG_WITH(program-name,
-[ --with-program-name alternate executable name],[
+APACHE_HELP_STRING(--with-program-name,alternate executable name),[
progname="$withval" ], [
progname="httpd"] )
# SuExec parameters
AC_ARG_WITH(suexec-caller,
-[ --with-suexec-caller User allowed to call SuExec],[
+APACHE_HELP_STRING(--with-suexec-caller,User allowed to call SuExec),[
AC_DEFINE_UNQUOTED(AP_HTTPD_USER, "$withval", [User allowed to call SuExec] ) ] )
AC_ARG_WITH(suexec-userdir,
-[ --with-suexec-userdir User subdirectory],[
+APACHE_HELP_STRING(--with-suexec-userdir,User subdirectory),[
AC_DEFINE_UNQUOTED(AP_USERDIR_SUFFIX, "$withval", [User subdirectory] ) ] )
AC_ARG_WITH(suexec-docroot,
-[ --with-suexec-docroot SuExec root directory],[
+APACHE_HELP_STRING(--with-suexec-docroot,SuExec root directory),[
AC_DEFINE_UNQUOTED(AP_DOC_ROOT, "$withval", [SuExec root directory] ) ] )
AC_ARG_WITH(suexec-uidmin,
-[ --with-suexec-uidmin Minimal allowed UID],[
+APACHE_HELP_STRING(--with-suexec-uidmin,Minimal allowed UID),[
AC_DEFINE_UNQUOTED(AP_UID_MIN, $withval, [Minimum allowed UID] ) ] )
AC_ARG_WITH(suexec-gidmin,
-[ --with-suexec-gidmin Minimal allowed GID],[
+APACHE_HELP_STRING(--with-suexec-gidmin,Minimal allowed GID),[
AC_DEFINE_UNQUOTED(AP_GID_MIN, $withval, [Minimum allowed GID] ) ] )
AC_ARG_WITH(suexec-logfile,
-[ --with-suexec-logfile Set the logfile],[
+APACHE_HELP_STRING(--with-suexec-logfile,Set the logfile),[
AC_DEFINE_UNQUOTED(AP_LOG_EXEC, "$withval", [SuExec log file] ) ] )
AC_ARG_WITH(suexec-safepath,
-[ --with-suexec-safepath Set the safepath],[
+APACHE_HELP_STRING(--with-suexec-safepath,Set the safepath),[
AC_DEFINE_UNQUOTED(AP_SAFE_PATH, "$withval", [safe shell path for SuExec] ) ] )
AC_ARG_WITH(suexec-umask,
-[ --with-suexec-umask umask for suexec'd process],[
+APACHE_HELP_STRING(--with-suexec-umask,umask for suexec'd process),[
AC_DEFINE_UNQUOTED(AP_SUEXEC_UMASK, 0$withval, [umask for suexec'd process] ) ] )
dnl AP_LIB_DIRS specifies the additional libs from srclib/ that we need
AC_MSG_CHECKING(for extra modules)
AC_ARG_WITH(module,
- [ --with-module=location Include the specified module. location is the
- path to the new 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/'`
AC_MSG_CHECKING(which MPM to use)
AC_ARG_WITH(mpm,
-[ --with-mpm=MPM Choose the process model for Apache to use.
- MPM={beos,worker,threaded,prefork,spmt_os2,perchild}],[
+APACHE_HELP_STRING(--with-mpm=MPM,Choose the process model for Apache to use.
+ MPM={beos|worker|threaded|prefork|spmt_os2|perchild}),[
APACHE_MPM=$withval
],[
if test "x$APACHE_MPM" = "x"; then
dnl XXX Should we change the foo_LTFLAGS="-static" settings below
dnl to something like APR_ADDTO? -aaron
-AC_ARG_ENABLE(static-htpasswd,[ --enable-static-htpasswd Build a statically linked version of htpasswd],[
+AC_ARG_ENABLE(static-htpasswd,APACHE_HELP_STRING(--enable-static-htpasswd,Build a statically linked version of htpasswd),[
if test "$enableval" = "yes" ; then
htpasswd_LTFLAGS="-static"
fi
])
APACHE_SUBST(htpasswd_LTFLAGS)
-AC_ARG_ENABLE(static-htdigest,[ --enable-static-htdigest Build a statically linked version of htdigest],[
+AC_ARG_ENABLE(static-htdigest,APACHE_HELP_STRING(--enable-static-htdigest,Build a statically linked version of htdigest),[
if test "$enableval" = "yes" ; then
htdigest_LTFLAGS="-static"
fi
])
APACHE_SUBST(htdigest_LTFLAGS)
-AC_ARG_ENABLE(static-rotatelogs,[ --enable-static-rotatelogs Build a statically linked version of rotatelogs],[
+AC_ARG_ENABLE(static-rotatelogs,APACHE_HELP_STRING(--enable-static-rotatelogs,Build a statically linked version of rotatelogs),[
if test "$enableval" = "yes" ; then
rotatelogs_LTFLAGS="-static"
fi
])
APACHE_SUBST(rotatelogs_LTFLAGS)
-AC_ARG_ENABLE(static-logresolve,[ --enable-static-logresolve Build a statically linked version of logresolve],[
+AC_ARG_ENABLE(static-logresolve,APACHE_HELP_STRING(--enable-static-logresolve,Build a statically linked version of logresolve),[
if test "$enableval" = "yes" ; then
logresolve_LTFLAGS="-static"
fi
])
APACHE_SUBST(logresolve_LTFLAGS)
-AC_ARG_ENABLE(static-ab,[ --enable-static-ab Build a statically linked version of ab],[
+AC_ARG_ENABLE(static-ab,APACHE_HELP_STRING(--enable-static-ab,Build a statically linked version of ab),[
if test "$enableval" = "yes" ; then
ab_LTFLAGS="-static"
fi