summaryrefslogtreecommitdiffstats
path: root/acinclude.m4
diff options
context:
space:
mode:
authorJustin Erenkrantz <jerenkrantz@apache.org>2001-09-30 09:57:15 +0200
committerJustin Erenkrantz <jerenkrantz@apache.org>2001-09-30 09:57:15 +0200
commitf493313f3a47a5658d151d6dda35828ef3a6e9f6 (patch)
tree2719904382dd1d40974b0ecb74d9b1f08bcacd47 /acinclude.m4
parentRemove unnecessary initialization and add a comment about chunk_hdr's (diff)
downloadapache2-f493313f3a47a5658d151d6dda35828ef3a6e9f6.tar.xz
apache2-f493313f3a47a5658d151d6dda35828ef3a6e9f6.zip
Kill two autoconf-related birds with one commit.
- 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
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m419
1 files changed, 13 insertions, 6 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index fe916b1396..efd77c7305 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -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