]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Kill two autoconf-related birds with one commit.
authorJustin Erenkrantz <jerenkrantz@apache.org>
Sun, 30 Sep 2001 07:57:15 +0000 (07:57 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Sun, 30 Sep 2001 07:57:15 +0000 (07:57 +0000)
- 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
acinclude.m4
configure.in
modules/config5.m4
server/mpm/config.m4
support/config.m4

diff --git a/CHANGES b/CHANGES
index 7787cb5b9d9fd2725bbfac9f978e5ec46cdb0ca2..c1c707dcb8ab9bc88c66cd974c6eb32cee975f98 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
 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]
index fe916b1396ec6192c55f8033dfa8e02686256d15..efd77c7305e5749be757f979ba1bec5bbdfeae58 100644 (file)
@@ -1,4 +1,11 @@
 
+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))
@@ -200,8 +207,8 @@ dnl            explicit yes/no always overrides.
 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
@@ -312,7 +319,7 @@ dnl APACHE_ENABLE_LAYOUT
 dnl
 AC_DEFUN(APACHE_ENABLE_LAYOUT,[
 AC_ARG_ENABLE(layout,
-[  --enable-layout=LAYOUT],[
+APACHE_HELP_STRING(--enable-layout=LAYOUT,Default file layout),[
   LAYOUT=$enableval
 ])
 
@@ -333,7 +340,7 @@ AC_DEFUN(APACHE_ENABLE_MODULES,[
   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
@@ -344,7 +351,7 @@ AC_DEFUN(APACHE_ENABLE_MODULES,[
   ])
   
   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
@@ -378,7 +385,7 @@ AC_DEFUN(APACHE_CHECK_SSL_TOOLKIT,[
 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
index fd5d8fde6fdeb9dd6e5632be78e1cab45d845d0a..87b2588dcc27a242b5d4c451d53602e647e02417 100644 (file)
@@ -248,11 +248,11 @@ initgroups \
 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
@@ -299,41 +299,41 @@ APACHE_SUBST(POST_SHARED_CMDS)
 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
index caa40eaf70603ca25c2ddb673d9cbc497bb5cb81..a143f287f34938a2f12e04a3503a8868b62f00b4 100644 (file)
@@ -1,7 +1,7 @@
 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/'`
index 3cbd0cdfae33dc85a846219a51a92064e7f2b6e1..e8178176035b9dfad2432a44de37f1818f3ff688 100644 (file)
@@ -1,7 +1,7 @@
 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
index ce377479b6962a301439d5a96e2737746fc74468..bbaf0f3e83e734133b6b8cb174d48a0a196d5dd8 100644 (file)
@@ -9,35 +9,35 @@ ab_LTFLAGS=""
 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