]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
1999-09-26 Akim Demaille <akim@epita.fr>
authorAkim Demaille <akim@epita.fr>
Mon, 27 Sep 1999 09:30:20 +0000 (09:30 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 27 Sep 1999 09:30:20 +0000 (09:30 +0000)
* 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
INSTALL
NEWS
TODO
acgeneral.m4
acspecific.m4
autoconf.texi
configure
doc/autoconf.texi
lib/autoconf/general.m4
lib/autoconf/specific.m4

index f52d2eedd847f7f9fa0dba89a639c790534c9f1b..f297f8d3808d11d3db037f601cd039124ba907fe 100644 (file)
--- 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 15e11277b072fdca4fe26cce3fd2c51753f861c1..d11dae2909cf811febafe5e16c6321a772c27af4 100644 (file)
--- 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 4193bf15a66a59cc6dc732367d7aceac4d3e55e6..94002225a73017bd25107688f1a72f0e2574183e 100644 (file)
--- 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 f4485a7212e63983f09dd9500127ca3319ff989a..bc6aa8f515e53bffcb0d1e6933df292ce3659b92 100644 (file)
--- 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.
 
 ------------------------------------------------------------------------------
-
index dbdfd46a447cb231c02d19a8eecebcac0a9b7ebe..0a01b997a109497108ab9a55444d03020ae7f8e8 100644 (file)
@@ -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 of a software?
+dnl AC_WRAP([Short doc.], [          ], [  --too-wide ], 30)
+dnl |   --too-wide
+dnl |           Short doc.
+dnl
+dnl AC_WRAP([Super long documentation.], [          ], [  --too-wide ], 30)
+dnl |   --too-wide
+dnl |      Super long
+dnl |      documentation.
+dnl
+dnl dnl FIXME: there is no checking of a longer PREFIX than WIDTH, but do
+dnl dnl we really want to bother with people trying each single corner
+dnl dnl of a software?
 define([AC_WRAP],
-[pushdef([ac_prefix], [$3])dnl
-pushdef([ac_width], m4_eval(ifelse([$2],, 79, $2) - len(ac_prefix)))dnl
-pushdef([ac_cursor], 0)dnl
-ac_prefix[]dnl
-AC_FOREACH([ac_word], $1,
-[define([ac_cursor], m4_eval(ac_cursor + len(ac_word) + 1))dnl
-ifelse(m4_eval(ac_cursor > ac_width),
-       1, [define([ac_cursor], m4_eval(len(ac_word) + 1))]
-ac_prefix)dnl
-ac_word ])dnl
-popdef([ac_prefix])dnl
-popdef([ac_width])dnl
-popdef([ac_cursor])])
+[pushdef([AC_Prefix], m4_default([$2], []))dnl
+pushdef([AC_Prefix1], m4_default([$3], [AC_Prefix]))dnl
+pushdef([AC_Width], m4_default([$4], 79))dnl
+pushdef([AC_Cursor], len(AC_Prefix1))dnl
+AC_Prefix1[]dnl
+ifelse(m4_eval(AC_Cursor > len(AC_Prefix)),
+       1, [define([AC_Cursor], len(AC_Prefix))
+AC_Prefix])[]dnl
+AC_FOREACH([AC_Word], [$1],
+[define([AC_Cursor], m4_eval(AC_Cursor + len(AC_Word) + 1))dnl
+ifelse(m4_eval(AC_Cursor > AC_Width),
+       1, [define([AC_Cursor], m4_eval(len(AC_Prefix) + len(AC_Word) + 1))]
+AC_Prefix)dnl
+AC_Word ])dnl
+popdef([AC_Cursor])dnl
+popdef([AC_Width])dnl
+popdef([AC_Prefix1])dnl
+popdef([AC_Prefix])dnl
+])
 
 
 dnl AC_HELP_STRING(LHS, RHS[, COLUMN])
@@ -571,33 +599,14 @@ dnl  | |                       ^
 dnl  | column 2                |
 dnl  column 0                  column 26
 dnl
-dnl This macro is a adhoc version of AC_WRAP.
 define([AC_HELP_STRING],
 [pushdef([AC_Prefix], m4_default([$3], [                          ]))dnl
-pushdef([AC_Prefix_Len], len(AC_Prefix))dnl Default: 26
-pushdef([AC_Prefix_Format], [  %-]m4_eval(len(AC_Prefix) - 3)[s])dnl [  %-23s]
-pushdef([AC_Width], m4_eval(79 - AC_Prefix_Len))dnl Width of the RHS column.
-pushdef([AC_Cursor], 0)dnl
-m4_format(AC_Prefix_Format, [$1])dnl
-dnl If the option is too wide, leave it alone on the line
-ifelse(m4_eval(len(m4_format(AC_Prefix_Format, [$1])) > AC_Prefix_Len),
-       1, [
-]AC_Prefix)dnl
-AC_FOREACH([AC_Word], $2,
-[define([AC_Cursor], m4_eval(AC_Cursor + len(AC_Word) + 1))dnl
-ifelse(m4_eval(AC_Cursor > AC_Width),
-       1, [define([AC_Cursor], m4_eval(len(AC_Word) + 1))]
-AC_Prefix)dnl
-AC_Word ])dnl
-popdef([AC_Cursor])dnl
-popdef([AC_Width])dnl
+pushdef([AC_Prefix_Format], [  %-]m4_eval(len(AC_Prefix) - 3)[s ])dnl [  %-23s ]
+AC_WRAP([$2], AC_Prefix, m4_format(AC_Prefix_Format, [$1]))dnl
 popdef([AC_Prefix_Format])dnl
-popdef([AC_Prefix_Len])dnl
 popdef([AC_Prefix])dnl
 ])
 
-
-
 dnl ### Initialization
 
 
@@ -828,18 +837,12 @@ EOF
 changequote([, ])dnl
 dnl It would be great to sort, unfortunately, since each entry maybe
 dnl split on several lines, it is not as evident as a simple `| sort'.
-    if test -n "$ac_arg_enable_help"; then
-      echo "
+    test -n "$ac_arg_enable_help" && echo "
 --enable options recognized:$ac_arg_enable_help"
-    fi
-    if test -n "$ac_arg_with_help"; then
-      echo "
+    test -n "$ac_arg_with_help" && echo "
 --with options recognized:$ac_arg_with_help"
-    fi
-    if test -n "$ac_arg_var_help"; then
-      echo "
+    test -n "$ac_arg_var_help" && echo "
 Some of the influent environment variables:$ac_arg_var_help"
-    fi
     exit 0 ;;
 
   -host | --host | --hos | --ho)
@@ -1307,9 +1310,9 @@ AC_DEFUN(AC_ARG_VAR,
 ac_arg_var_help="$ac_arg_var_help
 AC_HELP_STRING([$1], [$2], [              ])"
 AC_DIVERT_POP()dnl
-dnl Prepend instead of appending, so that envvars set on the cmd line
-dnl win over the environment.  Don't register envvars not set.
-dnl Don't register several times.
+dnl Register if set and not yet registered.
+dnl If there are envvars given as arguments, they are already set,
+dnl therefore they won't be set again, which is the right thing.
 case "${$1+set} $ac_configure_args" in
  *" $1="* );;
  "set "*) ac_configure_args="$1='[$]$1' $ac_configure_args";;
@@ -1712,7 +1715,7 @@ AC_DIVERT_POP()dnl
 ])])
 
 
-dnl ### Printing messages at autoconf run time
+dnl ### Printing messages at autoconf runtime
 
 dnl _AC_ERRPRINT(MESSAGE)
 dnl Report the MESSAGE at m4 time, with line and filename.
@@ -1728,20 +1731,21 @@ define(AC_FATAL,
 m4exit(ifdef([$2], [$2], 1))])
 
 
-dnl ### Printing messages at configure run time
+dnl ### Printing messages at configure runtime
 
 dnl _AC_SH_QUOTE(STRING)
-dnl Quote the back quotes but if they are already quoted.
-dnl This exception is to provide backwards compatibility.
+dnl --------------------
+dnl If there are quoted (via backslash) backquotes do nothing, else
+dnl backslash all the quotes.
 define(_AC_SH_QUOTE,
-[changequote(<<, >>)dnl
-substr(patsubst(<<X$1>>,
-                <<\([^\]\)`>>, <<\1\\`>>), 1)<<>>dnl
-changequote([, ])])
+[ifelse(regexp([$1], [\\`]),
+        -1, [patsubst([$1], [`], [\\`])],
+        [AC_WARNING([needlessly backslashed backquotes.])dnl
+[$1]])])
 
 dnl _AC_ECHO_UNQUOTED(STRING [ , FD ])
 dnl Expands into a sh call to echo onto FD (default is AC_FD_MSG).
-dnl The shell perform its expansions on STRING.
+dnl The shell performs its expansions on STRING.
 define([_AC_ECHO_UNQUOTED],
 [echo "[$1]" 1>&ifelse($2,, AC_FD_MSG, $2)])
 
@@ -1964,18 +1968,17 @@ AC_SUBST($1)dnl
 ])
 
 dnl AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND [, PATH]])
+dnl -------------------------------------------------------------------------
 AC_DEFUN(AC_PATH_PROG,
 [# Extract the first word of "$2", so it can be a program name with args.
 set dummy $2; ac_word=[$]2
 AC_MSG_CHECKING([for $ac_word])
 AC_CACHE_VAL(ac_cv_path_$1,
 [case "[$]$1" in
-  /*)
+dnl Second pattern matches DOS absolute paths.
+  /* | ?:/*)
   ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
   ;;
-  ?:/*)
-  ac_cv_path_$1="[$]$1" # Let the user override the test with a dos path.
-  ;;
   *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
 dnl $ac_dummy forces splitting on constant user-supplied paths.
@@ -2167,8 +2170,8 @@ dnl because the test really is for library $1 defining function $2, not
 dnl just for library $1.  Separate tests with the same $1 and different $2s
 dnl may have different results.
 AC_DEFUN(AC_CHECK_LIB,
-[AC_VAR_PUSHDEF([ac_var], [ac_cv_lib_$1_$2])dnl
-AC_CACHE_CHECK([for $2 in -l$1], ac_var,
+[AC_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])dnl
+AC_CACHE_CHECK([for $2 in -l$1], ac_Lib,
 [ac_save_LIBS="$LIBS"
 LIBS="-l$1 $5 $LIBS"
 AC_TRY_LINK(dnl
@@ -2184,15 +2187,15 @@ extern "C"
 char $2();
 ])),
 [$2()],
-AC_VAR_SET(ac_var, yes), AC_VAR_SET(ac_var, no))
+AC_VAR_SET(ac_Lib, yes), AC_VAR_SET(ac_Lib, no))
 LIBS="$ac_save_LIBS"])
-AC_SHELL_IFELSE(test AC_VAR_GET(ac_var) = yes,
+AC_SHELL_IFELSE(test AC_VAR_GET(ac_Lib) = yes,
                 m4_default([$3],
                           [AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_LIB$1))
   LIBS="-l$1 $LIBS"
 ]),
                 [$4])dnl
-AC_VAR_POPDEF([ac_var])dnl
+AC_VAR_POPDEF([ac_Lib])dnl
 ])dnl AC_CHECK_LIB
 
 dnl AC_HAVE_LIBRARY(LIBRARY, [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
@@ -2296,7 +2299,7 @@ dnl ### Examining syntax
 
 
 dnl AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
-dnl             [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl                [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
 AC_DEFUN(AC_TRY_COMPILE,
 [cat > conftest.$ac_ext <<EOF
 ifelse(AC_LANG, [FORTRAN77],
@@ -2416,13 +2419,13 @@ dnl ### Checking for header files
 
 dnl AC_CHECK_HEADER(HEADER-FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
 AC_DEFUN(AC_CHECK_HEADER,
-[AC_VAR_PUSHDEF([ac_var_header], [ac_cv_header_$1])dnl
-AC_CACHE_CHECK([for $1], ac_var_header,
+[AC_VAR_PUSHDEF([ac_Header], [ac_cv_header_$1])dnl
+AC_CACHE_CHECK([for $1], ac_Header,
 [AC_TRY_CPP([#include <$1>],
-AC_VAR_SET(ac_var_header, yes), AC_VAR_SET(ac_var_header, no))])
-AC_SHELL_IFELSE(test AC_VAR_GET(ac_var_header) = yes,
+AC_VAR_SET(ac_Header, yes), AC_VAR_SET(ac_Header, no))])
+AC_SHELL_IFELSE(test AC_VAR_GET(ac_Header) = yes,
                 [$2], [$3])dnl
-AC_VAR_POPDEF([ac_var_header])dnl
+AC_VAR_POPDEF([ac_Header])dnl
 ])dnl AC_CHECK_HEADER
 
 dnl AC_CHECK_HEADERS(HEADER-FILE...
@@ -2577,37 +2580,42 @@ AC_SUBST(LIBOBJS)dnl
 dnl ### Checking compiler characteristics
 
 
-dnl AC_CHECK_SIZEOF(TYPE [, CROSS-SIZE])
+dnl AC_CHECK_SIZEOF(TYPE [, CROSS-SIZE, [INCLUDES]])
+dnl ------------------------------------------------
+dnl This macro will probably be obsoleted by the macros of Kaveh.  In
+dnl addition `CHECK' is not a proper name (is not boolean).
 AC_DEFUN(AC_CHECK_SIZEOF,
-[AC_VAR_PUSHDEF([ac_var], [ac_cv_func_$1])dnl
-AC_CACHE_CHECK([size of $1], ac_var,
+[AC_VAR_PUSHDEF([ac_Sizeof], [ac_cv_sizeof_$1])dnl
+AC_CACHE_CHECK([size of $1], ac_Sizeof,
 [AC_TRY_RUN([#include <stdio.h>
+[$3]
 main()
 {
   FILE *f=fopen("conftestval", "w");
   if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof($1));
+  fprintf(f, "%d\n", sizeof([$1]));
   exit(0);
 }],
-  AC_VAR_SET(ac_var, `cat conftestval`),
-  AC_VAR_SET(ac_var, 0),
-  ifset([$2], AC_VAR_SET(ac_var, $2)))])
-AC_DEFINE_UNQUOTED(AC_TR_CPP(sizeof_$1), AC_VAR_GET(ac_var))
-AC_VAR_POPDEF([ac_var])dnl
+  AC_VAR_SET(ac_Sizeof, `cat conftestval`),
+  AC_VAR_SET(ac_Sizeof, 0),
+  ifset([$2], AC_VAR_SET(ac_Sizeof, $2)))])
+AC_DEFINE_UNQUOTED(AC_TR_CPP(sizeof_$1), AC_VAR_GET(ac_Sizeof))
+AC_VAR_POPDEF([ac_Sizeof])dnl
 ])
 
 
 dnl ### Checking for typedefs
 
 
-dnl AC_CHECK_TYPE(TYPE, DEFAULT)
+dnl AC_CHECK_TYPE(TYPE, DEFAULT[, INCLUDES])
+dnl ----------------------------------------
 dnl FIXME: This is an extremely badly choosen name, since this
 dnl macro actually performs an AC_REPLACE_TYPE.  Some day we
 dnl have to clean this up.
 AC_DEFUN(AC_CHECK_TYPE,
 [AC_REQUIRE([AC_HEADER_STDC])dnl
-AC_MSG_CHECKING(for $1)
-AC_CACHE_VAL(ac_cv_type_$1,
+AC_VAR_PUSHDEF([ac_Type], [ac_cv_type_$1])dnl
+AC_CACHE_CHECK([for $1], ac_Type,
 [AC_EGREP_CPP(dnl
 changequote(<<,>>)dnl
 <<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
@@ -2615,13 +2623,12 @@ changequote([,]), [#include <sys/types.h>
 #if STDC_HEADERS
 #include <stdlib.h>
 #include <stddef.h>
-#endif], eval "ac_cv_type_$1=yes", eval "ac_cv_type_$1=no")])dnl
-if eval "test \"`echo '$ac_cv_type_'$1`\" = yes"; then
-  AC_MSG_RESULT(yes)
-else
-  AC_MSG_RESULT(no)
-  AC_DEFINE_UNQUOTED($1, $2)
-fi
+#endif
+[$3]
+], AC_VAR_SET(ac_Type, yes), AC_VAR_SET(ac_Type, no))])
+AC_SHELL_IFELSE(test AC_VAR_GET(ac_Type) = yes,,
+                [AC_DEFINE_UNQUOTED($1, $2)])dnl
+AC_VAR_POPDEF([ac_Type])dnl
 ])
 
 
@@ -2709,9 +2716,11 @@ dnl so uname gets run too.
 # Compiler output produced by configure, useful for debugging
 # configure, is in ./config.log if it exists.
 
-ac_cs_usage="\
-Usage: $CONFIG_STATUS @BKL@OPTIONS@BKR@
-Configure files from templates according to the current configuration.
+ac_cs_usage="\\
+\\\`$CONFIG_STATUS' configures files from templates according to the current
+configuration.
+
+Usage: $CONFIG_STATUS @BKL@OPTIONS@BKR@ FILE...
 
   --recheck    Update $CONFIG_STATUS by reconfiguring in the same conditions
   --version    Print the version of Autoconf and exit
@@ -2719,15 +2728,12 @@ Configure files from templates according to the current configuration.
 
 By default the following files will updated.
 ifset($1, [  Configuration files:
-AC_WRAP($1, 79, [    ])
+AC_WRAP($1, [    ])
 ])dnl
 ifdef([AC_LIST_HEADER], [  Configuration headers:
-AC_WRAP(AC_LIST_HEADER, 79, [    ])]
+AC_WRAP(AC_LIST_HEADER, [    ])]
 )dnl
 
-In order to configure a list a specified FILES and HEADERS, run
-  CONFIG_FILES=FILES CONFIG_HEADERS=HEADERS $CONFIG_STATUS
-
 Report bugs to <bug-autoconf@gnu.org>."
 
 ac_cs_version="\
@@ -2735,6 +2741,23 @@ $CONFIG_STATUS generated by autoconf version AC_ACVERSION.
 Configured on host `(hostname || uname -n) 2>/dev/null | sed 1q` by running
   [$]0 [$]ac_configure_args"
 
+dnl We use a different name than CONFTEST just to help the maintainers
+dnl to make the difference between `conftest' which is the root of the
+dnl files used by configure, and `ac_cs_root' which is the root of the
+dnl files of config.status.
+# Root of the tmp file names.  Use pid to allow concurrent executions.
+ac_cs_root=cs\$\$
+
+ac_given_srcdir=$srcdir
+ifdef([AC_PROVIDE_AC_PROG_INSTALL], [ac_given_INSTALL="$INSTALL"
+])dnl
+
+# Files that config.status was made for.
+AC_WRAP([config_files="]$1["]
+)
+ifdef([AC_LIST_HEADER], [AC_WRAP([config_headers="]AC_LIST_HEADER["])]
+)dnl
+
 for ac_option
 do
   case "[\$]ac_option" in
@@ -2745,31 +2768,50 @@ do
     echo "[\$]ac_cs_version"; exit 0 ;;
   -help | --help | --hel | --he | --h)
     echo "[\$]ac_cs_usage"; exit 0 ;;
-  *) echo "[\$]ac_cs_usage"; exit 1 ;;
+  *) # Find out the files to process
+    for ac_file in [\$]config_files
+    do
+      case [\$]ac_file in
+        [\$]ac_option | [\$]ac_option:* )
+          CONFIG_FILES="[\$]CONFIG_FILES [\$]ac_file"
+          ac_option=
+          break ;;
+      esac
+    done
+    test -z "[\$]ac_option" && continue
+    for ac_file in [\$]config_headers
+    do
+      case [\$]ac_file in
+        [\$]ac_option | [\$]ac_option:* )
+          CONFIG_HEADERS="[\$]CONFIG_HEADERS [\$]ac_file"
+          ac_option=
+          break ;;
+      esac
+    done
+    test -z "[\$]ac_option" && continue
+    echo "$CONFIG_STATUS: invalid argument: [\$]ac_option"; exit 1
+   ;;
   esac
 done
 
-ac_given_srcdir=$srcdir
-ifdef([AC_PROVIDE_AC_PROG_INSTALL], [ac_given_INSTALL="$INSTALL"
-])dnl
-dnl We use a different name than CONFTEST just to help the maintainers
-dnl to make the difference between `conftest' which is the root of the
-dnl files used by configure, and `confstat' which is the root of the
-dnl files of config.status.
-# Allow concurrent executions.
-confstat=cft\$\$
 EOF
 
 cat >> $CONFIG_STATUS <<EOF
-dnl Remove all the CONFIG_FILES, and trap to remove the temp files.  There
-dnl is no need to trap for the config files since they are built from `mv
-dnl tmp-file config-file', hence their update is atomic.
-: \${CONFIG_FILES="$1"}
-ifdef([AC_LIST_HEADER], [: \${CONFIG_HEADERS=AC_LIST_HEADER}
+# If there were arguments, don't assign a default value.
+if test \$[#] = 0; then
+  : \${CONFIG_FILES="\$config_files"}
+ifdef([AC_LIST_HEADER], [  : \${CONFIG_HEADERS="\$config_headers"}
 ])dnl
+fi
+
+# Remove all the CONFIG_FILES, and trap to remove the temp files.
+dnl There is no need to trap for the config files since they are built
+dnl from `mv tmp-file config-file', hence their update is atomic.
 rm -fr \`echo "\$CONFIG_FILES" | sed "s/:@BKL@^ @BKR@*//g"\`
-trap 'rm -fr \$confstat*; exit 1' 1 2 15
+trap 'rm -fr \$ac_cs_root*; exit 1' 1 2 15
+
 EOF
+
 dnl The following three sections are in charge of their own here
 dnl documenting into $CONFIG_STATUS.
 AC_OUTPUT_FILES($1)
@@ -2807,7 +2849,7 @@ dnl Using a here document instead of a string reduces the quoting nightmare.
 # If the first sed substitution is executed (which looks for macros that
 # take arguments), then we branch to the cleanup section.  Otherwise,
 # look for a macro that doesn't take arguments.
-cat > $confstat.defs <<\EOF
+cat > $ac_cs_root.defs <<\EOF
 changequote(<<, >>)dnl
 s%^[   ]*<<#>>[        ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)%-D\1=\2%g
 t cleanup
@@ -2827,7 +2869,7 @@ EOF
 # would break.
 ac_LF_and_DOT="`echo; echo .`"
 DEFS=`sed -f $conftest.defs confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f $confstat.defs
+rm -f $ac_cs_root.defs
 ])
 
 
@@ -2843,20 +2885,22 @@ define(AC_OUTPUT_FILES,
 # Protect against being on the right side of a sed subst in config.status.
 changequote(, )dnl
 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > \$confstat.subs <<\\CEOF
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > \$ac_cs_root.subs <<\\CEOF
 changequote([, ])dnl
 dnl These here document variables are unquoted when configure runs
 dnl but quoted when config.status runs, so variables are expanded once.
 dnl Insert the sed substitutions of variables.
 undivert(AC_DIVERSION_SED)dnl
 CEOF
+
 EOF
 
 cat >> $CONFIG_STATUS <<\EOF
-
 # Split the substitutions into bite-sized pieces for seds with
 # small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_lines=90 # Maximum number of lines to put in a sed script.
+dnl One cannot portably go further than 100 commands because of HP-UX.
+dnl Here, there are 2 cmd per line, and two cmd are added later.
+ac_max_sed_lines=48
 ac_sed_frag=1 # Number of current file.
 ac_beg=1 # First line for current file.
 ac_end=$ac_max_sed_lines # Line after last line for current file.
@@ -2864,23 +2908,24 @@ ac_more_lines=:
 ac_sed_cmds=""
 while $ac_more_lines; do
   if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" $confstat.subs > $confstat.sfrag
+    sed "1,${ac_beg}d; ${ac_end}q" $ac_cs_root.subs > $ac_cs_root.sfrag
   else
-    sed "${ac_end}q" $confstat.subs > $confstat.sfrag
+    sed "${ac_end}q" $ac_cs_root.subs > $ac_cs_root.sfrag
   fi
-  if test ! -s $confstat.sfrag; then
+  if test ! -s $ac_cs_root.sfrag; then
     ac_more_lines=false
-    rm -f $confstat.sfrag
+    rm -f $ac_cs_root.sfrag
   else
     # The purpose of the label and of the branching condition is to
     # speed up the sed processing (if there are no `@' at all, there
     # is no need to browse any of the substitutions).
+    # These are the two extra sed commands mentioned above.
     (echo ':t
-/@@BKL@a-zA-Z_@BKR@@BKL@a-zA-Z_0-9@BKR@*@/!b' && cat $confstat.sfrag) > $confstat.s$ac_sed_frag
+/@@BKL@a-zA-Z_@BKR@@BKL@a-zA-Z_0-9@BKR@*@/!b' && cat $ac_cs_root.sfrag) > $ac_cs_root.s$ac_sed_frag
     if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f $confstat.s$ac_sed_frag"
+      ac_sed_cmds="sed -f $ac_cs_root.s$ac_sed_frag"
     else
-      ac_sed_cmds="$ac_sed_cmds | sed -f $confstat.s$ac_sed_frag"
+      ac_sed_cmds="$ac_sed_cmds | sed -f $ac_cs_root.s$ac_sed_frag"
     fi
     ac_sed_frag=`expr $ac_sed_frag + 1`
     ac_beg=$ac_end
@@ -2971,18 +3016,18 @@ s%@top_srcdir@%$top_srcdir%;t t
 ifdef([AC_PROVIDE_AC_PROG_INSTALL], [s%@INSTALL@%$INSTALL%;t t
 ])dnl
 dnl The parens around the eval prevent an "illegal io" in Ultrix sh.
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $confstat.out
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_cs_root.out
 dnl This would break Makefile dependencies.
-dnl  if cmp -s $ac_file $confstat.out 2>/dev/null; then
+dnl  if cmp -s $ac_file $ac_cs_root.out 2>/dev/null; then
 dnl    echo "$ac_file is unchanged"
-dnl    rm -f $confstat.out
+dnl    rm -f $ac_cs_root.out
 dnl   else
 dnl     rm -f $ac_file
-dnl    mv $confstat.out $ac_file
+dnl    mv $ac_cs_root.out $ac_file
 dnl  fi
-  mv $confstat.out $ac_file
+  mv $ac_cs_root.out $ac_file
 fi; done
-rm -f $confstat.s*
+rm -f $ac_cs_root.s*
 EOF
 ])dnl AC_OUTPUT_FILES
 
@@ -3016,14 +3061,6 @@ ac_eC=' '
 ac_eD='%g'
 changequote([, ])dnl
 
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-dnl Support passing AC_CONFIG_HEADER a value containing shell variables.
-cat >> $CONFIG_STATUS <<EOF
-  CONFIG_HEADERS="$1"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
 changequote(, )dnl
   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
@@ -3036,9 +3073,9 @@ changequote([, ])dnl
 
   echo creating $ac_file
 
-  rm -f $confstat.frag $confstat.in $confstat.out
+  rm -f $ac_cs_root.frag $ac_cs_root.in $ac_cs_root.out
   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  cat $ac_file_inputs > $confstat.in
+  cat $ac_file_inputs > $ac_cs_root.in
 
 EOF
 
@@ -3049,7 +3086,12 @@ EOF
 rm -f conftest.vals
 dnl Using a here document instead of a string reduces the quoting nightmare.
 dnl Putting comments in sed scripts is not portable.
-cat > $confstat.hdr <<\EOF
+dnl One may be tempted to use the same trick to speed up the sed script
+dnl as for CONFIG_FILES (combinasion of :t and t t).  Here we cannot,
+dnl because of the `#define' templates: we may enter in infinite loops
+dnl replacing `#define foo bar' by itself.
+dnl We ought to get rid of the #define templates.
+cat > $ac_cs_root.hdr <<\EOF
 changequote(<<, >>)dnl
 s/[\\&%]/\\&/g
 s%[\\$`]%\\&%g
@@ -3057,15 +3099,15 @@ s%^[    ]*<<#>>[        ]*define[       ][      ]*\(\([^        (][^    (]*\)([^)]*)\)[         ]*\(.*\)$%${ac_d
 t cleanup
 s%^[   ]*<<#>>[        ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$% ${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
 : cleanup
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
+s%ac_d%ac_e%gp
+s%ac_e%ac_u%gp
 changequote([, ])dnl
 EOF
 # If some macros were called several times there might be several times
 # the same #defines, which is useless.  Nevertheless, we may not want to
 # sort them, since we want the *last* AC_DEFINE to be honored.
-uniq confdefs.h | sed -n -f $confstat.hdr > conftest.vals
-rm -f $confstat.hdr
+uniq confdefs.h | sed -n -f $ac_cs_root.hdr > conftest.vals
+rm -f $ac_cs_root.hdr
 
 # This sed command replaces #undef with comments.  This is necessary, for
 # example, in the case of _POSIX_SOURCE, which is predefined and required
@@ -3076,22 +3118,21 @@ s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
 changequote([, ])dnl
 EOF
 
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
-
 rm -f conftest.tail
 while :
 do
   ac_lines=`grep -c . conftest.vals`
   # grep -c gives empty output for an empty file on some AIX systems.
   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
-  # Write a limited-size here document to $confstat.frag.
-  echo '  cat > $confstat.frag <<CEOF' >> $CONFIG_STATUS
+  # Write a limited-size here document to $ac_cs_root.frag.
+  echo '  cat > $ac_cs_root.frag <<CEOF' >> $CONFIG_STATUS
+dnl A small speed up: don't consider the non `#undef' or `#define' lines.
+  echo '/^#[   ]*u*n*d*e*f*/!b' >> $CONFIG_STATUS
   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
   echo 'CEOF
-  sed -f $confstat.frag $confstat.in > $confstat.out
-  rm -f $confstat.in
-  mv $confstat.out $confstat.in
+  sed -f $ac_cs_root.frag $ac_cs_root.in > $ac_cs_root.out
+  rm -f $ac_cs_root.in
+  mv $ac_cs_root.out $ac_cs_root.in
 ' >> $CONFIG_STATUS
   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
   rm -f conftest.vals
@@ -3101,13 +3142,13 @@ rm -f conftest.vals
 
 dnl Now back to your regularly scheduled config.status.
 cat >> $CONFIG_STATUS <<\EOF
-  rm -f $confstat.frag $confstat.h
-  echo "/* $ac_file.  Generated automatically by configure.  */" > $confstat.h
-  cat $confstat.in >> $confstat.h
-  rm -f $confstat.in
-  if cmp -s $ac_file $confstat.h 2>/dev/null; then
+  rm -f $ac_cs_root.frag $ac_cs_root.h
+  echo "/* $ac_file.  Generated automatically by configure.  */" > $ac_cs_root.h
+  cat $ac_cs_root.in >> $ac_cs_root.h
+  rm -f $ac_cs_root.in
+  if cmp -s $ac_file $ac_cs_root.h 2>/dev/null; then
     echo "$ac_file is unchanged"
-    rm -f $confstat.h
+    rm -f $ac_cs_root.h
   else
     # Remove last slash and all that follows it.  Not all systems have dirname.
   changequote(, )dnl
@@ -3120,7 +3161,7 @@ dnl to be created too.
       test ! -d "$ac_dir" && mkdir "$ac_dir"
     fi
     rm -f $ac_file
-    mv $confstat.h $ac_file
+    mv $ac_cs_root.h $ac_file
   fi
 fi; done
 EOF
index 27f4cb28ebd0103aa626b94cdb3f6d9b572a55ab..31574fa8742fc1836c0258fb718f845b6d431f8d 100644 (file)
@@ -70,10 +70,11 @@ else
 fi
 ])
 
-dnl AC_PROG_CC takes an optional first argument which, if specified,
-dnl must be a space separated list of C compilers to search for.  This
-dnl just gives the user an opportunity to specify an alternative search
-dnl list for the C compiler.
+dnl AC_PROG_CC([COMPILER ...])
+dnl --------------------------
+dnl COMPILER ... is a space separated list of C compilers to search for.
+dnl This just gives the user an opportunity to specify an alternative
+dnl search list for the C compiler.
 AC_DEFUN(AC_PROG_CC,
 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
 AC_ARG_VAR([CFLAGS], [Extra flags for the C compiler])
@@ -484,9 +485,64 @@ dnl Check for mawk first since it's generally faster.
 AC_DEFUN(AC_PROG_AWK,
 [AC_CHECK_PROGS(AWK, mawk gawk nawk awk, )])
 
+dnl AC_PROG_SED
+dnl -----------
+dnl Check whether the first sed in the path supports long scripts.
+dnl Set the variable $ac_cv_prog_sed_max_cmd to the maximum number
+dnl of commands to put in a sed script, `infinite' meaning a priori
+dnl infinite.
+AC_DEFUN([AC_PROG_SED],
+[AC_CACHE_CHECK([for max sed script length], ac_cv_prog_sed_max_cmd,
+[echo >conftest.s "\
+s/0/1/;s/1/2/;s/2/3/;s/3/4/;s/4/5/;s/5/6/;s/6/7/;s/7/8/;s/8/9/;s/9/0/;s/9/O/;"
+dnl 2^4 = 16 lines of 10 commands.
+for ac_cnt in 0 1 2 3
+do
+  cat conftest.s conftest.s >conftest.s1
+  mv conftest.s1 conftest.s
+done
+if test "`echo 0 | sed -f conftest.s`" != 0; then
+dnl HP-UX sed dies with scripts longer than 100 commands.
+  ac_cv_prog_sed_max_cmd=100
+else
+  ac_cv_prog_sed_max_cmd=infinite
+fi
+])dnl
+])
+
+dnl AC_PROG_BINSH
+dnl -------------
+dnl Check the maximum length of an here document.
+dnl FIXME: Is this test really reliable?
+AC_DEFUN([AC_PROG_BINSH],
+[AC_CACHE_CHECK([for max here document length], ac_cv_prog_binsh_max_heredoc,
+[echo >conftest.s1 "\
+ac_test='This is a sample string to test here documents.'"
+dnl 2^8 = 256 lines
+for ac_cnt in 0 1 2 3 4 5 6 7
+do
+  cat conftest.s1 conftest.s1 >conftest.sh
+  mv conftest.sh conftest.s1
+done
+echo 'cat >conftest.s1 <<CEOF' >conftest.sh
+cat conftest.s1 >>conftest.sh
+echo 'echo "Success"' >>conftest.sh
+echo 'CEOF' >>conftest.sh
+$SHELL ./conftest.sh
+if test "`$SHELL ./conftest.s1`" != Success; then
+dnl Some people say to limit oneself to 12, which seems incredibly small.
+  ac_cv_prog_binsh_max_heredoc=12
+else
+  ac_cv_prog_binsh_max_heredoc=infinite
+fi
+])dnl
+])dnl AC_PROG_BINSH
+
 AC_DEFUN(AC_PROG_YACC,
 [AC_CHECK_PROGS(YACC, 'bison -y' byacc, yacc)])
 
+dnl AC_PROG_CPP
+dnl -----------
 AC_DEFUN(AC_PROG_CPP,
 [AC_MSG_CHECKING(how to run the C preprocessor)
 # On Suns, sometimes $CPP names a directory.
@@ -1978,11 +2034,11 @@ AC_DEFUN(AC_C_LONG_DOUBLE,
 [if test "$GCC" = yes; then
   ac_cv_c_long_double=yes
 else
-AC_TRY_COMPILE(,
-[/* The Stardent Vistra knows sizeof(long double), but does not support it.  */
+AC_TRY_RUN([int main() {
+/* The Stardent Vistra knows sizeof(long double), but does not support it.  */
 long double foo = 0.0;
 /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
-switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;],
+exit(sizeof(long double) < sizeof(double)); }],
 ac_cv_c_long_double=yes, ac_cv_c_long_double=no)
 fi])
 if test $ac_cv_c_long_double = yes; then
index 2b1655af85b59a93630209f2bf047755a6504584..8db54d3f6442872c685406428e816c79aaec15af 100644 (file)
@@ -2813,16 +2813,21 @@ If @code{uid_t} is not defined, define @code{uid_t} to be @code{int} and
 @subsection Generic Typedef Checks
 
 This macro is used to check for typedefs not covered by the particular
-test macros.
+test macros.  This macro does not fit well with the rest of Autoconf,
+and its design will probably change in the future.
+
+One of its main flaws is that missing types are not typedef'd, they are
+defined, which can lead to incompatible code in the case of pointer types.
 
-@defmac AC_CHECK_TYPE (@var{type}, @var{default})
+@defmac AC_CHECK_TYPE (@var{type}, @var{default}@r{[}, @var{includes}@r{]})
 @maindex CHECK_TYPE
 If the type @var{type} is not defined in @file{sys/types.h}, or
-@file{stdlib.h} or @file{stddef.h} if they exist, define it to be the
-(or C++) builtin type @var{default}; e.g., @samp{short} or
+@file{stdlib.h} or @file{stddef.h} if they exist, define it to be the C
+(or C++) builtin type @var{default}; e.g., @samp{short} or
 @samp{unsigned}.
 @end defmac
 
+
 @node C Compiler Characteristics, Fortran 77 Compiler Characteristics, Typedefs, Existing Tests
 @section C Compiler Characteristics
 
@@ -2886,7 +2891,7 @@ found in macros such as this:
 @end example
 @end defmac
 
-@defmac AC_CHECK_SIZEOF (@var{type} @r{[}, @var{cross-size}@r{]})
+@defmac AC_CHECK_SIZEOF (@var{type} @r{[}, @var{cross-size}@r{[}, @var{includes}@r{]]})
 @maindex CHECK_SIZEOF
 Define @code{SIZEOF_@var{uctype}} to be the size in bytes of the C (or
 C++) builtin type @var{type}, e.g. @samp{int} or @samp{char *}.  If
@@ -5083,12 +5088,29 @@ may use comes with Autoconf.
 @node Invoking config.status, Questions, Invoking configure, Top
 @chapter Recreating a Configuration
 
-The @code{configure} script creates a file named @file{config.status}
-which describes which configuration options were specified when the
-package was last configured.  This file is a shell script which,
-if run, will recreate the same configuration.
+The @code{configure} script creates a file named @file{config.status},
+which actually configures, @dfn{intanciates}, the template files.  It
+also keeps the configuration options that were specified when the
+package was last configured in case reconfiguring is needed.
+
+Synopsis:
+@example
+./config.status [@var{file}@dots{}]
+./config.status @var{option}
+@end example
 
-It supports the following options:
+In the first form, it configures the @var{files}, if none are specified,
+all the templates are instanciated.  The files may be specified with or
+without their dependencies, i.e., if the files  @file{foo.in} and
+@file{bar.in} are precursors of @file{foobar}, the two following lines
+are equivalent:
+@example
+./config.status foobar
+./config.status foobar:foo.in:bar.in
+@end example
+
+In the second form, no file is instanciated, but a specific action is
+taken:
 @table @code
 @item --recheck
 Ask @file{config.status} to update itself.  This option is useful if you
@@ -5104,7 +5126,8 @@ changes; @pxref{Automatic Remaking}, for an example).
 
 @item --help
 @itemx -h
-Print a summary of the command line options and exit.
+Print a summary of the command line options, a list of the template
+files and exit.
 
 @item --version
 Print the version number of Autoconf used to create the @code{configure}
@@ -5138,14 +5161,15 @@ one of them, perhaps a common library, does.  These variables allow a
 @defvar CONFIG_FILES
 @evindex CONFIG_FILES
 The files in which to perform @samp{@@@var{variable}@@} substitutions.
-The default is the arguments given to @code{AC_OUTPUT} in @file{configure.in}.
+The default is the arguments given to @code{AC_OUTPUT} in
+@file{configure.in}.
 @end defvar
 
 @defvar CONFIG_HEADERS
 @evindex CONFIG_HEADERS
-The files in which to substitute C @code{#define} statements.
-The default is the arguments given to @code{AC_CONFIG_HEADER}; if that
-macro was not called, @file{config.status} ignores this variable.
+The files in which to substitute C @code{#define} statements.  The
+default is the arguments given to @code{AC_CONFIG_HEADER}; if that macro
+was not called, @file{config.status} ignores this variable.
 @end defvar
 
 These variables also allow you to write @file{Makefile} rules that
@@ -5170,6 +5194,20 @@ Makefile: Makefile.in config.status
 (If @file{configure.in} does not call @code{AC_CONFIG_HEADER}, there is
 no need to set @code{CONFIG_HEADERS} in the @code{make} rules.)
 
+Note that this example could also have been written
+
+@example
+@group
+config.h: stamp-h
+stamp-h: config.h.in config.status
+        ./config.status config.h
+        echo > stamp-h
+
+Makefile: Makefile.in config.status
+        ./config.status Makefile
+@end group
+@end example
+
 @node Questions, Upgrading, Invoking config.status, Top
 @chapter Questions About Autoconf
 
index 524bb0f66b108614a94f924d0f2fce7a6f529f72..f184f46122ea0fca7eb241913a436d2788673a56 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,14 +1,15 @@
 #! /bin/sh
-
 # Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+# Generated automatically using autoconf version 2.14.1 
+# Copyright (C) 1992, 93, 94, 95, 96, 98, 1999 Free Software Foundation, Inc.
 #
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 
 # Defaults:
-ac_help=
+ac_arg_with_help=
+ac_arg_enable_help=
+ac_arg_var_help=
 ac_default_prefix=/usr/local
 # Any additions from configure.in:
 
@@ -52,6 +53,9 @@ MFLAGS= MAKEFLAGS=
 SHELL=${CONFIG_SHELL-/bin/sh}
 # Maximum number of lines to put in a shell here document.
 ac_max_here_lines=12
+# Sed expression to map a string onto a valid sh and CPP variable names.
+ac_tr_sh='sed -e y%*+%pp%;s%[^a-zA-Z0-9_]%_%g'
+ac_tr_cpp='sed -e y%*abcdefghijklmnopqrstuvwxyz%PABCDEFGHIJKLMNOPQRSTUVWXYZ%;s%[^A-Z0-9_]%_%g'
 
 ac_prev=
 for ac_option
@@ -134,15 +138,24 @@ do
   -help | --help | --hel | --he)
     # Omit some internal or obsolete options to make the list less imposing.
     # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
+    cat << \EOF
+`configure' configures software source code packages to adapt to many kinds
+of systems.
+
+Usage: configure [OPTION]... [VAR=VALUE]... [HOST]
+
+To safely assign special values to environment variables (e.g., CC,
+CFLAGS...), give to `configure' the definition as VAR=VALUE.
+
+Defaults for the options are specified in brackets.
+
 Configuration:
   --cache-file=FILE       cache test results in FILE
   --help                  print this message
   --no-create             do not create output files
   --quiet, --silent       do not print \`checking...' messages
   --version               print the version of autoconf that created configure
+
 Directory and file names:
   --prefix=PREFIX         install architecture-independent files in PREFIX
                           [$ac_default_prefix]
@@ -163,16 +176,20 @@ Directory and file names:
   --infodir=DIR           info documentation in DIR [PREFIX/info]
   --mandir=DIR            man documentation in DIR [PREFIX/man]
   --srcdir=DIR            find the sources in DIR [configure dir or ..]
+
+Program names:
   --program-prefix=PREFIX prepend PREFIX to installed program names
   --program-suffix=SUFFIX append SUFFIX to installed program names
   --program-transform-name=PROGRAM
                           run sed PROGRAM on installed program names
+
 EOF
-    cat << EOF
+    cat << \EOF
 Host type:
   --build=BUILD           configure for building on BUILD [BUILD=HOST]
   --host=HOST             configure for HOST [guessed]
   --target=TARGET         configure for TARGET [TARGET=HOST]
+
 Features and packages:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
@@ -181,9 +198,12 @@ Features and packages:
   --x-includes=DIR        X include files are in DIR
   --x-libraries=DIR       X library files are in DIR
 EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
+    test -n "$ac_arg_enable_help" && echo "
+--enable options recognized:$ac_arg_enable_help"
+    test -n "$ac_arg_with_help" && echo "
+--with options recognized:$ac_arg_with_help"
+    test -n "$ac_arg_var_help" && echo "
+Some of the influent environment variables:$ac_arg_var_help"
     exit 0 ;;
 
   -host | --host | --hos | --ho)
@@ -333,7 +353,7 @@ EOF
     verbose=yes ;;
 
   -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
+    echo "configure generated by autoconf version 2.14.1"
     exit 0 ;;
 
   -with-* | --with-*)
@@ -379,6 +399,15 @@ EOF
   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
     ;;
 
+  *=*)
+    ac_envvar=`echo $ac_option|sed -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_envvar| sed 's/[_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_envvar: invalid variable name" 1>&2; exit 1; }
+    fi
+    eval "${ac_envvar}='$ac_optarg'"
+    export $ac_envvar ;;
+
   *)
     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
       echo "configure: warning: $ac_option: invalid host type" 1>&2
@@ -393,7 +422,7 @@ EOF
 done
 
 if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+  { echo "configure: error: missing argument to --\`echo $ac_prev | sed 's/_/-/g'\`" 1>&2; exit 1; }
 fi
 
 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
@@ -469,9 +498,9 @@ else
 fi
 if test ! -r $srcdir/$ac_unique_file; then
   if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+    { echo "configure: error: cannot find sources in $ac_confdir or .." 1>&2; exit 1; }
   else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+    { echo "configure: error: cannot find sources in $srcdir" 1>&2; exit 1; }
   fi
 fi
 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
@@ -493,7 +522,7 @@ done
 
 if test -r "$cache_file"; then
   echo "loading cache $cache_file"
-  . $cache_file
+      test -f "$cache_file" && . $cache_file
 else
   echo "creating cache $cache_file"
   > $cache_file
@@ -533,10 +562,10 @@ EOF_SED
   rm -f conftestsed
 fi
 test "$program_prefix" != NONE &&
-  program_transform_name="s,^,${program_prefix},; $program_transform_name"
+  program_transform_name="s,^,${program_prefix},;$program_transform_name"
 # Use a double $ so make ignores it.
 test "$program_suffix" != NONE &&
-  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+  program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
 
 # sed with no file args requires a program.
 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
@@ -546,22 +575,19 @@ for ac_prog in gm4 gnum4 m4
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:551: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_M4'+set}'`\" = set"; then
+echo $ac_n "checking for $ac_word... $ac_c" 1>&6
+echo "configure:580: checking for $ac_word" 1>&5
+if test "${ac_cv_path_M4+set}" = set; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$M4" in
-  /*)
+  /* | ?:/*)
   ac_cv_path_M4="$M4" # Let the user override the test with a path.
   ;;
-  ?:/*)                         
-  ac_cv_path_M4="$M4" # Let the user override the test with a dos path.
-  ;;
   *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do 
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_path_M4="$ac_dir/$ac_word"
@@ -583,9 +609,9 @@ test -n "$M4" && break
 done
 test -n "$M4" || M4="m4"
 
-echo $ac_n "checking whether we are using GNU m4""... $ac_c" 1>&6
-echo "configure:588: checking whether we are using GNU m4" >&5
-if eval "test \"`echo '$''{'acac_cv_gnu_m4'+set}'`\" = set"; then
+echo $ac_n "checking whether we are using GNU m4... $ac_c" 1>&6
+echo "configure:614: checking whether we are using GNU m4" 1>&5
+if test "${acac_cv_gnu_m4+set}" = set; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   acac_cv_gnu_m4=no
@@ -595,7 +621,6 @@ if test x"$M4" != x; then
   esac
 fi
 fi
-
 echo "$ac_t""$acac_cv_gnu_m4" 1>&6
 if test x"$acac_cv_gnu_m4" != xyes; then
   { echo "configure: error: GNU m4 is required" 1>&2; exit 1; }
@@ -604,9 +629,9 @@ for ac_prog in mawk gawk nawk awk
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:609: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
+echo $ac_n "checking for $ac_word... $ac_c" 1>&6
+echo "configure:634: checking for $ac_word" 1>&5
+if test "${ac_cv_prog_AWK+set}" = set; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$AWK"; then
@@ -637,22 +662,19 @@ done
 
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:642: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
+echo $ac_n "checking for $ac_word... $ac_c" 1>&6
+echo "configure:667: checking for $ac_word" 1>&5
+if test "${ac_cv_path_PERL+set}" = set; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   case "$PERL" in
-  /*)
+  /* | ?:/*)
   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
   ;;
-  ?:/*)                         
-  ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
-  ;;
   *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do 
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_path_PERL="$ac_dir/$ac_word"
@@ -690,11 +712,11 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
   fi
 done
 if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+  { echo "configure: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
 fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
 
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -707,10 +729,10 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:712: checking for a BSD compatible install" >&5
+echo $ac_n "checking for a BSD compatible install... $ac_c" 1>&6
+echo "configure:734: checking for a BSD compatible install" 1>&5
 if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+if test "${ac_cv_path_install+set}" = set; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
     IFS="${IFS=        }"; ac_save_IFS="$IFS"; IFS=":"
@@ -728,6 +750,10 @@ else
             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
            # AIX install.  It has an incompatible calling convention.
            :
+         elif test $ac_prog = install &&
+           grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
+           # program-specific install script used by HP pwplus--don't use.
+           :
          else
            ac_cv_path_install="$ac_dir/$ac_prog -c"
            break 2
@@ -756,7 +782,7 @@ echo "$ac_t""$INSTALL" 1>&6
 # It thinks the first close brace ends the variable substitution.
 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
@@ -832,15 +858,29 @@ trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
 # Transform confdefs.h into DEFS.
 # Protect against shell expansion while executing Makefile rules.
 # Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the cleanup section.  Otherwise,
+# look for a macro that doesn't take arguments.
+cat > $ac_cs_root.defs <<\EOF
+s%^[   ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)%-D\1=\2%g
+t cleanup
+s%^[   ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)%-D\1=\2%g
+: cleanup
 s%[    `~#$^&*(){}\\|;'"<>?]%\\&%g
 s%\[%\\&%g
 s%\]%\\&%g
 s%\$%$$%g
 EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output.  A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT="`echo; echo .`"
+DEFS=`sed -f $conftest.defs confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f $ac_cs_root.defs
 
 
 # Without the "./", some shells look in PATH for config.status.
@@ -860,7 +900,36 @@ cat > $CONFIG_STATUS <<EOF
 # Compiler output produced by configure, useful for debugging
 # configure, is in ./config.log if it exists.
 
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+ac_cs_usage="\\
+\\\`$CONFIG_STATUS' configures files from templates according to the current
+configuration.
+
+Usage: $CONFIG_STATUS [OPTIONS] FILE...
+
+  --recheck    Update $CONFIG_STATUS by reconfiguring in the same conditions
+  --version    Print the version of Autoconf and exit
+  --help       Display this help and exit
+
+By default the following files will updated.
+  Configuration files:
+    Makefile testsuite/Makefile 
+
+Report bugs to <bug-autoconf@gnu.org>."
+
+ac_cs_version="\
+$CONFIG_STATUS generated by autoconf version 2.14.1.
+Configured on host `(hostname || uname -n) 2>/dev/null | sed 1q` by running
+  $0 $ac_configure_args"
+
+# Root of the tmp file names.  Use pid to allow concurrent executions.
+ac_cs_root=cs\$\$
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+# Files that config.status was made for.
+config_files="Makefile testsuite/Makefile" 
+
 for ac_option
 do
   case "\$ac_option" in
@@ -868,101 +937,130 @@ do
     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
+    echo "\$ac_cs_version"; exit 0 ;;
   -help | --help | --hel | --he | --h)
     echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
+  *) # Find out the files to process
+    for ac_file in \$config_files
+    do
+      case \$ac_file in
+        \$ac_option | \$ac_option:* )
+          CONFIG_FILES="\$CONFIG_FILES \$ac_file"
+          ac_option=
+          break ;;
+      esac
+    done
+    test -z "\$ac_option" && continue
+    for ac_file in \$config_headers
+    do
+      case \$ac_file in
+        \$ac_option | \$ac_option:* )
+          CONFIG_HEADERS="\$CONFIG_HEADERS \$ac_file"
+          ac_option=
+          break ;;
+      esac
+    done
+    test -z "\$ac_option" && continue
+    echo "$CONFIG_STATUS: invalid argument: \$ac_option"; exit 1
+   ;;
   esac
 done
 
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile testsuite/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
+
 cat >> $CONFIG_STATUS <<EOF
+# If there were arguments, don't assign a default value.
+if test \$# = 0; then
+  : \${CONFIG_FILES="\$config_files"}
+fi
 
+# Remove all the CONFIG_FILES, and trap to remove the temp files.
+rm -fr \`echo "\$CONFIG_FILES" | sed "s/:[^ ]*//g"\`
+trap 'rm -fr \$ac_cs_root*; exit 1' 1 2 15
+
+EOF
+
+cat >>$CONFIG_STATUS <<EOF
 # Protect against being on the right side of a sed subst in config.status.
 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@M4@%$M4%g
-s%@AWK@%$AWK%g
-s%@PERL@%$PERL%g
-s%@SCRIPTS@%$SCRIPTS%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@standards_info@%$standards_info%g
-s%@standards_dvi@%$standards_dvi%g
-
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > \$ac_cs_root.subs <<\\CEOF
+s%@SHELL@%$SHELL%;t t
+s%@CFLAGS@%$CFLAGS%;t t
+s%@CPPFLAGS@%$CPPFLAGS%;t t
+s%@CXXFLAGS@%$CXXFLAGS%;t t
+s%@FFLAGS@%$FFLAGS%;t t
+s%@DEFS@%$DEFS%;t t
+s%@LDFLAGS@%$LDFLAGS%;t t
+s%@LIBS@%$LIBS%;t t
+s%@exec_prefix@%$exec_prefix%;t t
+s%@prefix@%$prefix%;t t
+s%@program_transform_name@%$program_transform_name%;t t
+s%@bindir@%$bindir%;t t
+s%@sbindir@%$sbindir%;t t
+s%@libexecdir@%$libexecdir%;t t
+s%@datadir@%$datadir%;t t
+s%@sysconfdir@%$sysconfdir%;t t
+s%@sharedstatedir@%$sharedstatedir%;t t
+s%@localstatedir@%$localstatedir%;t t
+s%@libdir@%$libdir%;t t
+s%@includedir@%$includedir%;t t
+s%@oldincludedir@%$oldincludedir%;t t
+s%@infodir@%$infodir%;t t
+s%@mandir@%$mandir%;t t
+s%@M4@%$M4%;t t
+s%@AWK@%$AWK%;t t
+s%@PERL@%$PERL%;t t
+s%@SCRIPTS@%$SCRIPTS%;t t
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%;t t
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%;t t
+s%@INSTALL_DATA@%$INSTALL_DATA%;t t
+s%@standards_info@%$standards_info%;t t
+s%@standards_dvi@%$standards_dvi%;t t
 CEOF
+
 EOF
 
 cat >> $CONFIG_STATUS <<\EOF
-
 # Split the substitutions into bite-sized pieces for seds with
 # small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
+ac_max_sed_lines=48
+ac_sed_frag=1 # Number of current file.
 ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_end=$ac_max_sed_lines # Line after last line for current file.
 ac_more_lines=:
 ac_sed_cmds=""
 while $ac_more_lines; do
   if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+    sed "1,${ac_beg}d; ${ac_end}q" $ac_cs_root.subs > $ac_cs_root.sfrag
   else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+    sed "${ac_end}q" $ac_cs_root.subs > $ac_cs_root.sfrag
   fi
-  if test ! -s conftest.s$ac_file; then
+  if test ! -s $ac_cs_root.sfrag; then
     ac_more_lines=false
-    rm -f conftest.s$ac_file
+    rm -f $ac_cs_root.sfrag
   else
+    # The purpose of the label and of the branching condition is to
+    # speed up the sed processing (if there are no `@' at all, there
+    # is no need to browse any of the substitutions).
+    # These are the two extra sed commands mentioned above.
+    (echo ':t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $ac_cs_root.sfrag) > $ac_cs_root.s$ac_sed_frag
     if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
+      ac_sed_cmds="sed -f $ac_cs_root.s$ac_sed_frag"
     else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+      ac_sed_cmds="$ac_sed_cmds | sed -f $ac_cs_root.s$ac_sed_frag"
     fi
-    ac_file=`expr $ac_file + 1`
+    ac_sed_frag=`expr $ac_sed_frag + 1`
     ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+    ac_end=`expr $ac_end + $ac_max_sed_lines`
   fi
 done
 if test -z "$ac_sed_cmds"; then
   ac_sed_cmds=cat
 fi
-EOF
 
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile testsuite/Makefile"}
 EOF
+
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
@@ -1010,17 +1108,29 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
   *) ac_comsub= ;;
   esac
 
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+# Don't redirect the output to AC_FILE directly: use `mv' so that updating
+# is atomic, and doesn't need trapping.
+  ac_file_inputs=`echo $ac_file_in | sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+EOF
+cat >>$CONFIG_STATUS <<EOF
   sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+$ac_vpsub
+$extrasub
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s%@configure_input@%$configure_input%;t t
+s%@srcdir@%$srcdir%;t t
+s%@top_srcdir@%$top_srcdir%;t t
+s%@INSTALL@%$INSTALL%;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_cs_root.out
+  mv $ac_cs_root.out $ac_file
 fi; done
-rm -f conftest.s*
-
+rm -f $ac_cs_root.s*
 EOF
+
+
 cat >> $CONFIG_STATUS <<EOF
 
 EOF
@@ -1030,5 +1140,5 @@ exit 0
 EOF
 chmod +x $CONFIG_STATUS
 rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
 
index 2b1655af85b59a93630209f2bf047755a6504584..8db54d3f6442872c685406428e816c79aaec15af 100644 (file)
@@ -2813,16 +2813,21 @@ If @code{uid_t} is not defined, define @code{uid_t} to be @code{int} and
 @subsection Generic Typedef Checks
 
 This macro is used to check for typedefs not covered by the particular
-test macros.
+test macros.  This macro does not fit well with the rest of Autoconf,
+and its design will probably change in the future.
+
+One of its main flaws is that missing types are not typedef'd, they are
+defined, which can lead to incompatible code in the case of pointer types.
 
-@defmac AC_CHECK_TYPE (@var{type}, @var{default})
+@defmac AC_CHECK_TYPE (@var{type}, @var{default}@r{[}, @var{includes}@r{]})
 @maindex CHECK_TYPE
 If the type @var{type} is not defined in @file{sys/types.h}, or
-@file{stdlib.h} or @file{stddef.h} if they exist, define it to be the
-(or C++) builtin type @var{default}; e.g., @samp{short} or
+@file{stdlib.h} or @file{stddef.h} if they exist, define it to be the C
+(or C++) builtin type @var{default}; e.g., @samp{short} or
 @samp{unsigned}.
 @end defmac
 
+
 @node C Compiler Characteristics, Fortran 77 Compiler Characteristics, Typedefs, Existing Tests
 @section C Compiler Characteristics
 
@@ -2886,7 +2891,7 @@ found in macros such as this:
 @end example
 @end defmac
 
-@defmac AC_CHECK_SIZEOF (@var{type} @r{[}, @var{cross-size}@r{]})
+@defmac AC_CHECK_SIZEOF (@var{type} @r{[}, @var{cross-size}@r{[}, @var{includes}@r{]]})
 @maindex CHECK_SIZEOF
 Define @code{SIZEOF_@var{uctype}} to be the size in bytes of the C (or
 C++) builtin type @var{type}, e.g. @samp{int} or @samp{char *}.  If
@@ -5083,12 +5088,29 @@ may use comes with Autoconf.
 @node Invoking config.status, Questions, Invoking configure, Top
 @chapter Recreating a Configuration
 
-The @code{configure} script creates a file named @file{config.status}
-which describes which configuration options were specified when the
-package was last configured.  This file is a shell script which,
-if run, will recreate the same configuration.
+The @code{configure} script creates a file named @file{config.status},
+which actually configures, @dfn{intanciates}, the template files.  It
+also keeps the configuration options that were specified when the
+package was last configured in case reconfiguring is needed.
+
+Synopsis:
+@example
+./config.status [@var{file}@dots{}]
+./config.status @var{option}
+@end example
 
-It supports the following options:
+In the first form, it configures the @var{files}, if none are specified,
+all the templates are instanciated.  The files may be specified with or
+without their dependencies, i.e., if the files  @file{foo.in} and
+@file{bar.in} are precursors of @file{foobar}, the two following lines
+are equivalent:
+@example
+./config.status foobar
+./config.status foobar:foo.in:bar.in
+@end example
+
+In the second form, no file is instanciated, but a specific action is
+taken:
 @table @code
 @item --recheck
 Ask @file{config.status} to update itself.  This option is useful if you
@@ -5104,7 +5126,8 @@ changes; @pxref{Automatic Remaking}, for an example).
 
 @item --help
 @itemx -h
-Print a summary of the command line options and exit.
+Print a summary of the command line options, a list of the template
+files and exit.
 
 @item --version
 Print the version number of Autoconf used to create the @code{configure}
@@ -5138,14 +5161,15 @@ one of them, perhaps a common library, does.  These variables allow a
 @defvar CONFIG_FILES
 @evindex CONFIG_FILES
 The files in which to perform @samp{@@@var{variable}@@} substitutions.
-The default is the arguments given to @code{AC_OUTPUT} in @file{configure.in}.
+The default is the arguments given to @code{AC_OUTPUT} in
+@file{configure.in}.
 @end defvar
 
 @defvar CONFIG_HEADERS
 @evindex CONFIG_HEADERS
-The files in which to substitute C @code{#define} statements.
-The default is the arguments given to @code{AC_CONFIG_HEADER}; if that
-macro was not called, @file{config.status} ignores this variable.
+The files in which to substitute C @code{#define} statements.  The
+default is the arguments given to @code{AC_CONFIG_HEADER}; if that macro
+was not called, @file{config.status} ignores this variable.
 @end defvar
 
 These variables also allow you to write @file{Makefile} rules that
@@ -5170,6 +5194,20 @@ Makefile: Makefile.in config.status
 (If @file{configure.in} does not call @code{AC_CONFIG_HEADER}, there is
 no need to set @code{CONFIG_HEADERS} in the @code{make} rules.)
 
+Note that this example could also have been written
+
+@example
+@group
+config.h: stamp-h
+stamp-h: config.h.in config.status
+        ./config.status config.h
+        echo > stamp-h
+
+Makefile: Makefile.in config.status
+        ./config.status Makefile
+@end group
+@end example
+
 @node Questions, Upgrading, Invoking config.status, Top
 @chapter Questions About Autoconf
 
index dbdfd46a447cb231c02d19a8eecebcac0a9b7ebe..0a01b997a109497108ab9a55444d03020ae7f8e8 100644 (file)
@@ -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 of a software?
+dnl AC_WRAP([Short doc.], [          ], [  --too-wide ], 30)
+dnl |   --too-wide
+dnl |           Short doc.
+dnl
+dnl AC_WRAP([Super long documentation.], [          ], [  --too-wide ], 30)
+dnl |   --too-wide
+dnl |      Super long
+dnl |      documentation.
+dnl
+dnl dnl FIXME: there is no checking of a longer PREFIX than WIDTH, but do
+dnl dnl we really want to bother with people trying each single corner
+dnl dnl of a software?
 define([AC_WRAP],
-[pushdef([ac_prefix], [$3])dnl
-pushdef([ac_width], m4_eval(ifelse([$2],, 79, $2) - len(ac_prefix)))dnl
-pushdef([ac_cursor], 0)dnl
-ac_prefix[]dnl
-AC_FOREACH([ac_word], $1,
-[define([ac_cursor], m4_eval(ac_cursor + len(ac_word) + 1))dnl
-ifelse(m4_eval(ac_cursor > ac_width),
-       1, [define([ac_cursor], m4_eval(len(ac_word) + 1))]
-ac_prefix)dnl
-ac_word ])dnl
-popdef([ac_prefix])dnl
-popdef([ac_width])dnl
-popdef([ac_cursor])])
+[pushdef([AC_Prefix], m4_default([$2], []))dnl
+pushdef([AC_Prefix1], m4_default([$3], [AC_Prefix]))dnl
+pushdef([AC_Width], m4_default([$4], 79))dnl
+pushdef([AC_Cursor], len(AC_Prefix1))dnl
+AC_Prefix1[]dnl
+ifelse(m4_eval(AC_Cursor > len(AC_Prefix)),
+       1, [define([AC_Cursor], len(AC_Prefix))
+AC_Prefix])[]dnl
+AC_FOREACH([AC_Word], [$1],
+[define([AC_Cursor], m4_eval(AC_Cursor + len(AC_Word) + 1))dnl
+ifelse(m4_eval(AC_Cursor > AC_Width),
+       1, [define([AC_Cursor], m4_eval(len(AC_Prefix) + len(AC_Word) + 1))]
+AC_Prefix)dnl
+AC_Word ])dnl
+popdef([AC_Cursor])dnl
+popdef([AC_Width])dnl
+popdef([AC_Prefix1])dnl
+popdef([AC_Prefix])dnl
+])
 
 
 dnl AC_HELP_STRING(LHS, RHS[, COLUMN])
@@ -571,33 +599,14 @@ dnl  | |                       ^
 dnl  | column 2                |
 dnl  column 0                  column 26
 dnl
-dnl This macro is a adhoc version of AC_WRAP.
 define([AC_HELP_STRING],
 [pushdef([AC_Prefix], m4_default([$3], [                          ]))dnl
-pushdef([AC_Prefix_Len], len(AC_Prefix))dnl Default: 26
-pushdef([AC_Prefix_Format], [  %-]m4_eval(len(AC_Prefix) - 3)[s])dnl [  %-23s]
-pushdef([AC_Width], m4_eval(79 - AC_Prefix_Len))dnl Width of the RHS column.
-pushdef([AC_Cursor], 0)dnl
-m4_format(AC_Prefix_Format, [$1])dnl
-dnl If the option is too wide, leave it alone on the line
-ifelse(m4_eval(len(m4_format(AC_Prefix_Format, [$1])) > AC_Prefix_Len),
-       1, [
-]AC_Prefix)dnl
-AC_FOREACH([AC_Word], $2,
-[define([AC_Cursor], m4_eval(AC_Cursor + len(AC_Word) + 1))dnl
-ifelse(m4_eval(AC_Cursor > AC_Width),
-       1, [define([AC_Cursor], m4_eval(len(AC_Word) + 1))]
-AC_Prefix)dnl
-AC_Word ])dnl
-popdef([AC_Cursor])dnl
-popdef([AC_Width])dnl
+pushdef([AC_Prefix_Format], [  %-]m4_eval(len(AC_Prefix) - 3)[s ])dnl [  %-23s ]
+AC_WRAP([$2], AC_Prefix, m4_format(AC_Prefix_Format, [$1]))dnl
 popdef([AC_Prefix_Format])dnl
-popdef([AC_Prefix_Len])dnl
 popdef([AC_Prefix])dnl
 ])
 
-
-
 dnl ### Initialization
 
 
@@ -828,18 +837,12 @@ EOF
 changequote([, ])dnl
 dnl It would be great to sort, unfortunately, since each entry maybe
 dnl split on several lines, it is not as evident as a simple `| sort'.
-    if test -n "$ac_arg_enable_help"; then
-      echo "
+    test -n "$ac_arg_enable_help" && echo "
 --enable options recognized:$ac_arg_enable_help"
-    fi
-    if test -n "$ac_arg_with_help"; then
-      echo "
+    test -n "$ac_arg_with_help" && echo "
 --with options recognized:$ac_arg_with_help"
-    fi
-    if test -n "$ac_arg_var_help"; then
-      echo "
+    test -n "$ac_arg_var_help" && echo "
 Some of the influent environment variables:$ac_arg_var_help"
-    fi
     exit 0 ;;
 
   -host | --host | --hos | --ho)
@@ -1307,9 +1310,9 @@ AC_DEFUN(AC_ARG_VAR,
 ac_arg_var_help="$ac_arg_var_help
 AC_HELP_STRING([$1], [$2], [              ])"
 AC_DIVERT_POP()dnl
-dnl Prepend instead of appending, so that envvars set on the cmd line
-dnl win over the environment.  Don't register envvars not set.
-dnl Don't register several times.
+dnl Register if set and not yet registered.
+dnl If there are envvars given as arguments, they are already set,
+dnl therefore they won't be set again, which is the right thing.
 case "${$1+set} $ac_configure_args" in
  *" $1="* );;
  "set "*) ac_configure_args="$1='[$]$1' $ac_configure_args";;
@@ -1712,7 +1715,7 @@ AC_DIVERT_POP()dnl
 ])])
 
 
-dnl ### Printing messages at autoconf run time
+dnl ### Printing messages at autoconf runtime
 
 dnl _AC_ERRPRINT(MESSAGE)
 dnl Report the MESSAGE at m4 time, with line and filename.
@@ -1728,20 +1731,21 @@ define(AC_FATAL,
 m4exit(ifdef([$2], [$2], 1))])
 
 
-dnl ### Printing messages at configure run time
+dnl ### Printing messages at configure runtime
 
 dnl _AC_SH_QUOTE(STRING)
-dnl Quote the back quotes but if they are already quoted.
-dnl This exception is to provide backwards compatibility.
+dnl --------------------
+dnl If there are quoted (via backslash) backquotes do nothing, else
+dnl backslash all the quotes.
 define(_AC_SH_QUOTE,
-[changequote(<<, >>)dnl
-substr(patsubst(<<X$1>>,
-                <<\([^\]\)`>>, <<\1\\`>>), 1)<<>>dnl
-changequote([, ])])
+[ifelse(regexp([$1], [\\`]),
+        -1, [patsubst([$1], [`], [\\`])],
+        [AC_WARNING([needlessly backslashed backquotes.])dnl
+[$1]])])
 
 dnl _AC_ECHO_UNQUOTED(STRING [ , FD ])
 dnl Expands into a sh call to echo onto FD (default is AC_FD_MSG).
-dnl The shell perform its expansions on STRING.
+dnl The shell performs its expansions on STRING.
 define([_AC_ECHO_UNQUOTED],
 [echo "[$1]" 1>&ifelse($2,, AC_FD_MSG, $2)])
 
@@ -1964,18 +1968,17 @@ AC_SUBST($1)dnl
 ])
 
 dnl AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND [, PATH]])
+dnl -------------------------------------------------------------------------
 AC_DEFUN(AC_PATH_PROG,
 [# Extract the first word of "$2", so it can be a program name with args.
 set dummy $2; ac_word=[$]2
 AC_MSG_CHECKING([for $ac_word])
 AC_CACHE_VAL(ac_cv_path_$1,
 [case "[$]$1" in
-  /*)
+dnl Second pattern matches DOS absolute paths.
+  /* | ?:/*)
   ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
   ;;
-  ?:/*)
-  ac_cv_path_$1="[$]$1" # Let the user override the test with a dos path.
-  ;;
   *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
 dnl $ac_dummy forces splitting on constant user-supplied paths.
@@ -2167,8 +2170,8 @@ dnl because the test really is for library $1 defining function $2, not
 dnl just for library $1.  Separate tests with the same $1 and different $2s
 dnl may have different results.
 AC_DEFUN(AC_CHECK_LIB,
-[AC_VAR_PUSHDEF([ac_var], [ac_cv_lib_$1_$2])dnl
-AC_CACHE_CHECK([for $2 in -l$1], ac_var,
+[AC_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])dnl
+AC_CACHE_CHECK([for $2 in -l$1], ac_Lib,
 [ac_save_LIBS="$LIBS"
 LIBS="-l$1 $5 $LIBS"
 AC_TRY_LINK(dnl
@@ -2184,15 +2187,15 @@ extern "C"
 char $2();
 ])),
 [$2()],
-AC_VAR_SET(ac_var, yes), AC_VAR_SET(ac_var, no))
+AC_VAR_SET(ac_Lib, yes), AC_VAR_SET(ac_Lib, no))
 LIBS="$ac_save_LIBS"])
-AC_SHELL_IFELSE(test AC_VAR_GET(ac_var) = yes,
+AC_SHELL_IFELSE(test AC_VAR_GET(ac_Lib) = yes,
                 m4_default([$3],
                           [AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_LIB$1))
   LIBS="-l$1 $LIBS"
 ]),
                 [$4])dnl
-AC_VAR_POPDEF([ac_var])dnl
+AC_VAR_POPDEF([ac_Lib])dnl
 ])dnl AC_CHECK_LIB
 
 dnl AC_HAVE_LIBRARY(LIBRARY, [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
@@ -2296,7 +2299,7 @@ dnl ### Examining syntax
 
 
 dnl AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
-dnl             [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl                [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
 AC_DEFUN(AC_TRY_COMPILE,
 [cat > conftest.$ac_ext <<EOF
 ifelse(AC_LANG, [FORTRAN77],
@@ -2416,13 +2419,13 @@ dnl ### Checking for header files
 
 dnl AC_CHECK_HEADER(HEADER-FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
 AC_DEFUN(AC_CHECK_HEADER,
-[AC_VAR_PUSHDEF([ac_var_header], [ac_cv_header_$1])dnl
-AC_CACHE_CHECK([for $1], ac_var_header,
+[AC_VAR_PUSHDEF([ac_Header], [ac_cv_header_$1])dnl
+AC_CACHE_CHECK([for $1], ac_Header,
 [AC_TRY_CPP([#include <$1>],
-AC_VAR_SET(ac_var_header, yes), AC_VAR_SET(ac_var_header, no))])
-AC_SHELL_IFELSE(test AC_VAR_GET(ac_var_header) = yes,
+AC_VAR_SET(ac_Header, yes), AC_VAR_SET(ac_Header, no))])
+AC_SHELL_IFELSE(test AC_VAR_GET(ac_Header) = yes,
                 [$2], [$3])dnl
-AC_VAR_POPDEF([ac_var_header])dnl
+AC_VAR_POPDEF([ac_Header])dnl
 ])dnl AC_CHECK_HEADER
 
 dnl AC_CHECK_HEADERS(HEADER-FILE...
@@ -2577,37 +2580,42 @@ AC_SUBST(LIBOBJS)dnl
 dnl ### Checking compiler characteristics
 
 
-dnl AC_CHECK_SIZEOF(TYPE [, CROSS-SIZE])
+dnl AC_CHECK_SIZEOF(TYPE [, CROSS-SIZE, [INCLUDES]])
+dnl ------------------------------------------------
+dnl This macro will probably be obsoleted by the macros of Kaveh.  In
+dnl addition `CHECK' is not a proper name (is not boolean).
 AC_DEFUN(AC_CHECK_SIZEOF,
-[AC_VAR_PUSHDEF([ac_var], [ac_cv_func_$1])dnl
-AC_CACHE_CHECK([size of $1], ac_var,
+[AC_VAR_PUSHDEF([ac_Sizeof], [ac_cv_sizeof_$1])dnl
+AC_CACHE_CHECK([size of $1], ac_Sizeof,
 [AC_TRY_RUN([#include <stdio.h>
+[$3]
 main()
 {
   FILE *f=fopen("conftestval", "w");
   if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof($1));
+  fprintf(f, "%d\n", sizeof([$1]));
   exit(0);
 }],
-  AC_VAR_SET(ac_var, `cat conftestval`),
-  AC_VAR_SET(ac_var, 0),
-  ifset([$2], AC_VAR_SET(ac_var, $2)))])
-AC_DEFINE_UNQUOTED(AC_TR_CPP(sizeof_$1), AC_VAR_GET(ac_var))
-AC_VAR_POPDEF([ac_var])dnl
+  AC_VAR_SET(ac_Sizeof, `cat conftestval`),
+  AC_VAR_SET(ac_Sizeof, 0),
+  ifset([$2], AC_VAR_SET(ac_Sizeof, $2)))])
+AC_DEFINE_UNQUOTED(AC_TR_CPP(sizeof_$1), AC_VAR_GET(ac_Sizeof))
+AC_VAR_POPDEF([ac_Sizeof])dnl
 ])
 
 
 dnl ### Checking for typedefs
 
 
-dnl AC_CHECK_TYPE(TYPE, DEFAULT)
+dnl AC_CHECK_TYPE(TYPE, DEFAULT[, INCLUDES])
+dnl ----------------------------------------
 dnl FIXME: This is an extremely badly choosen name, since this
 dnl macro actually performs an AC_REPLACE_TYPE.  Some day we
 dnl have to clean this up.
 AC_DEFUN(AC_CHECK_TYPE,
 [AC_REQUIRE([AC_HEADER_STDC])dnl
-AC_MSG_CHECKING(for $1)
-AC_CACHE_VAL(ac_cv_type_$1,
+AC_VAR_PUSHDEF([ac_Type], [ac_cv_type_$1])dnl
+AC_CACHE_CHECK([for $1], ac_Type,
 [AC_EGREP_CPP(dnl
 changequote(<<,>>)dnl
 <<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
@@ -2615,13 +2623,12 @@ changequote([,]), [#include <sys/types.h>
 #if STDC_HEADERS
 #include <stdlib.h>
 #include <stddef.h>
-#endif], eval "ac_cv_type_$1=yes", eval "ac_cv_type_$1=no")])dnl
-if eval "test \"`echo '$ac_cv_type_'$1`\" = yes"; then
-  AC_MSG_RESULT(yes)
-else
-  AC_MSG_RESULT(no)
-  AC_DEFINE_UNQUOTED($1, $2)
-fi
+#endif
+[$3]
+], AC_VAR_SET(ac_Type, yes), AC_VAR_SET(ac_Type, no))])
+AC_SHELL_IFELSE(test AC_VAR_GET(ac_Type) = yes,,
+                [AC_DEFINE_UNQUOTED($1, $2)])dnl
+AC_VAR_POPDEF([ac_Type])dnl
 ])
 
 
@@ -2709,9 +2716,11 @@ dnl so uname gets run too.
 # Compiler output produced by configure, useful for debugging
 # configure, is in ./config.log if it exists.
 
-ac_cs_usage="\
-Usage: $CONFIG_STATUS @BKL@OPTIONS@BKR@
-Configure files from templates according to the current configuration.
+ac_cs_usage="\\
+\\\`$CONFIG_STATUS' configures files from templates according to the current
+configuration.
+
+Usage: $CONFIG_STATUS @BKL@OPTIONS@BKR@ FILE...
 
   --recheck    Update $CONFIG_STATUS by reconfiguring in the same conditions
   --version    Print the version of Autoconf and exit
@@ -2719,15 +2728,12 @@ Configure files from templates according to the current configuration.
 
 By default the following files will updated.
 ifset($1, [  Configuration files:
-AC_WRAP($1, 79, [    ])
+AC_WRAP($1, [    ])
 ])dnl
 ifdef([AC_LIST_HEADER], [  Configuration headers:
-AC_WRAP(AC_LIST_HEADER, 79, [    ])]
+AC_WRAP(AC_LIST_HEADER, [    ])]
 )dnl
 
-In order to configure a list a specified FILES and HEADERS, run
-  CONFIG_FILES=FILES CONFIG_HEADERS=HEADERS $CONFIG_STATUS
-
 Report bugs to <bug-autoconf@gnu.org>."
 
 ac_cs_version="\
@@ -2735,6 +2741,23 @@ $CONFIG_STATUS generated by autoconf version AC_ACVERSION.
 Configured on host `(hostname || uname -n) 2>/dev/null | sed 1q` by running
   [$]0 [$]ac_configure_args"
 
+dnl We use a different name than CONFTEST just to help the maintainers
+dnl to make the difference between `conftest' which is the root of the
+dnl files used by configure, and `ac_cs_root' which is the root of the
+dnl files of config.status.
+# Root of the tmp file names.  Use pid to allow concurrent executions.
+ac_cs_root=cs\$\$
+
+ac_given_srcdir=$srcdir
+ifdef([AC_PROVIDE_AC_PROG_INSTALL], [ac_given_INSTALL="$INSTALL"
+])dnl
+
+# Files that config.status was made for.
+AC_WRAP([config_files="]$1["]
+)
+ifdef([AC_LIST_HEADER], [AC_WRAP([config_headers="]AC_LIST_HEADER["])]
+)dnl
+
 for ac_option
 do
   case "[\$]ac_option" in
@@ -2745,31 +2768,50 @@ do
     echo "[\$]ac_cs_version"; exit 0 ;;
   -help | --help | --hel | --he | --h)
     echo "[\$]ac_cs_usage"; exit 0 ;;
-  *) echo "[\$]ac_cs_usage"; exit 1 ;;
+  *) # Find out the files to process
+    for ac_file in [\$]config_files
+    do
+      case [\$]ac_file in
+        [\$]ac_option | [\$]ac_option:* )
+          CONFIG_FILES="[\$]CONFIG_FILES [\$]ac_file"
+          ac_option=
+          break ;;
+      esac
+    done
+    test -z "[\$]ac_option" && continue
+    for ac_file in [\$]config_headers
+    do
+      case [\$]ac_file in
+        [\$]ac_option | [\$]ac_option:* )
+          CONFIG_HEADERS="[\$]CONFIG_HEADERS [\$]ac_file"
+          ac_option=
+          break ;;
+      esac
+    done
+    test -z "[\$]ac_option" && continue
+    echo "$CONFIG_STATUS: invalid argument: [\$]ac_option"; exit 1
+   ;;
   esac
 done
 
-ac_given_srcdir=$srcdir
-ifdef([AC_PROVIDE_AC_PROG_INSTALL], [ac_given_INSTALL="$INSTALL"
-])dnl
-dnl We use a different name than CONFTEST just to help the maintainers
-dnl to make the difference between `conftest' which is the root of the
-dnl files used by configure, and `confstat' which is the root of the
-dnl files of config.status.
-# Allow concurrent executions.
-confstat=cft\$\$
 EOF
 
 cat >> $CONFIG_STATUS <<EOF
-dnl Remove all the CONFIG_FILES, and trap to remove the temp files.  There
-dnl is no need to trap for the config files since they are built from `mv
-dnl tmp-file config-file', hence their update is atomic.
-: \${CONFIG_FILES="$1"}
-ifdef([AC_LIST_HEADER], [: \${CONFIG_HEADERS=AC_LIST_HEADER}
+# If there were arguments, don't assign a default value.
+if test \$[#] = 0; then
+  : \${CONFIG_FILES="\$config_files"}
+ifdef([AC_LIST_HEADER], [  : \${CONFIG_HEADERS="\$config_headers"}
 ])dnl
+fi
+
+# Remove all the CONFIG_FILES, and trap to remove the temp files.
+dnl There is no need to trap for the config files since they are built
+dnl from `mv tmp-file config-file', hence their update is atomic.
 rm -fr \`echo "\$CONFIG_FILES" | sed "s/:@BKL@^ @BKR@*//g"\`
-trap 'rm -fr \$confstat*; exit 1' 1 2 15
+trap 'rm -fr \$ac_cs_root*; exit 1' 1 2 15
+
 EOF
+
 dnl The following three sections are in charge of their own here
 dnl documenting into $CONFIG_STATUS.
 AC_OUTPUT_FILES($1)
@@ -2807,7 +2849,7 @@ dnl Using a here document instead of a string reduces the quoting nightmare.
 # If the first sed substitution is executed (which looks for macros that
 # take arguments), then we branch to the cleanup section.  Otherwise,
 # look for a macro that doesn't take arguments.
-cat > $confstat.defs <<\EOF
+cat > $ac_cs_root.defs <<\EOF
 changequote(<<, >>)dnl
 s%^[   ]*<<#>>[        ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)%-D\1=\2%g
 t cleanup
@@ -2827,7 +2869,7 @@ EOF
 # would break.
 ac_LF_and_DOT="`echo; echo .`"
 DEFS=`sed -f $conftest.defs confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f $confstat.defs
+rm -f $ac_cs_root.defs
 ])
 
 
@@ -2843,20 +2885,22 @@ define(AC_OUTPUT_FILES,
 # Protect against being on the right side of a sed subst in config.status.
 changequote(, )dnl
 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > \$confstat.subs <<\\CEOF
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > \$ac_cs_root.subs <<\\CEOF
 changequote([, ])dnl
 dnl These here document variables are unquoted when configure runs
 dnl but quoted when config.status runs, so variables are expanded once.
 dnl Insert the sed substitutions of variables.
 undivert(AC_DIVERSION_SED)dnl
 CEOF
+
 EOF
 
 cat >> $CONFIG_STATUS <<\EOF
-
 # Split the substitutions into bite-sized pieces for seds with
 # small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_lines=90 # Maximum number of lines to put in a sed script.
+dnl One cannot portably go further than 100 commands because of HP-UX.
+dnl Here, there are 2 cmd per line, and two cmd are added later.
+ac_max_sed_lines=48
 ac_sed_frag=1 # Number of current file.
 ac_beg=1 # First line for current file.
 ac_end=$ac_max_sed_lines # Line after last line for current file.
@@ -2864,23 +2908,24 @@ ac_more_lines=:
 ac_sed_cmds=""
 while $ac_more_lines; do
   if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" $confstat.subs > $confstat.sfrag
+    sed "1,${ac_beg}d; ${ac_end}q" $ac_cs_root.subs > $ac_cs_root.sfrag
   else
-    sed "${ac_end}q" $confstat.subs > $confstat.sfrag
+    sed "${ac_end}q" $ac_cs_root.subs > $ac_cs_root.sfrag
   fi
-  if test ! -s $confstat.sfrag; then
+  if test ! -s $ac_cs_root.sfrag; then
     ac_more_lines=false
-    rm -f $confstat.sfrag
+    rm -f $ac_cs_root.sfrag
   else
     # The purpose of the label and of the branching condition is to
     # speed up the sed processing (if there are no `@' at all, there
     # is no need to browse any of the substitutions).
+    # These are the two extra sed commands mentioned above.
     (echo ':t
-/@@BKL@a-zA-Z_@BKR@@BKL@a-zA-Z_0-9@BKR@*@/!b' && cat $confstat.sfrag) > $confstat.s$ac_sed_frag
+/@@BKL@a-zA-Z_@BKR@@BKL@a-zA-Z_0-9@BKR@*@/!b' && cat $ac_cs_root.sfrag) > $ac_cs_root.s$ac_sed_frag
     if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f $confstat.s$ac_sed_frag"
+      ac_sed_cmds="sed -f $ac_cs_root.s$ac_sed_frag"
     else
-      ac_sed_cmds="$ac_sed_cmds | sed -f $confstat.s$ac_sed_frag"
+      ac_sed_cmds="$ac_sed_cmds | sed -f $ac_cs_root.s$ac_sed_frag"
     fi
     ac_sed_frag=`expr $ac_sed_frag + 1`
     ac_beg=$ac_end
@@ -2971,18 +3016,18 @@ s%@top_srcdir@%$top_srcdir%;t t
 ifdef([AC_PROVIDE_AC_PROG_INSTALL], [s%@INSTALL@%$INSTALL%;t t
 ])dnl
 dnl The parens around the eval prevent an "illegal io" in Ultrix sh.
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $confstat.out
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_cs_root.out
 dnl This would break Makefile dependencies.
-dnl  if cmp -s $ac_file $confstat.out 2>/dev/null; then
+dnl  if cmp -s $ac_file $ac_cs_root.out 2>/dev/null; then
 dnl    echo "$ac_file is unchanged"
-dnl    rm -f $confstat.out
+dnl    rm -f $ac_cs_root.out
 dnl   else
 dnl     rm -f $ac_file
-dnl    mv $confstat.out $ac_file
+dnl    mv $ac_cs_root.out $ac_file
 dnl  fi
-  mv $confstat.out $ac_file
+  mv $ac_cs_root.out $ac_file
 fi; done
-rm -f $confstat.s*
+rm -f $ac_cs_root.s*
 EOF
 ])dnl AC_OUTPUT_FILES
 
@@ -3016,14 +3061,6 @@ ac_eC=' '
 ac_eD='%g'
 changequote([, ])dnl
 
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-dnl Support passing AC_CONFIG_HEADER a value containing shell variables.
-cat >> $CONFIG_STATUS <<EOF
-  CONFIG_HEADERS="$1"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
 changequote(, )dnl
   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
@@ -3036,9 +3073,9 @@ changequote([, ])dnl
 
   echo creating $ac_file
 
-  rm -f $confstat.frag $confstat.in $confstat.out
+  rm -f $ac_cs_root.frag $ac_cs_root.in $ac_cs_root.out
   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  cat $ac_file_inputs > $confstat.in
+  cat $ac_file_inputs > $ac_cs_root.in
 
 EOF
 
@@ -3049,7 +3086,12 @@ EOF
 rm -f conftest.vals
 dnl Using a here document instead of a string reduces the quoting nightmare.
 dnl Putting comments in sed scripts is not portable.
-cat > $confstat.hdr <<\EOF
+dnl One may be tempted to use the same trick to speed up the sed script
+dnl as for CONFIG_FILES (combinasion of :t and t t).  Here we cannot,
+dnl because of the `#define' templates: we may enter in infinite loops
+dnl replacing `#define foo bar' by itself.
+dnl We ought to get rid of the #define templates.
+cat > $ac_cs_root.hdr <<\EOF
 changequote(<<, >>)dnl
 s/[\\&%]/\\&/g
 s%[\\$`]%\\&%g
@@ -3057,15 +3099,15 @@ s%^[    ]*<<#>>[        ]*define[       ][      ]*\(\([^        (][^    (]*\)([^)]*)\)[         ]*\(.*\)$%${ac_d
 t cleanup
 s%^[   ]*<<#>>[        ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$% ${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
 : cleanup
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
+s%ac_d%ac_e%gp
+s%ac_e%ac_u%gp
 changequote([, ])dnl
 EOF
 # If some macros were called several times there might be several times
 # the same #defines, which is useless.  Nevertheless, we may not want to
 # sort them, since we want the *last* AC_DEFINE to be honored.
-uniq confdefs.h | sed -n -f $confstat.hdr > conftest.vals
-rm -f $confstat.hdr
+uniq confdefs.h | sed -n -f $ac_cs_root.hdr > conftest.vals
+rm -f $ac_cs_root.hdr
 
 # This sed command replaces #undef with comments.  This is necessary, for
 # example, in the case of _POSIX_SOURCE, which is predefined and required
@@ -3076,22 +3118,21 @@ s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
 changequote([, ])dnl
 EOF
 
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
-
 rm -f conftest.tail
 while :
 do
   ac_lines=`grep -c . conftest.vals`
   # grep -c gives empty output for an empty file on some AIX systems.
   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
-  # Write a limited-size here document to $confstat.frag.
-  echo '  cat > $confstat.frag <<CEOF' >> $CONFIG_STATUS
+  # Write a limited-size here document to $ac_cs_root.frag.
+  echo '  cat > $ac_cs_root.frag <<CEOF' >> $CONFIG_STATUS
+dnl A small speed up: don't consider the non `#undef' or `#define' lines.
+  echo '/^#[   ]*u*n*d*e*f*/!b' >> $CONFIG_STATUS
   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
   echo 'CEOF
-  sed -f $confstat.frag $confstat.in > $confstat.out
-  rm -f $confstat.in
-  mv $confstat.out $confstat.in
+  sed -f $ac_cs_root.frag $ac_cs_root.in > $ac_cs_root.out
+  rm -f $ac_cs_root.in
+  mv $ac_cs_root.out $ac_cs_root.in
 ' >> $CONFIG_STATUS
   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
   rm -f conftest.vals
@@ -3101,13 +3142,13 @@ rm -f conftest.vals
 
 dnl Now back to your regularly scheduled config.status.
 cat >> $CONFIG_STATUS <<\EOF
-  rm -f $confstat.frag $confstat.h
-  echo "/* $ac_file.  Generated automatically by configure.  */" > $confstat.h
-  cat $confstat.in >> $confstat.h
-  rm -f $confstat.in
-  if cmp -s $ac_file $confstat.h 2>/dev/null; then
+  rm -f $ac_cs_root.frag $ac_cs_root.h
+  echo "/* $ac_file.  Generated automatically by configure.  */" > $ac_cs_root.h
+  cat $ac_cs_root.in >> $ac_cs_root.h
+  rm -f $ac_cs_root.in
+  if cmp -s $ac_file $ac_cs_root.h 2>/dev/null; then
     echo "$ac_file is unchanged"
-    rm -f $confstat.h
+    rm -f $ac_cs_root.h
   else
     # Remove last slash and all that follows it.  Not all systems have dirname.
   changequote(, )dnl
@@ -3120,7 +3161,7 @@ dnl to be created too.
       test ! -d "$ac_dir" && mkdir "$ac_dir"
     fi
     rm -f $ac_file
-    mv $confstat.h $ac_file
+    mv $ac_cs_root.h $ac_file
   fi
 fi; done
 EOF
index 27f4cb28ebd0103aa626b94cdb3f6d9b572a55ab..31574fa8742fc1836c0258fb718f845b6d431f8d 100644 (file)
@@ -70,10 +70,11 @@ else
 fi
 ])
 
-dnl AC_PROG_CC takes an optional first argument which, if specified,
-dnl must be a space separated list of C compilers to search for.  This
-dnl just gives the user an opportunity to specify an alternative search
-dnl list for the C compiler.
+dnl AC_PROG_CC([COMPILER ...])
+dnl --------------------------
+dnl COMPILER ... is a space separated list of C compilers to search for.
+dnl This just gives the user an opportunity to specify an alternative
+dnl search list for the C compiler.
 AC_DEFUN(AC_PROG_CC,
 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
 AC_ARG_VAR([CFLAGS], [Extra flags for the C compiler])
@@ -484,9 +485,64 @@ dnl Check for mawk first since it's generally faster.
 AC_DEFUN(AC_PROG_AWK,
 [AC_CHECK_PROGS(AWK, mawk gawk nawk awk, )])
 
+dnl AC_PROG_SED
+dnl -----------
+dnl Check whether the first sed in the path supports long scripts.
+dnl Set the variable $ac_cv_prog_sed_max_cmd to the maximum number
+dnl of commands to put in a sed script, `infinite' meaning a priori
+dnl infinite.
+AC_DEFUN([AC_PROG_SED],
+[AC_CACHE_CHECK([for max sed script length], ac_cv_prog_sed_max_cmd,
+[echo >conftest.s "\
+s/0/1/;s/1/2/;s/2/3/;s/3/4/;s/4/5/;s/5/6/;s/6/7/;s/7/8/;s/8/9/;s/9/0/;s/9/O/;"
+dnl 2^4 = 16 lines of 10 commands.
+for ac_cnt in 0 1 2 3
+do
+  cat conftest.s conftest.s >conftest.s1
+  mv conftest.s1 conftest.s
+done
+if test "`echo 0 | sed -f conftest.s`" != 0; then
+dnl HP-UX sed dies with scripts longer than 100 commands.
+  ac_cv_prog_sed_max_cmd=100
+else
+  ac_cv_prog_sed_max_cmd=infinite
+fi
+])dnl
+])
+
+dnl AC_PROG_BINSH
+dnl -------------
+dnl Check the maximum length of an here document.
+dnl FIXME: Is this test really reliable?
+AC_DEFUN([AC_PROG_BINSH],
+[AC_CACHE_CHECK([for max here document length], ac_cv_prog_binsh_max_heredoc,
+[echo >conftest.s1 "\
+ac_test='This is a sample string to test here documents.'"
+dnl 2^8 = 256 lines
+for ac_cnt in 0 1 2 3 4 5 6 7
+do
+  cat conftest.s1 conftest.s1 >conftest.sh
+  mv conftest.sh conftest.s1
+done
+echo 'cat >conftest.s1 <<CEOF' >conftest.sh
+cat conftest.s1 >>conftest.sh
+echo 'echo "Success"' >>conftest.sh
+echo 'CEOF' >>conftest.sh
+$SHELL ./conftest.sh
+if test "`$SHELL ./conftest.s1`" != Success; then
+dnl Some people say to limit oneself to 12, which seems incredibly small.
+  ac_cv_prog_binsh_max_heredoc=12
+else
+  ac_cv_prog_binsh_max_heredoc=infinite
+fi
+])dnl
+])dnl AC_PROG_BINSH
+
 AC_DEFUN(AC_PROG_YACC,
 [AC_CHECK_PROGS(YACC, 'bison -y' byacc, yacc)])
 
+dnl AC_PROG_CPP
+dnl -----------
 AC_DEFUN(AC_PROG_CPP,
 [AC_MSG_CHECKING(how to run the C preprocessor)
 # On Suns, sometimes $CPP names a directory.
@@ -1978,11 +2034,11 @@ AC_DEFUN(AC_C_LONG_DOUBLE,
 [if test "$GCC" = yes; then
   ac_cv_c_long_double=yes
 else
-AC_TRY_COMPILE(,
-[/* The Stardent Vistra knows sizeof(long double), but does not support it.  */
+AC_TRY_RUN([int main() {
+/* The Stardent Vistra knows sizeof(long double), but does not support it.  */
 long double foo = 0.0;
 /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
-switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;],
+exit(sizeof(long double) < sizeof(double)); }],
 ac_cv_c_long_double=yes, ac_cv_c_long_double=no)
 fi])
 if test $ac_cv_c_long_double = yes; then