autoconf-patches
[Top][All Lists]
Advanced

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

installed non-width patches imported from gnulib


From: Paul Eggert
Subject: installed non-width patches imported from gnulib
Date: Sat, 08 Apr 2006 14:48:25 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

To help simplify the discussion of the integer-width macros I
installed the following, which are all the other macros imported from
gnulib, and which seem to be noncontroversial.  Perhaps the
integer-width stuff should wait until after Autoconf 2.60 comes out,
since it seems to be somewhat of a can of worms.

2006-04-08  Paul Eggert  <address@hidden>

        Import macros from gnulib (often changing their name).

        * NEWS: AC_C_TYPE_LONG_DOUBLE is now obsolete.
        New macros AC_CHECK_DECLS_ONCE, AC_CHECK_FUNCS_ONCE,
        AC_CHECK_HEADERS_ONCE, AC_FUNC_STRTOLD, AC_HEADER_ASSERT,
        AC_STRUCT_DIRENT_D_INO, AC_STRUCT_DIRENT_D_TYPE,
        AC_TYPE_LONG_DOUBLE, AC_TYPE_LONG_DOUBLE_WIDER, AC_TYPE_INT8_T,
        AC_TYPE_INT16_T, AC_TYPE_INT32_T, AC_TYPE_INT64_T,
        AC_TYPE_INTMAX_T, AC_TYPE_INTPTR_T, AC_TYPE_LONG_LONG_INT,
        AC_TYPE_UINT8_T, AC_TYPE_UINT16_T, AC_TYPE_UINT32_T,
        AC_TYPE_UINT64_T, AC_TYPE_UINTMAX_T, AC_TYPE_UINTPTR_T,
        AC_TYPE_UNSIGNED_LONG_LONG_INT, AC_USE_SYSTEM_EXTENSIONS.
        The manual mentions Gnulib more prominently.
        * doc/autoconf.texi (Gnulib): New node.
        (Pointers): Add Gnulib URL.
        (Particular Functions): Alphabetize.  Add AC_FUNC_STRTOLD.
        (Generic Functions): Add AC_CHECK_FUNCS_ONCE.  Refer to new
        Gnulib section.
        (Particular Headers): Add AC_HEADER_ASSERT.  For stdbool.h,
        suggest a #define rather than a typedef for _Bool, and mention
        Gnulib rather than trying to substitute stdbool code.
        (Generic Headers): Add AC_CHECK_HEADERS_ONCE.
        (Generic Declarations): Add AC_CHECK_DECLS_ONCE.
        (Particular Structures): Add AC_STRUCT_DIRENT_D_INO,
        AC_STRUCT_DIRENT_D_TYPE.
        (Particular Types): Mention stdint.h and inttypes.h as standard
        headers too.
        Add AC_TYPE_INT8_T, AC_TYPE_INT16_T, AC_TYPE_INT32_T, AC_TYPE_INT64_T,
        AC_TYPE_INTMAX_T, AC_TYPE_INTPTR_T, AC_TYPE_LONG_DOUBLE,
        AC_TYPE_LONG_DOUBLE_WIDER, AC_TYPE_LONG_LONG_INT, AC_TYPE_UINT8_T,
        AC_TYPE_UINT16_T, AC_TYPE_UINT32_T, AC_TYPE_UINT64_T,
        AC_TYPE_UINTMAX_T, AC_TYPE_UINTPTR_T, AC_TYPE_UNSIGNED_LONG_LONG_INT.
        (C Compiler): Move AC_C_LONG_DOUBLE to ...
        (Obsolete Macros): here.  Under AC_LONG_DOUBLE, mention
        AC_TYPE_LONG_DOUBLE or AC_TYPE_LONG_DOUBLE_WIDER instead.
        (Posix Variants): Add AC_USE_SYSTEM_EXTENSIONS.
        (Coding Style).  Don't mention m4_expand_once.
        * lib/autoconf/c.m4 (AC_C_LONG_DOUBLE): Implement via
        AC_TYPE_LONG_DOUBLE_WIDER.  Now obsolete.
        * lib/autoconf/functions.m4 (_AH_CHECK_FUNCS): New macro.
        (AC_CHECK_FUNCS): Use it.
        (AC_CHECK_FUNCS_ONCE, AC_FUNC_STRTOLD): New macros.
        (AC_FUNC_WAIT3): "the Open Group standards" -> "POSIX".
        * lib/autoconf/general.m4 (AC_CHECK_DECLS_ONCE): New macro.
        * lib/autoconf/headers.m4 (AC_CHECK_HEADERS_ONCE): New macro.
        (AC_HEADER_ASSERT): New macro.
        (AC_HEADER_STDBOOL): Don't assume "#error" works.
        Catch a bug in IBM AIX xlc compiler version 6.0.0.0.
        Catch a bug in an HP-UX C compiler.
        * lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): New macro.
        * lib/autoconf/types.m4 (AC_TYPE_INTMAX_T. AC_TYPE_UINTMAX_T):
        (AC_TYPE_INTPTR_T, AC_TYPE_UINTPTR_T. AC_TYPE_LONG_DOUBLE):
        (AC_TYPE_LONG_DOUBLE_WIDER, AC_C_LONG_DOUBLE, AC_TYPE_LONG_LONG_INT):
        (AC_TYPE_UNSIGNED_LONG_LONG_INT, _AC_TYPE_INT, _AC_TYPE_UNSIGNED_INT):
        (_AC_STRUCT_DIRENT, AC_STRUCT_DIRENT_D_INO, AC_STRUCT_DIRENT_D_TYPE):
        New macros.

Index: NEWS
===================================================================
RCS file: /cvsroot/autoconf/autoconf/NEWS,v
retrieving revision 1.357
diff -p -b -w -u -r1.357 NEWS
--- NEWS        5 Apr 2006 22:41:36 -0000       1.357
+++ NEWS        8 Apr 2006 21:43:16 -0000
@@ -35,6 +35,16 @@
 ** AC_C_TYPEOF
   New macro to check for support of 'typeof' syntax a la GNU C.
 
+** AC_CHECK_DECLS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_HEADERS_ONCE
+  New "once-only" variants of commonly-used macros, to make 'configure'
+  smaller and faster in common cases.
+
+** AC_FUNC_STRTOLD
+  New macro to check for strtold with C99 semantics.
+
+** AC_HEADER_ASSERT
+  New macro that lets builder disable assertions at 'configure'-time.
+
 ** AC_PATH_X
   Now checks for X11/Xlib.h and XrmInitialize (X proper) rather than
   X11/Intrinsic.h and XtMalloc (Xt).
@@ -62,6 +72,9 @@
   ac_cv_prog_cc_c99 or ac_cv_prog_cc_c89 (whichever is valid, in
   that order).
 
+** AC_STRUCT_DIRENT_D_INO, AC_STRUCT_DIRENT_D_TYPE
+  New macro for checking commonly-used members of struct dirent.
+
 ** AC_SUBST
   The subtituted value can now contain newlines.
 
@@ -69,6 +82,20 @@
   The substitution now occurs only when @variable@ is on a line by itself,
   optionally surrounded by spaces and tabs.  The whole line is replaced.
 
+** AC_TYPE_LONG_DOUBLE, AC_TYPE_LONG_DOUBLE_WIDER
+  New macros to check for long double, and whether it is wider than double.
+  The old macro AC_C_TYPE_LONG_DOUBLE has been marked as obsolete;
+  applications should switch to the new macro.
+
+** AC_TYPE_INT8_T, AC_TYPE_INT16_T, AC_TYPE_INT32_T, AC_TYPE_INT64_T,
+   AC_TYPE_INTMAX_T, AC_TYPE_INTPTR_T, AC_TYPE_LONG_LONG_INT, AC_TYPE_SSIZE_T,
+   AC_TYPE_UINT8_T, AC_TYPE_UINT16_T, AC_TYPE_UINT32_T, AC_TYPE_UINT64_T,
+   AC_TYPE_UINTMAX_T, AC_TYPE_UINTPTR_T, AC_TYPE_UNSIGNED_LONG_LONG_INT
+  New macros to check for C99 and POSIX types.
+
+** AC_USE_SYSTEM_EXTENSIONS
+  New macro to enable extensions to Posix.
+
 ** AH_HEADER
   New macro which is defined to the name of the first declared config header
   or undefined if no config headers have been declared yet.
@@ -99,6 +126,8 @@
   New macros for configuring installation of Erlang libraries:
   AC_ERLANG_SUBST_INSTALL_LIB_DIR, AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR.
 
+** The manual now mentions Gnulib more prominently.
+
 ** New macros to support Objective C.
   AC_PROG_OBJC, AC_PROG_OBJCPP.
 
Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.988
diff -p -b -w -u -r1.988 autoconf.texi
--- doc/autoconf.texi   7 Apr 2006 18:00:55 -0000       1.988
+++ doc/autoconf.texi   8 Apr 2006 21:43:17 -0000
@@ -279,6 +279,7 @@ published by the Free Software Foundatio
 The @acronym{GNU} Build System
 
 * Automake::                    Escaping Makefile hell
+* Gnulib::                      The @acronym{GNU} portability library
 * Libtool::                     Building libraries portably
 * Pointers::                    More info on the @acronym{GNU} build system
 
@@ -709,6 +710,7 @@ entire @acronym{GNU} build system for yo
 
 @menu
 * Automake::                    Escaping Makefile hell
+* Gnulib::                      The @acronym{GNU} portability library
 * Libtool::                     Building libraries portably
 * Pointers::                    More info on the @acronym{GNU} build system
 @end menu
@@ -755,6 +757,32 @@ The benefits of Automake increase for la
 with subdirectories), but even for small programs the added convenience
 and portability can be substantial.  And that's not address@hidden
 
address@hidden Gnulib
address@hidden Gnulib
+
address@hidden software has a well-deserved reputation for running on
+many different types of systems.  While our primary goal is to write
+software for the @acronym{GNU} system, many users and developers have
+been introduced to us through the systems that they were already using.
+
address@hidden Gnulib
+Gnulib is a central location for common @acronym{GNU} code, intended to
+be shared among free software packages.  Its components are typically
+shared at the source level, rather than being a library that gets built,
+installed, and linked against.  The idea is to copy files from Gnulib
+into your own source tree.  There is no distribution tarball; developers
+should just grab source modules from the repository.  The source files
+are available online, under various licenses, mostly @acronym{GNU}
address@hidden or @acronym{GNU} @acronym{LGPL}.
+
+Gnulib modules typically contain C source code along with Autoconf
+macros used to configure the source code.  For example, the Gnulib
address@hidden module implements a @file{stdbool.h} header that nearly
+conforms to C99, even on old-fashioned hosts that lack @file{stdbool.h}.
+This module contains a source file for the replacement header, along
+with an Autoconf macro that arranges to use the replacement header on
+old-fashioned systems.
+
 @node Libtool
 @section Libtool
 
@@ -802,7 +830,8 @@ the @acronym{GNU} build tools.
 
 The home pages for
 @uref{http://www.gnu.org/software/autoconf/, Autoconf},
address@hidden://www.gnu.org/software/automake/, Automake}, and
address@hidden://www.gnu.org/software/automake/, Automake},
address@hidden://www.gnu.org/software/gnulib/, Gnulib}, and
 @uref{http://www.gnu.org/software/libtool/, Libtool}.
 
 @item Automake Manual
@@ -4539,17 +4568,6 @@ If the @code{strcoll} function exists an
 definitions of @code{strcoll} that should not be used.
 @end defmac
 
address@hidden AC_FUNC_STRTOD
address@hidden
address@hidden POW_LIB
address@hidden @fuindex strtod
address@hidden @code{strtod}
-If the @code{strtod} function does not exist or doesn't work correctly,
-ask for an @code{AC_LIBOBJ} replacement of @samp{strtod}.  In this case,
-because @file{strtod.c} is likely to need @samp{pow}, set the output
-variable @code{POW_LIB} to the extra library needed.
address@hidden defmac
-
 @defmac AC_FUNC_STRERROR_R
 @acindex{FUNC_STRERROR_R}
 @cvindex HAVE_STRERROR_R
@@ -4576,6 +4594,24 @@ Check for @code{strftime} in the @file{i
 Then, if @code{strftime} is available, define @code{HAVE_STRFTIME}.
 @end defmac
 
address@hidden AC_FUNC_STRTOD
address@hidden
address@hidden POW_LIB
address@hidden @fuindex strtod
address@hidden @code{strtod}
+If the @code{strtod} function does not exist or doesn't work correctly,
+ask for an @code{AC_LIBOBJ} replacement of @samp{strtod}.  In this case,
+because @file{strtod.c} is likely to need @samp{pow}, set the output
+variable @code{POW_LIB} to the extra library needed.
address@hidden defmac
+
address@hidden AC_FUNC_STRTOLD
address@hidden
address@hidden @code{strtold}
+If the @code{strtold} function exists and conforms to C99, define
address@hidden
address@hidden defmac
+
 @defmac AC_FUNC_STRNLEN
 @acindex{FUNC_STRNLEN}
 @cvindex HAVE_STRNLEN
@@ -4657,6 +4693,17 @@ execute when one of the functions is fou
 functions is not found.
 @end defmac
 
address@hidden AC_CHECK_FUNCS_ONCE (@address@hidden)
address@hidden
address@hidden address@hidden
+For each @var{function} enumerated in the blank-or-newline-separated argument
+list, define @address@hidden (in all capitals) if it is available.
+This is a once-only variant of @code{AC_CHECK_FUNCS}.  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.
address@hidden defmac
+
 @sp 1
 
 Autoconf follows a philosophy that was formed over the years by those
@@ -4666,10 +4713,7 @@ environment.  Some functions may be miss
 package must be ready to replace them.
 
 Suitable replacements for many such problem functions are available from
address@hidden://www.gnu.org/software/gnulib/, Gnulib}, which aims to
-provide a centralized repository of such portability functions (among
-other things).  The source files are available online, under various
-licenses, mostly @acronym{GNU} @acronym{GPL} or @acronym{GNU} @acronym{LGPL}.
+Gnulib (@pxref{Gnulib}).
 
 @defmac AC_LIBOBJ (@var{function})
 @acindex{LIBOBJ}
@@ -4782,6 +4826,12 @@ problems they cause.  By definition, thi
 additions.  Please help us keeping it as complete as possible.
 
 @table @asis
+
address@hidden @file{limits.h}
+C99 says that @file{limits.h} defines @code{LLONG_MIN},
address@hidden, and @code{ULLONG_MAX}, but many almost-C99
+environments (e.g., default GCC 4.0.2 + glibc 2.4) do not define them.
+
 @item @file{inttypes.h} vs.@: @file{stdint.h}
 @hdrindex{inttypes.h}
 @hdrindex{stdint.h}
@@ -4889,6 +4939,15 @@ AC_CHECK_HEADERS([X11/extensions/scrnsav
 These macros check for particular system header files---whether they
 exist, and in some cases whether they declare certain symbols.
 
address@hidden AC_HEADER_ASSERT
address@hidden
address@hidden NDEBUG
address@hidden
+Check whether to enable assertions in the style of @file{assert.h}.
+Assertions are enabled by default, but the user can override this by
+invoking @command{configure} with the @option{--disable-assert} option.
address@hidden defmac
+
 @defmac AC_HEADER_DIRENT
 @acindex{HEADER_DIRENT}
 @cvindex HAVE_DIRENT_H
@@ -4940,6 +4999,9 @@ the length of a directory entry name by 
 @code{struct dirent} to the @code{NAMLEN} macro.
 
 This macro also checks for the SCO Xenix @file{dir} and @file{x} libraries.
+
+Also see @code{AC_STRUCT_DIRENT_D_INO} and
address@hidden (@pxref{Particular Structures}).
 @end defmac
 
 @defmac AC_HEADER_MAJOR
@@ -4995,7 +5057,7 @@ Amdahl UTS and Motorola System V/88.
 @cvindex HAVE__BOOL
 @hdrindex{stdbool.h}
 @hdrindex{system.h}
-If @file{stdbool.h} exists and is conformant to C99, define
+If @file{stdbool.h} exists and conforms to C99, define
 @code{HAVE_STDBOOL_H} to 1; if the type @code{_Bool} is defined, define
 @code{HAVE__BOOL} to 1.  To fulfill the C99 requirements, your
 @file{system.h} could contain the following code:
@@ -5008,7 +5070,7 @@ If @file{stdbool.h} exists and is confor
 #  ifdef __cplusplus
 typedef bool _Bool;
 #  else
-typedef unsigned char _Bool;
+#   define _Bool signed char
 #  endif
 # endif
 # define bool _Bool
@@ -5018,37 +5080,10 @@ typedef unsigned char _Bool;
 #endif
 @end verbatim
 
-Alternatively you can construct an output variable that includes only
-those headers and definitions needed.  For example:
+Alternatively you can use the @samp{stdbool} package of Gnulib
+(@pxref{Gnulib}); it packages the above code into a replacement header
+and contains a few other bells and whistles.
 
address@hidden
-AC_HEADER_STDBOOL
-AC_SUBST([stdbool])
-if test "x$ac_cv_header_stdbool_h" = xyes; then
-  stdbool='
-#include <stdbool.h>
-'
-else
-  if test "x$ac_cv_type__Bool" != xyes; then
-    stdbool='
-#ifdef __cplusplus
-typedef bool _Bool;
-#else
-typedef unsigned char _Bool;
-#endif
-'
-  else
-    stdbool='
-'
-  fi
-  stdbool=$stdbool'
-#define bool _Bool
-#define false 0
-#define true 1
-#define __bool_true_false_are_defined 1
-'
-fi
address@hidden verbatim
 @end defmac
 
 
@@ -5299,6 +5334,21 @@ AC_CHECK_HEADERS([bar.h], [], [],
 ])
 @end 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.
address@hidden defmac
+
 @node Declarations
 @section Declarations
 @cindex Declaration, checking
@@ -5384,6 +5434,18 @@ your files may be used without being con
 the configuration.  In most cases the traditional approach is enough.
 @end defmac
 
address@hidden AC_CHECK_DECLS_ONCE (@var{symbols})
address@hidden
address@hidden address@hidden
+For each of the @var{symbols} (@emph{comma}-separated list), define
address@hidden@var{symbol}} (in all capitals) to @samp{1} if
address@hidden is declared in the default include files, otherwise to
address@hidden  This is a once-only variant of @code{AC_CHECK_DECLS}.  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.
address@hidden defmac
+
 
 @node Structures
 @section Structures
@@ -5405,6 +5467,28 @@ member you need, then you can use the ge
 
 The following macros check for certain structures or structure members.
 
address@hidden AC_STRUCT_DIRENT_D_INO
address@hidden
address@hidden HAVE_STRUCT_DIRENT_D_INO
+Perform all the actions of @code{AC_HEADER_DIRENT} (@pxref{Particular
+Headers}).  Then, if @code{struct dirent} contains a @code{d_ino}
+member, define @code{HAVE_STRUCT_DIRENT_D_INO}.
+
address@hidden indicates only the presence of
address@hidden, not whether its contents are always reliable.
+Traditionally, a zero @code{d_ino} indicated a deleted directory entry,
+though modern systems hide this detail from the user and never return
+zero @code{d_ino} values.
address@hidden defmac
+
address@hidden AC_STRUCT_DIRENT_D_TYPE
address@hidden
address@hidden HAVE_STRUCT_DIRENT_D_TYPE
+Perform all the actions of @code{AC_HEADER_DIRENT} (@pxref{Particular
+Headers}).  Then, if @code{struct dirent} contains a @code{d_type}
+member, define @code{HAVE_STRUCT_DIRENT_D_TYPE}.
address@hidden defmac
+
 @defmac AC_STRUCT_ST_BLKSIZE
 @acindex{STRUCT_ST_BLKSIZE}
 @cvindex HAVE_STRUCT_STAT_ST_BLKSIZE
@@ -5528,8 +5612,15 @@ use a general type-check macro.
 
 @hdrindex{sys/types.h}
 @hdrindex{stdlib.h}
address@hidden
address@hidden
 These macros check for particular C types in @file{sys/types.h},
address@hidden and others, if they exist.
address@hidden, @file{stdint.h}, @file{inttypes.h} and others, if they
+exist.
+
+The Gnulib @code{stdint} module is an alternate way to define many of
+these symbols; it is useful if you prefer your code to assume a
+C99-or-better environment.  @xref{Gnulib}.
 
 @defmac AC_TYPE_GETGROUPS
 @acindex{TYPE_GETGROUPS}
@@ -5538,6 +5629,79 @@ Define @code{GETGROUPS_T} to be whicheve
 is the base type of the array argument to @code{getgroups}.
 @end defmac
 
address@hidden AC_TYPE_INT8_T
address@hidden
address@hidden HAVE_INT8_T
address@hidden int8_t
+If @file{stdint.h} or @file{inttypes.h} defines the type @code{int8_t},
+define @code{HAVE_INT8_T}.  Otherwise, define @code{int8_t} to a signed
+integer type that is exactly 8 bits wide and that uses two's complement
+representation, if such a type exists.
address@hidden defmac
+
address@hidden AC_TYPE_INT16_T
address@hidden
address@hidden HAVE_INT16_T
address@hidden int16_t
+This is like @code{AC_TYPE_INT8_T}, except for 16-bit integers.
address@hidden defmac
+
address@hidden AC_TYPE_INT32_T
address@hidden
address@hidden HAVE_INT32_T
address@hidden int32_t
+This is like @code{AC_TYPE_INT8_T}, except for 32-bit integers.
address@hidden defmac
+
address@hidden AC_TYPE_INT64_T
address@hidden
address@hidden HAVE_INT64_T
address@hidden int64_t
+This is like @code{AC_TYPE_INT8_T}, except for 64-bit integers.
address@hidden defmac
+
address@hidden AC_TYPE_INTMAX_T
address@hidden
address@hidden HAVE_INTMAX_T
address@hidden intmax_t
+If @file{stdint.h} or @file{inttypes.h} defines the type @code{intmax_t},
+define @code{HAVE_INTMAX_T}.  Otherwise, define @code{intmax_t} to the
+widest signed integer type.
address@hidden defmac
+
address@hidden AC_TYPE_INTPTR_T
address@hidden
address@hidden HAVE_INTPTR_T
address@hidden intptr_t
+If @file{stdint.h} or @file{inttypes.h} defines the type @code{intptr_t},
+define @code{HAVE_INTPTR_T}.  Otherwise, define @code{intptr_t} to a
+signed integer type wide enough to hold a pointer, if such a type
+exists.
address@hidden defmac
+
address@hidden AC_TYPE_LONG_DOUBLE
address@hidden
address@hidden HAVE_LONG_DOUBLE
+If the C compiler supports a working @code{long double} type, define
address@hidden  The @code{long double} type might have the
+same range and precision as @code{double}.
address@hidden defmac
+
address@hidden AC_TYPE_LONG_DOUBLE_WIDER
address@hidden
address@hidden HAVE_LONG_DOUBLE_WIDER
+If the C compiler supports a working @code{long double} type with more
+range or precision than the @code{double} type, define
address@hidden
address@hidden defmac
+
address@hidden AC_TYPE_LONG_LONG_INT
address@hidden
address@hidden HAVE_LONG_LONG_INT
+If the C compiler supports a working @code{long long int} type, define
address@hidden
address@hidden defmac
+
 @defmac AC_TYPE_MBSTATE_T
 @acindex{TYPE_MBSTATE_T}
 @cvindex mbstate_t
@@ -5592,6 +5756,12 @@ hup_handler ()
 Equivalent to @samp{AC_CHECK_TYPE([size_t], [unsigned int])}.
 @end defmac
 
address@hidden AC_TYPE_SSIZE_T
address@hidden
address@hidden ssize_t
+Equivalent to @samp{AC_CHECK_TYPE([ssize_t], [int])}.
address@hidden defmac
+
 @defmac AC_TYPE_UID_T
 @acindex{TYPE_UID_T}
 @cvindex uid_t
@@ -5600,6 +5770,63 @@ If @code{uid_t} is not defined, define @
 @code{gid_t} to be @code{int}.
 @end defmac
 
address@hidden AC_TYPE_UINT8_T
address@hidden
address@hidden HAVE_UINT8_T
address@hidden uint8_t
+If @file{stdint.h} or @file{inttypes.h} defines the type @code{uint8_t},
+define @code{HAVE_UINT8_T}.  Otherwise, define @code{uint8_t} to an
+unsigned integer type that is exactly 8 bits wide, if such a type
+exists.
address@hidden defmac
+
address@hidden AC_TYPE_UINT16_T
address@hidden
address@hidden HAVE_UINT16_T
address@hidden uint16_t
+This is like @code{AC_TYPE_UINT8_T}, except for 16-bit unsigned integers.
address@hidden defmac
+
address@hidden AC_TYPE_UINT32_T
address@hidden
address@hidden HAVE_UINT32_T
address@hidden uint32_t
+This is like @code{AC_TYPE_UINT8_T}, except for 32-bit unsigned integers.
address@hidden defmac
+
address@hidden AC_TYPE_UINT64_T
address@hidden
address@hidden HAVE_UINT64_T
address@hidden uint64_t
+This is like @code{AC_TYPE_UINT8_T}, except for 64-bit unsigned integers.
address@hidden defmac
+
address@hidden AC_TYPE_UINTMAX_T
address@hidden
address@hidden HAVE_UINTMAX_T
address@hidden uintmax_t
+If @file{stdint.h} or @file{inttypes.h} defines the type @code{uintmax_t},
+define @code{HAVE_UINTMAX_T}.  Otherwise, define @code{uintmax_t} to the
+widest unsigned integer type.
address@hidden defmac
+
address@hidden AC_TYPE_UINTPTR_T
address@hidden
address@hidden HAVE_UINTPTR_T
address@hidden uintptr_t
+If @file{stdint.h} or @file{inttypes.h} defines the type @code{uintptr_t},
+define @code{HAVE_UINTPTR_T}.  Otherwise, define @code{uintptr_t} to an
+unsigned integer type wide enough to hold a pointer, if such a type
+exists.
address@hidden defmac
+
address@hidden AC_TYPE_UNSIGNED_LONG_LONG_INT
address@hidden
address@hidden HAVE_UNSIGNED_LONG_LONG_INT
+If the C compiler supports a working @code{unsigned long long int} type,
+define @code{HAVE_UNSIGNED_LONG_LONG_INT}.
address@hidden defmac
+
 @node Generic Types
 @subsection Generic Type Checks
 
@@ -6045,14 +6272,6 @@ If the C type @code{char} is unsigned, d
 unless the C compiler predefines it.
 @end defmac
 
address@hidden AC_C_LONG_DOUBLE
address@hidden
address@hidden HAVE_LONG_DOUBLE
-If the C compiler supports a working @code{long double} type with more
-range or precision than the @code{double} type, define
address@hidden
address@hidden defmac
-
 @defmac AC_C_STRINGIZE
 @acindex{C_STRINGIZE}
 @cvindex HAVE_STRINGIZE
@@ -6749,6 +6968,23 @@ If on Minix, define @code{_MINIX} and @c
 facilities.  Should be called before any macros that run the C compiler.
 @end defmac
 
address@hidden AC_USE_SYSTEM_EXTENSIONS
address@hidden
address@hidden _ALL_SOURCE
address@hidden _GNU_SOURCE
address@hidden _MINIX
address@hidden _POSIX_1_SOURCE
address@hidden _POSIX_PTHREAD_SEMANTICS
address@hidden _POSIX_SOURCE
address@hidden __EXTENSIONS__
+If possible, enable extensions to Posix on hosts that normally disable
+the extensions, typically due to standards-conformance namespace issues.
+This may involve defining @code{__EXTENSIONS__} and
address@hidden, which are macros used by Solaris.  This
+macro also has the combined effects of @code{AC_GNU_SOURCE},
address@hidden, and @code{AC_MINIX}.
address@hidden defmac
+
 
 @node Erlang Libraries
 @section Erlang Libraries
@@ -10004,8 +10240,8 @@ by setting @address@hidden,
 But since there is a macro named @code{AC_SUBST_FILE}, it was just
 impossible to @samp{AC_SUBST(FILE)}!  In this case,
 @code{AC_SUBST(@var{symbol})} or @code{_AC_SUBST(@var{symbol})} should
-have been used (yes, with the parentheses)@dots{}or better yet, high-level
-macros such as @code{AC_EXPAND_ONCE}.
+have been used (yes, with the parentheses).
address@hidden or better yet, high-level macros such as @code{m4_expand_once}
 
 No Autoconf macro should ever enter the user-variable name space; i.e.,
 except for the variables that are the actual result of running the
@@ -15045,6 +15281,17 @@ removed because of limited usefulness
 This macro is obsolete; it does nothing.
 @end defmac
 
address@hidden AC_C_LONG_DOUBLE
address@hidden
address@hidden HAVE_LONG_DOUBLE
+If the C compiler supports a working @code{long double} type with more
+range or precision than the @code{double} type, define
address@hidden
+
+You should use @code{AC_TYPE_LONG_DOUBLE} or
address@hidden instead.  @xref{Particular Types}.
address@hidden defmac
+
 @defmac AC_CANONICAL_SYSTEM
 @acindex{CANONICAL_SYSTEM}
 Determine the system type and set output variables to the names of the
@@ -15429,7 +15676,12 @@ Use the generic macro @samp{AC_CHECK_SIZ
 
 @defmac AC_LONG_DOUBLE
 @acindex{LONG_DOUBLE}
address@hidden
+If the C compiler supports a working @code{long double} type with more
+range or precision than the @code{double} type, define
address@hidden
+
+You should use @code{AC_TYPE_LONG_DOUBLE} or
address@hidden instead.  @xref{Particular Types}.
 @end defmac
 
 @defmac AC_LONG_FILE_NAMES
Index: lib/autoconf/c.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/c.m4,v
retrieving revision 1.220
diff -p -b -w -u -r1.220 c.m4
--- lib/autoconf/c.m4   6 Apr 2006 11:24:00 -0000       1.220
+++ lib/autoconf/c.m4   8 Apr 2006 21:43:17 -0000
@@ -1275,42 +1275,6 @@ fi
 ])# AC_C_CHAR_UNSIGNED
 
 
-# AC_C_LONG_DOUBLE
-# ----------------
-AC_DEFUN([AC_C_LONG_DOUBLE],
-[AC_CACHE_CHECK(
-   [for working long double with more range or precision than double],
-   [ac_cv_c_long_double],
-   [AC_COMPILE_IFELSE(
-      [AC_LANG_BOOL_COMPILE_TRY(
-        [[#include <float.h>
-          long double const a[] =
-            {
-               0.0L, DBL_MIN, DBL_MAX, DBL_EPSILON,
-               LDBL_MIN, LDBL_MAX, LDBL_EPSILON
-            };
-          long double
-          f (long double x)
-          {
-             return ((x + (unsigned long int) 10) * (-1 / x) + a[0]
-                      + (x ? f (x) : 'c'));
-          }
-        ]],
-        [[(0 < ((DBL_MAX_EXP < LDBL_MAX_EXP)
-                 + (DBL_MANT_DIG < LDBL_MANT_DIG)
-                 - (LDBL_MAX_EXP < DBL_MAX_EXP)
-                 - (LDBL_MANT_DIG < DBL_MANT_DIG)))
-          && (int) LDBL_EPSILON == 0
-         ]])],
-      ac_cv_c_long_double=yes,
-      ac_cv_c_long_double=no)])
-if test $ac_cv_c_long_double = yes; then
-  AC_DEFINE(HAVE_LONG_DOUBLE, 1,
-           [Define to 1 if long double works and has more range or precision 
than double.])
-fi
-])# AC_C_LONG_DOUBLE
-
-
 # AC_C_BIGENDIAN ([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN])
 # -------------------------------------------------------------------------
 AC_DEFUN([AC_C_BIGENDIAN],
Index: lib/autoconf/functions.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/functions.m4,v
retrieving revision 1.97
diff -p -b -w -u -r1.97 functions.m4
--- lib/autoconf/functions.m4   3 Apr 2006 03:18:39 -0000       1.97
+++ lib/autoconf/functions.m4   8 Apr 2006 21:43:17 -0000
@@ -75,12 +75,18 @@ AS_VAR_POPDEF([ac_var])dnl
 ])# AC_CHECK_FUNC
 
 
+# _AH_CHECK_FUNCS(FUNCTION...)
+# ----------------------------
+m4_define([_AH_CHECK_FUNCS],
+[m4_foreach_w([AC_Func], [$1],
+   [AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([AC_Func])),
+      [Define to 1 if you have the `]m4_defn([AC_Func])[' function.])])])
+
+
 # AC_CHECK_FUNCS(FUNCTION..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 # ---------------------------------------------------------------------
 AC_DEFUN([AC_CHECK_FUNCS],
-[m4_foreach_w([AC_Func], [$1],
-  [AH_TEMPLATE(AS_TR_CPP(HAVE_[]AC_Func),
-              [Define to 1 if you have the `]AC_Func[' function.])])dnl
+[_AH_CHECK_FUNCS([$1])dnl
 for ac_func in $1
 do
 AC_CHECK_FUNC($ac_func,
@@ -90,6 +96,26 @@ done
 ])
 
 
+# AC_CHECK_FUNCS_ONCE(FUNCTION...)
+# --------------------------------
+AC_DEFUN([AC_CHECK_FUNCS_ONCE],
+[
+  _AH_CHECK_FUNCS([$1])
+  m4_foreach_w([AC_Func], [$1],
+    [AC_DEFUN([_AC_Func_]m4_defn([AC_Func]),
+       [m4_divert_text([INIT_PREPARE],
+         [ac_func_list="$ac_func_list AC_Func"])
+       _AC_FUNCS_EXPANSION])
+     AC_REQUIRE([_AC_Func_]m4_defn([AC_Func]))])
+])
+m4_define([_AC_FUNCS_EXPANSION],
+[
+  m4_divert_text([DEFAULTS], [ac_func_list=])
+  AC_CHECK_FUNCS([$ac_func_list])
+  m4_define([_AC_FUNCS_EXPANSION], [])
+])
+
+
 # AC_REPLACE_FUNCS(FUNCTION...)
 # -----------------------------
 AC_DEFUN([AC_REPLACE_FUNCS],
@@ -1499,6 +1525,36 @@ fi
 ])
 
 
+# AC_FUNC_STRTOLD
+# ---------------
+AC_DEFUN([AC_FUNC_STRTOLD],
+[
+  AC_CACHE_CHECK([whether strtold conforms to C99],
+    [ac_cv_func_strtold],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+         [[/* On HP-UX before 11.23, strtold returns a struct instead of
+               long double.  Reject implementations like that, by requiring
+               compatibility with the C99 prototype.  */
+#           include <stdlib.h>
+            static long double (*p) (char const *, char **) = strtold;
+            static long double
+            test (char const *nptr, char **endptr)
+            {
+              long double r;
+              r = strtold (nptr, endptr);
+              return r;
+            }]],
+          [[return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;]])],
+       [ac_cv_func_strtold=yes],
+       [ac_cv_func_strtold=no])])
+  if test $ac_cv_func_strtold = yes; then
+    AC_DEFINE([HAVE_STRTOLD], 1,
+      [Define to 1 if strtold exists and conforms to C99.])
+  fi
+])# AC_FUNC_STRTOLD
+
+
 # AU::AM_FUNC_STRTOD
 # ------------------
 AU_ALIAS([AM_FUNC_STRTOD], [AC_FUNC_STRTOD])
@@ -1894,7 +1950,7 @@ AU_ALIAS([AC_VPRINTF], [AC_FUNC_VPRINTF]
 AN_FUNCTION([wait3], [AC_FUNC_WAIT3])
 AC_DEFUN([AC_FUNC_WAIT3],
 [AC_DIAGNOSE([obsolete],
-[$0: `wait3' is being removed from the Open Group standards.
+[$0: `wait3' has been removed from POSIX.
 Remove this `AC_FUNC_WAIT3' and adjust your code to use `waitpid' instead.])dnl
 AC_CACHE_CHECK([for wait3 that fills in rusage],
               [ac_cv_func_wait3_rusage],
Index: lib/autoconf/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v
retrieving revision 1.902
diff -p -b -w -u -r1.902 general.m4
--- lib/autoconf/general.m4     8 Apr 2006 17:59:57 -0000       1.902
+++ lib/autoconf/general.m4     8 Apr 2006 21:43:17 -0000
@@ -2490,6 +2490,18 @@ $3],
 ])# AC_CHECK_DECLS
 
 
+# AC_CHECK_DECLS_ONCE(SYMBOLS)
+# ----------------------------
+# Like AC_CHECK_DECLS(SYMBOLS), but do it at most once.
+AC_DEFUN([AC_CHECK_DECLS_ONCE],
+[
+  m4_foreach([AC_Symbol], [$1],
+    [AC_DEFUN([_AC_Check_Decl_]m4_defn([AC_Symbol]),
+       [AC_CHECK_DECLS(m4_defn([AC_Symbol]))])
+     AC_REQUIRE([_AC_Check_Decl_]m4_defn([AC_Symbol]))])
+])
+
+
 
 ## ---------------------------------- ##
 ## Replacement of library functions.  ##
@@ -2568,8 +2580,8 @@ AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
 ## ----------------------------------- ##
 
 
-# _AC_COMPUTE_INT_COMPILE(EXPRESSION, VARIABLE, [INCLUDES], [IF-FAILS])
-# ---------------------------------------------------------------------
+# _AC_COMPUTE_INT_COMPILE(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
+# -------------------------------------------------------------------
 # Compute the integer EXPRESSION and store the result in the VARIABLE.
 # Works OK if cross compiling, but assumes twos-complement arithmetic.
 m4_define([_AC_COMPUTE_INT_COMPILE],
@@ -2612,15 +2624,15 @@ esac[]dnl
 ])# _AC_COMPUTE_INT_COMPILE
 
 
-# _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, [INCLUDES], [IF-FAILS])
-# -----------------------------------------------------------------
+# _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
+# ---------------------------------------------------------------
 # Store the evaluation of the integer EXPRESSION in VARIABLE.
 m4_define([_AC_COMPUTE_INT_RUN],
 [_AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])],
                [$2=`cat conftest.val`], [$4])])
 
 
-# _AC_COMPUTE_INT(EXPRESSION, VARIABLE, INCLUDES, IF-FAILS)
+# _AC_COMPUTE_INT(EXPRESSION, VARIABLE, PROLOGUE, IF-FAILS)
 # ---------------------------------------------------------
 m4_define([_AC_COMPUTE_INT],
 [AC_LANG_COMPILER_REQUIRE()dnl
Index: lib/autoconf/headers.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/headers.m4,v
retrieving revision 1.47
diff -p -b -w -u -r1.47 headers.m4
--- lib/autoconf/headers.m4     4 Apr 2006 16:13:47 -0000       1.47
+++ lib/autoconf/headers.m4     8 Apr 2006 21:43:17 -0000
@@ -1,7 +1,7 @@
 # This file is part of Autoconf.                       -*- Autoconf -*-
 # Checking for headers.
 #
-# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006 Free Software
+# Copyright (C) 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software
 # Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -94,8 +94,8 @@ AC_DEFUN([AC_CHECK_HEADER],
 
 # _AC_CHECK_HEADER_MONGREL(HEADER-FILE,
 #                          [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#                          [INCLUDES])
-# --------------------------------------------------------------
+#                         [INCLUDES = DEFAULT-INCLUDES])
+# ------------------------------------------------------------------
 # Check using both the compiler and the preprocessor.  If they disagree,
 # warn, and the preproc wins.
 #
@@ -150,7 +150,7 @@ AS_VAR_POPDEF([ac_Header])dnl
 
 # _AC_CHECK_HEADER_NEW(HEADER-FILE,
 #                      [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#                      [INCLUDES])
+#                     [INCLUDES = DEFAULT-INCLUDES])
 # --------------------------------------------------------------
 # Check the compiler accepts HEADER-FILE.  The INCLUDES are defaulted.
 m4_define([_AC_CHECK_HEADER_NEW],
@@ -184,11 +184,11 @@ AS_VAR_POPDEF([ac_Header])dnl
 # --------------------------------
 m4_define([AH_CHECK_HEADERS],
 [m4_foreach_w([AC_Header], [$1],
-  [AH_TEMPLATE(AS_TR_CPP(HAVE_[]AC_Header),
-              [Define to 1 if you have the <]AC_Header[> header file.])])])
+  [AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([AC_Header])),
+     [Define to 1 if you have the <]m4_defn([AC_Header])[> header file.])])])
 
 
-# AC_CHECK_HEADERS(HEADER-FILE...
+# AC_CHECK_HEADERS(HEADER-FILE...,
 #                  [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
 #                  [INCLUDES])
 # ----------------------------------------------------------
@@ -204,6 +204,26 @@ done
 ])# AC_CHECK_HEADERS
 
 
+# AC_CHECK_HEADERS_ONCE(HEADER-FILE...)
+# -------------------------------------
+AC_DEFUN([AC_CHECK_HEADERS_ONCE],
+[
+  AH_CHECK_HEADERS([$1])
+  m4_foreach_w([AC_Header], [$1],
+    [AC_DEFUN([_AC_Header_]m4_quote(m4_translit(AC_Header, [./-], [___])),
+       [m4_divert_text([INIT_PREPARE],
+         [ac_header_list="$ac_header_list AC_Header"])
+       _AC_HEADERS_EXPANSION])
+     AC_REQUIRE([_AC_Header_]m4_quote(m4_translit(AC_Header, [./-], [___])))])
+])
+m4_define([_AC_HEADERS_EXPANSION],
+[
+  m4_divert_text([DEFAULTS], [ac_header_list=])
+  AC_CHECK_HEADERS([$ac_header_list])
+  m4_define([_AC_HEADERS_EXPANSION], [])
+])
+
+
 
 
 ## --------------------- ##
@@ -354,6 +374,19 @@ AN_HEADER([wctype.h],           [AC_CHEC
 ## 4. Tests for specific headers.  ##
 ## ------------------------------- ##
 
+# AC_HEADER_ASSERT
+# ----------------
+# Check whether to enable assertions.
+AC_DEFUN([AC_HEADER_ASSERT],
+[
+  AC_MSG_CHECKING([whether to enable assertions])
+  AC_ARG_ENABLE([assert],
+    [  --disable-assert        turn off assertions],
+    [AC_MSG_RESULT([no])
+     AC_DEFINE(NDEBUG, 1, [Define to 1 if assertions should be disabled.])],
+    [AC_MSG_RESULT(yes)])
+])
+
 
 # _AC_CHECK_HEADER_DIRENT(HEADER-FILE,
 #                         [ACTION-IF-FOUND], [ACTION-IF-NOT_FOUND])
@@ -526,22 +559,22 @@ AC_DEFUN([AC_HEADER_STDBOOL],
       [[
 #include <stdbool.h>
 #ifndef bool
-# error bool is not defined
+ "error: bool is not defined"
 #endif
 #ifndef false
-# error false is not defined
+ "error: false is not defined"
 #endif
 #if false
-# error false is not 0
+ "error: false is not 0"
 #endif
 #ifndef true
-# error true is not defined
+ "error: true is not defined"
 #endif
 #if true != 1
-# error true is not 1
+ "error: true is not 1"
 #endif
 #ifndef __bool_true_false_are_defined
-# error __bool_true_false_are_defined is not defined
+ "error: __bool_true_false_are_defined is not defined"
 #endif
 
        struct s { _Bool s: 1; _Bool t; } s;
@@ -558,10 +591,39 @@ AC_DEFUN([AC_HEADER_STDBOOL],
        enum { j = false, k = true, l = false * true, m = true * 256 };
        _Bool n[m];
        char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+       char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+#      if defined __xlc__ || defined __GNUC__
+        /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
+           reported by James Lemley on 2005-10-05; see
+           
http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
+           This test is not quite right, since xlc is allowed to
+           reject this program, as the initializer for xlcbug is
+           not one of the forms that C requires support for.
+           However, doing the test right would require a run-time
+           test, and that would make cross-compilation harder.
+           Let us hope that IBM fixes the xlc bug, and also adds
+           support for this kind of constant expression.  In the
+           meantime, this test will reject xlc, which is OK, since
+           our stdbool.h substitute should suffice.  We also test
+           this with GCC, where it should work, to detect more
+           quickly whether someone messes up the test in the
+           future.  */
+        char digs[] = "0123456789";
+        int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
+#      endif
+       /* Catch a bug in an HP-UX C compiler.  See
+          http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+          http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+        */
+       _Bool q = true;
+       _Bool *pq = &q;
       ]],
       [[
-        return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !j + !k + !l
-                + !m + !n + !o);
+       *pq |= q;
+       *pq |= ! q;
+       /* Refer to every declared value, to avoid compiler optimizations.  */
+       return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+               + !m + !n + !o + !p + !q + !pq);
       ]])],
       [ac_cv_header_stdbool_h=yes],
       [ac_cv_header_stdbool_h=no])])
Index: lib/autoconf/specific.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/specific.m4,v
retrieving revision 1.365
diff -p -b -w -u -r1.365 specific.m4
--- lib/autoconf/specific.m4    5 Apr 2006 20:55:14 -0000       1.365
+++ lib/autoconf/specific.m4    8 Apr 2006 21:43:17 -0000
@@ -125,7 +125,7 @@ m4_define([_AC_SYS_LARGEFILE_TEST_INCLUD
 # _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE,
 #                               CACHE-VAR,
 #                               DESCRIPTION,
-#                               [INCLUDES], [FUNCTION-BODY])
+#                              PROLOGUE, [FUNCTION-BODY])
 # ----------------------------------------------------------
 m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE],
 [AC_CACHE_CHECK([for $1 value needed for large files], [$3],
@@ -379,6 +379,41 @@ esac
 matches *mingw32*])# AC_MINGW32
 
 
+# AC_USE_SYSTEM_EXTENSIONS
+# ------------------------
+# Enable extensions on systems that normally disable them,
+# typically due to standards-conformance issues.
+AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
+[
+  AC_BEFORE([$0], [AC_COMPILE_IFELSE])
+  AC_BEFORE([$0], [AC_RUN_IFELSE])
+
+  AC_REQUIRE([AC_GNU_SOURCE])
+  AC_REQUIRE([AC_AIX])
+  AC_REQUIRE([AC_MINIX])
+
+  AH_VERBATIM([__EXTENSIONS__],
+[/* Enable extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif])
+  AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
+    [ac_cv_safe_to_define___extensions__],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM([
+#        define __EXTENSIONS__ 1
+         AC_INCLUDES_DEFAULT])],
+       [ac_cv_safe_to_define___extensions__=yes],
+       [ac_cv_safe_to_define___extensions__=no])])
+  test $ac_cv_safe_to_define___extensions__ = yes &&
+    AC_DEFINE([__EXTENSIONS__])
+  AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+])
+
+
 
 
 ## -------------------------- ##
Index: lib/autoconf/types.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/types.m4,v
retrieving revision 1.36
diff -p -b -w -u -r1.36 types.m4
--- lib/autoconf/types.m4       5 Apr 2006 20:55:14 -0000       1.36
+++ lib/autoconf/types.m4       8 Apr 2006 21:43:17 -0000
@@ -1,6 +1,8 @@
 # This file is part of Autoconf.                       -*- Autoconf -*-
 # Type related macros: existence, sizeof, and structure members.
-# Copyright (C) 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
+#
+# Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -66,7 +68,7 @@
 #
 #    AC_CHECK_TYPE(TYPE,
 #                 [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#                 [INCLUDES])
+#                 [INCLUDES = DEFAULT-INCLUDES])
 #
 # In order to provide backward compatibility, the new scheme is
 # implemented as _AC_CHECK_TYPE_NEW, the old scheme as _AC_CHECK_TYPE_OLD,
@@ -304,6 +306,204 @@ AU_DEFUN([AM_TYPE_PTRDIFF_T],
 [AC_CHECK_TYPES(ptrdiff_t)])
 
 
+# AC_TYPE_INTMAX_T
+# -----------------
+AC_DEFUN([AC_TYPE_INTMAX_T],
+[
+  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+  AC_CHECK_TYPE([intmax_t],
+    [AC_DEFINE([HAVE_INTMAX_T], 1,
+       [Define to 1 if the system has the type `intmax_t'.])],
+    [test $ac_cv_type_long_long_int = yes \
+       && ac_type='long long int' \
+       || ac_type='long int'
+     AC_DEFINE_UNQUOTED([intmax_t], [$ac_type],
+       [Define to the widest signed integer type
+       if <stdint.h> and <inttypes.h> do not define.])])
+])
+
+
+# AC_TYPE_UINTMAX_T
+# -----------------
+AC_DEFUN([AC_TYPE_UINTMAX_T],
+[
+  AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+  AC_CHECK_TYPE([uintmax_t],
+    [AC_DEFINE([HAVE_UINTMAX_T], 1,
+       [Define to 1 if the system has the type `uintmax_t'.])],
+    [test $ac_cv_type_unsigned_long_long_int = yes \
+       && ac_type='unsigned long long int' \
+       || ac_type='unsigned long int'
+     AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type],
+       [Define to the widest unsigned integer type
+       if <stdint.h> and <inttypes.h> do not define.])])
+])
+
+
+# AC_TYPE_INTPTR_T
+# -----------------
+AC_DEFUN([AC_TYPE_INTPTR_T],
+[
+  AC_CHECK_TYPE([intptr_t],
+    [AC_DEFINE([HAVE_INTPTR_T], 1,
+       [Define to 1 if the system has the type `intptr_t'.])],
+    [for ac_type in 'int' 'long int' 'long long int'; do
+       AC_COMPILE_IFELSE(
+        [AC_LANG_BOOL_COMPILE_TRY(
+           [AC_INCLUDES_DEFAULT],
+           [[sizeof (void *) <= sizeof ($ac_type)]])],
+        [AC_DEFINE_UNQUOTED([intptr_t], [$ac_type],
+           [Define to the type of a signed integer type wide enough to
+            hold a pointer, if such a type exists, and if the system
+            does not define it.])
+         ac_type=])
+       test -z "$ac_type" && break
+     done])
+])
+
+
+# AC_TYPE_UINTPTR_T
+# -----------------
+AC_DEFUN([AC_TYPE_UINTPTR_T],
+[
+  AC_CHECK_TYPE([uintptr_t],
+    [AC_DEFINE([HAVE_UINTPTR_T], 1,
+       [Define to 1 if the system has the type `uintptr_t'.])],
+    [for ac_type in 'unsigned int' 'unsigned long int' \
+       'unsigned long long int'; do
+       AC_COMPILE_IFELSE(
+        [AC_LANG_BOOL_COMPILE_TRY(
+           [AC_INCLUDES_DEFAULT],
+           [[sizeof (void *) <= sizeof ($ac_type)]])],
+        [AC_DEFINE_UNQUOTED([uintptr_t], [$ac_type],
+           [Define to the type of an unsigned integer type wide enough to
+            hold a pointer, if such a type exists, and if the system
+            does not define it.])
+         ac_type=])
+       test -z "$ac_type" && break
+     done])
+])
+
+
+# AC_TYPE_LONG_DOUBLE
+# -------------------
+AC_DEFUN([AC_TYPE_LONG_DOUBLE],
+[
+  AC_CACHE_CHECK([for long double], [ac_cv_type_long_double],
+    [if test "$GCC" = yes; then
+       ac_cv_type_long_double=yes
+     else
+       AC_COMPILE_IFELSE(
+        [AC_LANG_BOOL_COMPILE_TRY(
+           [[/* The Stardent Vistra knows sizeof (long double), but does
+                not support it.  */
+             long double foo = 0.0L;]],
+           [[/* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
+             sizeof (double) <= sizeof (long double)]])],
+        [ac_cv_type_long_double=yes],
+        [ac_cv_type_long_double=no])
+     fi])
+  if test $ac_cv_type_long_double = yes; then
+    AC_DEFINE([HAVE_LONG_DOUBLE], 1,
+      [Define to 1 if the system has the type `long double'.])
+  fi
+])
+
+
+# AC_TYPE_LONG_DOUBLE_WIDER
+# -------------------------
+AC_DEFUN([AC_TYPE_LONG_DOUBLE_WIDER],
+[
+  AC_CACHE_CHECK(
+    [for long double with more range or precision than double],
+    [ac_cv_type_long_double_wider],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_BOOL_COMPILE_TRY(
+         [[#include <float.h>
+           long double const a[] =
+             {
+                0.0L, DBL_MIN, DBL_MAX, DBL_EPSILON,
+                LDBL_MIN, LDBL_MAX, LDBL_EPSILON
+             };
+           long double
+           f (long double x)
+           {
+              return ((x + (unsigned long int) 10) * (-1 / x) + a[0]
+                       + (x ? f (x) : 'c'));
+           }
+         ]],
+         [[(0 < ((DBL_MAX_EXP < LDBL_MAX_EXP)
+                  + (DBL_MANT_DIG < LDBL_MANT_DIG)
+                  - (LDBL_MAX_EXP < DBL_MAX_EXP)
+                  - (LDBL_MANT_DIG < DBL_MANT_DIG)))
+           && (int) LDBL_EPSILON == 0
+         ]])],
+       ac_cv_type_long_double_wider=yes,
+       ac_cv_type_long_double_wider=no)])
+  if test $ac_cv_type_long_double_wider = yes; then
+    AC_DEFINE([HAVE_LONG_DOUBLE_WIDER], 1,
+      [Define to 1 if the type `long double' works and has more range or
+       precision than `double'.])
+  fi
+])# AC_TYPE_LONG_DOUBLE_WIDER
+
+
+# AC_C_LONG_DOUBLE
+# ----------------
+AU_DEFUN([AC_C_LONG_DOUBLE],
+  [
+    AC_TYPE_LONG_DOUBLE_WIDER
+    ac_cv_c_long_double=$ac_cv_type_long_double_wider
+    if test $ac_cv_c_long_double = yes; then
+      AC_DEFINE([HAVE_LONG_DOUBLE], 1,
+       [Define to 1 if the type `long double' works and has more range or
+        precision than `double'.])
+    fi
+  ],
+  [The macro `AC_C_LONG_DOUBLE' is obsolete.
+You should use `AC_TYPE_LONG_DOUBLE' or `AC_TYPE_LONG_DOUBLE_WIDER' instead.]
+)
+
+
+# AC_TYPE_LONG_LONG_INT
+# ---------------------
+AC_DEFUN([AC_TYPE_LONG_LONG_INT],
+[
+  AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
+    [AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+         [long long int ll = 1LL; int i = 63;],
+         [long long int llmax = (long long int) -1;
+          return ll << i | ll >> i | llmax / ll | llmax % ll;])],
+       [ac_cv_type_long_long_int=yes],
+       [ac_cv_type_long_long_int=no])])
+  if test $ac_cv_type_long_long_int = yes; then
+    AC_DEFINE([HAVE_LONG_LONG_INT], 1,
+      [Define to 1 if the system has the type `long long int'.])
+  fi
+])
+
+
+# AC_TYPE_UNSIGNED_LONG_LONG_INT
+# ------------------------------
+AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
+[
+  AC_CACHE_CHECK([for unsigned long long int],
+    [ac_cv_type_unsigned_long_long_int],
+    [AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+         [unsigned long long int ull = 1ULL; int i = 63;],
+         [unsigned long long int ullmax = (unsigned long long int) -1;
+          return ull << i | ull >> i | ullmax / ull | ullmax % ull;])],
+       [ac_cv_type_unsigned_long_long_int=yes],
+       [ac_cv_type_unsigned_long_long_int=no])])
+  if test $ac_cv_type_unsigned_long_long_int = yes; then
+    AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], 1,
+      [Define to 1 if the system has the type `unsigned long long int'.])
+  fi
+])
+
+
 # AC_TYPE_MBSTATE_T
 # -----------------
 AC_DEFUN([AC_TYPE_MBSTATE_T],
@@ -343,6 +543,9 @@ fi
 AN_IDENTIFIER([size_t], [AC_TYPE_SIZE_T])
 AC_DEFUN([AC_TYPE_SIZE_T], [AC_CHECK_TYPE(size_t, unsigned int)])
 
+AN_IDENTIFIER([ssize_t], [AC_TYPE_SSIZE_T])
+AC_DEFUN([AC_TYPE_SSIZE_T], [AC_CHECK_TYPE(ssize_t, int)])
+
 AN_IDENTIFIER([pid_t], [AC_TYPE_PID_T])
 AC_DEFUN([AC_TYPE_PID_T],  [AC_CHECK_TYPE(pid_t,  int)])
 
@@ -352,6 +555,82 @@ AC_DEFUN([AC_TYPE_OFF_T],  [AC_CHECK_TYP
 AN_IDENTIFIER([mode_t], [AC_TYPE_MODE_T])
 AC_DEFUN([AC_TYPE_MODE_T], [AC_CHECK_TYPE(mode_t, int)])
 
+AN_IDENTIFIER([int8_t], [AC_TYPE_INT8_T])
+AN_IDENTIFIER([int16_t], [AC_TYPE_INT16_T])
+AN_IDENTIFIER([int32_t], [AC_TYPE_INT32_T])
+AN_IDENTIFIER([int64_t], [AC_TYPE_INT64_T])
+AN_IDENTIFIER([uint8_t], [AC_TYPE_UINT8_T])
+AN_IDENTIFIER([uint16_t], [AC_TYPE_UINT16_T])
+AN_IDENTIFIER([uint32_t], [AC_TYPE_UINT32_T])
+AN_IDENTIFIER([uint64_t], [AC_TYPE_UINT64_T])
+AC_DEFUN([AC_TYPE_INT8_T], [_AC_TYPE_INT(8)])
+AC_DEFUN([AC_TYPE_INT16_T], [_AC_TYPE_INT(16)])
+AC_DEFUN([AC_TYPE_INT32_T], [_AC_TYPE_INT(32)])
+AC_DEFUN([AC_TYPE_INT64_T], [_AC_TYPE_INT(64)])
+AC_DEFUN([AC_TYPE_UINT8_T], [_AC_TYPE_UNSIGNED_INT(8)])
+AC_DEFUN([AC_TYPE_UINT16_T], [_AC_TYPE_UNSIGNED_INT(16)])
+AC_DEFUN([AC_TYPE_UINT32_T], [_AC_TYPE_UNSIGNED_INT(32)])
+AC_DEFUN([AC_TYPE_UINT64_T], [_AC_TYPE_UNSIGNED_INT(64)])
+
+# _AC_TYPE_INT(NBITS)
+# -------------------
+AC_DEFUN([_AC_TYPE_INT],
+[
+  AC_CACHE_CHECK([for int$1_t], [ac_cv_c_int$1_t],
+    [ac_cv_c_int$1_t=no
+     for ac_type in 'int$1_t' 'int' 'long int' \
+        'long long int' 'short int' 'signed char'; do
+       AC_COMPILE_IFELSE(
+        [AC_LANG_BOOL_COMPILE_TRY(
+           [AC_INCLUDES_DEFAULT],
+           [[0 < ($ac_type) (((($ac_type) 1 << ($1 - 2)) - 1) * 2 + 1)]])],
+        [AC_COMPILE_IFELSE(
+           [AC_LANG_BOOL_COMPILE_TRY(
+              [AC_INCLUDES_DEFAULT],
+              [[($ac_type) (((($ac_type) 1 << ($1 - 2)) - 1) * 2 + 1)
+                < ($ac_type) (((($ac_type) 1 << ($1 - 2)) - 1) * 2 + 2)]])],
+           [],
+           [ac_cv_c_int$1_t=$ac_type])])
+       test "$ac_cv_c_int$1_t" != no && break
+     done])
+  case $ac_cv_c_int$1_t in #(
+  no|int$1_t) ;; #(
+  *)
+    AC_DEFINE_UNQUOTED([int$1_t], [$ac_cv_c_int$1_t],
+      [Define to the type of a signed integer type of width exactly $1 bits
+       if such a type exists and the standard includes do not define it.]);;
+  esac
+])# _AC_TYPE_INT
+
+# _AC_TYPE_UNSIGNED_INT(NBITS)
+# ----------------------------
+AC_DEFUN([_AC_TYPE_UNSIGNED_INT],
+[
+  AC_CACHE_CHECK([for uint$1_t], [ac_cv_c_uint$1_t],
+    [ac_cv_c_uint$1_t=no
+     for ac_type in 'uint$1_t' 'unsigned int' 'unsigned long int' \
+        'unsigned long long int' 'unsigned short int' 'unsigned char'; do
+       AC_COMPILE_IFELSE(
+        [AC_LANG_BOOL_COMPILE_TRY(
+           [AC_INCLUDES_DEFAULT],
+           [[($ac_type) -1 >> ($1 - 1) == 1]])],
+        [ac_cv_c_uint$1_t=$ac_type])
+       test "$ac_cv_c_uint$1_t" != no && break
+     done])
+  case $ac_cv_c_uint$1_t in #(
+  no|uint$1_t) ;; #(
+  *)
+    m4_if([$1], 32,
+      [AC_DEFINE([_UINT$1_T], 1,
+        [Define for Solaris 2.5.1 so the uint$1_t typedef from
+         <sys/synch.h>, <pthread.h>, or <semaphore.h> is not used.
+         If the typedef was allowed, the #define below would cause a
+         syntax error.])])
+    AC_DEFINE_UNQUOTED([uint$1_t], [$ac_cv_c_uint$1_t],
+      [Define to the type of an unsigned integer type of width exactly $1 bits
+       if such a type exists and the standard includes do not define it.]);;
+  esac
+])# _AC_TYPE_UNSIGNED_INT
 
 # AC_TYPE_SIGNAL
 # --------------
@@ -470,7 +749,7 @@ you adjust the code.])
 
 # AC_CHECK_MEMBER(AGGREGATE.MEMBER,
 #                 [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#                 [INCLUDES])
+#                [INCLUDES = DEFAULT-INCLUDES])
 # ---------------------------------------------------------
 # AGGREGATE.MEMBER is for instance `struct passwd.pw_gecos', shell
 # variables are not a valid argument.
@@ -504,7 +783,7 @@ AS_VAR_POPDEF([ac_Member])dnl
 
 # AC_CHECK_MEMBERS([AGGREGATE.MEMBER, ...],
 #                  [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]
-#                  [INCLUDES])
+#                 [INCLUDES = DEFAULT-INCLUDES])
 # ---------------------------------------------------------
 # The first argument is an m4 list.
 AC_DEFUN([AC_CHECK_MEMBERS],
@@ -530,6 +809,40 @@ AN_IDENTIFIER([st_rdev],    [AC_CHECK_ME
 
 # Alphabetic order, please.
 
+# _AC_STRUCT_DIRENT(MEMBER)
+# -------------------------
+AC_DEFUN([_AC_STRUCT_DIRENT],
+[
+  AC_REQUIRE([AC_HEADER_DIRENT])
+  AC_CHECK_MEMBERS([struct dirent.$1], [], [],
+    [[
+#include <sys/types.h>
+#ifdef HAVE_DIRENT_H
+# include <dirent.h>
+#else
+# define dirent direct
+# ifdef HAVE_SYS_NDIR_H
+#  include <sys/ndir.h>
+# endif
+# ifdef HAVE_SYS_DIR_H
+#  include <sys/dir.h>
+# endif
+# ifdef HAVE_NDIR_H
+#  include <ndir.h>
+# endif
+#endif
+    ]])
+])
+
+# AC_STRUCT_DIRENT_D_INO
+# -----------------------------------
+AC_DEFUN([AC_STRUCT_DIRENT_D_INO], [_AC_STRUCT_DIRENT([d_ino])])
+
+# AC_STRUCT_DIRENT_D_TYPE
+# ------------------------------------
+AC_DEFUN([AC_STRUCT_DIRENT_D_TYPE], [_AC_STRUCT_DIRENT([d_type])])
+
+
 # AC_STRUCT_ST_BLKSIZE
 # --------------------
 AU_DEFUN([AC_STRUCT_ST_BLKSIZE],




reply via email to

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