autoconf: 1999-09-26 Akim Demaille <akim@epita.fr>

From 811a0a183aa7cbaaf79af8500ef2c33093a55bd3 Mon Sep 17 00:00:00 2001
From: Akim Demaille <[EMAIL REDACTED]>
Date: Mon, 27 Sep 1999 09:30:20 +0000
Subject: [PATCH] 1999-09-26  Akim Demaille  <akim@epita.fr>

	* acgeneral.m4 (AC_WRAP): Rewritten.
	(AC_HELP_STRING): Wrapper of AC_WRAP.
	* acgeneral.m4 (_AC_SH_QUOTE): Rewritten.  Don't try to handle
	both backslashed and non backslashed backquotes in a single
	string: consider that either all the backquotes are quoted, or
	none.

1999-09-26  Akim Demaille  <akim@epita.fr>

	* acgeneral.m4 (AC_PATH_PROG): Use a single case statement for
	Unix and DOS absolute paths.

	* acgeneral.m4 (AC_CHECK_SIZEOF): Fix a typo.
	Allow a third default argument: extra headers.
	* autoconf.texi (C Compiler Characteristics): Document.

	* acgeneral.m4 (AC_CHECK_TYPE): Convert to the AC_VAR_* family.
	Allow a third optional argument: extra includes.
	* autoconf.texi (Generic Typedefs): Documents.

1999-09-25  Akim Demaille  <akim@epita.fr>

	* acgeneral.m4 (AC_OUTPUT, handling of options): Make it possible
	to specify the files to configure on the command line instead of
	via envvars.  Document it.

1999-09-25  Akim Demaille  <akim@epita.fr>

	* acgeneral.m4: Rename the occurences of the variable `confstat'
 	as `ac_cs_root'.  The previous name was breaking the naming
	scheme.

	* TODO: Updated.
	Added a section for 2.15 and 3.
---
 ChangeLog                | 107 ++++++----
 INSTALL                  |   4 +-
 NEWS                     |   9 +-
 TODO                     | 235 +++++++++++++---------
 acgeneral.m4             | 409 +++++++++++++++++++++------------------
 acspecific.m4            |  70 ++++++-
 autoconf.texi            |  68 +++++--
 configure                | 354 +++++++++++++++++++++------------
 doc/autoconf.texi        |  68 +++++--
 lib/autoconf/general.m4  | 409 +++++++++++++++++++++------------------
 lib/autoconf/specific.m4 |  70 ++++++-
 11 files changed, 1140 insertions(+), 663 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f52d2eed..f297f8d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,40 @@
+1999-09-26  Akim Demaille  <akim@epita.fr>
+
+	* acgeneral.m4 (AC_WRAP): Rewritten.
+	(AC_HELP_STRING): Wrapper of AC_WRAP.
+	* acgeneral.m4 (_AC_SH_QUOTE): Rewritten.  Don't try to handle
+	both backslashed and non backslashed backquotes in a single
+	string: consider that either all the backquotes are quoted, or
+	none.
+
+1999-09-26  Akim Demaille  <akim@epita.fr>
+
+	* acgeneral.m4 (AC_PATH_PROG): Use a single case statement for
+	Unix and DOS absolute paths.
+
+	* acgeneral.m4 (AC_CHECK_SIZEOF): Fix a typo.
+	Allow a third default argument: extra headers.
+	* autoconf.texi (C Compiler Characteristics): Document.
+
+	* acgeneral.m4 (AC_CHECK_TYPE): Convert to the AC_VAR_* family.
+	Allow a third optional argument: extra includes.
+	* autoconf.texi (Generic Typedefs): Documents.
+
+1999-09-25  Akim Demaille  <akim@epita.fr>
+
+	* acgeneral.m4 (AC_OUTPUT, handling of options): Make it possible
+	to specify the files to configure on the command line instead of
+	via envvars.  Document it.
+
+1999-09-25  Akim Demaille  <akim@epita.fr>
+
+	* acgeneral.m4: Rename the occurences of the variable `confstat'
+ 	as `ac_cs_root'.  The previous name was breaking the naming
+	scheme.
+
+	* TODO: Updated.
+	Added a section for 2.15 and 3.
+
 1999-09-23  Pavel Roskin  <pavel_roskin@geocities.com>
 
 	Avoid that comments from aclocal.m4 show up in configure when
@@ -26,7 +63,7 @@
 	(AC_INIT_NOTICE): Initialize ac_arg_enable_help, ac_arg_with_help,
 	and ac_arg_var_help.
 	* acgeneral.m4 (AC_INIT_PARSE_ARGS): Remove the handling of
- 	--env-var=.  After debate, the solution chosen to specify envvars
+	--env-var=.  After debate, the solution chosen to specify envvars
 	to configure is a` la make: ./configure VAR=VAL.
 	(AC_INIT_PARSE_ARGS, --help): Output ac_arg_enable_help,
 	ac_arg_with_help, and ac_arg_var_help.
@@ -1038,37 +1075,37 @@ Sat Sep 12 16:25:00 1998  Aaron Crane  <aaronc@pobox.com>
 
 Tue Sep  8 14:06:04 1998  Matthew D. Langston  <langston@SLAC.Stanford.EDU>
 
-        * acgeneral.m4: Make the following macros Fortran 77 aware
-        (i.e. conditionalize whether to `#include "confdefs.h"', etc.):
-        (AC_TRY_COMPILE)
-        (AC_TRY_LINK)
-        (AC_CHECK_LIB)
+	* acgeneral.m4: Make the following macros Fortran 77 aware
+	(i.e. conditionalize whether to `#include "confdefs.h"', etc.):
+	(AC_TRY_COMPILE)
+	(AC_TRY_LINK)
+	(AC_CHECK_LIB)
 
-        * acgeneral.m4 (AC_LANG_FORTRAN77): Rename `AC_LANG_FORTRAN' to
-        `AC_LANG_FORTRAN77'.  Change the Fortran 77 language macro from
-        `FORTRAN' to `FORTRAN77'.
-        (AC_LANG_RESTORE): Change the Fortran 77 language macro from
-        `FORTRAN' to `FORTRAN77'
+	* acgeneral.m4 (AC_LANG_FORTRAN77): Rename `AC_LANG_FORTRAN' to
+	`AC_LANG_FORTRAN77'.  Change the Fortran 77 language macro from
+	`FORTRAN' to `FORTRAN77'.
+	(AC_LANG_RESTORE): Change the Fortran 77 language macro from
+	`FORTRAN' to `FORTRAN77'
 
-        * autoconf.texi: Updated Fortran 77 documentation, particularly
-        for `AC_TRY_COMPILE', `AC_TRY_LINK' and `AC_CHECK_LIB'.
+	* autoconf.texi: Updated Fortran 77 documentation, particularly
+	for `AC_TRY_COMPILE', `AC_TRY_LINK' and `AC_CHECK_LIB'.
 
 Thu Sep  3 09:34:39 1998  Matthew D. Langston  <langston@SLAC.Stanford.EDU>
 
-        * autoconf.texi: Added Fortran 77 documentation.
+	* autoconf.texi: Added Fortran 77 documentation.
 
-        * acspecific.m4 (AC_PROG_FC): New macro.  Determine a Fortran
-        compiler to use.
-        (AC_PROG_FC_WORKS): New macro.
-        (AC_PROG_FC_GNU): New macro.
-        (AC_PROG_FC_G): New macro.
-        (AC_PROG_FC_C_O): New macro.
+	* acspecific.m4 (AC_PROG_FC): New macro.  Determine a Fortran
+	compiler to use.
+	(AC_PROG_FC_WORKS): New macro.
+	(AC_PROG_FC_GNU): New macro.
+	(AC_PROG_FC_G): New macro.
+	(AC_PROG_FC_C_O): New macro.
 
-        * acgeneral.m4: Add FFLAGS (Fortran 77 flags).
-        (AC_LANG_FORTRAN): New macro.
-        (AC_LANG_RESTORE): Make Fortran 77 aware.
-        (AC_TRY_COMPILER): Make Fortran 77 aware (i.e. conditionalize
-        whether to `#include "confdefs.h"').
+	* acgeneral.m4: Add FFLAGS (Fortran 77 flags).
+	(AC_LANG_FORTRAN): New macro.
+	(AC_LANG_RESTORE): Make Fortran 77 aware.
+	(AC_TRY_COMPILER): Make Fortran 77 aware (i.e. conditionalize
+	whether to `#include "confdefs.h"').
 
 Thu Jun 18 12:13:27 1998  Ian Lance Taylor  <ian@cygnus.com>
 
@@ -1321,7 +1358,7 @@ Tue Nov 12 00:06:14 1996  David J MacKenzie  <djm@catapult.va.pubnix.com>
  	Markku Savela <msa@msa.tte.vtt.fi> and Julian Onions
 	<j.onions@nexor.co.uk>.
 	* acgeneral.m4 (AC_TRY_RUN_NATIVE, AC_TRY_LINK, AC_TRY_COMPILE,
-        AC_TRY_CPP): Show the test program in config.log if the test fails.
+	AC_TRY_CPP): Show the test program in config.log if the test fails.
 	From Karl Berry <karl@cs.umb.edu>.
 
 	* testsuite/config/unix.exp: Run the configure script as "./script"
@@ -1382,11 +1419,11 @@ Sat Nov  9 01:54:04 1996  David J MacKenzie  <djm@catapult.va.pubnix.com>
 	AC_CHECK_HEADERS_DIRENT): Ditto.
 
 	* acspecific.m4 (AC_FUNC_SETPGRP): New macro.
-        * acconfig.h (SETPGRP_VOID): New entry.
+	* acconfig.h (SETPGRP_VOID): New entry.
 	From "T.E.Dickey" <dickey@clark.net>.
 
-        * acspecific.m4 (AC_PATH_X_DIRECT): Try /lib/usr/lib/X11 for A/UX.
-        From Guillermo Gomez <gomez@mi.uni-erlangen.de>.
+	* acspecific.m4 (AC_PATH_X_DIRECT): Try /lib/usr/lib/X11 for A/UX.
+	From Guillermo Gomez <gomez@mi.uni-erlangen.de>.
 	(AC_PATH_XTRA): Replace -R with adding LD_RUN_PATH to CC in the
 	Solaris kludge.  Suggested by Paul Eggert <eggert@twinsun.com>.
 	Define X_DISPLAY_MISSING with AC_DEFINE, and
@@ -1401,7 +1438,7 @@ Sat Nov  9 01:54:04 1996  David J MacKenzie  <djm@catapult.va.pubnix.com>
 	From gvran@uddeborg.pp.se.
 	Don't blather about being called before AC_TRY_LINK,
 	which is now called in AC_PROG_CC.  Don't encourage using this macro.
-        * acconfig.h (X_DISPLAY_MISSING): Add entry.
+	* acconfig.h (X_DISPLAY_MISSING): Add entry.
 
 Fri Nov  8 16:02:08 1996  David J MacKenzie  <djm@catapult.va.pubnix.com>
 
@@ -1649,7 +1686,7 @@ Mon Nov 20 15:26:50 1995  David J. MacKenzie  <djm@catapult.va.pubnix.com>
 
 Sat Nov 18 14:21:55 1995  Karl Berry  <karl@cs.umb.edu>
 
-        * autoconf.sh: Allow lowercase letters in the undefined-macro name.
+	* autoconf.sh: Allow lowercase letters in the undefined-macro name.
 
 Fri Nov 17 15:05:44 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
 
@@ -1982,12 +2019,12 @@ Wed Feb  1 11:58:27 1995  David J. MacKenzie  <djm@catapult.va.pubnix.com>
 Tue Dec  6 19:07:07 1994  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
 
 	* acspecific.m4 (AC_FUNC_GETLOADAVG): Use elf_begin in -lelf
-        check, not elf_read.
+	check, not elf_read.
 
 Mon Nov  7 18:18:11 1994  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
 
 	* acspecific.m4 (AC_PROG_MAKE_SET): Fix msg; $MAKE is not useful
-        Make syntax.
+	Make syntax.
 
 Fri Nov  4 09:08:33 1994  David J. MacKenzie  <djm@duality.gnu.ai.mit.edu>
 
@@ -2459,10 +2496,10 @@ Fri Aug 26 00:34:11 1994  David J. MacKenzie  (djm@vortex.eng.umd.edu)
 	code after AC_OUTPUT (needed for Emacs).
 
 	* acgeneral.m4 (AC_CANONICAL_SYSTEM): Move setting of alias vars
-	  into submacros.
+ 	into submacros.
 
 	* acspecific.m4 (AC_PROG_CPP): If $CPP is set and is a directory,
-	  ignore it.
+ 	ignore it.
 
 Thu Aug 25 09:26:36 1994  David J. MacKenzie  (djm@vortex.eng.umd.edu)
 
diff --git a/INSTALL b/INSTALL
index 15e11277..d11dae29 100644
--- a/INSTALL
+++ b/INSTALL
@@ -126,10 +126,10 @@ you can use the `configure' options `--x-includes=DIR' and
 Specifying the System Type
 ==========================
 
-   There may be some features `configure' can not figure out
+   There may be some features `configure' cannot figure out
 automatically, but needs to determine by the type of host the package
 will run on.  Usually `configure' can figure that out, but if it prints
-a message saying it can not guess the host type, give it the
+a message saying it cannot guess the host type, give it the
 `--host=TYPE' option.  TYPE can either be a short name for the system
 type, such as `sun4', or a canonical name with three fields:
      CPU-COMPANY-SYSTEM
diff --git a/NEWS b/NEWS
index 4193bf15..94002225 100644
--- a/NEWS
+++ b/NEWS
@@ -2,9 +2,14 @@ Major changes in release 2.15:
 
 * config.status
   - much faster on most architectures
-  - now has a useful --help
+  - has a useful --help
   - concurrent executions
-    It is now safe to use `make -j' with configure.
+    It is safe to use `make -j' with configure.
+  - human interface improved
+    It is possible to invoke
+      ./config.status foobar
+    instead of the former form (still valid)
+      CONFIG_HEADERS= CONFIG_FILES=foobar:foo.in:bar.in
 * New macros
   - AC_CHECK_DECL and AC_CHECK_DECLS
     To check whether a symbol is declared.
diff --git a/TODO b/TODO
index f4485a72..bc6aa8f5 100644
--- a/TODO
+++ b/TODO
@@ -2,7 +2,133 @@
 
 Things it might be nice to do someday.  I haven't evaluated all of
 these suggestions... their presence here doesn't imply my endorsement.
--djm
+-djm & his successors.
+
+
+------------------------------------------------------------------------------
+
+* Required for 2.15
+
+These are things mandatory to fulfill before releasing 2.15.  There
+are also suggestions we should either satisfy right now (they're
+easy), or remove (obsoleted since then).
+
+** We should remove obsolete things.
+Both in the doc and the code.  Looking for the keyword `obsolete'
+proves to be useful.
+
+** Clarify exactly our position wrt `#define' templates.
+The fact that there are `#define' templates forbids many useful
+optimizations.  In fact, who really uses #define template in
+config.h.in?
+
+** Write the documentation of AC_ARG_VAR
+where should it go?
+
+** Mention automake, libtool, etc. in the Autoconf manual.
+
+** Don't hard code ASCII (I think Ben has solved this one --akim)
+there is absolutely no guarantee that 'a' to 'z' are contiguous, and
+the ISLOWER macro is not guaranteed to correctly reproduce the result
+of islower. In all variants of ASCII however, it will work correctly
+in the C locale.
+
+There is also no guarantee that toupper(i) - i is the same constant if
+non-zero. TOUPPER, hence, is not correct either. But, in all variants
+of ASCII in the C locale, it works.
+
+Tanmoy Bhattacharya (tanmoy@qcd.lanl.gov>
+
+** CONFIG_LINKS= (I think we should fix this one --akim)
+When using CONFIG_FILES= and CONFIG_HEADERS= for controlling partial
+configuration, any AC_LINK_FILES is repeated in each case (that is,
+usually, once for config.h and once per subdirectory).  This is not
+elegant.
+
+Maybe Autoconf could use some kind of CONFIG_LINKS=<file-list>, having
+all such AC_LINK(ed)_FILES by default, but usable by each Makefile.in
+in rules for updating the particular links they need.
+
+From: pinard@iro.umontreal.ca
+
+** More C compilers (How come this has never been handled?  --akim)
+Question: at least one common UNIX variant has a "cc" that is old K&R
+and "c89" for ANSI C.  Is there any reason why AC_PROG_CC couldn't
+check for c89 before cc if it can't find gcc?
+
+hpa@yggdrasil.com (H. Peter Anvin)
+
+** @magic@ expanded in all the AC_SUBST (I think this one is obsoleted
+with the existence of Automake.  Remove this wish?  --akim)
+Perhaps Autoconf could have a single @magic@ frob that gets replaced with
+assignments for all the *dir variables?  There is quite a plethora for each
+Makefile.in to have foodir = @foodir@.
+
+From: Roland McGrath <roland@gnu.ai.mit.edu>
+
+------------------------------------------------------------------------------
+
+* Autoconf 3
+
+** Use m4 lists?
+I think one sad decision in Autoconf was to use white space separated
+lists for some arguments.  For instance AC_CHECK_FUNCS(foo bar).  I
+tend to think that, even if it is not as nice, we should use m4 lists,
+i.e., AC_CHECK_FUNCS((foo, bar)) in this case.  This would ease
+specializing loops, and more importantly, make them much more robust.
+
+A typical example of things that can be performed if we use m4 lists
+instead of white space separated lists is the case of things that have
+a space in their names, eg, structures.
+
+With the current scheme it would be extremely difficult to loop over
+AC_CHECK_STRUCTS(struct foo struct bar), while it natural and well
+defined for m4 lists: AC_CHECK_STRUCTS((struct foo, struct bar)).
+
+I know that makes a huge difference in syntax, but a major release
+should be ready to settle a new world.  We *can* provide helping tools
+for the transition.  Considering the benefits, I really think it is
+worth thinking. --akim
+
+** Forbid shell variables as main arguments
+The fact that we have to support shell variables as main argument
+forbids many interesting constructions (specialization are not always
+possible, equally for AC_REQUIRE'ing macros *with their arguments*).
+Any loop should be handled by m4 itself, and nothing should be hidden
+to it.  As a consequence, shell variables on the main arguments become
+useless (the main reason we support shell variables is to allow the
+loop versions of single argument macros, eg, to go from AC_CHECK_FUNC
+to AC_CHECK_FUNCS). --akim
+
+** Use the @SUBST@ technology also for headers instead of #undef.
+This requires that acconfig.h becomes completely obsolete: autoheader
+should generate all the templates.
+
+** Specializing loops.
+For instance, make AC_CHECK_FUNC[S] automatically use any particular
+macros for the listed functions.
+This requires to obsolete the feature `break' in ACTION-IF, since all
+the loops are to be handled by m4, not sh.
+
+** Merge the two lex macros, AC_PROG_LEX and AC_DECL_YYTEXT?
+Add give a mean to *require* Flex instead of Lex.
+
+** Faces of a test
+Each macro can potentially come with several faces: of course the
+configure snippet (AC_foo), a config.h snippet (AH_foo), a system.h
+snippet (AS_foo), documentation (AD_foo) and, why not, the some C code
+for instance to replace a function.
+
+The motivation for the `faces' is to encapsulate.  It is abnormal that
+once one has a configure macro, then she has to read somewhere to find
+the piece of system.h to use etc.  The macros should come in a
+self-contained way, or, said it another way, PnP.
+
+A major issue is that of specialization.  AC_CHECK_HEADER (or another
+name) for instance, will have as an effect, via system.h to include
+the header.  But if the test for the header is specific, the generic
+AS_CHECK_HEADER will still be used.  Conversely, some headers may not
+require a specific AC_ tests, but a specialized AS_ macro.
 
 ------------------------------------------------------------------------------
 
@@ -33,6 +159,10 @@ these suggestions... their presence here doesn't imply my endorsement.
   actually also take into account whatever value LIBS had when they
   were checked for.
 
+  Isn't this the issue of AC_SEARCH_LIB? --akim
+  How come the list of libraries to browse not an additional parameter
+  of AC_CHECK_FUNC, exactly like for the headers? --akim
+
 ------------------------------------------------------------------------------
 
 * Add AC_PROG_CC_POSIX to replace the current ad-hoc macros for AIX,
@@ -40,11 +170,6 @@ these suggestions... their presence here doesn't imply my endorsement.
 
 ------------------------------------------------------------------------------
 
-* Make AC_CHECK_FUNC[S] automatically use any particular macros for the
-  listed functions.
-
-------------------------------------------------------------------------------
-
 * Support creating both config.h and DEFS in the same configure.
 
 ------------------------------------------------------------------------------
@@ -62,7 +187,7 @@ these suggestions... their presence here doesn't imply my endorsement.
 
 ------------------------------------------------------------------------------
 
-* Split up AC_SUBST substitutions using a loop to accomodate shells
+* Split up AC_SUBST substitutions using a loop to accommodate shells
   with severely limited here document sizes, if it turns out to be a problem.
   I'm not sure whether the limit is on lines or bytes; if bytes, it
   will be less of a problem than it was with the long lines used for
@@ -111,17 +236,6 @@ warnings.  (Roland McGrath)
 
 In config.status comment, put the host/target/build types, if used.
 
-------------------------------------------------------------------------------
-
-     The argument HELP-STRING is a description of the option which
-     ...
-     Avoid tabs in the help string.  You'll need to enclose it in `['
-     and `]' in order to produce the leading spaces.
-
-Except that [...] is the convention for telling the user the default,
-So I guess a changequote(`,') or something would be in order in some cases.
-From: "K. Berry" <kb@cs.umb.edu>
-
 ------------------------------------------------------------------------------
 
 The default of unlimited permission is fine, but there should be some easy
@@ -144,7 +258,7 @@ disabling the m4 "comment" feature when processing user-supplied strings.
 on hal.gnu.ai.mit.edu, configure is getting the wrong answer for
 AC_CHECK_FUNCS(select).
 
-The problem here is that there's severe namespace pollution: when
+The problem here is that there's severe name space pollution: when
 conftest.c includes <ctype.h> to pick up any __stub macro definitions,
 it's getting a prototype declaration for select(), which collides
 with the dummy declaration in conftest.c.  (The chain of includes
@@ -169,13 +283,13 @@ Andreas Schwab
 ------------------------------------------------------------------------------
 
 put all the config.* stuff somewhere like config/?
-All these extraneous files sure clutter up a toplevel directory.
+All these extraneous files sure clutter up a top level directory.
 From: "Randall S. Winchester" <rsw@eng.umd.edu>
 
 ------------------------------------------------------------------------------
 
 It would be nice if I could (in the Makefile.in files) set
-the path to config.h. You have config.h ../config.h ../../config.h's all 
+the path to config.h. You have config.h ../config.h ../../config.h's all
 over the place, in the findutils-4.1 directory.
 From: "Randall S. Winchester" <rsw@eng.umd.edu>
 
@@ -214,7 +328,7 @@ AC_PKG_WITH(PACKAGE, HELP_STRING, PACKAGE-ROOT, PACKAGE-LIBS, PACKAGE-DEFS,
 	PACKAGE-CCPFLAGS)
 like
 
-AC_PKG_WITH(kerberos,,/usr/local/athena,-lkrb -ldes,[KERBEROS KRB4 
+AC_PKG_WITH(kerberos,,/usr/local/athena,-lkrb -ldes,[KERBEROS KRB4
 CRYPT],include)
 AC_PKG_WITH(hesiod,
 [if hesiod is not in kerberos-root add --with-hesiod-root=somewhere]
@@ -234,7 +348,7 @@ as order matters.
 
 also an AC_PKG_CHK_HEADER
 and an AC_PKG_CHK_FUNCTION
-so one can give alternate paths to check for stuff ($PKG-ROOT/lib for 
+so one can give alternate paths to check for stuff ($PKG-ROOT/lib for
 example)
 From: Randall Winchester
 
@@ -243,10 +357,10 @@ From: Randall Winchester
 AC_C_CROSS assumes that configure was
 called like 'CC=target-gcc; ./configure'. I want to write a package
 that has target dependent libraries and host dependent tools. So I
-don't like to lose the distinction between CC and [G]CC_FOR_TARGET. 
+don't like to lose the distinction between CC and [G]CC_FOR_TARGET.
 AC_C_CROSS should check for equality of target and host.
 
-It would be great if 
+It would be great if
 
 GCC_FOR_TARGET
 AR_FOR_TARGET
@@ -283,11 +397,11 @@ probably aren't worried about yet, e.g. shm_open.
 All these functions fail with errno set to ENOSYS (89)
 ``Operation not applicable''.
 
-Perhaps autoconf should have a
+Perhaps Autoconf should have a
 specific macro for fnmatch, another for glob+globfree, another for
 regcomp+regexec+regerror+regfree, and another for wordexp+wordfree.
 This wouldn't solve the problem in general, but it should work for
-Solaris 2.4.  Or autoconf could limit itself to fnmatch and regcomp,
+Solaris 2.4.  Or Autoconf could limit itself to fnmatch and regcomp,
 the only two functions that I know have been a problem so far.
 
 From Paul Eggert.
@@ -301,7 +415,7 @@ Make easy macros for checking for X functions and libraries, such as Motif.
 * Test suite: more things to test:
 ** That the shell scripts produce correct output on some simple data.
 ** Configuration header files.  That autoheader does the right thing,
-   and so does AC_CONFIG_HEADER when autoconf is run.
+   and so does AC_CONFIG_HEADER when Autoconf is run.
 
 ------------------------------------------------------------------------------
 
@@ -311,7 +425,7 @@ Autoheader in autoconf-2.4 doesn't produce entries for:
 
 and it seems like it could easily do so.
 
-In general, it seems to me like autoconf isn't set up to
+In general, it seems to me like Autoconf isn't set up to
 let me periodically run autoheader, and then include my
 "local" tests -- autoheader gets most stuff right, I'd like
 to rerun it periodically without losing my local changes
@@ -341,14 +455,6 @@ From:    Rich Salz <rsalz@osf.org>
 
 ------------------------------------------------------------------------------
 
-It is IMHO a bug that `config.status' cannot handle multiple
-simultaneous invocations.  It should include the process id (`$$' in sh)
-as part of the name of any temporary files it creates.
-
-From:    fjh@kryten.cs.mu.oz.au (Fergus Henderson)
-
-------------------------------------------------------------------------------
-
 Timezone calculations checks.
 
 ------------------------------------------------------------------------------
@@ -358,10 +464,6 @@ Of course, this can be done locally with config.site.
 
 ------------------------------------------------------------------------------
 
-Mention automake, libtool, etc. in the autoconf manual.
-
-------------------------------------------------------------------------------
-
 I wonder if it is possible to get the path for X11's app-defaults
 directory by autoconf. Moreover, I'd like to have a general way of
 accessing imake variables by autoconf, something like
@@ -372,14 +474,6 @@ Slaven Rezic <eserte@cabulja.herceg.de>
 
 ------------------------------------------------------------------------------
 
-Question: at least one common UNIX variant has a "cc" that is old K&R
-and "c89" for ANSI C.  Is there any reason why AC_PROG_CC couldn't
-check for c89 before cc if it can't find gcc?
-
-hpa@yggdrasil.com (H. Peter Anvin)
-
-------------------------------------------------------------------------------
-
 Cache consistency checking: ignore cache if environment
 (CC or PATH) differs.
 From Mike Haertel
@@ -421,27 +515,6 @@ From: rcb5@win.tue.nl (Richard Verhoeven)
 
 ------------------------------------------------------------------------------
 
-When using CONFIG_FILES= and CONFIG_HEADERS= for controlling
-partial configuration, any AC_LINK_FILES is repeated in each case
-(that is, usually, once for config.h and once per subdirectory).
-This is not elegant.
-
-Maybe Autoconf could use some kind of CONFIG_LINKS=<file-list>,
-having all such AC_LINK(ed)_FILES by default, but usable by each
-Makefile.in in rules for updating the particular links they need.
-
-From: pinard@iro.umontreal.ca
-
-------------------------------------------------------------------------------
-
-Perhaps autoconf could have a single @magic@ frob that gets replaced with
-assignments for all the *dir variables?  There is quite a plethora for each
-Makefile.in to have foodir = @foodir@.
-
-From: Roland McGrath <roland@gnu.ai.mit.edu>
-
-------------------------------------------------------------------------------
-
 In most cases, when autoscan suggests something, using the search
 or index command into the Info reader for autoconf manual quickly
 explains me what the test is about.  However, for header files
@@ -518,17 +591,13 @@ From: Tom Tromey <tromey@creche.cygnus.com>
 
 ------------------------------------------------------------------------------
 
-Another thing I wish for is a macro which figures out which libraries are 
-needed for BSD-sytle sockets.  AC_PATH_X already detects this 
+Another thing I wish for is a macro which figures out which libraries are
+needed for BSD-sytle sockets.  AC_PATH_X already detects this
 correctly...so it's just a matter of seperating out the socket-related code.
 From: "Joel N. Weber II" <nemo@koa.iolani.honolulu.hi.us>
 
 ------------------------------------------------------------------------------
 
-Merge the two lex macros, AC_PROG_LEX and AC_DECL_YYTEXT?
-
-------------------------------------------------------------------------------
-
 in order to use the AC_CANONICAL_SYSTEM macro, I have to
 have install-sh somewhere nearby --- why is this?  I have no real
 reason to distribute install-sh, other than that its absence breaks
@@ -552,19 +621,6 @@ with autoconf scripts.
 
 ------------------------------------------------------------------------------
 
-there is absolutely no guarantee that 'a' to 'z' are
-contiguous, and the ISLOWER macro is not guaranteed to correctly
-reproduce the result of islower. In all variants of ASCII however, it
-will work correctly in the C locale.
-
-There is also no guarantee that toupper(i) - i is the same constant if
-non-zero. TOUPPER, hence, is not correct either. But, in all variants
-of ASCII in the C locale, it works.
-
-Tanmoy Bhattacharya (tanmoy@qcd.lanl.gov>
-
-------------------------------------------------------------------------------
-
 autoreconf doesn't support having (in the same tree) both directories
 that are parts of a larger package (sharing aclocal.m4 and acconfig.h),
 and directories that are independent packages (each with their own ac*).
@@ -580,4 +636,3 @@ configure.in, not just those given by an AC_CONFIG_SUBDIRS directive.
 This may not be a problem in practice.
 
 ------------------------------------------------------------------------------
-
diff --git a/acgeneral.m4 b/acgeneral.m4
index dbdfd46a..0a01b997 100644
--- a/acgeneral.m4
+++ b/acgeneral.m4
@@ -91,8 +91,8 @@ dnl m4 output diversions.  We let m4 output them all in order at the end,
 dnl except that we explicitly undivert AC_DIVERSION_SED, AC_DIVERSION_CMDS,
 dnl and AC_DIVERSION_ICMDS.
 
-define(AC_DIVERSION_KILL, -1)dnl	suppress output
-define(AC_DIVERSION_BINSH, 0)dnl	AC_REQUIRE'd #! /bin/sh line
+define(AC_DIVERSION_KILL, -1)dnl       	suppress output
+define(AC_DIVERSION_BINSH, 0)dnl       	AC_REQUIRE'd #! /bin/sh line
 define(AC_DIVERSION_NOTICE, 1)dnl	copyright notice & option help strings
 define(AC_DIVERSION_INIT, 2)dnl		initialization code
 define(AC_DIVERSION_NORMAL_4, 3)dnl	AC_REQUIRE'd code, 4 level deep
@@ -306,7 +306,7 @@ dnl   behavior of tr wrt the character `-'.  Sed has to be used in these
 dnl   cases.
 dnl - m4/sh polymorphism
 dnl   Transliteration of manifest strings should be handled by m4, while
-dnl   shell variables' content will be translated at run time (tr or sed).
+dnl   shell variables' content will be translated at runtime (tr or sed).
 
 dnl AC_TR(STRING, FROM, TO, ALPHABET, DEFAULT)
 dnl ------------------------------------------
@@ -461,19 +461,19 @@ dnl
 dnl Pay attention to the changequotes.  Inner changequotes exist for
 dnl obvious reasons (we want to insert square brackets).  Outer
 dnl changequotes are needed because otherwise the m4 parser, when it
-dnl sees the closing bracket we add to the result believes it is the
+dnl sees the closing bracket we add to the result, believes it is the
 dnl end of the body of the macro we define.
-changequote(<, >)
-define(<_AC_COMMATIZE>,
-<changequote(`, ')dnl
-pushdef(`one_line', translit(patsubst(`$1', `\\
-'), `
-', ` '))dnl
-pushdef(`no_trailing_space', patsubst(one_line, `[	]+$'))dnl
-[patsubst(no_trailing_space, `[ 	]+', `],[')]dnl
+changequote(<<, >>)
+define(<<_AC_COMMATIZE>>,
+<<changequote(``, '')dnl
+pushdef(``one_line'', translit(patsubst(``$1'', ``\\
+''), ``
+'', `` ''))dnl
+pushdef(``no_trailing_space'', patsubst(one_line, ``[	]+$''))dnl
+[patsubst(no_trailing_space, ``[ 	]+'', ``],['')]dnl
 changequote([, ])dnl
-popdef(`no_trailing_space')dnl
-popdef(`one_line')>)
+popdef(``no_trailing_space'')dnl
+popdef(``one_line'')>>)
 changequote([, ])
 
 dnl AC_FOREACH(VARIABLE, LIST, EXPRESSION)
@@ -504,30 +504,58 @@ dnl ## Helping macros to display strings ##
 dnl ## --------------------------------- ##
 
 
-dnl AC_WRAP(STRING [,WIDTH] [, PREFIX]]))
-dnl -------------------------------------
-dnl Expands into the STRING wrapped to hold in WIDTH (which defaults to
-dnl 79).  Words longer than WIDTH are not split.  Each line is prefixed
-dnl with PREFIX.  Note that the length of PREFIX is taken into account
-dnl by this macro to compute the length of a line.
+dnl AC_WRAP(STRING [, PREFIX[, FIRST-PREFIX[, WIDTH]]]]))
+dnl -----------------------------------------------------
+dnl Expands into STRING wrapped to hold in WIDTH columns (default = 79).
+dnl If prefix is set, each line is prefixed with it.  If FIRST-PREFIX is
+dnl specified, then the first line is prefixed with it.  As a special
+dnl case, if the length of the first prefix is greater than that of
+dnl PREFIX, then FIRST-PREFIX will be left alone on the first line.
+dnl
+dnl Typical outputs are:
+dnl
+dnl AC_WRAP([Short string */], [   ], [/* ], 20)
+dnl | /* Short string */
+dnl
+dnl AC_WRAP([Much longer string */], [   ], [/* ], 20)
+dnl | /* Much longer
+dnl |    string */
+dnl
+dnl AC_WRAP([Short doc.], [          ], [  --short ], 30)
+dnl |   --short Short doc.
 dnl
-dnl FIXME: there is no checking of a longer PREFIX than WIDTH, but do
-dnl we really want to bother with people trying each single corner
-dnl 

(Patch may be truncated, please check the link at the top of this post.)