autoconf-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Autoconf source repository branch, master, updated. v2.69-112-


From: Zack Weinberg
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.69-112-gf181785
Date: Mon, 23 Sep 2013 14:12:37 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=f181785d0e754b4265d592e7288169b976cfc441

The branch, master has been updated
       via  f181785d0e754b4265d592e7288169b976cfc441 (commit)
       via  5509c49845d13d81585ab1939a5eae418eef9a96 (commit)
       via  bb7b27a9c7ef873453da277522bf0cd24cb9b96b (commit)
       via  86c213d0e355296f026a36e3203c0813041aae89 (commit)
       via  11f520c61d8b21f1522968d6e6afb899070f0a6f (commit)
       via  a1b936ff6c8462a8ffe9f2c7707f6b580549253d (commit)
      from  0041de6b381c9009e8dba5ddb1c501ddc7afa9f6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f181785d0e754b4265d592e7288169b976cfc441
Author: Zack Weinberg <address@hidden>
Date:   Sun Sep 15 17:16:18 2013 -0400

    Expose the checks done by AC_INCLUDES_DEFAULT as a public macro.
    
     * lib/autoconf/headers.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS):
       Rename to AC_CHECK_INCLUDES_DEFAULT.  All callers changed.
       (AC_HEADER_STDC, AC_UNISTD_H): Use AC_CHECK_INCLUDES_DEFAULT instead
       of previous kludge.
    
     * doc/autoconf.texi, NEWS: Document AC_CHECK_INCLUDES_DEFAULT.

commit 5509c49845d13d81585ab1939a5eae418eef9a96
Author: Zack Weinberg <address@hidden>
Date:   Sun Sep 15 12:24:45 2013 -0400

    Use AC_CHECK_{DECLS,FUNCS,HEADERS}_ONCE more in specific-check macros.
    
     * lib/autoconf/functions.m4 (AC_FUNC_CHOWN): No need to check for unistd.h.
       (_AC_LIBOBJ_FNMATCH): Use AC_CHECK_DECLS_ONCE and AC_CHECK_FUNCS_ONCE.
       (_AC_LIBOBJ_GETLOADAVG): Use AC_CHECK_FUNCS_ONCE for setlocale.
       (AC_FUNC_MMAP): Use AC_CHECK_FUNCS_ONCE for getpagesize.
       (AC_FUNC_SELECT_ARGTYPES): Use AC_CHECK_HEADERS_ONCE for sys/select.h and
       sys/socket.h.
       (AC_FUNC_STRERROR_R): Use AC_CHECK_DECLS_ONCE + AC_CHECK_FUNCS_ONCE for
       strerror_r.
       (AC_FUNC_UTIME_NULL): Use AC_CHECK_HEADERS_ONCE for utime.h.
       (AC_FUNC_FORK): Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE.
       (AC_FUNC_VPRINTF): Use AC_CHECK_FUNCS_ONCE for vprintf (but not _doprnt).
    
     * lib/autoconf/headers.m4 (AC_HEADER_TIME, AC_MEMORY_H): Use
       AC_CHECK_HEADERS_ONCE.

commit bb7b27a9c7ef873453da277522bf0cd24cb9b96b
Author: Zack Weinberg <address@hidden>
Date:   Sat Sep 14 12:42:15 2013 -0400

    Use AC_CHECK_HEADERS_ONCE for the tests done by AC_INCLUDES_DEFAULT.
    
     * lib/autoconf/headers.m4 (AC_CHECK_HEADERS_ONCE): Divide into a public
       macro that AC_REQUIREs _AC_INCLUDES_DEFAULT_REQUIREMENTS, and ...
       (_AC_CHECK_HEADERS_ONCE): ... a private macro, that doesn't.
       (_AC_HEADERS_EXPANSION): Use $ac_includes_default, not
       AC_INCLUDES_DEFAULT.
       (_AC_INCLUDES_DEFAULT_REQUIREMENTS): Use AC_CHECK_HEADERS_ONCE.

commit 86c213d0e355296f026a36e3203c0813041aae89
Author: Zack Weinberg <address@hidden>
Date:   Sat Sep 14 12:22:49 2013 -0400

    Modernize AC_INCLUDES_DEFAULT and friends.
    
     * lib/autoconf/headers.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS):
       Include stddef.h, stdlib.h, and string.h unconditionally.
       Don't include memory.h at all.
       Don't use AC_HEADER_STDC.
       Don't check for stddef.h, stdlib.h, string.h, or memory.h.
       For compatibility, unconditionally define STDC_HEADERS,
       HAVE_STDLIB_H, and HAVE_STRING_H.
       (AN_HEADER list): Remove C89 headers, and memory.h from list.
       (AC_HEADER_STDC, AC_UNISTD_H): AU_DEFUN to trigger
       _AC_INCLUDES_DEFAULT_REQUIREMENTS if it hasn't already happened,
       and do nothing else.
       (AC_HEADER_TIME): AU_DEFUN, and define TIME_WITH_SYS_TIME unconditionally
       as long as sys/time.h is present.
       (AC_USG, AC_MEMORY_H): Assume existence of string.h.
     * lib/autoconf/functions.m4 (_AC_FUNC_MALLOC_IF, _AC_FUNC_REALLOC_IF):
       Don't use AC_HEADER_STDC. Assume stdlib.h exists.
       (AC_FUNC_MKTIME): Don't use AC_HEADER_TIME.  Assume time.h exists.
       (AC_FUNC_ALLOCA): Assume stdlib.h exists.
       (_AC_LIBOBJ_FNMATCH): Assume wchar.h and wctype.h exist.
       (_AC_LIBOBJ_GETLOADAVG): Assume locale.h exists.
       (AC_FUNC_MMAP): Assume stdlib.h exists.
     * tests/tools.at: Use AC_WORDS_BIGENDIAN instead of AC_STDC_HEADERS in
       autoupdate test.
    
     * NEWS, doc/autoconf.texi: Document changes. Remove obsolete advice.

commit 11f520c61d8b21f1522968d6e6afb899070f0a6f
Author: Zack Weinberg <address@hidden>
Date:   Fri Sep 13 20:42:04 2013 -0400

    AC_CHECK_HEADER/AC_CHECK_HEADERS: complete transition to compile tests.
    
    * lib/autoconf/headers.m4 (AC_CHECK_HEADER): Use _AC_CHECK_HEADER_COMPILE
      by default.  Continue to use _AC_CHECK_HEADER_PREPROC if fourth arg is 
'-'.
      (_AC_CHECK_HEADER_PREPROC): Issue a deprecation warning.
      (_AC_CHECK_HEADER_MONGREL, _AC_CHECK_HEADER_MONGREL_BODY): Remove.
    
    * tests/c.at, tests/semantics.at: Update uses of AC_CHECK_HEADER(S).
    * doc/autoconf.texi, NEWS: Document change.

commit a1b936ff6c8462a8ffe9f2c7707f6b580549253d
Author: Zack Weinberg <address@hidden>
Date:   Fri Sep 13 11:26:08 2013 -0400

    * tests/local.at (AT_CHECK_M4): Support 'stderr' as fourth argument.

-----------------------------------------------------------------------

Summary of changes:
 NEWS                      |   41 ++++
 doc/autoconf.texi         |  498 ++++++++++++++++++++-------------------------
 lib/autoconf/functions.m4 |   79 +++-----
 lib/autoconf/headers.m4   |  337 ++++++++++--------------------
 tests/c.at                |   28 ++-
 tests/local.at            |    5 +-
 tests/semantics.at        |   19 +-
 tests/tools.at            |    6 +-
 8 files changed, 435 insertions(+), 578 deletions(-)

diff --git a/NEWS b/NEWS
index 7003c44..36d20cc 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,16 @@ GNU Autoconf NEWS - User visible changes.
    echo.  Macros AS_ECHO and AS_ECHO_N now expand unconditionally to
    'printf "%s\n"' and 'printf %s'.
 
+** AC_CHECK_HEADER and AC_CHECK_HEADERS now default to doing only a
+   compilation test.  This completes the transition from preprocessor-
+   based header tests begun in Autoconf 2.56.
+
+   The double test that was the default since Autoconf 2.64 is no
+   longer available.  You can still request a preprocessor-only test
+   by specifying '-' as the fourth argument to either macro, but this
+   is now deprecated.  If you really need that behavior use
+   AC_PREPROC_IFELSE.
+
 ** Macros
 
 - New macro AC_C__GENERIC.
@@ -60,6 +70,37 @@ GNU Autoconf NEWS - User visible changes.
 - AT_TESTED arguments can use variable or command substitutions, including
   in particular $EXEEXT
 
+- AC_INCLUDES_DEFAULT has been streamlined.  It now assumes that the
+  ISO C90 headers 'stdlib.h' and 'string.h' are unconditionally
+  available, and does not include the pre-standard header 'memory.h'
+  at all.  If the POSIX header 'strings.h' exists, it will be
+  included; it is assumed to be safe to include both 'string.h' and
+  'strings.h' in the same source file.  We are not aware of any
+  current system that violates any of the above assumptions.
+
+  For compatibility's sake, the C preprocessor macros STDC_HEADERS,
+  HAVE_STDLIB_H, and HAVE_STRING_H are defined unconditionally.
+  These preprocessor macros should be considered obsolescent.
+
+  Future releases of Autoconf may reduce the set of headers checked
+  for by AC_INCLUDES_DEFAULT.
+
+- AC_HEADER_STDC and AC_HEADER_TIME are now stubs which will be
+  removed from 'configure.ac' by 'autoupdate'.  For compatibility's
+  sake, the stubs (and their 'autoupdate' replacements) continue to
+  define the C preprocessor macros STDC_HEADERS and TIME_WITH_SYS_TIME,
+  respectively, but without actually checking for the ancient systems
+  where formerly those macros would not be defined.
+
+  These macros were already labeled obsolescent in the manual.
+
+- New macro, AC_CHECK_INCLUDES_DEFAULT.  It causes the checks normally
+  performed as a side-effect by AC_INCLUDES_DEFAULT to happen at that
+  point in 'configure', if they haven't already been done.  Autoupdate
+  will replace certain obsolete constructs, whose only remaining
+  useful effect is to trigger those checks, with this macro.  It is
+  unlikely to be useful otherwise.
+
 * Noteworthy changes in release 2.69 (2012-04-24) [stable]
 
 ** Autoconf now requires perl 5.6 or better (but generated configure
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 4932067..a2368e7 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -3885,57 +3885,78 @@ succeeds.
 @subsection Default Includes
 @cindex Default includes
 @cindex Includes, default
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden
 
-Several tests depend upon a set of header files.  Since these headers
-are not universally available, tests actually have to provide a set of
-protected includes, such as:
+Test programs frequently need to include headers that may or may not be
+available on the system whose features are being tested.  Each test can
+use all the preprocessor macros that have been @code{AC_DEFINE}d by
+previous tests, so for example one may write
 
 @example
 @group
-#ifdef TIME_WITH_SYS_TIME
+#include <time.h>
+#ifdef HAVE_SYS_TIME_H
 # include <sys/time.h>
-# include <time.h>
-#else
-# ifdef HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
 #endif
 @end group
 @end example
 
 @noindent
-Unless you know exactly what you are doing, you should avoid using
-unconditional includes, and check the existence of the headers you
-include beforehand (@pxref{Header Files}).
+if @file{sys/time.h} has already been tested for.
+
+All hosted environments that are still of interest for portable code
+provide all of the headers specified in ISO C90 (as amended in 1995):
address@hidden, @file{ctype.h}, @file{errno.h}, @file{float.h},
address@hidden, @file{limits.h}, @file{locale.h}, @file{math.h},
address@hidden, @file{signal.h}, @file{stdarg.h}, @file{stddef.h},
address@hidden, @file{stdlib.h}, @file{string.h}, @file{time.h},
address@hidden, and @file{wctype.h}.  Most programs can safely include
+these headers unconditionally.  All other headers, including all headers
+from later revisions of the C standard, need to be tested for
+(@pxref{Header Files}).
 
-Most generic macros use the following macro to provide the default set
+If your program needs to be portable to a @emph{freestanding}
+environment, such as an embedded OS that doesn't provide all of the
+facilities of the C90 standard library, you may need to test for some of
+the above headers as well.  Note that many Autoconf macros internally
+assume that the complete set of C90 headers are available.
+
+Most generic macros use the following macro to provide a default set
 of includes:
 
 @defmac AC_INCLUDES_DEFAULT (@ovar{include-directives})
 @acindex{INCLUDES_DEFAULT}
-Expand to @var{include-directives} if defined, otherwise to:
+Expand to @var{include-directives} if present and nonempty, otherwise to:
 
 @example
 @group
+#include <stddef.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #ifdef HAVE_SYS_TYPES_H
 # include <sys/types.h>
 #endif
 #ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif
-#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-#include <stddef.h>
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-#  include <memory.h>
-# endif
-# include <string.h>
-#endif
 #ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif
@@ -3951,14 +3972,26 @@ Expand to @var{include-directives} if defined, 
otherwise to:
 @end group
 @end example
 
-If the default includes are used, then check for the presence of these
-headers and their compatibility, i.e., you don't need to run
address@hidden, nor check for @file{stdlib.h} etc.
+Using this macro without @var{include-directives} has the side effect of
+checking for @file{sys/types.h}, @file{sys/stat.h}, @file{strings.h},
address@hidden, @file{stdint.h}, and @file{unistd.h}, as if by
address@hidden  For backward compatibility's sake, it also
+unconditionally defines @code{HAVE_STRING_H}, @code{HAVE_STDLIB_H}, and
address@hidden  New code should not make use of these preprocessor
+macros.
address@hidden defmac
+
address@hidden AC_CHECK_INCLUDES_DEFAULT
address@hidden
+Check for all the headers that @code{AC_INCLUDES_DEFAULT} would check
+for as a side-effect, if this has not already happened.
 
-These headers are checked for in the same order as they are included.
-For instance, on some systems @file{string.h} and @file{strings.h} both
-exist, but conflict.  Then @code{HAVE_STRING_H} is defined, not
address@hidden
+This macro mainly exists so that @code{autoupdate} can replace certain
+obsolete constructs with it. You should not need to use it yourself; in
+fact, it is likely to be safe to delete it from any script in which it
+appears.  (@code{autoupdate} does not know whether preprocessor macros
+such as @code{HAVE_STDINT_H} are used in the program, nor whether they
+would get defined as a side-effect of other checks.)
 @end defmac
 
 @node Alternative Programs
@@ -4887,9 +4920,7 @@ like the following, to declare it properly.
 
 @example
 @group
-#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
 #include <stddef.h>
 #ifdef HAVE_ALLOCA_H
 # include <alloca.h>
@@ -5744,6 +5775,34 @@ Posix Headers, gnulib, GNU gnulib} and @ref{Glibc Header 
File
 Substitutes, , Glibc Headers, gnulib, GNU gnulib}.  Please help us keep
 the gnulib list as complete as possible.
 
+When we say that a header ``may require'' some set of other headers, we
+mean that it may be necessary for you to manually include those other
+headers first, or the contents of the header under test will fail to
+compile.  When checking for these headers, you must provide the
+potentially-required headers in the @var{includes} argument to
address@hidden or @code{AC_CHECK_HEADERS}, or the check will
+fail spuriously.  @code{AC_INCLUDES_DEFAULT} (@pxref{Default Includes})
+arranges to include a number of common requirements and should normally
+come first in your @var{includes}.  For example, @file{net/if.h} may
+require @file{sys/types.h}, @file{sys/socket.h}, or both, and
address@hidden handles @file{sys/types.h} but not
address@hidden/socket.h}, so you should check for it like this:
+
address@hidden
+AC_CHECK_HEADERS([sys/socket.h])
+AC_CHECK_HEADERS([net/if.h], [], [],
+[AC_INCLUDES_DEFAULT[
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+]])
address@hidden example
+
+Note that the example mixes single quoting (address@hidden,
+so that it gets expanded) and double quoting (to ensure that each
+preprocessor @code{#} gets treated as a literal string rather than a
+comment).
+
 @table @asis
 
 @item @file{limits.h}
@@ -5752,96 +5811,67 @@ In C99 and later, @file{limits.h} defines 
@code{LLONG_MIN},
 environments (e.g., default GCC 4.0.2 + glibc 2.4) do not
 define them.
 
address@hidden @file{memory.h}
address@hidden
+This header file is obsolete; use @file{string.h} instead.
+
address@hidden @file{strings.h}
address@hidden
+On some systems, this is the only header that declares
address@hidden, @code{strncasecmp}, and @code{ffs}.
+
+This header may or may not include @file{string.h} for you.  However, on
+all recent systems it is safe to include both @file{string.h} and
address@hidden, in either order, in the same source file.
+
 @item @file{inttypes.h} vs.@: @file{stdint.h}
 @hdrindex{inttypes.h}
 @hdrindex{stdint.h}
-In C99 and later, @file{inttypes.h} includes
address@hidden, so there's no need to include @file{stdint.h}
-separately in a standard environment.  Some implementations have
address@hidden but not @file{stdint.h} (e.g., Solaris 7), but we don't
-know of any implementation that has @file{stdint.h} but not
address@hidden
+C99 specifies that @file{inttypes.h} includes @file{stdint.h}, so there's
+no need to include @file{stdint.h} separately in a standard environment.
+However, some implementations have @file{inttypes.h} but not @file{stdint.h}
+(e.g., Solaris 7), and some have @file{stdint.h} but not @file{inttypes.h}
+(e.g. MSVC 2012).  Therefore, it is necessary to check for each and include
+each only if available.
 
 @item @file{linux/irda.h}
 @hdrindex{linux/irda.h}
-It requires @file{linux/types.h} and @file{sys/socket.h}.
+This header may require @file{linux/types.h} and/or @file{sys/socket.h}.
 
 @item @file{linux/random.h}
 @hdrindex{linux/random.h}
-It requires @file{linux/types.h}.
+This header may require @file{linux/types.h}.
 
 @item @file{net/if.h}
 @hdrindex{net/if.h}
-On Darwin, this file requires that @file{sys/socket.h} be included
-beforehand.  One should run:
-
address@hidden
-AC_CHECK_HEADERS([sys/socket.h])
-AC_CHECK_HEADERS([net/if.h], [], [],
-[#include <stdio.h>
-#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-#include <stddef.h>
-#ifdef HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
-])
address@hidden example
+This header may require @file{sys/types.h} and/or @file{sys/socket.h}.
 
 @item @file{netinet/if_ether.h}
 @hdrindex{netinet/if_ether.h}
-On Darwin, this file requires that @file{stdio.h} and
address@hidden/socket.h} be included beforehand.  One should run:
-
address@hidden
-AC_CHECK_HEADERS([sys/socket.h])
-AC_CHECK_HEADERS([netinet/if_ether.h], [], [],
-[#include <stdio.h>
-#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-#include <stddef.h>
-#ifdef HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
-])
address@hidden example
-
address@hidden @file{stdint.h}
-See above, item @file{inttypes.h} vs.@: @file{stdint.h}.
-
address@hidden @file{stdlib.h}
address@hidden
-On many systems (e.g., Darwin), @file{stdio.h} is a prerequisite.
+This header may require some combination of @file{sys/types.h},
address@hidden/socket.h}, @file{netinet/in.h}, and @file{net/if.h}.
 
 @item @file{sys/mount.h}
 @hdrindex{sys/mount.h}
-On FreeBSD 4.8 on ia32 and using gcc version 2.95.4,
address@hidden/params.h} is a prerequisite.
+This header may require @file{sys/params.h}.
 
 @item @file{sys/ptem.h}
 @hdrindex{sys/ptem.h}
-On Solaris 8, @file{sys/stream.h} is a prerequisite.
+This header may require @file{sys/stream.h}.
 
 @item @file{sys/socket.h}
 @hdrindex{sys/socket.h}
-On Darwin, @file{stdlib.h} is a prerequisite.
+This header may require @file{sys/types.h}.
 
 @item @file{sys/ucred.h}
 @hdrindex{sys/ucred.h}
-On Tru64 5.1, @file{sys/types.h} is a prerequisite.
+This header may require @file{sys/types.h}.
 
 @item @file{X11/extensions/scrnsaver.h}
 @hdrindex{X11/extensions/scrnsaver.h}
 Using XFree86, this header requires @file{X11/Xlib.h}, which is probably
 so required that you might not even consider looking for it.
 
address@hidden
-AC_CHECK_HEADERS([X11/extensions/scrnsaver.h], [], [],
-[[#include <X11/Xlib.h>
-]])
address@hidden example
 @end table
 
 
@@ -6035,91 +6065,14 @@ does not.
 @defmac AC_HEADER_STDC
 @acindex{HEADER_STDC}
 @cvindex STDC_HEADERS
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden
 @caindex header_stdc
-Define @code{STDC_HEADERS} if the system has C header files
-conforming to ANSI C89 (ISO C90).
-Specifically, this macro checks for @file{stdlib.h}, @file{stdarg.h},
address@hidden, and @file{float.h}; if the system has those, it
-probably has the rest of the C89 header files.  This macro also
-checks whether @file{string.h} declares @code{memchr} (and thus
-presumably the other @code{mem} functions), whether @file{stdlib.h}
-declare @code{free} (and thus presumably @code{malloc} and other related
-functions), and whether the @file{ctype.h} macros work on characters
-with the high bit set, as the C standard requires.
-
-If you use this macro, your code can refer to @code{STDC_HEADERS} to
-determine whether the system has conforming header files (and probably C
-library functions).
-
-This macro caches its result in the @code{ac_cv_header_stdc} variable.
-
-This macro is obsolescent, as current systems have conforming header
-files.  New programs need not use this macro.
 
address@hidden
address@hidden
-Nowadays @file{string.h} is part of the C standard and declares functions like
address@hidden, and @file{strings.h} is standardized by Posix and declares
-BSD functions like @code{bcopy}; but
-historically, string functions were a major sticking point in this area.
-If you still want to worry about portability to ancient systems without
-standard headers, there is so much variation
-that it is probably easier to declare the functions you use than to
-figure out exactly what the system header files declare.  Some ancient systems
-contained a mix of functions from the C standard and from BSD;
-some were mostly standard but lacked @samp{memmove}; some defined the
-BSD functions as macros in @file{string.h} or
address@hidden; some had only the BSD functions but
address@hidden; some declared the memory functions in @file{memory.h},
-some in @file{string.h}; etc.  It is probably sufficient to check for
-one string function and one memory function; if the library had the
-standard versions of those then it probably had most of the others.
-If you put the following in @file{configure.ac}:
+This macro is obsolescent.  Its sole effect is to make sure that all the
+headers that are included by @code{AC_INCLUDES_DEFAULT} (@pxref{Default
+Includes}), but not part of ISO C90, have been checked for.
 
address@hidden
-# This example is obsolescent.
-# Nowadays you can omit these macro calls.
-AC_HEADER_STDC
-AC_CHECK_FUNCS([strchr memcpy])
address@hidden example
-
address@hidden
-then, in your code, you can use declarations like this:
-
address@hidden
address@hidden
-/* This example is obsolescent.
-   Nowadays you can just #include <string.h>.  */
-#ifdef STDC_HEADERS
-# include <string.h>
-#else
-# ifndef HAVE_STRCHR
-#  define strchr index
-#  define strrchr rindex
-# endif
-char *strchr (), *strrchr ();
-# ifndef HAVE_MEMCPY
-#  define memcpy(d, s, n) bcopy ((s), (d), (n))
-#  define memmove(d, s, n) bcopy ((s), (d), (n))
-# endif
-#endif
address@hidden group
address@hidden example
-
address@hidden
-If you use a function like @code{memchr}, @code{memset}, @code{strtok},
-or @code{strspn}, which have no BSD equivalent, then macros don't
-suffice to port to ancient hosts; you must provide an implementation of
-each function.  An easy
-way to incorporate your implementations only when needed (since the ones
-in system C libraries may be hand optimized) is to, taking @code{memchr}
-for example, put it in @file{memchr.c} and use
address@hidden([memchr])}.
+All hosted environments that are still of interest for portable code
+provide all of the headers specified in ISO C90 (as amended in 1995).
 @end defmac
 
 @defmac AC_HEADER_SYS_WAIT
@@ -6180,46 +6133,6 @@ The way to check whether the system supports Posix is:
 @end group
 @end example
 
address@hidden
address@hidden AC_HEADER_TIME
address@hidden
address@hidden TIME_WITH_SYS_TIME
address@hidden
address@hidden/time.h}
address@hidden header_time
-If a program may include both @file{time.h} and @file{sys/time.h},
-define @code{TIME_WITH_SYS_TIME}.  On some ancient systems,
address@hidden/time.h} included @file{time.h}, but @file{time.h} was not
-protected against multiple inclusion, so programs could not explicitly
-include both files.  This macro is useful in programs that use, for
-example, @code{struct timeval} as well as
address@hidden tm}.  It is best used in conjunction with
address@hidden, which can be checked for using
address@hidden([sys/time.h])}.
-
address@hidden
address@hidden
-#ifdef TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# ifdef HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
address@hidden group
address@hidden example
-
address@hidden
-This macro caches its result in the @code{ac_cv_header_time} variable.
-
-This macro is obsolescent, as current systems can include both files
-when they exist.  New programs need not use this macro.
address@hidden defmac
-
-
 @defmac AC_HEADER_TIOCGWINSZ
 @acindex{HEADER_TIOCGWINSZ}
 @cvindex GWINSZ_IN_SYS_IOCTL
@@ -6264,26 +6177,21 @@ commands @var{action-if-found}, otherwise execute
 header file is available, consider using @code{AC_CHECK_HEADERS}
 instead.
 
address@hidden is decoded to determine the appropriate include
-directives.  If omitted or empty, @file{configure} will check for both header
-existence (with the preprocessor) and usability (with the compiler),
-using @code{AC_INCLUDES_DEFAULT} for the compile test.  If
-there is a discrepancy between the results, a warning is issued to the
-user, and the compiler results are favored (@pxref{Present But
-Cannot Be Compiled}).  In general, favoring the compiler results means
-that a header will be treated as not found even though the file exists,
-because you did not provide enough prerequisites.
-
-Providing a non-empty @var{includes} argument allows the code to provide
-any prerequisites prior to including the header under test; it is common
-to use the argument @code{AC_INCLUDES_DEFAULT} (@pxref{Default
-Includes}).  With an explicit fourth argument, no preprocessor test is
-needed.  As a special case, an @var{includes} of exactly @samp{-}
-triggers the older preprocessor check, which merely determines existence
-of the file in the preprocessor search path; this should only be used as
-a last resort (it is safer to determine the actual prerequisites and
-perform a compiler check, or else use @code{AC_PREPROC_IFELSE} to make
-it obvious that only a preprocessor check is desired).
address@hidden should be the appropriate @dfn{prerequisite} code, i.e.@:
+whatever might be required to appear above
address@hidden <@var{header-file}>} for it to compile without error.
+This can be anything, but will normally be additional @samp{#include}
+directives. If @var{includes} is omitted or empty, @file{configure} will
+use the contents of the macro @code{AC_INCLUDES_DEFAULT}.
address@hidden Includes}.
+
+This macro used to check only for the @emph{presence} of a header, not
+whether its contents were acceptable to the compiler.  Some older
address@hidden scripts rely on this behavior, so it is still
+available by specifying @samp{-} as @var{includes}.  This mechanism is
+deprecated as of Autoconf 2.70; situations where a preprocessor-only
+check is required should use @code{AC_PREPROC_IFELSE}.
address@hidden the Preprocessor}.
 
 This macro caches its result in the @address@hidden
 variable, with characters not suitable for a variable name mapped to
@@ -6314,47 +6222,49 @@ variable, with characters not suitable for a variable 
name mapped to
 underscores.
 @end defmac
 
-Previous versions of Autoconf merely checked whether the header was
-accepted by the preprocessor.  This was changed because the old test was
-inappropriate for typical uses.  Headers are typically used to compile,
-not merely to preprocess, and the old behavior sometimes accepted
-headers that clashed at compile-time (@pxref{Present But Cannot Be
-Compiled}).  If you need to check whether a header is preprocessable,
-you can use @code{AC_PREPROC_IFELSE} (@pxref{Running the Preprocessor}).
address@hidden AC_CHECK_HEADERS_ONCE (@address@hidden)
address@hidden
address@hidden address@hidden
+For each given system header file @var{header-file} in the
+blank-separated argument list that exists, define
address@hidden@var{header-file}} (in all capitals).
 
-Actually requiring a header to compile improves the robustness of the
-test, but it also requires
-that you make sure that headers that must be included before the
address@hidden be part of the @var{includes}, (@pxref{Default
-Includes}).  If looking for @file{bar.h}, which requires that
address@hidden be included before if it exists, we suggest the following
-scheme:
+If you do not need the full power of @code{AC_CHECK_HEADERS}, this
+variant generates smaller, faster @command{configure} files.  All
+headers passed to @code{AC_CHECK_HEADERS_ONCE} are checked for in one
+pass, early during the @command{configure} run.  The checks cannot be
+conditionalized, you cannot specify an @var{action-if-found} or
address@hidden, and @code{AC_INCLUDES_DEFAULT} is always used
+for the prerequisites.
address@hidden defmac
+
+In previous versions of Autoconf, these macros merely checked whether
+the header was accepted by the preprocessor.  This was changed because
+the old test was inappropriate for typical uses.  Headers are typically
+used to compile, not merely to preprocess, and the old behavior
+sometimes accepted headers that clashed at compile-time
+(@pxref{Present But Cannot Be Compiled}).  If for some reason it is
+inappropriate to check whether a header is compilable, you should use
address@hidden (@pxref{Running the Preprocessor}) instead of
+these macros.
+
+Requiring each header to compile improves the robustness of the test,
+but it also requires you to make sure that the @var{includes} are
+correct.  Most system headers nowadays make sure to @code{#include}
+whatever they require, or else have their dependencies satisfied by
address@hidden (@pxref{Default Includes}), but
address@hidden Portability}, for known exceptions.  In general, if you
+are looking for @file{bar.h}, which requires that @file{foo.h} be
+included first if it exists, you should do something like this:
 
address@hidden
address@hidden
 AC_CHECK_HEADERS([foo.h])
 AC_CHECK_HEADERS([bar.h], [], [],
 [#ifdef HAVE_FOO_H
 # include <foo.h>
 #endif
 ])
address@hidden verbatim
-
-The following variant generates smaller, faster @command{configure}
-files if you do not need the full power of @code{AC_CHECK_HEADERS}.
-
address@hidden AC_CHECK_HEADERS_ONCE (@address@hidden)
address@hidden
address@hidden address@hidden
-For each given system header file @var{header-file} in the
-blank-separated argument list that exists, define
address@hidden@var{header-file}} (in all capitals).
-This is a once-only variant of @code{AC_CHECK_HEADERS}.  It generates the
-checking code at most once, so that @command{configure} is smaller and
-faster; but the checks cannot be conditionalized and are always done once,
-early during the @command{configure} run.  Thus, this macro is only safe
-for checking headers that do not have prerequisites beyond what
address@hidden provides.
address@hidden defmac
address@hidden example
 
 @node Declarations
 @section Declarations
@@ -23406,6 +23316,24 @@ Replaced by @code{AC_CHECK_HEADER} 
(@pxref{AC_CHECK_HEADER}).
 Replaced by @code{AC_EGREP_HEADER} (@pxref{AC_EGREP_HEADER}).
 @end defmac
 
address@hidden
address@hidden AC_HEADER_TIME
address@hidden
address@hidden TIME_WITH_SYS_TIME
address@hidden
address@hidden/time.h}
address@hidden header_time
+This macro used to check whether it was possible to include
address@hidden and @file{sys/time.h} in the same source file,
+defining @code{TIME_WITH_SYS_TIME} if so.
+
+Nowadays, it is equivalent to @samp{AC_CHECK_HEADERS([sys/time.h])},
+although it does still define @code{TIME_WITH_SYS_TIME} for
+compatibility's sake.  @file{time.h} is universally present, and the
+systems on which @file{sys/time.h} conflicted with @file{time.h} are
+obsolete.
address@hidden defmac
+
 @defmac AC_HELP_STRING
 @acindex{HELP_STRING}
 Replaced by @code{AS_HELP_STRING} (@pxref{AS_HELP_STRING}).
@@ -23562,9 +23490,7 @@ Replaced by @code{AC_HEADER_MAJOR} 
(@pxref{AC_HEADER_MAJOR}).
 Used to define @code{NEED_MEMORY_H} if the @code{mem} functions were
 defined in @file{memory.h}.  Today it is equivalent to
 @samp{AC_CHECK_HEADERS([memory.h])} (@pxref{AC_CHECK_HEADERS}).  Adjust
-your code to depend upon
address@hidden, not @code{NEED_MEMORY_H}; see @ref{Standard
-Symbols}.
+your code to get the @code{mem} functions from @file{string.h} instead.
 @end defmac
 
 @defmac AC_MINGW32
@@ -23814,7 +23740,9 @@ Replaced by @code{AC_HEADER_STAT} 
(@pxref{AC_HEADER_STAT}).
 
 @defmac AC_STDC_HEADERS
 @acindex{STDC_HEADERS}
-Replaced by @code{AC_HEADER_STDC} (@pxref{AC_HEADER_STDC}).
+Replaced by @code{AC_HEADER_STDC} (@pxref{AC_HEADER_STDC}), which
+is itself obsolete.  Nowadays it is safe to assume the facilities of C90
+exist.
 @end defmac
 
 @defmac AC_STRCOLL
@@ -23912,7 +23840,9 @@ Replaced by @code{AC_STRUCT_TIMEZONE} 
(@pxref{AC_STRUCT_TIMEZONE}).
 
 @defmac AC_TIME_WITH_SYS_TIME
 @acindex{TIME_WITH_SYS_TIME}
-Replaced by @code{AC_HEADER_TIME} (@pxref{AC_HEADER_TIME}).
+Replaced by @code{AC_HEADER_TIME} (@pxref{AC_HEADER_TIME}), which is
+itself obsolete; nowadays one need only do
address@hidden([sys/time.h])}.
 @end defmac
 
 @defmac AC_TRY_COMPILE (@var{includes}, @var{function-body}, @
@@ -24052,15 +23982,24 @@ Replaced by @code{AC_TYPE_UID_T} 
(@pxref{AC_TYPE_UID_T}).
 
 @defmac AC_UNISTD_H
 @acindex{UNISTD_H}
-Same as @samp{AC_CHECK_HEADERS([unistd.h])} (@pxref{AC_CHECK_HEADERS}).
+Same as @samp{AC_CHECK_HEADERS([unistd.h])} (@pxref{AC_CHECK_HEADERS}),
+which is one of the tests done as a side effect by
address@hidden (@pxref{Default Includes}), so usually
+unnecessary to write explicitly.
 @end defmac
 
 @defmac AC_USG
 @acindex{USG}
 @cvindex USG
-Define @code{USG} if the BSD string functions are defined in
address@hidden  You should no longer depend upon @code{USG}, but on
address@hidden; see @ref{Standard Symbols}.
+Define @code{USG} if the BSD string functions (@code{bcopy},
address@hidden, @code{index}, @code{rindex}, etc) are @emph{not} defined
+in @file{strings.h}.  Modern code should assume @file{string.h} exists
+and should use the ISO C string functions (@code{memmove}, @code{memset},
address@hidden, @code{strrchr}, etc) unconditionally.
+
address@hidden may be the only header that declares @code{strcasecmp},
address@hidden, and @code{ffs}.  @code{AC_INCLUDES_DEFAULT} checks
+for it (@pxref{Default Includes}); test @code{HAVE_STRINGS_H}.
 @end defmac
 
 @defmac AC_UTIME_NULL
@@ -25994,7 +25933,8 @@ elsewhere.
 The transition began with Autoconf 2.56.  As of Autoconf 2.64 both
 checks are performed, and @command{configure} complains loudly if the
 compiler and the preprocessor do not agree.  However, only the compiler
-result is considered.
+result is considered.  As of Autoconf 2.70, only the compiler check is
+performed.
 
 Consider the following example:
 
@@ -26044,7 +25984,7 @@ checking for pi.h... no
 @end smallexample
 
 @noindent
-The proper way the handle this case is using the fourth argument
+The proper way to handle this case is using the fourth argument
 (@pxref{Generic Headers}):
 
 @example
diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4
index b544fcd..96da5de 100644
--- a/lib/autoconf/functions.m4
+++ b/lib/autoconf/functions.m4
@@ -380,9 +380,7 @@ AC_CACHE_CHECK([for alloca], ac_cv_func_alloca_works,
   ac_cv_func_alloca_works=yes
 else
   AC_LINK_IFELSE([AC_LANG_PROGRAM(
-[[#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
+[[#include <stdlib.h>
 #include <stddef.h>
 #ifndef alloca
 # ifdef __GNUC__
@@ -424,7 +422,6 @@ AN_FUNCTION([chown], [AC_FUNC_CHOWN])
 AC_DEFUN([AC_FUNC_CHOWN],
 [AC_REQUIRE([AC_TYPE_UID_T])dnl
 AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
-AC_CHECK_HEADERS(unistd.h)
 AC_CACHE_CHECK([for working chown], ac_cv_func_chown_works,
 [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
 #include <fcntl.h>
@@ -564,9 +561,8 @@ AC_DEFUN([_AC_LIBOBJ_FNMATCH],
 [AC_REQUIRE([AC_C_CONST])dnl
 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
 AC_REQUIRE([AC_TYPE_MBSTATE_T])dnl
-AC_CHECK_DECLS([getenv])
-AC_CHECK_FUNCS([btowc mbsrtowcs mempcpy wmempcpy])
-AC_CHECK_HEADERS([wchar.h wctype.h])
+AC_CHECK_DECLS_ONCE([getenv])
+AC_CHECK_FUNCS_ONCE([btowc mbsrtowcs mempcpy wmempcpy])
 AC_LIBOBJ([fnmatch])
 
AC_CONFIG_LINKS([$ac_config_libobj_dir/fnmatch.h:$ac_config_libobj_dir/fnmatch_.h])
 AC_DEFINE(fnmatch, rpl_fnmatch,
@@ -677,15 +673,13 @@ m4_define([_AC_LIBOBJ_GETLOADAVG],
 [AC_LIBOBJ(getloadavg)
 AC_DEFINE(C_GETLOADAVG, 1, [Define to 1 if using `getloadavg.c'.])
 # Figure out what our getloadavg.c needs.
+AC_CHECK_FUNCS_ONCE([setlocale])
 ac_have_func=no
 AC_CHECK_HEADER(sys/dg_sys_info.h,
 [ac_have_func=yes
  AC_DEFINE(DGUX, 1, [Define to 1 for DGUX with <sys/dg_sys_info.h>.])
  AC_CHECK_LIB(dgc, dg_sys_info)])
 
-AC_CHECK_HEADER(locale.h)
-AC_CHECK_FUNCS(setlocale)
-
 # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
 # uses stabs), but it is still SVR4.  We cannot check for <elf.h> because
 # Irix 4.0.5F has the header but not the library.
@@ -905,17 +899,11 @@ fi
 # ------------------------------------
 # If `malloc (0)' properly handled, run IF-WORKS, otherwise, IF-NOT.
 AC_DEFUN([_AC_FUNC_MALLOC_IF],
-[AC_REQUIRE([AC_HEADER_STDC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
-AC_CHECK_HEADERS(stdlib.h)
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
 AC_CACHE_CHECK([for GNU libc compatible malloc], ac_cv_func_malloc_0_nonnull,
 [AC_RUN_IFELSE(
 [AC_LANG_PROGRAM(
-[[#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-# include <stdlib.h>
-#else
-char *malloc ();
-#endif
+[[#include <stdlib.h>
 ]],
                 [return ! malloc (0);])],
               [ac_cv_func_malloc_0_nonnull=yes],
@@ -1013,21 +1001,14 @@ test $ac_cv_func_memcmp_working = no && 
AC_LIBOBJ([memcmp])
 # --------------
 AN_FUNCTION([mktime], [AC_FUNC_MKTIME])
 AC_DEFUN([AC_FUNC_MKTIME],
-[AC_REQUIRE([AC_HEADER_TIME])dnl
-AC_CHECK_HEADERS_ONCE(sys/time.h unistd.h)
-AC_CHECK_FUNCS_ONCE(alarm)
+[AC_CHECK_HEADERS_ONCE([sys/time.h unistd.h])
+AC_CHECK_FUNCS_ONCE([alarm])
 AC_CACHE_CHECK([for working mktime], ac_cv_func_working_mktime,
 [AC_RUN_IFELSE([AC_LANG_SOURCE(
 [[/* Test program from Paul Eggert and Tony Leneis.  */
-#ifdef TIME_WITH_SYS_TIME
+#include <time.h>
+#ifdef HAVE_SYS_TIME_H
 # include <sys/time.h>
-# include <time.h>
-#else
-# ifdef HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
 #endif
 
 #include <limits.h>
@@ -1228,8 +1209,8 @@ AU_ALIAS([AM_FUNC_MKTIME], [AC_FUNC_MKTIME])
 AN_FUNCTION([mmap], [AC_FUNC_MMAP])
 AC_DEFUN([AC_FUNC_MMAP],
 [AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
-AC_CHECK_HEADERS_ONCE([stdlib.h unistd.h sys/param.h])
-AC_CHECK_FUNCS([getpagesize])
+AC_CHECK_HEADERS_ONCE([unistd.h sys/param.h])
+AC_CHECK_FUNCS_ONCE([getpagesize])
 AC_CACHE_CHECK([for working mmap], [ac_cv_func_mmap_fixed_mapped],
 [AC_RUN_IFELSE([AC_LANG_SOURCE([AC_INCLUDES_DEFAULT]
 [[/* malloc might have been renamed as rpl_malloc. */
@@ -1260,10 +1241,6 @@ AC_CACHE_CHECK([for working mmap], 
[ac_cv_func_mmap_fixed_mapped],
 #include <fcntl.h>
 #include <sys/mman.h>
 
-#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
-char *malloc ();
-#endif
-
 /* This mess was copied from the GNU getpagesize.h.  */
 #ifndef HAVE_GETPAGESIZE
 # ifdef _SC_PAGESIZE
@@ -1424,17 +1401,11 @@ AU_ALIAS([AM_FUNC_OBSTACK], [AC_FUNC_OBSTACK])
 # -------------------------------------
 # If `realloc (0, 0)' is properly handled, run IF-WORKS, otherwise, IF-NOT.
 AC_DEFUN([_AC_FUNC_REALLOC_IF],
-[AC_REQUIRE([AC_HEADER_STDC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
-AC_CHECK_HEADERS(stdlib.h)
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
 AC_CACHE_CHECK([for GNU libc compatible realloc], ac_cv_func_realloc_0_nonnull,
 [AC_RUN_IFELSE(
 [AC_LANG_PROGRAM(
-[[#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-# include <stdlib.h>
-#else
-char *realloc ();
-#endif
+[[#include <stdlib.h>
 ]],
                 [return ! realloc (0, 0);])],
               [ac_cv_func_realloc_0_nonnull=yes],
@@ -1474,7 +1445,7 @@ AC_DEFUN([AC_FUNC_REALLOC],
 # function's arguments, and define those types in `SELECT_TYPE_ARG1',
 # `SELECT_TYPE_ARG234', and `SELECT_TYPE_ARG5'.
 AC_DEFUN([AC_FUNC_SELECT_ARGTYPES],
-[AC_CHECK_HEADERS(sys/select.h sys/socket.h)
+[AC_CHECK_HEADERS_ONCE([sys/select.h sys/socket.h])
 AC_CACHE_CHECK([types of arguments for select],
 [ac_cv_func_select_args],
 [for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
@@ -1663,8 +1634,8 @@ AU_ALIAS([AM_FUNC_STRTOD], [AC_FUNC_STRTOD])
 # ------------------
 AN_FUNCTION([strerror_r], [AC_FUNC_STRERROR_R])
 AC_DEFUN([AC_FUNC_STRERROR_R],
-[AC_CHECK_DECLS([strerror_r])
-AC_CHECK_FUNCS([strerror_r])
+[AC_CHECK_DECLS_ONCE([strerror_r])
+AC_CHECK_FUNCS_ONCE([strerror_r])
 AC_CACHE_CHECK([whether strerror_r returns char *],
               ac_cv_func_strerror_r_char_p,
    [
@@ -1793,7 +1764,7 @@ AU_ALIAS([AC_STRCOLL], [AC_FUNC_STRCOLL])
 # AC_FUNC_UTIME_NULL
 # ------------------
 AC_DEFUN([AC_FUNC_UTIME_NULL],
-[AC_CHECK_HEADERS_ONCE(utime.h)
+[AC_CHECK_HEADERS_ONCE([utime.h])
 AC_CACHE_CHECK(whether utime accepts a null argument, ac_cv_func_utime_null,
 [rm -f conftest.data; >conftest.data
 # Sequent interprets utime(file, 0) to mean use start of epoch.  Wrong.
@@ -1831,8 +1802,8 @@ AN_FUNCTION([fork],  [AC_FUNC_FORK])
 AN_FUNCTION([vfork], [AC_FUNC_FORK])
 AC_DEFUN([AC_FUNC_FORK],
 [AC_REQUIRE([AC_TYPE_PID_T])dnl
-AC_CHECK_HEADERS(vfork.h)
-AC_CHECK_FUNCS(fork vfork)
+AC_CHECK_HEADERS_ONCE([vfork.h])
+AC_CHECK_FUNCS_ONCE([fork vfork])
 if test "x$ac_cv_func_fork" = xyes; then
   _AC_FUNC_FORK
 else
@@ -2015,12 +1986,12 @@ AU_ALIAS([AC_VFORK], [AC_FUNC_FORK])
 # Why the heck is that _doprnt does not define HAVE__DOPRNT???
 # That the logical name!
 AC_DEFUN([AC_FUNC_VPRINTF],
-[AC_CHECK_FUNCS(vprintf, [],
-[AC_CHECK_FUNC(_doprnt,
-              [AC_DEFINE(HAVE_DOPRNT, 1,
+[AC_CHECK_FUNCS_ONCE([vprintf])
+AS_IF([test "x$ac_cv_func_vprintf" = xno],
+[AC_CHECK_FUNC([_doprnt],
+              [AC_DEFINE([HAVE_DOPRNT], [1],
                          [Define to 1 if you don't have `vprintf' but do have
-                         `_doprnt.'])])])
-])
+                         `_doprnt.'])])])])
 
 
 # AU::AC_VPRINTF
diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4
index 7f5dbce..34783f0 100644
--- a/lib/autoconf/headers.m4
+++ b/lib/autoconf/headers.m4
@@ -46,99 +46,17 @@
 #                [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
 #                [INCLUDES])
 # ---------------------------------------------------------
-# We are slowly moving to checking headers with the compiler instead
-# of the preproc, so that we actually learn about the usability of a
-# header instead of its mere presence.  But since users are used to
-# the old semantics, they check for headers in random order and
-# without providing prerequisite headers.  This macro implements the
-# transition phase, and should be cleaned up latter to use compilation
-# only.
-#
-# If INCLUDES is empty, then check both via the compiler and preproc.
-# If the results are different, issue a warning, but keep the preproc
-# result.
-#
-# If INCLUDES is `-', keep only the old semantics.
-#
-# If INCLUDES is specified and different from `-', then use the new
-# semantics only.
+# This used to check for headers using the preprocessor only, but we
+# have now switched to running a full compilation, so that we learn
+# about the usability of a header instead of its mere presence.
+# The old behavior is still available by specifying `-' as the
+# INCLUDES, but this triggers a deprecation warning.
 #
 # The m4_indir allows for fewer expansions of address@hidden
 AC_DEFUN([AC_CHECK_HEADER],
-[m4_indir(m4_case([$4],
-                 [],  [[_AC_CHECK_HEADER_MONGREL]],
-                 [-], [[_AC_CHECK_HEADER_PREPROC]],
-                      [[_AC_CHECK_HEADER_COMPILE]]), $@)
-])# AC_CHECK_HEADER
-
-
-# _AC_CHECK_HEADER_MONGREL_BODY
-# -----------------------------
-# Shell function body for _AC_CHECK_HEADER_MONGREL
-m4_define([_AC_CHECK_HEADER_MONGREL_BODY],
-[  AS_LINENO_PUSH([$[]1])
-  AS_VAR_SET_IF([$[]3],
-               [AC_CACHE_CHECK([for $[]2], [$[]3], [])],
-               [# Is the header compilable?
-AC_MSG_CHECKING([$[]2 usability])
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([$[]4
address@hidden:@include <$[]2>])],
-                 [ac_header_compiler=yes],
-                 [ac_header_compiler=no])
-AC_MSG_RESULT([$ac_header_compiler])
-
-# Is the header present?
-AC_MSG_CHECKING([$[]2 presence])
-AC_PREPROC_IFELSE([AC_LANG_SOURCE(address@hidden:@include <$[]2>])],
-                 [ac_header_preproc=yes],
-                 [ac_header_preproc=no])
-AC_MSG_RESULT([$ac_header_preproc])
-
-# So?  What about this header?
-case 
$ac_header_compiler:$ac_header_preproc:$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag
 in #((
-  yes:no: )
-    AC_MSG_WARN([$[]2: accepted by the compiler, rejected by the 
preprocessor!])
-    AC_MSG_WARN([$[]2: proceeding with the compiler's result])
-    ;;
-  no:yes:* )
-    AC_MSG_WARN([$[]2: present but cannot be compiled])
-    AC_MSG_WARN([$[]2:     check for missing prerequisite headers?])
-    AC_MSG_WARN([$[]2: see the Autoconf documentation])
-    AC_MSG_WARN([$[]2:     section "Present But Cannot Be Compiled"])
-    AC_MSG_WARN([$[]2: proceeding with the compiler's result])
-m4_ifset([AC_PACKAGE_BUGREPORT],
-[m4_n([( AS_BOX([Report this to ]AC_PACKAGE_BUGREPORT)
-     ) | sed "s/^/$as_me: WARNING:     /" >&2])])dnl
-    ;;
-esac
-  AC_CACHE_CHECK([for $[]2], [$[]3],
-                [AS_VAR_SET([$[]3], [$ac_header_compiler])])])
-  AS_LINENO_POP
-])#_AC_CHECK_HEADER_MONGREL_BODY
-
-# _AC_CHECK_HEADER_MONGREL(HEADER-FILE,
-#                         [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#                         [INCLUDES = DEFAULT-INCLUDES])
-# ------------------------------------------------------------------
-# Check using both the compiler and the preprocessor.  If they disagree,
-# warn, and the preproc wins.
-#
-# This is not based on _AC_CHECK_HEADER_COMPILE and _AC_CHECK_HEADER_PREPROC
-# because it obfuscate the code to try to factor everything, in particular
-# because of the cache variables, and the `checking ...' messages.
-AC_DEFUN([_AC_CHECK_HEADER_MONGREL],
-[AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_check_header_mongrel],
-  [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_check_header_mongrel],
-    [LINENO HEADER VAR INCLUDES],
-    [Tests whether HEADER exists, giving a warning if it cannot be compiled
-     using the include files in INCLUDES and setting the cache variable VAR
-     accordingly.])],
-  [$0_BODY])]dnl
-[AS_VAR_PUSHDEF([ac_Header], [ac_cv_header_$1])]dnl
-[ac_fn_[]_AC_LANG_ABBREV[]_check_header_mongrel ]dnl
-["$LINENO" "$1" "ac_Header" "AS_ESCAPE([AC_INCLUDES_DEFAULT([$4])], [""])"
-AS_VAR_IF([ac_Header], [yes], [$2], [$3])
-AS_VAR_POPDEF([ac_Header])])# _AC_CHECK_HEADER_MONGREL
+[m4_indir(m4_if([$4], [-],
+                [[_AC_CHECK_HEADER_PREPROC]],
+                [[_AC_CHECK_HEADER_COMPILE]]), $@)])
 
 
 # _AC_CHECK_HEADER_COMPILE_BODY
@@ -154,6 +72,7 @@ m4_define([_AC_CHECK_HEADER_COMPILE_BODY],
   AS_LINENO_POP
 ])# _AC_CHECK_HEADER_COMPILE_BODY
 
+
 # _AC_CHECK_HEADER_COMPILE(HEADER-FILE,
 #                     [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
 #                     [INCLUDES = DEFAULT-INCLUDES])
@@ -172,6 +91,7 @@ AC_DEFUN([_AC_CHECK_HEADER_COMPILE],
 AS_VAR_IF([ac_Header], [yes], [$2], [$3])
 AS_VAR_POPDEF([ac_Header])])# _AC_CHECK_HEADER_COMPILE
 
+
 # _AC_CHECK_HEADER_PREPROC_BODY
 # -----------------------------
 # Shell function body for _AC_CHECK_HEADER_PREPROC.
@@ -185,22 +105,28 @@ m4_define([_AC_CHECK_HEADER_PREPROC_BODY],
 ])# _AC_CHECK_HEADER_PREPROC_BODY
 
 
-
 # _AC_CHECK_HEADER_PREPROC(HEADER-FILE,
 #                     [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 # --------------------------------------------------------------
 # Check the preprocessor accepts HEADER-FILE.
 AC_DEFUN([_AC_CHECK_HEADER_PREPROC],
+[AC_DIAGNOSE([obsolete], [Checking for headers with the preprocessor is
+deprecated. Specify prerequisite code to AC_CHECK_HEADER
+instead of using fourth argument `-'. (Many headers need
+no prerequisites. If you truly need to test whether
+something passes the preprocessor but not the compiler,
+use AC_PREPROC_IFELSE.)])]dnl
 [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_check_header_preproc],
   [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_check_header_preproc],
     [LINENO HEADER VAR],
-    [Tests whether HEADER is present, setting the cache variable VAR 
accordingly.])],
+    [Tests whether HEADER exists and can be preprocessed (in isolation),
+     setting the cache variable VAR accordingly.])],
   [$0_BODY])]dnl
 [AS_VAR_PUSHDEF([ac_Header], [ac_cv_header_$1])]dnl
 [ac_fn_[]_AC_LANG_ABBREV[]_check_header_preproc "$LINENO" "$1" "ac_Header"
 AS_VAR_IF([ac_Header], [yes], [$2], [$3])
-AS_VAR_POPDEF([ac_Header])dnl
-])# _AC_CHECK_HEADER_PREPROC
+AS_VAR_POPDEF([ac_Header])])# _AC_CHECK_HEADER_PREPROC
+
 
 # _AC_CHECK_HEADER_OLD(HEADER-FILE, [ACTION-IF-FOUND],
 #                      [ACTION-IF-NOT-FOUND])
@@ -222,6 +148,14 @@ AC_DEFUN([_AC_CHECK_HEADER_NEW],
 You should use AC_CHECK_HEADER with a fourth argument.])]dnl
 [_AC_CHECK_HEADER_COMPILE($@)])
 
+# _AC_CHECK_HEADER_MONGREL(HEADER-FILE,
+#                         [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# ------------------------------------------------------------------
+# In case anyone used this undocumented macro.  Map to the _PREPROC
+# semantics to minimize the chance of breaking anything.
+AU_DEFUN([_AC_CHECK_HEADER_MONGREL],
+  [AC_CHECK_HEADER([$1], [$2], [$3], [-])])
+
 
 # _AH_CHECK_HEADER(HEADER-FILE)
 # -----------------------------
@@ -270,15 +204,19 @@ 
_AC_HEADERS_EXPANSION])AC_REQUIRE([_AC_Header_]m4_translit([[$1]],
 # -------------------------------------
 # Add each whitespace-separated name in HEADER-FILE to the list of
 # headers to check once.
+# Note: has intimate knowledge of how AC_INCLUDES_DEFAULT works,
+# and vice versa.
 AC_DEFUN([AC_CHECK_HEADERS_ONCE],
-[m4_map_args_w([$1], [_AC_CHECK_HEADER_ONCE(], [)])])
+  [AC_REQUIRE([AC_CHECK_INCLUDES_DEFAULT])]dnl
+  [_AC_CHECK_HEADERS_ONCE([$1])])
+
+AC_DEFUN([_AC_CHECK_HEADERS_ONCE],
+  [m4_map_args_w([$1], [_AC_CHECK_HEADER_ONCE(], [)])])
 
 m4_define([_AC_HEADERS_EXPANSION],
-[
-  m4_divert_text([DEFAULTS], [ac_header_list=])
-  AC_CHECK_HEADERS([$ac_header_list], [], [], [AC_INCLUDES_DEFAULT])
-  m4_define([_AC_HEADERS_EXPANSION], [])
-])
+  [m4_divert_text([DEFAULTS], [ac_header_list=])]dnl
+  [AC_CHECK_HEADERS([$ac_header_list], [], [], [$ac_includes_default])]dnl
+  [m4_define([_AC_HEADERS_EXPANSION], [])])
 
 
 
@@ -291,31 +229,24 @@ m4_define([_AC_HEADERS_EXPANSION],
 # macros.  It is easier to document, to extend, and to understand than
 # having specific defaults for each macro.
 
-# _AC_INCLUDES_DEFAULT_REQUIREMENTS
-# ---------------------------------
+# AC_CHECK_INCLUDES_DEFAULT
+# -------------------------
 # Required when AC_INCLUDES_DEFAULT uses its default branch.
-AC_DEFUN([_AC_INCLUDES_DEFAULT_REQUIREMENTS],
+AC_DEFUN_ONCE([AC_CHECK_INCLUDES_DEFAULT],
+dnl If ever you change this variable, please keep autoconf.texi in sync.
 [m4_divert_text([DEFAULTS],
 [# Factoring default headers for most tests.
-dnl If ever you change this variable, please keep autoconf.texi in sync.
 ac_includes_default="\
+#include <stddef.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #ifdef HAVE_SYS_TYPES_H
 # include <sys/types.h>
 #endif
 #ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif
-#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-#include <stddef.h>
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-#  include <memory.h>
-# endif
-# include <string.h>
-#endif
 #ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif
@@ -328,13 +259,22 @@ ac_includes_default="\
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif"
-])dnl
-AC_REQUIRE([AC_HEADER_STDC])dnl
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-                 inttypes.h stdint.h unistd.h],
-                [], [], $ac_includes_default)
-])# _AC_INCLUDES_DEFAULT_REQUIREMENTS
+])]dnl
+[_AC_CHECK_HEADERS_ONCE(
+  [sys/types.h sys/stat.h strings.h inttypes.h stdint.h unistd.h],
+  [], [], [$ac_includes_default])]dnl
+dnl For backward compatibility, provide unconditional AC_DEFINEs of
+dnl HAVE_STDLIB_H, HAVE_STRING_H, and STDC_HEADERS.
+[AC_DEFINE([HAVE_STDLIB_H], [1],
+  [Always define to 1, for backward compatibility.
+   You can assume <stdlib.h> exists.])]dnl
+[AC_DEFINE([HAVE_STRING_H], [1],
+  [Always define to 1, for backward compatibility.
+   You can assume <string.h> exists.])]dnl
+[AC_DEFINE([STDC_HEADERS], [1],
+  [Always define to 1, for backward compatibility.
+   You can assume the C90 standard headers exist.])])
+# AC_CHECK_INCLUDES_DEFAULT
 
 
 # AC_INCLUDES_DEFAULT([INCLUDES])
@@ -349,34 +289,30 @@ AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h 
string.h memory.h strings.h \
 AC_DEFUN([AC_INCLUDES_DEFAULT],
 [m4_ifval([$1], [$1
 ],
-         [AC_REQUIRE([_AC_INCLUDES_DEFAULT_REQUIREMENTS])dnl
-$ac_includes_default])])
-
-
-
+[AC_REQUIRE([AC_CHECK_INCLUDES_DEFAULT])]dnl
+[$ac_includes_default])])
 
 
 ## ------------------------------------------- ##
 ## 3. Headers to check with AC_CHECK_HEADERS.  ##
 ## ------------------------------------------- ##
 
-# errno.h is portable.
+# There is no longer any need to check for headers that are part of
+# ISO C90 (as amended): assert.h, ctype.h, errno.h, float.h, iso646.h,
+# limits.h, locale.h, math.h, setjmp.h, signal.h, stdarg.h, stddef.h,
+# stdio.h, stdlib.h, string.h, time.h, wchar.h, wctype.h.
 
 AN_HEADER([OS.h],               [AC_CHECK_HEADERS])
 AN_HEADER([argz.h],             [AC_CHECK_HEADERS])
 AN_HEADER([arpa/inet.h],        [AC_CHECK_HEADERS])
 AN_HEADER([fcntl.h],            [AC_CHECK_HEADERS])
 AN_HEADER([fenv.h],             [AC_CHECK_HEADERS])
-AN_HEADER([float.h],            [AC_CHECK_HEADERS])
 AN_HEADER([fs_info.h],          [AC_CHECK_HEADERS])
 AN_HEADER([inttypes.h],         [AC_CHECK_HEADERS])
 AN_HEADER([langinfo.h],         [AC_CHECK_HEADERS])
 AN_HEADER([libintl.h],          [AC_CHECK_HEADERS])
-AN_HEADER([limits.h],           [AC_CHECK_HEADERS])
-AN_HEADER([locale.h],           [AC_CHECK_HEADERS])
 AN_HEADER([mach/mach.h],        [AC_CHECK_HEADERS])
 AN_HEADER([malloc.h],           [AC_CHECK_HEADERS])
-AN_HEADER([memory.h],           [AC_CHECK_HEADERS])
 AN_HEADER([mntent.h],           [AC_CHECK_HEADERS])
 AN_HEADER([mnttab.h],           [AC_CHECK_HEADERS])
 AN_HEADER([netdb.h],            [AC_CHECK_HEADERS])
@@ -386,11 +322,8 @@ AN_HEADER([nlist.h],            [AC_CHECK_HEADERS])
 AN_HEADER([paths.h],            [AC_CHECK_HEADERS])
 AN_HEADER([sgtty.h],            [AC_CHECK_HEADERS])
 AN_HEADER([shadow.h],           [AC_CHECK_HEADERS])
-AN_HEADER([stddef.h],           [AC_CHECK_HEADERS])
 AN_HEADER([stdint.h],           [AC_CHECK_HEADERS])
 AN_HEADER([stdio_ext.h],        [AC_CHECK_HEADERS])
-AN_HEADER([stdlib.h],           [AC_CHECK_HEADERS])
-AN_HEADER([string.h],           [AC_CHECK_HEADERS])
 AN_HEADER([strings.h],          [AC_CHECK_HEADERS])
 AN_HEADER([sys/acl.h],          [AC_CHECK_HEADERS])
 AN_HEADER([sys/file.h],         [AC_CHECK_HEADERS])
@@ -418,10 +351,6 @@ AN_HEADER([utime.h],            [AC_CHECK_HEADERS])
 AN_HEADER([utmp.h],             [AC_CHECK_HEADERS])
 AN_HEADER([utmpx.h],            [AC_CHECK_HEADERS])
 AN_HEADER([values.h],           [AC_CHECK_HEADERS])
-AN_HEADER([wchar.h],            [AC_CHECK_HEADERS])
-AN_HEADER([wctype.h],           [AC_CHECK_HEADERS])
-
-
 
 ## ------------------------------- ##
 ## 4. Tests for specific headers.  ##
@@ -659,7 +588,7 @@ AC_DEFUN([AC_CHECK_HEADER_STDBOOL],
 
 # AC_HEADER_STDBOOL
 # -----------------
-# Define HAVE_STDBOOL_H if tdbool.h that conforms to C99.
+# Define HAVE_STDBOOL_H if the system provides stdbool.h that conforms to C99.
 AC_DEFUN([AC_HEADER_STDBOOL],
 [AC_CHECK_HEADER_STDBOOL
 if test $ac_cv_header_stdbool_h = yes; then
@@ -668,62 +597,15 @@ fi
 ])# AC_HEADER_STDBOOL
 
 
-# AC_HEADER_STDC
-# --------------
-AC_DEFUN([AC_HEADER_STDC],
-[AC_CACHE_CHECK(for ANSI C header files, ac_cv_header_stdc,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-]])],
-                   [ac_cv_header_stdc=yes],
-                   [ac_cv_header_stdc=no])
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  AC_EGREP_HEADER(memchr, string.h, , ac_cv_header_stdc=no)
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  AC_EGREP_HEADER(free, stdlib.h, , ac_cv_header_stdc=no)
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  AC_RUN_IFELSE([AC_LANG_SOURCE(
-[[#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-                  (('a' <= (c) && (c) <= 'i') \
-                    || ('j' <= (c) && (c) <= 'r') \
-                    || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-       || toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}]])], , ac_cv_header_stdc=no, :)
-fi])
-if test $ac_cv_header_stdc = yes; then
-  AC_DEFINE(STDC_HEADERS, 1,
-           [Define to 1 if you have the ANSI C header files.])
-fi
-])# AC_HEADER_STDC
-
+# AU::AC_HEADER_STDC
+# ------------------
+AU_DEFUN([AC_HEADER_STDC],
+[# Autoupdate added the following line to ensure that your configure
+# script's behavior did not change.  It is probably safe to remove.
+AC_CHECK_INCLUDES_DEFAULT],
+ [The preprocessor macro `STDC_HEADERS' is obsolete.
+  Except in unusual embedded environments, you can safely include all
+  ISO C90 headers unconditionally.])
 
 # AC_HEADER_SYS_WAIT
 # ------------------
@@ -752,25 +634,23 @@ fi
 ])# AC_HEADER_SYS_WAIT
 
 
-# AC_HEADER_TIME
-# --------------
-AC_DEFUN([AC_HEADER_TIME],
-[AC_CACHE_CHECK([whether time.h and sys/time.h may both be included],
-  ac_cv_header_time,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-],
-[if ((struct tm *) 0)
-return 0;])],
-                  [ac_cv_header_time=yes],
-                  [ac_cv_header_time=no])])
-if test $ac_cv_header_time = yes; then
+# AU::AC_HEADER_TIME
+# ------------------
+AU_DEFUN([AC_HEADER_TIME],
+[AC_CHECK_HEADERS_ONCE([sys/time.h])
+# Obsolete code to be removed.
+if test $ac_cv_header_sys_time_h = yes; then
   AC_DEFINE(TIME_WITH_SYS_TIME, 1,
            [Define to 1 if you can safely include both <sys/time.h>
-            and <time.h>.])
+            and <time.h>.  This macro is obsolete.])
 fi
-])# AC_HEADER_TIME
+# End of obsolete code.
+], [Update your code to rely only on HAVE_SYS_TIME_H,
+then remove this warning and the obsolete code below it.
+All current systems provide time.h; it need not be checked for.
+Not all systems provide sys/time.h, but those that do, all allow
+you to include it and time.h simultaneously.])
+# AC_HEADER_TIME
 
 
 # _AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H
@@ -827,14 +707,17 @@ fi
 # AU::AC_UNISTD_H
 # ---------------
 AU_DEFUN([AC_UNISTD_H],
-[AC_CHECK_HEADERS(unistd.h)])
+[# Autoupdate added the following line to ensure that your configure
+# script's behavior did not change.  It is probably safe to remove.
+AC_CHECK_INCLUDES_DEFAULT])
 
 
 # AU::AC_USG
 # ----------
-# Define `USG' if string functions are in strings.h.
+# Define `USG' if string functions are *not* in strings.h.
 AU_DEFUN([AC_USG],
-[AC_MSG_CHECKING([for BSD string and memory functions])
+[# Obsolete code to be removed.
+AC_MSG_CHECKING([for BSD string and memory functions])
 AC_LINK_IFELSE([AC_LANG_PROGRAM(address@hidden:@include <strings.h>]],
                                [[rindex(0, 0); bzero(0, 0);]])],
               [AC_MSG_RESULT(yes)],
@@ -843,9 +726,11 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM(address@hidden:@include 
<strings.h>]],
                          [Define to 1 if you do not have <strings.h>, index,
                           bzero, etc... This symbol is obsolete, you should
                           not depend upon it.])])
-AC_CHECK_HEADERS(string.h)],
-[Remove `AC_MSG_CHECKING', `AC_LINK_IFELSE' and this warning
-when you adjust your code to use HAVE_STRING_H.])
+# End of obsolete code.
+],
+[Update your code to use string.h, then remove this
+warning and the code below it. It is not necessary
+to check for string.h.])
 
 
 # AU::AC_MEMORY_H
@@ -862,13 +747,17 @@ when you adjust your code to use HAVE_STRING_H.])
 # But it is better to check for both headers, and alias NEED_MEMORY_H to
 # HAVE_MEMORY_H.
 AU_DEFUN([AC_MEMORY_H],
-[AC_CHECK_HEADER(memory.h,
-               [AC_DEFINE([NEED_MEMORY_H], 1,
-                          [Same as `HAVE_MEMORY_H', don't depend on me.])])
-AC_CHECK_HEADERS(string.h memory.h)],
-[Remove this warning and
-`AC_CHECK_HEADER(memory.h, AC_DEFINE(...))' when you adjust your code to
-use HAVE_STRING_H and HAVE_MEMORY_H, not NEED_MEMORY_H.])
+[# Obsolete code to be removed.
+AC_CHECK_HEADERS_ONCE([memory.h])
+if test $ac_cv_header_memory_h = yes; then
+   AC_DEFINE([NEED_MEMORY_H], [1],
+             [Same as `HAVE_MEMORY_H', don't depend on me.])
+fi
+# End of obsolete code.
+],
+[Update your code to use string.h, then remove this
+warning and the code below it.  It is not necessary
+to check for string.h.])
 
 
 # AU::AC_DIR_HEADER
diff --git a/tests/c.at b/tests/c.at
index 2e8f149..b1d4644 100644
--- a/tests/c.at
+++ b/tests/c.at
@@ -123,8 +123,12 @@ test "x$ac_c_preproc_warn_flag" = xyes &&
 CPP="./mycpp $CPP"
 
 # Exercise CPP.
-AC_CHECK_HEADERS(stdio.h autoconf_io.h, [], [], [-])]])
 
+AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>]])],
+  [AC_DEFINE([HAVE_STDIO_H], [1], [Define if you have stdio.h])])
+AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <autoconf_io.h>]])],
+  [AC_DEFINE([HAVE_AUTOCONF_IO_H], [1], [Define if you have autoconf_io.h])])
+]])
 AT_CHECK_DEFINES(
 [/* #undef HAVE_AUTOCONF_IO_H */
 #define HAVE_STDIO_H 1
@@ -139,14 +143,14 @@ AT_CLEANUP
 
 AT_SETUP([AC_PROG_CPP without warnings])
 
-# Ignore if /lib/cpp doesn't work
-AT_CHECK([[echo '#include <stdio.h>' | /lib/cpp || exit 77]],
+# Ignore if the cpp in $PATH doesn't work
+AT_CHECK([[echo '#include <stdio.h>' | cpp || exit 77]],
   [], [ignore], [ignore])
 
 # A cpp which exit status is meaningless.
 AT_DATA([mycpp],
 [[#! /bin/sh
-/lib/cpp "$@"
+cpp "$@"
 exit 0
 ]])
 
@@ -159,7 +163,11 @@ test "x$ac_c_preproc_warn_flag" != xyes &&
   AC_MSG_ERROR([failed to detect preprocessor warning option])
 
 # Exercise CPP.
-AC_CHECK_HEADERS(stdio.h autoconf_io.h, [], [], [-])]])
+AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>]])],
+  [AC_DEFINE([HAVE_STDIO_H], [1], [Define if you have stdio.h])])
+AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <autoconf_io.h>]])],
+  [AC_DEFINE([HAVE_AUTOCONF_IO_H], [1], [Define if you have autoconf_io.h])])
+]])
 
 AT_CHECK_DEFINES(
 [/* #undef HAVE_AUTOCONF_IO_H */
@@ -179,8 +187,8 @@ AT_CLEANUP
 
 AT_SETUP([AC_PROG_CPP via CC])
 
-# Ignore if /lib/cpp doesn't work
-AT_CHECK([[echo '#include <stdio.h>' | /lib/cpp || exit 77]],
+# Ignore if the cpp in $PATH doesn't work
+AT_CHECK([[echo '#include <stdio.h>' | cpp || exit 77]],
   [], [ignore], [ignore])
 
 AT_DATA([mycc],
@@ -204,7 +212,11 @@ test "$CPP" != "$CC -E" &&
   AC_MSG_ERROR([error messages on stderr cause the preprocessor selection to 
fail])
 
 # Exercise CPP.
-AC_CHECK_HEADERS(stdio.h autoconf_io.h, [], [], [-])]])
+AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>]])],
+  [AC_DEFINE([HAVE_STDIO_H], [1], [Define if you have stdio.h])])
+AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <autoconf_io.h>]])],
+  [AC_DEFINE([HAVE_AUTOCONF_IO_H], [1], [Define if you have autoconf_io.h])])
+]])
 
 AT_CHECK_DEFINES(
 [/* #undef HAVE_AUTOCONF_IO_H */
diff --git a/tests/local.at b/tests/local.at
index 97a1e1d..47501bf 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -113,13 +113,14 @@ m4_define([AT_CHECK_M4],
 [AT_CHECK([$1], [$2], [$3],
           m4_case([$4], [], [], [ignore], [ignore], [stderr]))
 m4_case([$4], [], [], [ignore], [],
-[AT_CHECK([[sed 's/^[^:]*m4[-.ex0-9]*: *\([^:]*:\) *\([0-9][0-9]*: \)/m4:\1\2/
+[AT_CHECK([[mv stderr stderr-raw &&
+   sed 's/^[^:]*m4[-.ex0-9]*: *\([^:]*:\) *\([0-9][0-9]*: \)/m4:\1\2/
        s/^\([^:]*:\) *\([0-9][0-9]*:\)[^:]*m4[-.ex0-9]*: /m4:\1\2 /
        s/: C\(annot open \)\([^`:]*\):/: c\1`\2'\'':/
        s/: include:\( cannot open\)/:\1/
        s/^autom4te: [^ ]*m4[.ex]* /autom4te: m4 /
        s/ (E[A-Z]*)$//
-    ' stderr >&2]], [0], [], [$4])])
+    ' stderr-raw >&2]], [0], [], [$4])])
 ])
 
 # AT_CHECK_AUTOM4TE(FLAGS, [EXIT-STATUS = 0], STDOUT, STDERR)
diff --git a/tests/semantics.at b/tests/semantics.at
index c0b78a1..f2b9ea5 100644
--- a/tests/semantics.at
+++ b/tests/semantics.at
@@ -219,13 +219,7 @@ AT_DATA([autoconf_io.h],
 AT_CONFIGURE_AC([AC_CHECK_HEADERS(stdio.h autoconf_io.h)])
 AT_CHECK_AUTOCONF([-W obsolete])
 AT_CHECK_AUTOHEADER
-AT_CHECK_CONFIGURE([CPPFLAGS=-I.], [0], [ignore],
-[configure: WARNING: autoconf_io.h: present but cannot be compiled
-configure: WARNING: autoconf_io.h:     check for missing prerequisite headers?
-configure: WARNING: autoconf_io.h: see the Autoconf documentation
-configure: WARNING: autoconf_io.h:     section "Present But Cannot Be Compiled"
-configure: WARNING: autoconf_io.h: proceeding with the compiler's result
-])
+AT_CHECK_CONFIGURE([CPPFLAGS=-I.])
 AT_CHECK_ENV
 AT_CHECK_DEFINES(
 [/* #undef HAVE_AUTOCONF_IO_H */
@@ -251,7 +245,16 @@ AT_DATA([header2.h],
 
 AT_CONFIGURE_AC([AC_CHECK_HEADERS(header2.h, [], [], -)])
 
-AT_CHECK_AUTOCONF([-W obsolete])
+AT_CHECK_AUTOCONF([-W obsolete], [], [], [stderr])
+AT_CHECK([[grep '^configure\.ac' stderr]], [0],
+[configure.ac:4: warning: Checking for headers with the preprocessor is
+configure.ac:4: deprecated. Specify prerequisite code to AC_CHECK_HEADER
+configure.ac:4: instead of using fourth argument `-'. (Many headers need
+configure.ac:4: no prerequisites. If you truly need to test whether
+configure.ac:4: something passes the preprocessor but not the compiler,
+configure.ac:4: use AC_PREPROC_IFELSE.)
+configure.ac:4: the top level
+])
 AT_CHECK_AUTOHEADER
 AT_CHECK_CONFIGURE([CPPFLAGS=-I.])
 AT_CHECK_ENV
diff --git a/tests/tools.at b/tests/tools.at
index cace11a..294fb60 100644
--- a/tests/tools.at
+++ b/tests/tools.at
@@ -955,7 +955,7 @@ AC_DEFUN([FOO], [$#])
 AU_ALIAS([BAZ],[FOO])
 test "FOO:FOO():FOO(x) BAZ:BAZ():BAZ(x)" = "0:1:1 0:1:1" || exit 1
 AC_PROG_CC
-AC_STDC_HEADERS
+AC_WORDS_BIGENDIAN
 AC_OUTPUT
 ]])
 
@@ -963,8 +963,8 @@ AC_OUTPUT
 AT_CHECK_AUTOUPDATE
 AT_CHECK_AUTOCONF
 AT_CHECK_CONFIGURE
-AT_CHECK([grep 'AC_HEADER_STDC[(]' configure.ac], 1, [ignore], [ignore])
-AT_CHECK([grep 'AC_HEADER_STDC' configure.ac], 0, [ignore], [ignore])
+AT_CHECK([grep 'AC_C_BIGENDIAN[(]' configure.ac], 1, [ignore], [ignore])
+AT_CHECK([grep 'AC_C_BIGENDIAN' configure.ac], 0, [ignore], [ignore])
 
 AT_CLEANUP
 


hooks/post-receive
-- 
GNU Autoconf source repository



reply via email to

[Prev in Thread] Current Thread [Next in Thread]