mirror of
git://git.sv.gnu.org/autoconf
synced 2025-01-30 11:01:45 +08:00
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.
This commit is contained in:
parent
93324439eb
commit
309a01c200
62
ChangeLog
62
ChangeLog
@ -1,3 +1,65 @@
|
||||
2006-04-08 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
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.
|
||||
|
||||
* tests/mktests.sh (ac_exclude_list): Fix some typos in
|
||||
recent changes: awk wants /^(a|b)$/, not /^a|b$/.
|
||||
|
||||
2006-04-08 Stepan Kasal <kasal@ucw.cz>
|
||||
|
||||
* lib/autoconf/general.m4 (_AC_INIT_PREPARE): Fix the wording
|
||||
|
29
NEWS
29
NEWS
@ -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.
|
||||
|
||||
|
@ -279,6 +279,7 @@ published by the Free Software Foundation raise funds for
|
||||
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 your software.
|
||||
|
||||
@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 larger packages (especially ones
|
||||
with subdirectories), but even for small programs the added convenience
|
||||
and portability can be substantial. And that's not all@enddots{}
|
||||
|
||||
@node Gnulib
|
||||
@section Gnulib
|
||||
|
||||
@acronym{GNU} 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.
|
||||
|
||||
@cindex 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}
|
||||
@acronym{GPL} 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
|
||||
@code{stdbool} 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},
|
||||
@uref{http://www.gnu.org/software/automake/, Automake}, and
|
||||
@uref{http://www.gnu.org/software/automake/, Automake},
|
||||
@uref{http://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 and works correctly, define
|
||||
definitions of @code{strcoll} that should not be used.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_FUNC_STRTOD
|
||||
@acindex{FUNC_STRTOD}
|
||||
@ovindex POW_LIB
|
||||
@c @fuindex strtod
|
||||
@prindex @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.
|
||||
@end 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{intl} library, for SCO Unix.
|
||||
Then, if @code{strftime} is available, define @code{HAVE_STRFTIME}.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_FUNC_STRTOD
|
||||
@acindex{FUNC_STRTOD}
|
||||
@ovindex POW_LIB
|
||||
@c @fuindex strtod
|
||||
@prindex @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.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_FUNC_STRTOLD
|
||||
@acindex{FUNC_STRTOLD}
|
||||
@prindex @code{strtold}
|
||||
If the @code{strtold} function exists and conforms to C99, define
|
||||
@code{HAVE_STRTOLD}.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_FUNC_STRNLEN
|
||||
@acindex{FUNC_STRNLEN}
|
||||
@cvindex HAVE_STRNLEN
|
||||
@ -4657,6 +4693,17 @@ execute when one of the functions is found. You can give it a value of
|
||||
functions is not found.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_CHECK_FUNCS_ONCE (@var{function}@dots{})
|
||||
@acindex{CHECK_FUNCS_ONCE}
|
||||
@cvindex HAVE_@var{function}
|
||||
For each @var{function} enumerated in the blank-or-newline-separated argument
|
||||
list, define @code{HAVE_@var{function}} (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.
|
||||
@end defmac
|
||||
|
||||
@sp 1
|
||||
|
||||
Autoconf follows a philosophy that was formed over the years by those
|
||||
@ -4666,10 +4713,7 @@ environment. Some functions may be missing or unfixable, and your
|
||||
package must be ready to replace them.
|
||||
|
||||
Suitable replacements for many such problem functions are available from
|
||||
@uref{http://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, this list will always require
|
||||
additions. Please help us keeping it as complete as possible.
|
||||
|
||||
@table @asis
|
||||
|
||||
@item @file{limits.h}
|
||||
C99 says that @file{limits.h} defines @code{LLONG_MIN},
|
||||
@code{LLONG_MAX}, 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/scrnsaver.h], [], [],
|
||||
These macros check for particular system header files---whether they
|
||||
exist, and in some cases whether they declare certain symbols.
|
||||
|
||||
@defmac AC_HEADER_ASSERT
|
||||
@acindex{HEADER_ASSERT}
|
||||
@cvindex NDEBUG
|
||||
@hdrindex{assert.h}
|
||||
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.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_HEADER_DIRENT
|
||||
@acindex{HEADER_DIRENT}
|
||||
@cvindex HAVE_DIRENT_H
|
||||
@ -4940,6 +4999,9 @@ the length of a directory entry name by passing a pointer to a
|
||||
@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
|
||||
@code{AC_STRUCT_DIRENT_D_TYPE} (@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 conformant to C99, define
|
||||
# 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.
|
||||
|
||||
@verbatim
|
||||
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
|
||||
@end 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}.
|
||||
|
||||
@defmac AC_CHECK_HEADERS_ONCE (@var{header-file}@dots{})
|
||||
@acindex{CHECK_HEADERS_ONCE}
|
||||
@cvindex HAVE_@var{header}
|
||||
For each given system header file @var{header-file} in the
|
||||
blank-separated argument list that exists, define
|
||||
@code{HAVE_@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.
|
||||
@end defmac
|
||||
|
||||
@node Declarations
|
||||
@section Declarations
|
||||
@cindex Declaration, checking
|
||||
@ -5384,6 +5434,18 @@ your files may be used without being configured, or they are used during
|
||||
the configuration. In most cases the traditional approach is enough.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_CHECK_DECLS_ONCE (@var{symbols})
|
||||
@acindex{CHECK_DECLS_ONCE}
|
||||
@cvindex HAVE_DECL_@var{symbol}
|
||||
For each of the @var{symbols} (@emph{comma}-separated list), define
|
||||
@code{HAVE_DECL_@var{symbol}} (in all capitals) to @samp{1} if
|
||||
@var{symbol} is declared in the default include files, otherwise to
|
||||
@samp{0}. 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.
|
||||
@end defmac
|
||||
|
||||
|
||||
@node Structures
|
||||
@section Structures
|
||||
@ -5405,6 +5467,28 @@ member you need, then you can use the general structure-member macros
|
||||
|
||||
The following macros check for certain structures or structure members.
|
||||
|
||||
@defmac AC_STRUCT_DIRENT_D_INO
|
||||
@acindex{STRUCT_DIRENT_D_INO}
|
||||
@cvindex 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}.
|
||||
|
||||
@code{HAVE_STRUCT_DIRENT_D_INO} indicates only the presence of
|
||||
@code{d_ino}, 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.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_STRUCT_DIRENT_D_TYPE
|
||||
@acindex{STRUCT_DIRENT_D_TYPE}
|
||||
@cvindex 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}.
|
||||
@end 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}
|
||||
@hdrindex{stdint.h}
|
||||
@hdrindex{inttypes.h}
|
||||
These macros check for particular C types in @file{sys/types.h},
|
||||
@file{stdlib.h} and others, if they exist.
|
||||
@file{stdlib.h}, @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 whichever of @code{gid_t} or @code{int}
|
||||
is the base type of the array argument to @code{getgroups}.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_TYPE_INT8_T
|
||||
@acindex{TYPE_INT8_T}
|
||||
@cvindex HAVE_INT8_T
|
||||
@cvindex 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.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_TYPE_INT16_T
|
||||
@acindex{TYPE_INT16_T}
|
||||
@cvindex HAVE_INT16_T
|
||||
@cvindex int16_t
|
||||
This is like @code{AC_TYPE_INT8_T}, except for 16-bit integers.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_TYPE_INT32_T
|
||||
@acindex{TYPE_INT32_T}
|
||||
@cvindex HAVE_INT32_T
|
||||
@cvindex int32_t
|
||||
This is like @code{AC_TYPE_INT8_T}, except for 32-bit integers.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_TYPE_INT64_T
|
||||
@acindex{TYPE_INT64_T}
|
||||
@cvindex HAVE_INT64_T
|
||||
@cvindex int64_t
|
||||
This is like @code{AC_TYPE_INT8_T}, except for 64-bit integers.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_TYPE_INTMAX_T
|
||||
@acindex{TYPE_INTMAX_T}
|
||||
@cvindex HAVE_INTMAX_T
|
||||
@cvindex 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.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_TYPE_INTPTR_T
|
||||
@acindex{TYPE_INTPTR_T}
|
||||
@cvindex HAVE_INTPTR_T
|
||||
@cvindex 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.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_TYPE_LONG_DOUBLE
|
||||
@acindex{TYPE_LONG_DOUBLE}
|
||||
@cvindex HAVE_LONG_DOUBLE
|
||||
If the C compiler supports a working @code{long double} type, define
|
||||
@code{HAVE_LONG_DOUBLE}. The @code{long double} type might have the
|
||||
same range and precision as @code{double}.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_TYPE_LONG_DOUBLE_WIDER
|
||||
@acindex{TYPE_LONG_DOUBLE_WIDER}
|
||||
@cvindex 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
|
||||
@code{HAVE_LONG_DOUBLE_WIDER}.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_TYPE_LONG_LONG_INT
|
||||
@acindex{TYPE_LONG_LONG_INT}
|
||||
@cvindex HAVE_LONG_LONG_INT
|
||||
If the C compiler supports a working @code{long long int} type, define
|
||||
@code{HAVE_LONG_LONG_INT}.
|
||||
@end 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
|
||||
|
||||
@defmac AC_TYPE_SSIZE_T
|
||||
@acindex{TYPE_SSIZE_T}
|
||||
@cvindex ssize_t
|
||||
Equivalent to @samp{AC_CHECK_TYPE([ssize_t], [int])}.
|
||||
@end 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{uid_t} to be @code{int} and
|
||||
@code{gid_t} to be @code{int}.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_TYPE_UINT8_T
|
||||
@acindex{TYPE_UINT8_T}
|
||||
@cvindex HAVE_UINT8_T
|
||||
@cvindex 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.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_TYPE_UINT16_T
|
||||
@acindex{TYPE_UINT16_T}
|
||||
@cvindex HAVE_UINT16_T
|
||||
@cvindex uint16_t
|
||||
This is like @code{AC_TYPE_UINT8_T}, except for 16-bit unsigned integers.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_TYPE_UINT32_T
|
||||
@acindex{TYPE_UINT32_T}
|
||||
@cvindex HAVE_UINT32_T
|
||||
@cvindex uint32_t
|
||||
This is like @code{AC_TYPE_UINT8_T}, except for 32-bit unsigned integers.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_TYPE_UINT64_T
|
||||
@acindex{TYPE_UINT64_T}
|
||||
@cvindex HAVE_UINT64_T
|
||||
@cvindex uint64_t
|
||||
This is like @code{AC_TYPE_UINT8_T}, except for 64-bit unsigned integers.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_TYPE_UINTMAX_T
|
||||
@acindex{TYPE_UINTMAX_T}
|
||||
@cvindex HAVE_UINTMAX_T
|
||||
@cvindex 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.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_TYPE_UINTPTR_T
|
||||
@acindex{TYPE_UINTPTR_T}
|
||||
@cvindex HAVE_UINTPTR_T
|
||||
@cvindex 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.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_TYPE_UNSIGNED_LONG_LONG_INT
|
||||
@acindex{TYPE_UNSIGNED_LONG_LONG_INT}
|
||||
@cvindex 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}.
|
||||
@end defmac
|
||||
|
||||
@node Generic Types
|
||||
@subsection Generic Type Checks
|
||||
|
||||
@ -6045,14 +6272,6 @@ If the C type @code{char} is unsigned, define @code{__CHAR_UNSIGNED__},
|
||||
unless the C compiler predefines it.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_C_LONG_DOUBLE
|
||||
@acindex{C_LONG_DOUBLE}
|
||||
@cvindex 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
|
||||
@code{HAVE_LONG_DOUBLE}.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_C_STRINGIZE
|
||||
@acindex{C_STRINGIZE}
|
||||
@cvindex HAVE_STRINGIZE
|
||||
@ -6749,6 +6968,23 @@ If on Minix, define @code{_MINIX} and @code{_POSIX_SOURCE} and define
|
||||
facilities. Should be called before any macros that run the C compiler.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_USE_SYSTEM_EXTENSIONS
|
||||
@acindex{USE_SYSTEM_EXTENSIONS}
|
||||
@cvindex _ALL_SOURCE
|
||||
@cvindex _GNU_SOURCE
|
||||
@cvindex _MINIX
|
||||
@cvindex _POSIX_1_SOURCE
|
||||
@cvindex _POSIX_PTHREAD_SEMANTICS
|
||||
@cvindex _POSIX_SOURCE
|
||||
@cvindex __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
|
||||
@code{_POSIX_PTHREAD_SEMANTICS}, which are macros used by Solaris. This
|
||||
macro also has the combined effects of @code{AC_GNU_SOURCE},
|
||||
@code{AC_AIX}, and @code{AC_MINIX}.
|
||||
@end defmac
|
||||
|
||||
|
||||
@node Erlang Libraries
|
||||
@section Erlang Libraries
|
||||
@ -10004,8 +10240,8 @@ by setting @code{AC_SUBST_@var{symbol}}, which is a regular macro name.
|
||||
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).
|
||||
@c 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
|
||||
|
||||
@defmac AC_C_LONG_DOUBLE
|
||||
@acindex{C_LONG_DOUBLE}
|
||||
@cvindex 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
|
||||
@code{HAVE_LONG_DOUBLE}.
|
||||
|
||||
You should use @code{AC_TYPE_LONG_DOUBLE} or
|
||||
@code{AC_TYPE_LONG_DOUBLE_WIDER} instead. @xref{Particular Types}.
|
||||
@end 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_SIZEOF([long int])} instead.
|
||||
|
||||
@defmac AC_LONG_DOUBLE
|
||||
@acindex{LONG_DOUBLE}
|
||||
@code{AC_C_LONG_DOUBLE}
|
||||
If the C compiler supports a working @code{long double} type with more
|
||||
range or precision than the @code{double} type, define
|
||||
@code{HAVE_LONG_DOUBLE}.
|
||||
|
||||
You should use @code{AC_TYPE_LONG_DOUBLE} or
|
||||
@code{AC_TYPE_LONG_DOUBLE_WIDER} instead. @xref{Particular Types}.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_LONG_FILE_NAMES
|
||||
|
@ -1,4 +1,4 @@
|
||||
# This file is part of Autoconf. -*- Autoconf -*-
|
||||
# This file is part of Autoconf. -*- Autoconf -*-
|
||||
# Programming languages support.
|
||||
# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
|
||||
# Foundation, Inc.
|
||||
@ -574,8 +574,8 @@ AC_CACHE_CHECK(whether $CC accepts -g, ac_cv_prog_cc_g,
|
||||
[ac_cv_prog_cc_g=yes],
|
||||
[CFLAGS=""
|
||||
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||
[],
|
||||
[ac_c_werror_flag=$ac_save_c_werror_flag
|
||||
[],
|
||||
[ac_c_werror_flag=$ac_save_c_werror_flag
|
||||
CFLAGS="-g"
|
||||
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||
[ac_cv_prog_cc_g=yes])])])
|
||||
@ -800,8 +800,8 @@ AC_CACHE_CHECK(whether $CXX accepts -g, ac_cv_prog_cxx_g,
|
||||
[ac_cv_prog_cxx_g=yes],
|
||||
[CXXFLAGS=""
|
||||
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||
[],
|
||||
[ac_cxx_werror_flag=$ac_save_cxx_werror_flag
|
||||
[],
|
||||
[ac_cxx_werror_flag=$ac_save_cxx_werror_flag
|
||||
CXXFLAGS="-g"
|
||||
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||
[ac_cv_prog_cxx_g=yes])])])
|
||||
@ -931,8 +931,8 @@ AC_CACHE_CHECK(whether $OBJC accepts -g, ac_cv_prog_objc_g,
|
||||
[ac_cv_prog_objc_g=yes],
|
||||
[OBJCFLAGS=""
|
||||
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||
[],
|
||||
[ac_objc_werror_flag=$ac_save_objc_werror_flag
|
||||
[],
|
||||
[ac_objc_werror_flag=$ac_save_objc_werror_flag
|
||||
OBJCFLAGS="-g"
|
||||
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||
[ac_cv_prog_objc_g=yes])])])
|
||||
@ -1219,9 +1219,9 @@ AC_DEFUN([AC_PROG_CC_STDC],
|
||||
;;
|
||||
*)
|
||||
if test "x$ac_cv_prog_cc_stdc" = x; then
|
||||
AC_MSG_RESULT([none needed])
|
||||
AC_MSG_RESULT([none needed])
|
||||
else
|
||||
AC_MSG_RESULT([$ac_cv_prog_cc_stdc])
|
||||
AC_MSG_RESULT([$ac_cv_prog_cc_stdc])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@ -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],
|
||||
|
@ -1,4 +1,4 @@
|
||||
# This file is part of Autoconf. -*- Autoconf -*-
|
||||
# This file is part of Autoconf. -*- Autoconf -*-
|
||||
# Checking for functions.
|
||||
# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
|
||||
# Foundation, Inc.
|
||||
@ -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],
|
||||
|
@ -561,8 +561,8 @@ AC_SUBST([localstatedir], ['${prefix}/var'])dnl
|
||||
AC_SUBST([includedir], ['${prefix}/include'])dnl
|
||||
AC_SUBST([oldincludedir], ['/usr/include'])dnl
|
||||
AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
|
||||
['${datarootdir}/doc/${PACKAGE_TARNAME}'],
|
||||
['${datarootdir}/doc/${PACKAGE}'])])dnl
|
||||
['${datarootdir}/doc/${PACKAGE_TARNAME}'],
|
||||
['${datarootdir}/doc/${PACKAGE}'])])dnl
|
||||
AC_SUBST([infodir], ['${datarootdir}/info'])dnl
|
||||
AC_SUBST([htmldir], ['${docdir}'])dnl
|
||||
AC_SUBST([dvidir], ['${docdir}'])dnl
|
||||
@ -1644,7 +1644,7 @@ test -d "$ac_macro_dir" ||
|
||||
# It announces FILE is required in the auxdir.
|
||||
m4_define([AC_REQUIRE_AUX_FILE],
|
||||
[AS_LITERAL_IF([$1], [],
|
||||
[AC_FATAL([$0: requires a literal argument])])])
|
||||
[AC_FATAL([$0: requires a literal argument])])])
|
||||
|
||||
|
||||
|
||||
@ -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
|
||||
|
@ -1,7 +1,7 @@
|
||||
# This file is part of Autoconf. -*- Autoconf -*-
|
||||
# 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
|
||||
@ -65,8 +65,8 @@
|
||||
|
||||
|
||||
# AC_CHECK_HEADER(HEADER-FILE,
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
||||
# [INCLUDES])
|
||||
# [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
|
||||
@ -93,9 +93,9 @@ AC_DEFUN([AC_CHECK_HEADER],
|
||||
|
||||
|
||||
# _AC_CHECK_HEADER_MONGREL(HEADER-FILE,
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
||||
# [INCLUDES])
|
||||
# --------------------------------------------------------------
|
||||
# [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.
|
||||
#
|
||||
@ -149,8 +149,8 @@ AS_VAR_POPDEF([ac_Header])dnl
|
||||
|
||||
|
||||
# _AC_CHECK_HEADER_NEW(HEADER-FILE,
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
||||
# [INCLUDES])
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
||||
# [INCLUDES = DEFAULT-INCLUDES])
|
||||
# --------------------------------------------------------------
|
||||
# Check the compiler accepts HEADER-FILE. The INCLUDES are defaulted.
|
||||
m4_define([_AC_CHECK_HEADER_NEW],
|
||||
@ -166,7 +166,7 @@ AS_VAR_POPDEF([ac_Header])dnl
|
||||
|
||||
|
||||
# _AC_CHECK_HEADER_OLD(HEADER-FILE,
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
# --------------------------------------------------------------
|
||||
# Check the preprocessor accepts HEADER-FILE.
|
||||
m4_define([_AC_CHECK_HEADER_OLD],
|
||||
@ -184,13 +184,13 @@ 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...
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
||||
# [INCLUDES])
|
||||
# AC_CHECK_HEADERS(HEADER-FILE...,
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
||||
# [INCLUDES])
|
||||
# ----------------------------------------------------------
|
||||
AC_DEFUN([AC_CHECK_HEADERS],
|
||||
[AH_CHECK_HEADERS([$1])dnl
|
||||
@ -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,9 +374,22 @@ AN_HEADER([wctype.h], [AC_CHECK_HEADERS])
|
||||
## 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])
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT_FOUND])
|
||||
# -----------------------------------------------------------------
|
||||
# Like AC_CHECK_HEADER, except also make sure that HEADER-FILE
|
||||
# defines the type `DIR'. dirent.h on NextStep 3.2 doesn't.
|
||||
@ -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])])
|
||||
|
@ -1,4 +1,4 @@
|
||||
# This file is part of Autoconf. -*- Autoconf -*-
|
||||
# This file is part of Autoconf. -*- Autoconf -*-
|
||||
# Macros that test for specific, unclassified, features.
|
||||
#
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||
@ -123,9 +123,9 @@ m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES],
|
||||
|
||||
|
||||
# _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE,
|
||||
# CACHE-VAR,
|
||||
# DESCRIPTION,
|
||||
# [INCLUDES], [FUNCTION-BODY])
|
||||
# CACHE-VAR,
|
||||
# DESCRIPTION,
|
||||
# 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])
|
||||
])
|
||||
|
||||
|
||||
|
||||
|
||||
## -------------------------- ##
|
||||
|
@ -1,6 +1,8 @@
|
||||
# This file is part of Autoconf. -*- Autoconf -*-
|
||||
# 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
|
||||
@ -65,8 +67,8 @@
|
||||
# AC_CHECK_ families:
|
||||
#
|
||||
# AC_CHECK_TYPE(TYPE,
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
||||
# [INCLUDES])
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
||||
# [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,
|
||||
@ -162,8 +164,8 @@ AS_VAR_POPDEF([ac_Type])dnl
|
||||
|
||||
|
||||
# AC_CHECK_TYPES(TYPES,
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
||||
# [INCLUDES = DEFAULT-INCLUDES])
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
||||
# [INCLUDES = DEFAULT-INCLUDES])
|
||||
# --------------------------------------------------------
|
||||
# TYPES is an m4 list. There are no ambiguities here, we mean the newer
|
||||
# AC_CHECK_TYPE.
|
||||
@ -217,16 +219,16 @@ m4_define([_AC_CHECK_TYPE_MAYBE_TYPE_P],
|
||||
# AC_CHECK_TYPE(TYPE, DEFAULT)
|
||||
# or
|
||||
# AC_CHECK_TYPE(TYPE,
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
||||
# [INCLUDES = DEFAULT-INCLUDES])
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
||||
# [INCLUDES = DEFAULT-INCLUDES])
|
||||
# -------------------------------------------------------
|
||||
#
|
||||
# Dispatch respectively to _AC_CHECK_TYPE_OLD or _AC_CHECK_TYPE_NEW.
|
||||
# 1. More than two arguments => NEW
|
||||
# 1. More than two arguments => NEW
|
||||
# 2. $2 seems to be replacement type => OLD
|
||||
# See _AC_CHECK_TYPE_REPLACEMENT_TYPE_P for `replacement type'.
|
||||
# 3. $2 seems to be a type => NEW plus a warning
|
||||
# 4. default => NEW
|
||||
# 3. $2 seems to be a type => NEW plus a warning
|
||||
# 4. default => NEW
|
||||
AC_DEFUN([AC_CHECK_TYPE],
|
||||
[m4_if($#, 3,
|
||||
[_AC_CHECK_TYPE_NEW($@)],
|
||||
@ -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_TYPE(off_t, long int)])
|
||||
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
|
||||
# --------------
|
||||
@ -469,8 +748,8 @@ you adjust the code.])
|
||||
# ---------------- #
|
||||
|
||||
# AC_CHECK_MEMBER(AGGREGATE.MEMBER,
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
||||
# [INCLUDES])
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
||||
# [INCLUDES = DEFAULT-INCLUDES])
|
||||
# ---------------------------------------------------------
|
||||
# AGGREGATE.MEMBER is for instance `struct passwd.pw_gecos', shell
|
||||
# variables are not a valid argument.
|
||||
@ -503,8 +782,8 @@ AS_VAR_POPDEF([ac_Member])dnl
|
||||
|
||||
|
||||
# AC_CHECK_MEMBERS([AGGREGATE.MEMBER, ...],
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]
|
||||
# [INCLUDES])
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]
|
||||
# [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_MEMBERS([struct stat.st_rdev])])
|
||||
|
||||
# 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],
|
||||
@ -553,7 +866,7 @@ the `AC_DEFINE' when you adjust the code.])# AC_STRUCT_ST_BLKSIZE
|
||||
#
|
||||
# AC_OBSOLETE([$0], [; replace it with
|
||||
# AC_CHECK_MEMBERS([struct stat.st_blocks],
|
||||
# [AC_LIBOBJ([fileblocks])])
|
||||
# [AC_LIBOBJ([fileblocks])])
|
||||
# Please note that it will define `HAVE_STRUCT_STAT_ST_BLOCKS',
|
||||
# and not `HAVE_ST_BLOCKS'.])dnl
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user