1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00

Update Gnulib to v0.0-7509-g98a2286.

* Makefile.am (EXTRA_DIST): Add `m4/gnulib-cache.m4'.
* build-aux/git-version-gen: Keep unchanged.
This commit is contained in:
Ludovic Courtès 2012-07-06 23:25:57 +02:00
parent 32299e49e8
commit 005de2e827
166 changed files with 4361 additions and 1411 deletions

View file

@ -1,4 +1,4 @@
# canonicalize.m4 serial 23
# canonicalize.m4 serial 24
dnl Copyright (C) 2003-2007, 2009-2012 Free Software Foundation, Inc.
@ -56,6 +56,7 @@ AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE],
AC_DEFUN([gl_FUNC_REALPATH_WORKS],
[
AC_CHECK_FUNCS_ONCE([realpath])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether realpath works], [gl_cv_func_realpath_works], [
touch conftest.a
mkdir conftest.d
@ -89,13 +90,23 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS],
}
return result;
]])
], [gl_cv_func_realpath_works=yes], [gl_cv_func_realpath_works=no],
[gl_cv_func_realpath_works="guessing no"])
],
[gl_cv_func_realpath_works=yes],
[gl_cv_func_realpath_works=no],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_realpath_works="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_realpath_works="guessing no" ;;
esac
])
rm -rf conftest.a conftest.d
])
if test "$gl_cv_func_realpath_works" = yes; then
AC_DEFINE([FUNC_REALPATH_WORKS], [1], [Define to 1 if realpath()
can malloc memory, always gives an absolute path, and handles
trailing slash correctly.])
fi
case "$gl_cv_func_realpath_works" in
*yes)
AC_DEFINE([FUNC_REALPATH_WORKS], [1], [Define to 1 if realpath()
can malloc memory, always gives an absolute path, and handles
trailing slash correctly.])
;;
esac
])

View file

@ -1,4 +1,4 @@
# ceil.m4 serial 8
# ceil.m4 serial 9
dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -15,6 +15,7 @@ AC_DEFUN([gl_FUNC_CEIL],
fi
m4_ifdef([gl_FUNC_CEIL_IEEE], [
if test $gl_ceil_required = ieee && test $REPLACE_CEIL = 0; then
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether ceil works according to ISO C 99 with IEC 60559],
[gl_cv_func_ceil_ieee],
[
@ -44,7 +45,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_ceil_ieee=yes],
[gl_cv_func_ceil_ieee=no],
[gl_cv_func_ceil_ieee="guessing no"])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_ceil_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_ceil_ieee="guessing no" ;;
esac
])
LIBS="$save_LIBS"
])
case "$gl_cv_func_ceil_ieee" in

View file

@ -1,10 +1,10 @@
# check-math-lib.m4 serial 3
# check-math-lib.m4 serial 4
dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl
dnl gl_CHECK_MATH_LIB (VARIABLE, EXPRESSION)
dnl gl_CHECK_MATH_LIB (VARIABLE, EXPRESSION [, EXTRA-CODE])
dnl
dnl Sets the shell VARIABLE according to the libraries needed by EXPRESSION
dnl to compile and link: to the empty string if no extra libraries are needed,
@ -22,6 +22,7 @@ AC_DEFUN([gl_CHECK_MATH_LIB], [
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
$3
double x;]],
[$2])],
[$1=$libm

View file

@ -1,4 +1,4 @@
# errno_h.m4 serial 10
# errno_h.m4 serial 11
dnl Copyright (C) 2004, 2006, 2008-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -10,6 +10,9 @@ AC_DEFUN_ONCE([gl_HEADER_ERRNO_H],
AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [
AC_EGREP_CPP([booboo],[
#include <errno.h>
#if !defined ETXTBSY
booboo
#endif
#if !defined ENOMSG
booboo
#endif
@ -48,6 +51,12 @@ booboo
#endif
#if !defined ECANCELED
booboo
#endif
#if !defined EOWNERDEAD
booboo
#endif
#if !defined ENOTRECOVERABLE
booboo
#endif
],
[gl_cv_header_errno_h_complete=no],

View file

@ -1,4 +1,4 @@
# exponentd.m4 serial 2
# exponentd.m4 serial 3
dnl Copyright (C) 2007-2008, 2010-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -80,7 +80,8 @@ int main ()
dnl different sets of instructions: The older FPA instructions assume
dnl that they are stored in big-endian word order, while the words
dnl (like integer types) are stored in little-endian byte order.
dnl The newer VFP instructions assume little-endian order consistenly.
dnl The newer VFP instructions assume little-endian order
dnl consistently.
AC_EGREP_CPP([mixed_endianness], [
#if defined arm || defined __arm || defined __arm__
mixed_endianness

View file

@ -1,4 +1,4 @@
# serial 11 -*- Autoconf -*-
# serial 12 -*- Autoconf -*-
# Enable extensions on systems that normally disable them.
# Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc.
@ -67,7 +67,7 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable general extensions on MacOS X. */
/* Enable general extensions on Mac OS X. */
#ifndef _DARWIN_C_SOURCE
# undef _DARWIN_C_SOURCE
#endif

View file

@ -1,4 +1,4 @@
# floor.m4 serial 7
# floor.m4 serial 8
dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -15,6 +15,7 @@ AC_DEFUN([gl_FUNC_FLOOR],
fi
m4_ifdef([gl_FUNC_FLOOR_IEEE], [
if test $gl_floor_required = ieee && test $REPLACE_FLOOR = 0; then
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether floor works according to ISO C 99 with IEC 60559],
[gl_cv_func_floor_ieee],
[
@ -40,7 +41,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_floor_ieee=yes],
[gl_cv_func_floor_ieee=no],
[gl_cv_func_floor_ieee="guessing no"])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_floor_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_floor_ieee="guessing no" ;;
esac
])
LIBS="$save_LIBS"
])
case "$gl_cv_func_floor_ieee" in

View file

@ -1,4 +1,4 @@
# fpieee.m4 serial 1
# fpieee.m4 serial 2
dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -36,9 +36,11 @@ AC_DEFUN([gl_FP_IEEE],
# <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
if test -n "$GCC"; then
# GCC has the option -mieee.
# For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
CPPFLAGS="$CPPFLAGS -mieee"
else
# Compaq (ex-DEC) C has the option -ieee.
# Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
# For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
CPPFLAGS="$CPPFLAGS -ieee"
fi
;;

View file

@ -1,4 +1,4 @@
# frexp.m4 serial 13
# frexp.m4 serial 14
dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -107,7 +107,7 @@ AC_DEFUN([gl_FUNC_FREXP_WORKS],
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
ICC 10.0 has a bug when optimizing the expression -zero.
The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
to PowerPC on MacOS X 10.5. */
to PowerPC on Mac OS X 10.5. */
#if defined __hpux || defined __sgi || defined __ICC
static double
compute_minus_zero (void)

View file

@ -1,4 +1,4 @@
# fstat.m4 serial 1
# fstat.m4 serial 3
dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -7,16 +7,27 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_FSTAT],
[
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
AC_REQUIRE([gl_MSVC_INVAL])
if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
REPLACE_FSTAT=1
fi
AC_REQUIRE([gl_HEADER_SYS_STAT_H])
if test $WINDOWS_64_BIT_ST_SIZE = 1; then
REPLACE_FSTAT=1
fi
dnl Replace fstat() for supporting the gnulib-defined open() on directories.
m4_ifdef([gl_FUNC_FCHDIR], [
gl_TEST_FCHDIR
if test $HAVE_FCHDIR = 0 \
&& test "$gl_cv_func_open_directory_works" != yes; then
REPLACE_FSTAT=1
if test $HAVE_FCHDIR = 0; then
case "$gl_cv_func_open_directory_works" in
*yes) ;;
*)
REPLACE_FSTAT=1
;;
esac
fi
])
])

View file

@ -1,4 +1,4 @@
# gnulib-common.m4 serial 32
# gnulib-common.m4 serial 33
dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -14,7 +14,8 @@ AC_DEFUN([gl_COMMON], [
AC_DEFUN([gl_COMMON_BODY], [
AH_VERBATIM([_Noreturn],
[/* The _Noreturn keyword of C11. */
#ifndef _Noreturn
#if ! (defined _Noreturn \
|| (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
|| 0x5110 <= __SUNPRO_C)
# define _Noreturn __attribute__ ((__noreturn__))
@ -29,7 +30,7 @@ AC_DEFUN([gl_COMMON_BODY], [
[/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
__APPLE__ && __MACH__ test for MacOS X.
__APPLE__ && __MACH__ test for Mac OS X.
__APPLE_CC__ tests for the Apple compiler and its version.
__STDC_VERSION__ tests for the C99 mode. */
#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__

View file

@ -119,6 +119,8 @@ AC_DEFUN([gl_EARLY],
# Code from module listen:
# Code from module localcharset:
# Code from module locale:
# Code from module localeconv:
# Code from module log:
# Code from module log1p:
# Code from module lstat:
# Code from module maintainer-makefile:
@ -150,6 +152,7 @@ AC_DEFUN([gl_EARLY],
# Code from module regex:
# Code from module rename:
# Code from module rmdir:
# Code from module round:
# Code from module safe-read:
# Code from module safe-write:
# Code from module same-inode:
@ -180,12 +183,10 @@ AC_DEFUN([gl_EARLY],
# Code from module stdint:
# Code from module stdio:
# Code from module stdlib:
# Code from module strcase:
# Code from module streq:
# Code from module strftime:
# Code from module striconveh:
# Code from module string:
# Code from module strings:
# Code from module sys_file:
# Code from module sys_socket:
# Code from module sys_stat:
@ -238,6 +239,7 @@ gl_SYS_SOCKET_MODULE_INDICATOR([accept])
gl_FUNC_ALLOCA
gl_HEADER_ARPA_INET
AC_PROG_MKDIR_P
AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([bind])
@ -425,6 +427,7 @@ if test $HAVE_ISNANL = 0 || test $REPLACE_ISNAN = 1; then
fi
gl_MATH_MODULE_INDICATOR([isnanl])
gl_LANGINFO_H
AC_REQUIRE([gl_LARGEFILE])
gl_FUNC_LDEXP
gl_LD_VERSION_SCRIPT
gl_VISIBILITY
@ -438,7 +441,22 @@ gl_LOCALCHARSET
LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
gl_LOCALE_H
gl_COMMON_DOUBLE_MATHFUNC([log1p])
gl_FUNC_LOCALECONV
if test $REPLACE_LOCALECONV = 1; then
AC_LIBOBJ([localeconv])
gl_PREREQ_LOCALECONV
fi
gl_LOCALE_MODULE_INDICATOR([localeconv])
AC_REQUIRE([gl_FUNC_LOG])
if test $REPLACE_LOG = 1; then
AC_LIBOBJ([log])
fi
gl_MATH_MODULE_INDICATOR([log])
gl_FUNC_LOG1P
if test $HAVE_LOG1P = 0 || test $REPLACE_LOG1P = 1; then
AC_LIBOBJ([log1p])
fi
gl_MATH_MODULE_INDICATOR([log1p])
gl_FUNC_LSTAT
if test $REPLACE_LSTAT = 1; then
AC_LIBOBJ([lstat])
@ -558,6 +576,11 @@ if test $REPLACE_RMDIR = 1; then
AC_LIBOBJ([rmdir])
fi
gl_UNISTD_MODULE_INDICATOR([rmdir])
gl_FUNC_ROUND
if test $HAVE_ROUND = 0 || test $REPLACE_ROUND = 1; then
AC_LIBOBJ([round])
fi
gl_MATH_MODULE_INDICATOR([round])
gl_PREREQ_SAFE_READ
gl_PREREQ_SAFE_WRITE
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
@ -623,22 +646,12 @@ gl_STDDEF_H
gl_STDINT_H
gl_STDIO_H
gl_STDLIB_H
gl_STRCASE
if test $HAVE_STRCASECMP = 0; then
AC_LIBOBJ([strcasecmp])
gl_PREREQ_STRCASECMP
fi
if test $HAVE_STRNCASECMP = 0; then
AC_LIBOBJ([strncasecmp])
gl_PREREQ_STRNCASECMP
fi
gl_FUNC_GNU_STRFTIME
if test $gl_cond_libtool = false; then
gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
gl_libdeps="$gl_libdeps $LIBICONV"
fi
gl_HEADER_STRING_H
gl_HEADER_STRINGS_H
gl_HEADER_SYS_FILE_H
AC_PROG_MKDIR_P
gl_HEADER_SYS_SOCKET
@ -678,7 +691,6 @@ gl_LIBUNISTRING_LIBHEADER([0.9], [unitypes.h])
gl_FUNC_VASNPRINTF
gl_FUNC_VSNPRINTF
gl_STDIO_MODULE_INDICATOR([vsnprintf])
AC_SUBST([WARN_CFLAGS])
gl_WCHAR_H
gl_FUNC_WCRTOMB
if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
@ -918,6 +930,9 @@ AC_DEFUN([gl_FILE_LIST], [
lib/localcharset.c
lib/localcharset.h
lib/locale.in.h
lib/localeconv.c
lib/log.c
lib/log1p.c
lib/lstat.c
lib/malloc.c
lib/malloca.c
@ -962,6 +977,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/regexec.c
lib/rename.c
lib/rmdir.c
lib/round.c
lib/safe-read.c
lib/safe-read.h
lib/safe-write.c
@ -986,16 +1002,13 @@ AC_DEFUN([gl_FILE_LIST], [
lib/stdint.in.h
lib/stdio.in.h
lib/stdlib.in.h
lib/strcasecmp.c
lib/streq.h
lib/strftime.c
lib/strftime.h
lib/striconveh.c
lib/striconveh.h
lib/string.in.h
lib/strings.in.h
lib/stripslash.c
lib/strncasecmp.c
lib/sys_file.in.h
lib/sys_socket.in.h
lib/sys_stat.in.h
@ -1093,6 +1106,9 @@ AC_DEFUN([gl_FILE_LIST], [
m4/locale-ja.m4
m4/locale-zh.m4
m4/locale_h.m4
m4/localeconv.m4
m4/log.m4
m4/log1p.m4
m4/longlong.m4
m4/lstat.m4
m4/malloc.m4
@ -1114,6 +1130,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/nl_langinfo.m4
m4/nocrash.m4
m4/nproc.m4
m4/off_t.m4
m4/open.m4
m4/pathmax.m4
m4/pipe2.m4
@ -1125,6 +1142,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/regex.m4
m4/rename.m4
m4/rmdir.m4
m4/round.m4
m4/safe-read.m4
m4/safe-write.m4
m4/servent.m4
@ -1146,10 +1164,8 @@ AC_DEFUN([gl_FILE_LIST], [
m4/stdint_h.m4
m4/stdio_h.m4
m4/stdlib_h.m4
m4/strcase.m4
m4/strftime.m4
m4/string_h.m4
m4/strings_h.m4
m4/sys_file_h.m4
m4/sys_socket_h.m4
m4/sys_stat_h.m4

View file

@ -102,3 +102,48 @@ fi
])# AC_SYS_LARGEFILE
])# m4_version_prereq 2.69
# Enable large files on systems where this is implemented by Gnulib, not by the
# system headers.
# Set the variables WINDOWS_64_BIT_OFF_T, WINDOWS_64_BIT_ST_SIZE if Gnulib
# overrides ensure that off_t or 'struct size.st_size' are 64-bit, respectively.
AC_DEFUN([gl_LARGEFILE],
[
AC_REQUIRE([AC_CANONICAL_HOST])
case "$host_os" in
mingw*)
dnl Native Windows.
dnl mingw64 defines off_t to a 64-bit type already, if
dnl _FILE_OFFSET_BITS=64, which is ensured by AC_SYS_LARGEFILE.
AC_CACHE_CHECK([for 64-bit off_t], [gl_cv_type_off_t_64],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <sys/types.h>
int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
]],
[[]])],
[gl_cv_type_off_t_64=yes], [gl_cv_type_off_t_64=no])
])
if test $gl_cv_type_off_t_64 = no; then
WINDOWS_64_BIT_OFF_T=1
else
WINDOWS_64_BIT_OFF_T=0
fi
dnl But all native Windows platforms (including mingw64) have a 32-bit
dnl st_size member in 'struct stat'.
WINDOWS_64_BIT_ST_SIZE=1
;;
*)
dnl Nothing to do on gnulib's side.
dnl A 64-bit off_t is
dnl - already the default on Mac OS X, FreeBSD, NetBSD, OpenBSD, IRIX,
dnl OSF/1, Cygwin,
dnl - enabled by _FILE_OFFSET_BITS=64 (ensured by AC_SYS_LARGEFILE) on
dnl glibc, HP-UX, Solaris,
dnl - enabled by _LARGE_FILES=1 (ensured by AC_SYS_LARGEFILE) on AIX,
dnl - impossible to achieve on Minix 3.1.8.
WINDOWS_64_BIT_OFF_T=0
WINDOWS_64_BIT_ST_SIZE=0
;;
esac
])

View file

@ -1,4 +1,4 @@
# locale-fr.m4 serial 14
# locale-fr.m4 serial 17
dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -28,7 +28,7 @@ int main () {
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@ -37,7 +37,7 @@ int main () {
if (setlocale (LC_ALL, "") == NULL) return 1;
#endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@ -63,10 +63,12 @@ int main () {
one byte long. This excludes the UTF-8 encoding. */
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
#endif
return 0;
}
changequote([,])dnl
@ -90,7 +92,7 @@ changequote([,])dnl
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
# otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
# otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the usual locale name.
@ -154,7 +156,7 @@ int main () {
# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@ -163,7 +165,7 @@ int main () {
if (setlocale (LC_ALL, "") == NULL) return 1;
# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@ -189,10 +191,12 @@ int main () {
|| buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
return 1;
#endif
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
#endif
return 0;
}
changequote([,])dnl
@ -216,7 +220,7 @@ changequote([,])dnl
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
# otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
# otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the usual locale name.

View file

@ -1,4 +1,4 @@
# locale-ja.m4 serial 10
# locale-ja.m4 serial 12
dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -30,7 +30,7 @@ int main ()
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@ -39,7 +39,7 @@ int main ()
if (setlocale (LC_ALL, "") == NULL) return 1;
#endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@ -91,7 +91,7 @@ changequote([,])dnl
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
# otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
# otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the AIX locale name.

View file

@ -1,4 +1,4 @@
# locale-zh.m4 serial 10
# locale-zh.m4 serial 12
dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -31,7 +31,7 @@ int main ()
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
/* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@ -40,7 +40,7 @@ int main ()
if (setlocale (LC_ALL, "") == NULL) return 1;
#endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@ -101,7 +101,7 @@ changequote([,])dnl
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
# otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
# otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the locale name without encoding suffix.

View file

@ -1,4 +1,4 @@
# locale_h.m4 serial 14
# locale_h.m4 serial 19
dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -10,18 +10,29 @@ AC_DEFUN([gl_LOCALE_H],
dnl once only, before all statements that occur in other macros.
AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
dnl Persuade glibc <locale.h> to define locale_t.
dnl Persuade glibc <locale.h> to define locale_t and the int_p_*, int_n_*
dnl members of 'struct lconv'.
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
dnl If <stddef.h> is replaced, then <locale.h> must also be replaced.
AC_REQUIRE([gl_STDDEF_H])
dnl Solaris 11 2011-11 defines the int_p_*, int_n_* members of 'struct lconv'
dnl only if _LCONV_C99 is defined.
AC_REQUIRE([AC_CANONICAL_HOST])
case "$host_os" in
solaris*)
AC_DEFINE([_LCONV_C99], [1], [Define to 1 on Solaris.])
;;
esac
AC_CACHE_CHECK([whether locale.h conforms to POSIX:2001],
[gl_cv_header_locale_h_posix2001],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <locale.h>
int x = LC_MESSAGES;]],
int x = LC_MESSAGES;
int y = sizeof (((struct lconv *) 0)->decimal_point);]],
[[]])],
[gl_cv_header_locale_h_posix2001=yes],
[gl_cv_header_locale_h_posix2001=no])])
@ -31,7 +42,7 @@ AC_DEFUN([gl_LOCALE_H],
if test $ac_cv_header_xlocale_h = yes; then
HAVE_XLOCALE_H=1
dnl Check whether use of locale_t requires inclusion of <xlocale.h>,
dnl e.g. on MacOS X 10.5. If <locale.h> does not define locale_t by
dnl e.g. on Mac OS X 10.5. If <locale.h> does not define locale_t by
dnl itself, we assume that <xlocale.h> will do so.
AC_CACHE_CHECK([whether locale.h defines locale_t],
[gl_cv_header_locale_has_locale_t],
@ -54,6 +65,26 @@ AC_DEFUN([gl_LOCALE_H],
fi
AC_SUBST([HAVE_XLOCALE_H])
dnl Check whether 'struct lconv' is complete.
dnl Bionic libc's 'struct lconv' is just a dummy.
dnl On OpenBSD 4.9, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.5.x,
dnl mingw, MSVC 9, it lacks the int_p_* and int_n_* members.
AC_CACHE_CHECK([whether struct lconv is properly defined],
[gl_cv_sys_struct_lconv_ok],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <locale.h>
struct lconv l;
int x = sizeof (l.decimal_point);
int y = sizeof (l.int_p_cs_precedes);]],
[[]])],
[gl_cv_sys_struct_lconv_ok=yes],
[gl_cv_sys_struct_lconv_ok=no])
])
if test $gl_cv_sys_struct_lconv_ok = no; then
REPLACE_STRUCT_LCONV=1
fi
dnl <locale.h> is always overridden, because of GNULIB_POSIXCHECK.
gl_NEXT_HEADERS([locale.h])
@ -79,10 +110,13 @@ AC_DEFUN([gl_LOCALE_MODULE_INDICATOR],
AC_DEFUN([gl_LOCALE_H_DEFAULTS],
[
GNULIB_LOCALECONV=0; AC_SUBST([GNULIB_LOCALECONV])
GNULIB_SETLOCALE=0; AC_SUBST([GNULIB_SETLOCALE])
GNULIB_DUPLOCALE=0; AC_SUBST([GNULIB_DUPLOCALE])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_DUPLOCALE=1; AC_SUBST([HAVE_DUPLOCALE])
REPLACE_SETLOCALE=0; AC_SUBST([REPLACE_SETLOCALE])
REPLACE_DUPLOCALE=0; AC_SUBST([REPLACE_DUPLOCALE])
HAVE_DUPLOCALE=1; AC_SUBST([HAVE_DUPLOCALE])
REPLACE_LOCALECONV=0; AC_SUBST([REPLACE_LOCALECONV])
REPLACE_SETLOCALE=0; AC_SUBST([REPLACE_SETLOCALE])
REPLACE_DUPLOCALE=0; AC_SUBST([REPLACE_DUPLOCALE])
REPLACE_STRUCT_LCONV=0; AC_SUBST([REPLACE_STRUCT_LCONV])
])

22
m4/localeconv.m4 Normal file
View file

@ -0,0 +1,22 @@
# localeconv.m4 serial 1
dnl Copyright (C) 2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_LOCALECONV],
[
AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
AC_REQUIRE([gl_LOCALE_H])
if test $REPLACE_STRUCT_LCONV = 1; then
REPLACE_LOCALECONV=1
fi
])
# Prerequisites of lib/localeconv.c.
AC_DEFUN([gl_PREREQ_LOCALECONV],
[
AC_CHECK_MEMBERS([struct lconv.decimal_point], [], [],
[[#include <locale.h>]])
])

107
m4/log.m4 Normal file
View file

@ -0,0 +1,107 @@
# log.m4 serial 4
dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_LOG],
[
m4_divert_text([DEFAULTS], [gl_log_required=plain])
AC_REQUIRE([gl_MATH_H_DEFAULTS])
dnl Determine LOG_LIBM.
gl_COMMON_DOUBLE_MATHFUNC([log])
save_LIBS="$LIBS"
LIBS="$LIBS $LOG_LIBM"
gl_FUNC_LOG_WORKS
LIBS="$save_LIBS"
case "$gl_cv_func_log_works" in
*yes) ;;
*) REPLACE_LOG=1 ;;
esac
m4_ifdef([gl_FUNC_LOG_IEEE], [
if test $gl_log_required = ieee && test $REPLACE_LOG = 0; then
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether log works according to ISO C 99 with IEC 60559],
[gl_cv_func_log_ieee],
[
save_LIBS="$LIBS"
LIBS="$LIBS $LOG_LIBM"
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#ifndef __NO_MATH_INLINES
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
/* Compare two numbers with ==.
This is a separate function because IRIX 6.5 "cc -O" miscompiles an
'x == x' test. */
static int
numeric_equal (double x, double y)
{
return x == y;
}
static double dummy (double x) { return 0; }
int main (int argc, char *argv[])
{
double (*my_log) (double) = argc ? log : dummy;
/* Test log(negative).
This test fails on NetBSD 5.1, Solaris 11 2011-11. */
double y = my_log (-1.0);
if (numeric_equal (y, y))
return 1;
return 0;
}
]])],
[gl_cv_func_log_ieee=yes],
[gl_cv_func_log_ieee=no],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_log_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_log_ieee="guessing no" ;;
esac
])
LIBS="$save_LIBS"
])
case "$gl_cv_func_log_ieee" in
*yes) ;;
*) REPLACE_LOG=1 ;;
esac
fi
])
])
dnl Test whether log() works.
dnl On OSF/1 5.1, log(-0.0) is NaN.
AC_DEFUN([gl_FUNC_LOG_WORKS],
[
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether log works], [gl_cv_func_log_works],
[
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <math.h>
volatile double x;
double y;
int main ()
{
x = -0.0;
y = log (x);
if (!(y + y == y))
return 1;
return 0;
}
]])],
[gl_cv_func_log_works=yes],
[gl_cv_func_log_works=no],
[case "$host_os" in
osf*) gl_cv_func_log_works="guessing no";;
*) gl_cv_func_log_works="guessing yes";;
esac
])
])
])

94
m4/log1p.m4 Normal file
View file

@ -0,0 +1,94 @@
# log1p.m4 serial 3
dnl Copyright (C) 2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_LOG1P],
[
m4_divert_text([DEFAULTS], [gl_log1p_required=plain])
AC_REQUIRE([gl_MATH_H_DEFAULTS])
dnl Persuade glibc <math.h> to declare log1p().
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
dnl Determine LOG1P_LIBM.
gl_COMMON_DOUBLE_MATHFUNC([log1p])
dnl Test whether log1p() exists.
save_LIBS="$LIBS"
LIBS="$LIBS $LOG1P_LIBM"
AC_CHECK_FUNCS([log1p])
LIBS="$save_LIBS"
if test $ac_cv_func_log1p = yes; then
:
m4_ifdef([gl_FUNC_LOG1P_IEEE], [
if test $gl_log1p_required = ieee && test $REPLACE_LOG1P = 0; then
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether log1p works according to ISO C 99 with IEC 60559],
[gl_cv_func_log1p_ieee],
[
save_LIBS="$LIBS"
LIBS="$LIBS $LOG1P_LIBM"
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#ifndef __NO_MATH_INLINES
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
]gl_DOUBLE_MINUS_ZERO_CODE[
]gl_DOUBLE_SIGNBIT_CODE[
static double dummy (double x) { return 0; }
int main (int argc, char *argv[])
{
double (*my_log1p) (double) = argc ? log1p : dummy;
/* This test fails on AIX, HP-UX 11. */
double y = my_log1p (minus_zerod);
if (!(y == 0.0) || (signbitd (minus_zerod) && !signbitd (y)))
return 1;
return 0;
}
]])],
[gl_cv_func_log1p_ieee=yes],
[gl_cv_func_log1p_ieee=no],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_log1p_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_log1p_ieee="guessing no" ;;
esac
])
LIBS="$save_LIBS"
])
case "$gl_cv_func_log1p_ieee" in
*yes) ;;
*) REPLACE_LOG1P=1 ;;
esac
fi
])
else
HAVE_LOG1P=0
fi
if test $HAVE_LOG1P = 0 || test $REPLACE_LOG1P = 1; then
dnl Find libraries needed to link lib/log1p.c.
AC_REQUIRE([gl_FUNC_ISNAND])
AC_REQUIRE([gl_FUNC_LOG])
AC_REQUIRE([gl_FUNC_ROUND])
LOG1P_LIBM=
dnl Append $ISNAND_LIBM to LOG1P_LIBM, avoiding gratuitous duplicates.
case " $LOG1P_LIBM " in
*" $ISNAND_LIBM "*) ;;
*) LOG1P_LIBM="$LOG1P_LIBM $ISNAND_LIBM" ;;
esac
dnl Append $LOG_LIBM to LOG1P_LIBM, avoiding gratuitous duplicates.
case " $LOG1P_LIBM " in
*" $LOG_LIBM "*) ;;
*) LOG1P_LIBM="$LOG1P_LIBM $LOG_LIBM" ;;
esac
dnl Append $ROUND_LIBM to LOG1P_LIBM, avoiding gratuitous duplicates.
case " $LOG1P_LIBM " in
*" $ROUND_LIBM "*) ;;
*) LOG1P_LIBM="$LOG1P_LIBM $ROUND_LIBM" ;;
esac
fi
])

View file

@ -1,4 +1,4 @@
# serial 24
# serial 25
# Copyright (C) 1997-2001, 2003-2012 Free Software Foundation, Inc.
#
@ -16,9 +16,11 @@ AC_DEFUN([gl_FUNC_LSTAT],
AC_CHECK_FUNCS_ONCE([lstat])
if test $ac_cv_func_lstat = yes; then
AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
if test $gl_cv_func_lstat_dereferences_slashed_symlink = no; then
REPLACE_LSTAT=1
fi
case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
*no)
REPLACE_LSTAT=1
;;
esac
else
HAVE_LSTAT=0
fi
@ -51,20 +53,25 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
]])],
[gl_cv_func_lstat_dereferences_slashed_symlink=yes],
[gl_cv_func_lstat_dereferences_slashed_symlink=no],
[# When cross-compiling, be pessimistic so we will end up using the
# replacement version of lstat that checks for trailing slashes and
# calls lstat a second time when necessary.
gl_cv_func_lstat_dereferences_slashed_symlink=no
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
esac
])
else
# If the 'ln -s' command failed, then we probably don't even
# have an lstat function.
gl_cv_func_lstat_dereferences_slashed_symlink=no
gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
fi
rm -f conftest.sym conftest.file
])
test $gl_cv_func_lstat_dereferences_slashed_symlink = yes &&
AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1],
[Define to 1 if 'lstat' dereferences a symlink specified
with a trailing slash.])
case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
*yes)
AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1],
[Define to 1 if 'lstat' dereferences a symlink specified
with a trailing slash.])
;;
esac
])

View file

@ -1,9 +1,47 @@
# malloc.m4 serial 13
# malloc.m4 serial 14
dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
m4_version_prereq([2.70], [] ,[
# This is taken from the following Autoconf patch:
# http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9
AC_DEFUN([_AC_FUNC_MALLOC_IF],
[
AC_REQUIRE([AC_HEADER_STDC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
AC_CHECK_HEADERS([stdlib.h])
AC_CACHE_CHECK([for GNU libc compatible malloc],
[ac_cv_func_malloc_0_nonnull],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[#if defined STDC_HEADERS || defined HAVE_STDLIB_H
# include <stdlib.h>
#else
char *malloc ();
#endif
]],
[[return ! malloc (0);]])
],
[ac_cv_func_malloc_0_nonnull=yes],
[ac_cv_func_malloc_0_nonnull=no],
[case "$host_os" in
# Guess yes on platforms where we know the result.
*-gnu* | freebsd* | netbsd* | openbsd* \
| hpux* | solaris* | cygwin* | mingw*)
ac_cv_func_malloc_0_nonnull=yes ;;
# If we don't know, assume the worst.
*) ac_cv_func_malloc_0_nonnull=no ;;
esac
])
])
AS_IF([test $ac_cv_func_malloc_0_nonnull = yes], [$1], [$2])
])# _AC_FUNC_MALLOC_IF
])
# gl_FUNC_MALLOC_GNU
# ------------------
# Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if

View file

@ -1,4 +1,4 @@
# math_h.m4 serial 56
# math_h.m4 serial 113
dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -40,9 +40,16 @@ AC_DEFUN([gl_MATH_H],
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[#include <math.h>]],
[acosf acosl asinf asinl atanf atanl
ceilf ceill copysign copysignf copysignl cosf cosl coshf
expf expl fabsf floorf floorl fma fmaf fmal fmodf frexpf frexpl
ldexpf ldexpl logb logf logl log10f modff powf
cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf
expf expl exp2 exp2f exp2l expm1 expm1f expm1l
fabsf fabsl floorf floorl fma fmaf fmal
fmod fmodf fmodl frexpf frexpl hypotf hypotl
ilogb ilogbf ilogbl
ldexpf ldexpl
log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l
logb logbf logbl
modf modff modfl powf
remainder remainderf remainderl
rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl
tanf tanl tanhf trunc truncf truncl])
])
@ -58,67 +65,101 @@ AC_DEFUN([gl_MATH_MODULE_INDICATOR],
AC_DEFUN([gl_MATH_H_DEFAULTS],
[
GNULIB_ACOSF=0; AC_SUBST([GNULIB_ACOSF])
GNULIB_ACOSL=0; AC_SUBST([GNULIB_ACOSL])
GNULIB_ASINF=0; AC_SUBST([GNULIB_ASINF])
GNULIB_ASINL=0; AC_SUBST([GNULIB_ASINL])
GNULIB_ATANF=0; AC_SUBST([GNULIB_ATANF])
GNULIB_ATANL=0; AC_SUBST([GNULIB_ATANL])
GNULIB_ATAN2F=0; AC_SUBST([GNULIB_ATAN2F])
GNULIB_CEIL=0; AC_SUBST([GNULIB_CEIL])
GNULIB_CEILF=0; AC_SUBST([GNULIB_CEILF])
GNULIB_CEILL=0; AC_SUBST([GNULIB_CEILL])
GNULIB_COPYSIGN=0; AC_SUBST([GNULIB_COPYSIGN])
GNULIB_COPYSIGNF=0; AC_SUBST([GNULIB_COPYSIGNF])
GNULIB_COPYSIGNL=0; AC_SUBST([GNULIB_COPYSIGNL])
GNULIB_COSF=0; AC_SUBST([GNULIB_COSF])
GNULIB_COSL=0; AC_SUBST([GNULIB_COSL])
GNULIB_COSHF=0; AC_SUBST([GNULIB_COSHF])
GNULIB_EXPF=0; AC_SUBST([GNULIB_EXPF])
GNULIB_EXPL=0; AC_SUBST([GNULIB_EXPL])
GNULIB_FABSF=0; AC_SUBST([GNULIB_FABSF])
GNULIB_FLOOR=0; AC_SUBST([GNULIB_FLOOR])
GNULIB_FLOORF=0; AC_SUBST([GNULIB_FLOORF])
GNULIB_FLOORL=0; AC_SUBST([GNULIB_FLOORL])
GNULIB_FMA=0; AC_SUBST([GNULIB_FMA])
GNULIB_FMAF=0; AC_SUBST([GNULIB_FMAF])
GNULIB_FMAL=0; AC_SUBST([GNULIB_FMAL])
GNULIB_FMODF=0; AC_SUBST([GNULIB_FMODF])
GNULIB_FREXPF=0; AC_SUBST([GNULIB_FREXPF])
GNULIB_FREXP=0; AC_SUBST([GNULIB_FREXP])
GNULIB_FREXPL=0; AC_SUBST([GNULIB_FREXPL])
GNULIB_ISFINITE=0; AC_SUBST([GNULIB_ISFINITE])
GNULIB_ISINF=0; AC_SUBST([GNULIB_ISINF])
GNULIB_ISNAN=0; AC_SUBST([GNULIB_ISNAN])
GNULIB_ISNANF=0; AC_SUBST([GNULIB_ISNANF])
GNULIB_ISNAND=0; AC_SUBST([GNULIB_ISNAND])
GNULIB_ISNANL=0; AC_SUBST([GNULIB_ISNANL])
GNULIB_LDEXPF=0; AC_SUBST([GNULIB_LDEXPF])
GNULIB_LDEXPL=0; AC_SUBST([GNULIB_LDEXPL])
GNULIB_LOGB=0; AC_SUBST([GNULIB_LOGB])
GNULIB_LOGF=0; AC_SUBST([GNULIB_LOGF])
GNULIB_LOGL=0; AC_SUBST([GNULIB_LOGL])
GNULIB_LOG10F=0; AC_SUBST([GNULIB_LOG10F])
GNULIB_MODFF=0; AC_SUBST([GNULIB_MODFF])
GNULIB_POWF=0; AC_SUBST([GNULIB_POWF])
GNULIB_RINT=0; AC_SUBST([GNULIB_RINT])
GNULIB_RINTF=0; AC_SUBST([GNULIB_RINTF])
GNULIB_RINTL=0; AC_SUBST([GNULIB_RINTL])
GNULIB_ROUND=0; AC_SUBST([GNULIB_ROUND])
GNULIB_ROUNDF=0; AC_SUBST([GNULIB_ROUNDF])
GNULIB_ROUNDL=0; AC_SUBST([GNULIB_ROUNDL])
GNULIB_SIGNBIT=0; AC_SUBST([GNULIB_SIGNBIT])
GNULIB_SINF=0; AC_SUBST([GNULIB_SINF])
GNULIB_SINL=0; AC_SUBST([GNULIB_SINL])
GNULIB_SINHF=0; AC_SUBST([GNULIB_SINHF])
GNULIB_SQRTF=0; AC_SUBST([GNULIB_SQRTF])
GNULIB_SQRTL=0; AC_SUBST([GNULIB_SQRTL])
GNULIB_TANF=0; AC_SUBST([GNULIB_TANF])
GNULIB_TANL=0; AC_SUBST([GNULIB_TANL])
GNULIB_TANHF=0; AC_SUBST([GNULIB_TANHF])
GNULIB_TRUNC=0; AC_SUBST([GNULIB_TRUNC])
GNULIB_TRUNCF=0; AC_SUBST([GNULIB_TRUNCF])
GNULIB_TRUNCL=0; AC_SUBST([GNULIB_TRUNCL])
GNULIB_ACOSF=0; AC_SUBST([GNULIB_ACOSF])
GNULIB_ACOSL=0; AC_SUBST([GNULIB_ACOSL])
GNULIB_ASINF=0; AC_SUBST([GNULIB_ASINF])
GNULIB_ASINL=0; AC_SUBST([GNULIB_ASINL])
GNULIB_ATANF=0; AC_SUBST([GNULIB_ATANF])
GNULIB_ATANL=0; AC_SUBST([GNULIB_ATANL])
GNULIB_ATAN2F=0; AC_SUBST([GNULIB_ATAN2F])
GNULIB_CBRT=0; AC_SUBST([GNULIB_CBRT])
GNULIB_CBRTF=0; AC_SUBST([GNULIB_CBRTF])
GNULIB_CBRTL=0; AC_SUBST([GNULIB_CBRTL])
GNULIB_CEIL=0; AC_SUBST([GNULIB_CEIL])
GNULIB_CEILF=0; AC_SUBST([GNULIB_CEILF])
GNULIB_CEILL=0; AC_SUBST([GNULIB_CEILL])
GNULIB_COPYSIGN=0; AC_SUBST([GNULIB_COPYSIGN])
GNULIB_COPYSIGNF=0; AC_SUBST([GNULIB_COPYSIGNF])
GNULIB_COPYSIGNL=0; AC_SUBST([GNULIB_COPYSIGNL])
GNULIB_COSF=0; AC_SUBST([GNULIB_COSF])
GNULIB_COSL=0; AC_SUBST([GNULIB_COSL])
GNULIB_COSHF=0; AC_SUBST([GNULIB_COSHF])
GNULIB_EXPF=0; AC_SUBST([GNULIB_EXPF])
GNULIB_EXPL=0; AC_SUBST([GNULIB_EXPL])
GNULIB_EXP2=0; AC_SUBST([GNULIB_EXP2])
GNULIB_EXP2F=0; AC_SUBST([GNULIB_EXP2F])
GNULIB_EXP2L=0; AC_SUBST([GNULIB_EXP2L])
GNULIB_EXPM1=0; AC_SUBST([GNULIB_EXPM1])
GNULIB_EXPM1F=0; AC_SUBST([GNULIB_EXPM1F])
GNULIB_EXPM1L=0; AC_SUBST([GNULIB_EXPM1L])
GNULIB_FABSF=0; AC_SUBST([GNULIB_FABSF])
GNULIB_FABSL=0; AC_SUBST([GNULIB_FABSL])
GNULIB_FLOOR=0; AC_SUBST([GNULIB_FLOOR])
GNULIB_FLOORF=0; AC_SUBST([GNULIB_FLOORF])
GNULIB_FLOORL=0; AC_SUBST([GNULIB_FLOORL])
GNULIB_FMA=0; AC_SUBST([GNULIB_FMA])
GNULIB_FMAF=0; AC_SUBST([GNULIB_FMAF])
GNULIB_FMAL=0; AC_SUBST([GNULIB_FMAL])
GNULIB_FMOD=0; AC_SUBST([GNULIB_FMOD])
GNULIB_FMODF=0; AC_SUBST([GNULIB_FMODF])
GNULIB_FMODL=0; AC_SUBST([GNULIB_FMODL])
GNULIB_FREXPF=0; AC_SUBST([GNULIB_FREXPF])
GNULIB_FREXP=0; AC_SUBST([GNULIB_FREXP])
GNULIB_FREXPL=0; AC_SUBST([GNULIB_FREXPL])
GNULIB_HYPOT=0; AC_SUBST([GNULIB_HYPOT])
GNULIB_HYPOTF=0; AC_SUBST([GNULIB_HYPOTF])
GNULIB_HYPOTL=0; AC_SUBST([GNULIB_HYPOTL])
GNULIB_ILOGB=0; AC_SUBST([GNULIB_ILOGB])
GNULIB_ILOGBF=0; AC_SUBST([GNULIB_ILOGBF])
GNULIB_ILOGBL=0; AC_SUBST([GNULIB_ILOGBL])
GNULIB_ISFINITE=0; AC_SUBST([GNULIB_ISFINITE])
GNULIB_ISINF=0; AC_SUBST([GNULIB_ISINF])
GNULIB_ISNAN=0; AC_SUBST([GNULIB_ISNAN])
GNULIB_ISNANF=0; AC_SUBST([GNULIB_ISNANF])
GNULIB_ISNAND=0; AC_SUBST([GNULIB_ISNAND])
GNULIB_ISNANL=0; AC_SUBST([GNULIB_ISNANL])
GNULIB_LDEXPF=0; AC_SUBST([GNULIB_LDEXPF])
GNULIB_LDEXPL=0; AC_SUBST([GNULIB_LDEXPL])
GNULIB_LOG=0; AC_SUBST([GNULIB_LOG])
GNULIB_LOGF=0; AC_SUBST([GNULIB_LOGF])
GNULIB_LOGL=0; AC_SUBST([GNULIB_LOGL])
GNULIB_LOG10=0; AC_SUBST([GNULIB_LOG10])
GNULIB_LOG10F=0; AC_SUBST([GNULIB_LOG10F])
GNULIB_LOG10L=0; AC_SUBST([GNULIB_LOG10L])
GNULIB_LOG1P=0; AC_SUBST([GNULIB_LOG1P])
GNULIB_LOG1PF=0; AC_SUBST([GNULIB_LOG1PF])
GNULIB_LOG1PL=0; AC_SUBST([GNULIB_LOG1PL])
GNULIB_LOG2=0; AC_SUBST([GNULIB_LOG2])
GNULIB_LOG2F=0; AC_SUBST([GNULIB_LOG2F])
GNULIB_LOG2L=0; AC_SUBST([GNULIB_LOG2L])
GNULIB_LOGB=0; AC_SUBST([GNULIB_LOGB])
GNULIB_LOGBF=0; AC_SUBST([GNULIB_LOGBF])
GNULIB_LOGBL=0; AC_SUBST([GNULIB_LOGBL])
GNULIB_MODF=0; AC_SUBST([GNULIB_MODF])
GNULIB_MODFF=0; AC_SUBST([GNULIB_MODFF])
GNULIB_MODFL=0; AC_SUBST([GNULIB_MODFL])
GNULIB_POWF=0; AC_SUBST([GNULIB_POWF])
GNULIB_REMAINDER=0; AC_SUBST([GNULIB_REMAINDER])
GNULIB_REMAINDERF=0; AC_SUBST([GNULIB_REMAINDERF])
GNULIB_REMAINDERL=0; AC_SUBST([GNULIB_REMAINDERL])
GNULIB_RINT=0; AC_SUBST([GNULIB_RINT])
GNULIB_RINTF=0; AC_SUBST([GNULIB_RINTF])
GNULIB_RINTL=0; AC_SUBST([GNULIB_RINTL])
GNULIB_ROUND=0; AC_SUBST([GNULIB_ROUND])
GNULIB_ROUNDF=0; AC_SUBST([GNULIB_ROUNDF])
GNULIB_ROUNDL=0; AC_SUBST([GNULIB_ROUNDL])
GNULIB_SIGNBIT=0; AC_SUBST([GNULIB_SIGNBIT])
GNULIB_SINF=0; AC_SUBST([GNULIB_SINF])
GNULIB_SINL=0; AC_SUBST([GNULIB_SINL])
GNULIB_SINHF=0; AC_SUBST([GNULIB_SINHF])
GNULIB_SQRTF=0; AC_SUBST([GNULIB_SQRTF])
GNULIB_SQRTL=0; AC_SUBST([GNULIB_SQRTL])
GNULIB_TANF=0; AC_SUBST([GNULIB_TANF])
GNULIB_TANL=0; AC_SUBST([GNULIB_TANL])
GNULIB_TANHF=0; AC_SUBST([GNULIB_TANHF])
GNULIB_TRUNC=0; AC_SUBST([GNULIB_TRUNC])
GNULIB_TRUNCF=0; AC_SUBST([GNULIB_TRUNCF])
GNULIB_TRUNCL=0; AC_SUBST([GNULIB_TRUNCL])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_ACOSF=1; AC_SUBST([HAVE_ACOSF])
HAVE_ACOSL=1; AC_SUBST([HAVE_ACOSL])
@ -127,20 +168,31 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
HAVE_ATANF=1; AC_SUBST([HAVE_ATANF])
HAVE_ATANL=1; AC_SUBST([HAVE_ATANL])
HAVE_ATAN2F=1; AC_SUBST([HAVE_ATAN2F])
HAVE_CBRT=1; AC_SUBST([HAVE_CBRT])
HAVE_CBRTF=1; AC_SUBST([HAVE_CBRTF])
HAVE_CBRTL=1; AC_SUBST([HAVE_CBRTL])
HAVE_COPYSIGN=1; AC_SUBST([HAVE_COPYSIGN])
HAVE_COPYSIGNF=1; AC_SUBST([HAVE_COPYSIGNF])
HAVE_COPYSIGNL=1; AC_SUBST([HAVE_COPYSIGNL])
HAVE_COSF=1; AC_SUBST([HAVE_COSF])
HAVE_COSL=1; AC_SUBST([HAVE_COSL])
HAVE_COSHF=1; AC_SUBST([HAVE_COSHF])
HAVE_EXPF=1; AC_SUBST([HAVE_EXPF])
HAVE_EXPL=1; AC_SUBST([HAVE_EXPL])
HAVE_EXPM1=1; AC_SUBST([HAVE_EXPM1])
HAVE_EXPM1F=1; AC_SUBST([HAVE_EXPM1F])
HAVE_FABSF=1; AC_SUBST([HAVE_FABSF])
HAVE_FABSL=1; AC_SUBST([HAVE_FABSL])
HAVE_FMA=1; AC_SUBST([HAVE_FMA])
HAVE_FMAF=1; AC_SUBST([HAVE_FMAF])
HAVE_FMAL=1; AC_SUBST([HAVE_FMAL])
HAVE_FMODF=1; AC_SUBST([HAVE_FMODF])
HAVE_FMODL=1; AC_SUBST([HAVE_FMODL])
HAVE_FREXPF=1; AC_SUBST([HAVE_FREXPF])
HAVE_HYPOTF=1; AC_SUBST([HAVE_HYPOTF])
HAVE_HYPOTL=1; AC_SUBST([HAVE_HYPOTL])
HAVE_ILOGB=1; AC_SUBST([HAVE_ILOGB])
HAVE_ILOGBF=1; AC_SUBST([HAVE_ILOGBF])
HAVE_ILOGBL=1; AC_SUBST([HAVE_ILOGBL])
HAVE_ISNANF=1; AC_SUBST([HAVE_ISNANF])
HAVE_ISNAND=1; AC_SUBST([HAVE_ISNAND])
HAVE_ISNANL=1; AC_SUBST([HAVE_ISNANL])
@ -148,10 +200,18 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
HAVE_LOGF=1; AC_SUBST([HAVE_LOGF])
HAVE_LOGL=1; AC_SUBST([HAVE_LOGL])
HAVE_LOG10F=1; AC_SUBST([HAVE_LOG10F])
HAVE_LOG10L=1; AC_SUBST([HAVE_LOG10L])
HAVE_LOG1P=1; AC_SUBST([HAVE_LOG1P])
HAVE_LOG1PF=1; AC_SUBST([HAVE_LOG1PF])
HAVE_LOG1PL=1; AC_SUBST([HAVE_LOG1PL])
HAVE_LOGBF=1; AC_SUBST([HAVE_LOGBF])
HAVE_LOGBL=1; AC_SUBST([HAVE_LOGBL])
HAVE_MODFF=1; AC_SUBST([HAVE_MODFF])
HAVE_MODFL=1; AC_SUBST([HAVE_MODFL])
HAVE_POWF=1; AC_SUBST([HAVE_POWF])
HAVE_REMAINDER=1; AC_SUBST([HAVE_REMAINDER])
HAVE_REMAINDERF=1; AC_SUBST([HAVE_REMAINDERF])
HAVE_RINT=1; AC_SUBST([HAVE_RINT])
HAVE_RINTF=1; AC_SUBST([HAVE_RINTF])
HAVE_RINTL=1; AC_SUBST([HAVE_RINTL])
HAVE_SINF=1; AC_SUBST([HAVE_SINF])
HAVE_SINL=1; AC_SUBST([HAVE_SINL])
@ -164,16 +224,30 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL])
HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL])
HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL])
HAVE_DECL_CBRTF=1; AC_SUBST([HAVE_DECL_CBRTF])
HAVE_DECL_CBRTL=1; AC_SUBST([HAVE_DECL_CBRTL])
HAVE_DECL_CEILF=1; AC_SUBST([HAVE_DECL_CEILF])
HAVE_DECL_CEILL=1; AC_SUBST([HAVE_DECL_CEILL])
HAVE_DECL_COPYSIGNF=1; AC_SUBST([HAVE_DECL_COPYSIGNF])
HAVE_DECL_COSL=1; AC_SUBST([HAVE_DECL_COSL])
HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL])
HAVE_DECL_EXP2=1; AC_SUBST([HAVE_DECL_EXP2])
HAVE_DECL_EXP2F=1; AC_SUBST([HAVE_DECL_EXP2F])
HAVE_DECL_EXP2L=1; AC_SUBST([HAVE_DECL_EXP2L])
HAVE_DECL_EXPM1L=1; AC_SUBST([HAVE_DECL_EXPM1L])
HAVE_DECL_FLOORF=1; AC_SUBST([HAVE_DECL_FLOORF])
HAVE_DECL_FLOORL=1; AC_SUBST([HAVE_DECL_FLOORL])
HAVE_DECL_FREXPL=1; AC_SUBST([HAVE_DECL_FREXPL])
HAVE_DECL_LDEXPL=1; AC_SUBST([HAVE_DECL_LDEXPL])
HAVE_DECL_LOGB=1; AC_SUBST([HAVE_DECL_LOGB])
HAVE_DECL_LOGL=1; AC_SUBST([HAVE_DECL_LOGL])
HAVE_DECL_LOG10L=1; AC_SUBST([HAVE_DECL_LOG10L])
HAVE_DECL_LOG2=1; AC_SUBST([HAVE_DECL_LOG2])
HAVE_DECL_LOG2F=1; AC_SUBST([HAVE_DECL_LOG2F])
HAVE_DECL_LOG2L=1; AC_SUBST([HAVE_DECL_LOG2L])
HAVE_DECL_LOGB=1; AC_SUBST([HAVE_DECL_LOGB])
HAVE_DECL_REMAINDER=1; AC_SUBST([HAVE_DECL_REMAINDER])
HAVE_DECL_REMAINDERL=1; AC_SUBST([HAVE_DECL_REMAINDERL])
HAVE_DECL_RINTF=1; AC_SUBST([HAVE_DECL_RINTF])
HAVE_DECL_ROUND=1; AC_SUBST([HAVE_DECL_ROUND])
HAVE_DECL_ROUNDF=1; AC_SUBST([HAVE_DECL_ROUNDF])
HAVE_DECL_ROUNDL=1; AC_SUBST([HAVE_DECL_ROUNDL])
@ -183,29 +257,66 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
HAVE_DECL_TRUNC=1; AC_SUBST([HAVE_DECL_TRUNC])
HAVE_DECL_TRUNCF=1; AC_SUBST([HAVE_DECL_TRUNCF])
HAVE_DECL_TRUNCL=1; AC_SUBST([HAVE_DECL_TRUNCL])
REPLACE_CBRTF=0; AC_SUBST([REPLACE_CBRTF])
REPLACE_CBRTL=0; AC_SUBST([REPLACE_CBRTL])
REPLACE_CEIL=0; AC_SUBST([REPLACE_CEIL])
REPLACE_CEILF=0; AC_SUBST([REPLACE_CEILF])
REPLACE_CEILL=0; AC_SUBST([REPLACE_CEILL])
REPLACE_EXPM1=0; AC_SUBST([REPLACE_EXPM1])
REPLACE_EXPM1F=0; AC_SUBST([REPLACE_EXPM1F])
REPLACE_EXP2=0; AC_SUBST([REPLACE_EXP2])
REPLACE_EXP2L=0; AC_SUBST([REPLACE_EXP2L])
REPLACE_FABSL=0; AC_SUBST([REPLACE_FABSL])
REPLACE_FLOOR=0; AC_SUBST([REPLACE_FLOOR])
REPLACE_FLOORF=0; AC_SUBST([REPLACE_FLOORF])
REPLACE_FLOORL=0; AC_SUBST([REPLACE_FLOORL])
REPLACE_FMA=0; AC_SUBST([REPLACE_FMA])
REPLACE_FMAF=0; AC_SUBST([REPLACE_FMAF])
REPLACE_FMAL=0; AC_SUBST([REPLACE_FMAL])
REPLACE_FMOD=0; AC_SUBST([REPLACE_FMOD])
REPLACE_FMODF=0; AC_SUBST([REPLACE_FMODF])
REPLACE_FMODL=0; AC_SUBST([REPLACE_FMODL])
REPLACE_FREXPF=0; AC_SUBST([REPLACE_FREXPF])
REPLACE_FREXP=0; AC_SUBST([REPLACE_FREXP])
REPLACE_FREXPL=0; AC_SUBST([REPLACE_FREXPL])
REPLACE_HUGE_VAL=0; AC_SUBST([REPLACE_HUGE_VAL])
REPLACE_HYPOT=0; AC_SUBST([REPLACE_HYPOT])
REPLACE_HYPOTF=0; AC_SUBST([REPLACE_HYPOTF])
REPLACE_HYPOTL=0; AC_SUBST([REPLACE_HYPOTL])
REPLACE_ILOGB=0; AC_SUBST([REPLACE_ILOGB])
REPLACE_ILOGBF=0; AC_SUBST([REPLACE_ILOGBF])
REPLACE_ISFINITE=0; AC_SUBST([REPLACE_ISFINITE])
REPLACE_ISINF=0; AC_SUBST([REPLACE_ISINF])
REPLACE_ISNAN=0; AC_SUBST([REPLACE_ISNAN])
REPLACE_LDEXPL=0; AC_SUBST([REPLACE_LDEXPL])
REPLACE_LOG=0; AC_SUBST([REPLACE_LOG])
REPLACE_LOGF=0; AC_SUBST([REPLACE_LOGF])
REPLACE_LOGL=0; AC_SUBST([REPLACE_LOGL])
REPLACE_LOG10=0; AC_SUBST([REPLACE_LOG10])
REPLACE_LOG10F=0; AC_SUBST([REPLACE_LOG10F])
REPLACE_LOG10L=0; AC_SUBST([REPLACE_LOG10L])
REPLACE_LOG1P=0; AC_SUBST([REPLACE_LOG1P])
REPLACE_LOG1PF=0; AC_SUBST([REPLACE_LOG1PF])
REPLACE_LOG1PL=0; AC_SUBST([REPLACE_LOG1PL])
REPLACE_LOG2=0; AC_SUBST([REPLACE_LOG2])
REPLACE_LOG2F=0; AC_SUBST([REPLACE_LOG2F])
REPLACE_LOG2L=0; AC_SUBST([REPLACE_LOG2L])
REPLACE_LOGB=0; AC_SUBST([REPLACE_LOGB])
REPLACE_LOGBF=0; AC_SUBST([REPLACE_LOGBF])
REPLACE_LOGBL=0; AC_SUBST([REPLACE_LOGBL])
REPLACE_MODF=0; AC_SUBST([REPLACE_MODF])
REPLACE_MODFF=0; AC_SUBST([REPLACE_MODFF])
REPLACE_MODFL=0; AC_SUBST([REPLACE_MODFL])
REPLACE_NAN=0; AC_SUBST([REPLACE_NAN])
REPLACE_REMAINDER=0; AC_SUBST([REPLACE_REMAINDER])
REPLACE_REMAINDERF=0; AC_SUBST([REPLACE_REMAINDERF])
REPLACE_REMAINDERL=0; AC_SUBST([REPLACE_REMAINDERL])
REPLACE_ROUND=0; AC_SUBST([REPLACE_ROUND])
REPLACE_ROUNDF=0; AC_SUBST([REPLACE_ROUNDF])
REPLACE_ROUNDL=0; AC_SUBST([REPLACE_ROUNDL])
REPLACE_SIGNBIT=0; AC_SUBST([REPLACE_SIGNBIT])
REPLACE_SIGNBIT_USING_GCC=0; AC_SUBST([REPLACE_SIGNBIT_USING_GCC])
REPLACE_SQRTL=0; AC_SUBST([REPLACE_SQRTL])
REPLACE_TRUNC=0; AC_SUBST([REPLACE_TRUNC])
REPLACE_TRUNCF=0; AC_SUBST([REPLACE_TRUNCF])
REPLACE_TRUNCL=0; AC_SUBST([REPLACE_TRUNCL])

View file

@ -1,4 +1,4 @@
# mathfunc.m4 serial 10
# mathfunc.m4 serial 11
dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -113,7 +113,7 @@ AC_DEFUN([gl_MATHFUNC],
# tests whether the function FUNC is available in libc or libm.
# It sets FUNC_LIBM to empty or "-lm" accordingly.
# FUNC must be one of the following functions, that are present on all systems
# and provided by libm on all systems except MacOS X, BeOS, Haiku:
# and provided by libm on all systems except Mac OS X, BeOS, Haiku:
# acos asin atan atan2 cbrt cos cosh erf erfc exp fmod hypot j0 j1 jn lgamma
# log log10 log1p pow remainder sin sinh sqrt tan tanh y0 y1 yn

View file

@ -1,4 +1,4 @@
# mmap-anon.m4 serial 9
# mmap-anon.m4 serial 10
dnl Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -9,7 +9,7 @@ dnl with or without modifications, as long as this notice is preserved.
# - On Linux, AIX, OSF/1, Solaris, Cygwin, Interix, Haiku, both MAP_ANONYMOUS
# and MAP_ANON exist and have the same value.
# - On HP-UX, only MAP_ANONYMOUS exists.
# - On MacOS X, FreeBSD, NetBSD, OpenBSD, only MAP_ANON exists.
# - On Mac OS X, FreeBSD, NetBSD, OpenBSD, only MAP_ANON exists.
# - On IRIX, neither exists, and a file descriptor opened to /dev/zero must be
# used.
@ -27,18 +27,18 @@ AC_DEFUN([gl_FUNC_MMAP_ANON],
gl_have_mmap_anonymous=no
if test $gl_have_mmap = yes; then
AC_MSG_CHECKING([for MAP_ANONYMOUS])
AC_EGREP_CPP([I cant identify this map], [
AC_EGREP_CPP([I cannot identify this map], [
#include <sys/mman.h>
#ifdef MAP_ANONYMOUS
I cant identify this map
I cannot identify this map
#endif
],
[gl_have_mmap_anonymous=yes])
if test $gl_have_mmap_anonymous != yes; then
AC_EGREP_CPP([I cant identify this map], [
AC_EGREP_CPP([I cannot identify this map], [
#include <sys/mman.h>
#ifdef MAP_ANON
I cant identify this map
I cannot identify this map
#endif
],
[AC_DEFINE([MAP_ANONYMOUS], [MAP_ANON],

View file

@ -1,4 +1,4 @@
# multiarch.m4 serial 6
# multiarch.m4 serial 7
dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -6,7 +6,7 @@ dnl with or without modifications, as long as this notice is preserved.
# Determine whether the compiler is or may be producing universal binaries.
#
# On MacOS X 10.5 and later systems, the user can create libraries and
# On Mac OS X 10.5 and later systems, the user can create libraries and
# executables that work on multiple system types--known as "fat" or
# "universal" binaries--by specifying multiple '-arch' options to the
# compiler but only a single '-arch' option to the preprocessor. Like

View file

@ -1,4 +1,4 @@
# nocrash.m4 serial 3
# nocrash.m4 serial 4
dnl Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -18,7 +18,7 @@ dnl int main() { nocrash_init(); ... }
AC_DEFUN([GL_NOCRASH],[[
#include <stdlib.h>
#if defined __MACH__ && defined __APPLE__
/* Avoid a crash on MacOS X. */
/* Avoid a crash on Mac OS X. */
#include <mach/mach.h>
#include <mach/mach_error.h>
#include <mach/thread_status.h>

18
m4/off_t.m4 Normal file
View file

@ -0,0 +1,18 @@
# off_t.m4 serial 1
dnl Copyright (C) 2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl Check whether to override the 'off_t' type.
dnl Set WINDOWS_64_BIT_OFF_T.
AC_DEFUN([gl_TYPE_OFF_T],
[
m4_ifdef([gl_LARGEFILE], [
AC_REQUIRE([gl_LARGEFILE])
], [
WINDOWS_64_BIT_OFF_T=0
])
AC_SUBST([WINDOWS_64_BIT_OFF_T])
])

View file

@ -1,4 +1,4 @@
# printf.m4 serial 48
# printf.m4 serial 50
dnl Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -63,7 +63,7 @@ changequote(,)dnl
# Guess yes on FreeBSD >= 5.
freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
# Guess yes on MacOS X >= 10.3.
# Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
darwin*) gl_cv_func_printf_sizes_c99="guessing yes";;
# Guess yes on OpenBSD >= 3.9.
@ -222,7 +222,7 @@ changequote(,)dnl
# Guess yes on FreeBSD >= 6.
freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
# Guess yes on MacOS X >= 10.3.
# Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";;
darwin*) gl_cv_func_printf_infinite="guessing yes";;
# Guess yes on HP-UX >= 11.
@ -507,14 +507,14 @@ int main ()
if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
|| buf[0] == '0')
result |= 8;
/* This catches a MacOS X 10.3.9 (Darwin 7.9) bug. */
/* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug. */
if (sprintf (buf, "%.1a", 1.999) < 0
|| (strcmp (buf, "0x1.0p+1") != 0
&& strcmp (buf, "0x2.0p+0") != 0
&& strcmp (buf, "0x4.0p-1") != 0
&& strcmp (buf, "0x8.0p-2") != 0))
result |= 16;
/* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a
/* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a
glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
if (sprintf (buf, "%.1La", 1.999L) < 0
|| (strcmp (buf, "0x1.0p+1") != 0
@ -590,7 +590,7 @@ changequote(,)dnl
# Guess yes on FreeBSD >= 6.
freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
# Guess yes on MacOS X >= 10.3.
# Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
darwin*) gl_cv_func_printf_directive_f="guessing yes";;
# Guess yes on Solaris >= 2.10.
@ -1028,8 +1028,9 @@ int main()
changequote([,])dnl
])])
if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
(./conftest
(./conftest 2>&AS_MESSAGE_LOG_FD
result=$?
_AS_ECHO_LOG([\$? = $result])
if test $result != 0 && test $result != 77; then result=1; fi
exit $result
) >/dev/null 2>/dev/null
@ -1043,7 +1044,7 @@ changequote([,])dnl
fi
rm -fr conftest*
else
dnl A universal build on Apple MacOS X platforms.
dnl A universal build on Apple Mac OS X platforms.
dnl The result would be 'no' in 32-bit mode and 'yes' in 64-bit mode.
dnl But we need a configuration result that is valid in both modes.
gl_cv_func_printf_enomem="guessing no"
@ -1137,7 +1138,7 @@ changequote(,)dnl
# Guess yes on FreeBSD >= 5.
freebsd[1-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
# Guess yes on MacOS X >= 10.3.
# Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
# Guess yes on OpenBSD >= 3.9.
@ -1236,7 +1237,7 @@ changequote(,)dnl
# Guess yes on FreeBSD >= 5.
freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
# Guess yes on MacOS X >= 10.3.
# Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
# Guess yes on OpenBSD >= 3.9.
@ -1317,7 +1318,7 @@ changequote(,)dnl
# Guess yes on FreeBSD >= 5.
freebsd[1-4]*) gl_cv_func_snprintf_directive_n="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
# Guess yes on MacOS X >= 10.3.
# Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";;
darwin*) gl_cv_func_snprintf_directive_n="guessing yes";;
# Guess yes on Solaris >= 2.6.
@ -1459,7 +1460,7 @@ changequote(,)dnl
# Guess yes on FreeBSD >= 5.
freebsd[1-4]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
# Guess yes on MacOS X >= 10.3.
# Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
# Guess yes on Cygwin.
@ -1539,8 +1540,8 @@ dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
dnl glibc 2.5 . . . . . . . . . . . . . . . . . . . .
dnl glibc 2.3.6 . . . . # . . . . . . . . . . . . . . .
dnl FreeBSD 5.4, 6.1 . . . . # . . . . . . # . # . . . . . .
dnl MacOS X 10.5.8 . . . # # . . . . . . # . . . . . . . .
dnl MacOS X 10.3.9 . . . . # . . . . . . # . # . . . . . .
dnl Mac OS X 10.5.8 . . . # # . . . . . . # . . . . . . . .
dnl Mac OS X 10.3.9 . . . . # . . . . . . # . # . . . . . .
dnl OpenBSD 3.9, 4.0 . . # # # # . # . # . # . # . . . . . .
dnl Cygwin 1.7.0 (2009) . . . # . . . ? . . . . . ? . . . . . .
dnl Cygwin 1.5.25 (2008) . . . # # . . # . . . . . # . . . . . .

View file

@ -1,4 +1,4 @@
# putenv.m4 serial 18
# putenv.m4 serial 19
dnl Copyright (C) 2002-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -12,6 +12,7 @@ dnl The putenv in libc on at least SunOS 4.1.4 does *not* do that.
AC_DEFUN([gl_FUNC_PUTENV],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([for putenv compatible with GNU and SVID],
[gl_cv_func_svid_putenv],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],[[
@ -32,9 +33,18 @@ AC_DEFUN([gl_FUNC_PUTENV],
gl_cv_func_svid_putenv=yes,
gl_cv_func_svid_putenv=no,
dnl When crosscompiling, assume putenv is broken.
gl_cv_func_svid_putenv=no)
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_svid_putenv="guessing no" ;;
esac
])
])
if test $gl_cv_func_svid_putenv = no; then
REPLACE_PUTENV=1
fi
case "$gl_cv_func_svid_putenv" in
*yes) ;;
*)
REPLACE_PUTENV=1
;;
esac
])

View file

@ -1,4 +1,4 @@
# readlink.m4 serial 11
# readlink.m4 serial 12
dnl Copyright (C) 2003, 2007, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_READLINK],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_FUNCS_ONCE([readlink])
if test $ac_cv_func_readlink = no; then
HAVE_READLINK=0
@ -32,15 +33,26 @@ AC_DEFUN([gl_FUNC_READLINK],
]], [[char buf[20];
return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;]])],
[gl_cv_func_readlink_works=yes], [gl_cv_func_readlink_works=no],
[gl_cv_func_readlink_works="guessing no"])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_readlink_works="guessing no" ;;
esac
])
rm -f conftest.link conftest.lnk2])
if test "$gl_cv_func_readlink_works" != yes; then
AC_DEFINE([READLINK_TRAILING_SLASH_BUG], [1], [Define to 1 if readlink
fails to recognize a trailing slash.])
REPLACE_READLINK=1
elif test "$gl_cv_decl_readlink_works" != yes; then
REPLACE_READLINK=1
fi
case "$gl_cv_func_readlink_works" in
*yes)
if test "$gl_cv_decl_readlink_works" != yes; then
REPLACE_READLINK=1
fi
;;
*)
AC_DEFINE([READLINK_TRAILING_SLASH_BUG], [1], [Define to 1 if readlink
fails to recognize a trailing slash.])
REPLACE_READLINK=1
;;
esac
fi
])

View file

@ -1,4 +1,4 @@
# serial 60
# serial 61
# Copyright (C) 1996-2001, 2003-2012 Free Software Foundation, Inc.
#
@ -175,6 +175,9 @@ AC_DEFUN([gl_REGEX],
esac
if test $ac_use_included_regex = yes; then
AC_DEFINE([_REGEX_INCLUDE_LIMITS_H], [1],
[Define if you want <regex.h> to include <limits.h>, so that it
consistently overrides <limits.h>'s RE_DUP_MAX.])
AC_DEFINE([_REGEX_LARGE_OFFSETS], [1],
[Define if you want regoff_t to be at least as wide POSIX requires.])
AC_DEFINE([re_syntax_options], [rpl_re_syntax_options],

View file

@ -1,4 +1,4 @@
# serial 25
# serial 26
# Copyright (C) 2001, 2003, 2005-2006, 2009-2012 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@ -54,15 +54,24 @@ AC_DEFUN([gl_FUNC_RENAME],
[gl_cv_func_rename_slash_dst_works=yes],
[gl_cv_func_rename_slash_dst_works=no],
dnl When crosscompiling, assume rename is broken.
[gl_cv_func_rename_slash_dst_works="guessing no"])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
esac
])
rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
])
if test "x$gl_cv_func_rename_slash_dst_works" != xyes; then
REPLACE_RENAME=1
AC_DEFINE([RENAME_TRAILING_SLASH_DEST_BUG], [1],
[Define if rename does not correctly handle slashes on the destination
argument, such as on Solaris 10 or NetBSD 1.6.])
fi
case "$gl_cv_func_rename_slash_dst_works" in
*yes) ;;
*)
REPLACE_RENAME=1
AC_DEFINE([RENAME_TRAILING_SLASH_DEST_BUG], [1],
[Define if rename does not correctly handle slashes on the destination
argument, such as on Solaris 10 or NetBSD 1.6.])
;;
esac
dnl SunOS 4.1.1_U1 mistakenly forbids rename("dir/","name").
dnl Solaris 9 mistakenly allows rename("file/","name").
@ -97,15 +106,24 @@ AC_DEFUN([gl_FUNC_RENAME],
[gl_cv_func_rename_slash_src_works=yes],
[gl_cv_func_rename_slash_src_works=no],
dnl When crosscompiling, assume rename is broken.
[gl_cv_func_rename_slash_src_works="guessing no"])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_rename_slash_src_works="guessing no" ;;
esac
])
rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
])
if test "x$gl_cv_func_rename_slash_src_works" != xyes; then
REPLACE_RENAME=1
AC_DEFINE([RENAME_TRAILING_SLASH_SOURCE_BUG], [1],
[Define if rename does not correctly handle slashes on the source
argument, such as on Solaris 9 or cygwin 1.5.])
fi
case "$gl_cv_func_rename_slash_src_works" in
*yes) ;;
*)
REPLACE_RENAME=1
AC_DEFINE([RENAME_TRAILING_SLASH_SOURCE_BUG], [1],
[Define if rename does not correctly handle slashes on the source
argument, such as on Solaris 9 or cygwin 1.5.])
;;
esac
dnl NetBSD 1.6 and cygwin 1.5.x mistakenly reduce hard link count
dnl on rename("h1","h2").
@ -137,7 +155,13 @@ AC_DEFUN([gl_FUNC_RENAME],
[gl_cv_func_rename_link_works=yes],
[gl_cv_func_rename_link_works=no],
dnl When crosscompiling, assume rename is broken.
[gl_cv_func_rename_link_works="guessing no"])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_rename_link_works="guessing no" ;;
esac
])
else
gl_cv_func_rename_link_works="guessing no"
fi
@ -146,12 +170,15 @@ AC_DEFUN([gl_FUNC_RENAME],
gl_cv_func_rename_link_works=yes
fi
])
if test "x$gl_cv_func_rename_link_works" != xyes; then
REPLACE_RENAME=1
AC_DEFINE([RENAME_HARD_LINK_BUG], [1],
[Define if rename fails to leave hard links alone, as on NetBSD 1.6
or Cygwin 1.5.])
fi
case "$gl_cv_func_rename_link_works" in
*yes) ;;
*)
REPLACE_RENAME=1
AC_DEFINE([RENAME_HARD_LINK_BUG], [1],
[Define if rename fails to leave hard links alone, as on NetBSD 1.6
or Cygwin 1.5.])
;;
esac
dnl Cygwin 1.5.x mistakenly allows rename("dir","file").
dnl mingw mistakenly forbids rename("dir1","dir2").
@ -177,13 +204,22 @@ AC_DEFUN([gl_FUNC_RENAME],
[gl_cv_func_rename_dest_works=yes],
[gl_cv_func_rename_dest_works=no],
dnl When crosscompiling, assume rename is broken.
[gl_cv_func_rename_dest_works="guessing no"])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_rename_dest_works="guessing no" ;;
esac
])
rm -rf conftest.f conftest.d1 conftest.d2
])
if test "x$gl_cv_func_rename_dest_works" != xyes; then
REPLACE_RENAME=1
AC_DEFINE([RENAME_DEST_EXISTS_BUG], [1],
[Define if rename does not work when the destination file exists,
as on Cygwin 1.5 or Windows.])
fi
case "$gl_cv_func_rename_dest_works" in
*yes) ;;
*)
REPLACE_RENAME=1
AC_DEFINE([RENAME_DEST_EXISTS_BUG], [1],
[Define if rename does not work when the destination file exists,
as on Cygwin 1.5 or Windows.])
;;
esac
])

View file

@ -1,4 +1,4 @@
# rmdir.m4 serial 12
# rmdir.m4 serial 13
dnl Copyright (C) 2002, 2005, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_RMDIR],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
dnl Detect cygwin 1.5.x bug.
AC_CHECK_HEADERS_ONCE([unistd.h])
AC_CACHE_CHECK([whether rmdir works], [gl_cv_func_rmdir_works],
@ -31,9 +32,18 @@ AC_DEFUN([gl_FUNC_RMDIR],
return result;
]])],
[gl_cv_func_rmdir_works=yes], [gl_cv_func_rmdir_works=no],
[gl_cv_func_rmdir_works="guessing no"])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_rmdir_works="guessing no" ;;
esac
])
rm -rf conftest.dir conftest.file])
if test x"$gl_cv_func_rmdir_works" != xyes; then
REPLACE_RMDIR=1
fi
case "$gl_cv_func_rmdir_works" in
*yes) ;;
*)
REPLACE_RMDIR=1
;;
esac
])

142
m4/round.m4 Normal file
View file

@ -0,0 +1,142 @@
# round.m4 serial 16
dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_ROUND],
[
m4_divert_text([DEFAULTS], [gl_round_required=plain])
AC_REQUIRE([gl_MATH_H_DEFAULTS])
dnl Persuade glibc <math.h> to declare round().
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
gl_CHECK_MATH_LIB([ROUND_LIBM], [x = round (x);],
[extern
#ifdef __cplusplus
"C"
#endif
double round (double);
])
if test "$ROUND_LIBM" != missing; then
HAVE_ROUND=1
dnl Also check whether it's declared.
dnl IRIX 6.5 has round() in libm but doesn't declare it in <math.h>.
AC_CHECK_DECLS([round], , [HAVE_DECL_ROUND=0], [[#include <math.h>]])
dnl Test whether round() produces correct results. On NetBSD 3.0, for
dnl x = 1/2 - 2^-54, the system's round() returns a wrong result.
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether round works], [gl_cv_func_round_works],
[
save_LIBS="$LIBS"
LIBS="$LIBS $ROUND_LIBM"
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <float.h>
#include <math.h>
extern
#ifdef __cplusplus
"C"
#endif
double round (double);
#ifdef _MSC_VER
# pragma fenv_access (off)
#endif
int main()
{
/* 2^DBL_MANT_DIG. */
static const double TWO_MANT_DIG =
/* Assume DBL_MANT_DIG <= 5 * 31.
Use the identity
n = floor(n/5) + floor((n+1)/5) + ... + floor((n+4)/5). */
(double) (1U << (DBL_MANT_DIG / 5))
* (double) (1U << ((DBL_MANT_DIG + 1) / 5))
* (double) (1U << ((DBL_MANT_DIG + 2) / 5))
* (double) (1U << ((DBL_MANT_DIG + 3) / 5))
* (double) (1U << ((DBL_MANT_DIG + 4) / 5));
volatile double x = 0.5 - 0.5 / TWO_MANT_DIG;
exit (x < 0.5 && round (x) != 0.0);
}]])], [gl_cv_func_round_works=yes], [gl_cv_func_round_works=no],
[case "$host_os" in
netbsd* | aix*) gl_cv_func_round_works="guessing no";;
*) gl_cv_func_round_works="guessing yes";;
esac
])
LIBS="$save_LIBS"
])
case "$gl_cv_func_round_works" in
*no) REPLACE_ROUND=1 ;;
esac
m4_ifdef([gl_FUNC_ROUND_IEEE], [
if test $gl_round_required = ieee && test $REPLACE_ROUND = 0; then
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether round works according to ISO C 99 with IEC 60559],
[gl_cv_func_round_ieee],
[
save_LIBS="$LIBS"
LIBS="$LIBS $ROUND_LIBM"
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#ifndef __NO_MATH_INLINES
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
extern
#ifdef __cplusplus
"C"
#endif
double round (double);
]gl_DOUBLE_MINUS_ZERO_CODE[
]gl_DOUBLE_SIGNBIT_CODE[
static double dummy (double f) { return 0; }
int main (int argc, char *argv[])
{
double (*my_round) (double) = argc ? round : dummy;
/* Test whether round (-0.0) is -0.0. */
if (signbitd (minus_zerod) && !signbitd (my_round (minus_zerod)))
return 1;
return 0;
}
]])],
[gl_cv_func_round_ieee=yes],
[gl_cv_func_round_ieee=no],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_round_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_round_ieee="guessing no" ;;
esac
])
LIBS="$save_LIBS"
])
case "$gl_cv_func_round_ieee" in
*yes) ;;
*) REPLACE_ROUND=1 ;;
esac
fi
])
else
HAVE_ROUND=0
HAVE_DECL_ROUND=0
fi
if test $HAVE_ROUND = 0 || test $REPLACE_ROUND = 1; then
dnl Find libraries needed to link lib/round.c.
gl_FUNC_FLOOR_LIBS
gl_FUNC_CEIL_LIBS
ROUND_LIBM=
dnl Append $FLOOR_LIBM to ROUND_LIBM, avoiding gratuitous duplicates.
case " $ROUND_LIBM " in
*" $FLOOR_LIBM "*) ;;
*) ROUND_LIBM="$ROUND_LIBM $FLOOR_LIBM" ;;
esac
dnl Append $CEIL_LIBM to ROUND_LIBM, avoiding gratuitous duplicates.
case " $ROUND_LIBM " in
*" $CEIL_LIBM "*) ;;
*) ROUND_LIBM="$ROUND_LIBM $CEIL_LIBM" ;;
esac
fi
AC_SUBST([ROUND_LIBM])
])

View file

@ -1,4 +1,4 @@
# setenv.m4 serial 25
# setenv.m4 serial 26
dnl Copyright (C) 2001-2004, 2006-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_SETENV],
[
AC_REQUIRE([gl_FUNC_SETENV_SEPARATE])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
if test $ac_cv_func_setenv = no; then
HAVE_SETENV=0
else
@ -33,10 +34,19 @@ AC_DEFUN([gl_FUNC_SETENV],
return result;
]])],
[gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no],
[gl_cv_func_setenv_works="guessing no"])])
if test "$gl_cv_func_setenv_works" != yes; then
REPLACE_SETENV=1
fi
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_setenv_works="guessing no" ;;
esac
])])
case "$gl_cv_func_setenv_works" in
*yes) ;;
*)
REPLACE_SETENV=1
;;
esac
fi
])
@ -56,6 +66,7 @@ AC_DEFUN([gl_FUNC_SETENV_SEPARATE],
AC_DEFUN([gl_FUNC_UNSETENV],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_DECLS_ONCE([unsetenv])
if test $ac_cv_have_decl_unsetenv = no; then
HAVE_DECL_UNSETENV=0
@ -115,10 +126,19 @@ int unsetenv (const char *name);
if (getenv ("a")) return 6;
]])],
[gl_cv_func_unsetenv_works=yes], [gl_cv_func_unsetenv_works=no],
[gl_cv_func_unsetenv_works="guessing no"])])
if test "$gl_cv_func_unsetenv_works" != yes; then
REPLACE_UNSETENV=1
fi
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_unsetenv_works="guessing no" ;;
esac
])])
case "$gl_cv_func_unsetenv_works" in
*yes) ;;
*)
REPLACE_UNSETENV=1
;;
esac
fi
])

View file

@ -1,4 +1,4 @@
# serial 8
# serial 10
# Copyright (C) 2009-2012 Free Software Foundation, Inc.
#
@ -23,8 +23,9 @@ AC_DEFUN([gl_FUNC_STAT],
mingw*) gl_cv_func_stat_dir_slash="guessing no";;
*) gl_cv_func_stat_dir_slash="guessing yes";;
esac])])
dnl AIX 7.1, Solaris 9 mistakenly succeed on stat("file/")
dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/")
dnl AIX 7.1, Solaris 9, mingw64 mistakenly succeed on stat("file/").
dnl (For mingw, this is due to a broken stat() override in libmingwex.a.)
dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/").
AC_CACHE_CHECK([whether stat handles trailing slashes on files],
[gl_cv_func_stat_file_slash],
[touch conftest.tmp
@ -46,7 +47,13 @@ AC_DEFUN([gl_FUNC_STAT],
return result;
]])],
[gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no],
[gl_cv_func_stat_file_slash="guessing no"])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_stat_file_slash="guessing no" ;;
esac
])
rm -f conftest.tmp conftest.lnk])
case $gl_cv_func_stat_dir_slash in
*no) REPLACE_STAT=1

View file

@ -14,13 +14,27 @@ AC_DEFUN([gl_STDALIGN_H],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <stdalign.h>
int align_int = alignof (int) + _Alignof (double);
#include <stddef.h>
/* Test that alignof yields a result consistent with offsetof.
This catches GCC bug 52023
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
#ifdef __cplusplus
template <class t> struct alignof_helper { char a; t b; };
# define ao(type) offsetof (alignof_helper<type>, b)
#else
# define ao(type) offsetof (struct { char a; type b; }, b)
#endif
char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
/* Test _Alignas only on platforms where gnulib can help. */
#if \
(__GNUC__ || __IBMC__ || __IBMCPP__ \
|| 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
int alignas (8) alignas_int = 1;
char test_alignas[_Alignof (alignas_int) == 8 ? 1 : -1];
#endif
]])],
[gl_cv_header_working_stdalign_h=yes],

View file

@ -1,4 +1,4 @@
# stdio_h.m4 serial 40
# stdio_h.m4 serial 42
dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -13,12 +13,13 @@ AC_DEFUN([gl_STDIO_H],
dnl No need to create extra modules for these functions. Everyone who uses
dnl <stdio.h> likely needs them.
GNULIB_FSCANF=1
gl_MODULE_INDICATOR([fscanf])
GNULIB_SCANF=1
gl_MODULE_INDICATOR([scanf])
GNULIB_FGETC=1
GNULIB_GETC=1
GNULIB_GETCHAR=1
GNULIB_FGETS=1
GNULIB_GETS=1
GNULIB_FREAD=1
dnl This ifdef is necessary to avoid an error "missing file lib/stdio-read.c"
dnl "expected source file, required through AC_LIBSOURCES, not found". It is
@ -72,10 +73,10 @@ AC_DEFUN([gl_STDIO_H],
dnl Check for declarations of anything we want to poison if the
dnl corresponding gnulib module is not in use, and which is not
dnl guaranteed by C89.
dnl guaranteed by both C89 and C11.
gl_WARN_ON_USE_PREPARE([[#include <stdio.h>
]], [dprintf fpurge fseeko ftello getdelim getline pclose popen renameat
snprintf tmpfile vdprintf vsnprintf])
]], [dprintf fpurge fseeko ftello getdelim getline gets pclose popen
renameat snprintf tmpfile vdprintf vsnprintf])
])
AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
@ -113,7 +114,6 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS],
GNULIB_GETCHAR=0; AC_SUBST([GNULIB_GETCHAR])
GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM])
GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE])
GNULIB_GETS=0; AC_SUBST([GNULIB_GETS])
GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF])
GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
GNULIB_PCLOSE=0; AC_SUBST([GNULIB_PCLOSE])

View file

@ -1,45 +0,0 @@
# strcase.m4 serial 11
dnl Copyright (C) 2002, 2005-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_STRCASE],
[
gl_FUNC_STRCASECMP
gl_FUNC_STRNCASECMP
])
AC_DEFUN([gl_FUNC_STRCASECMP],
[
AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
AC_CHECK_FUNCS([strcasecmp])
if test $ac_cv_func_strcasecmp = no; then
HAVE_STRCASECMP=0
fi
])
AC_DEFUN([gl_FUNC_STRNCASECMP],
[
AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
AC_CHECK_FUNCS([strncasecmp])
if test $ac_cv_func_strncasecmp = yes; then
HAVE_STRNCASECMP=1
else
HAVE_STRNCASECMP=0
fi
AC_CHECK_DECLS([strncasecmp])
if test $ac_cv_have_decl_strncasecmp = no; then
HAVE_DECL_STRNCASECMP=0
fi
])
# Prerequisites of lib/strcasecmp.c.
AC_DEFUN([gl_PREREQ_STRCASECMP], [
:
])
# Prerequisites of lib/strncasecmp.c.
AC_DEFUN([gl_PREREQ_STRNCASECMP], [
:
])

View file

@ -1,52 +0,0 @@
# Configure a replacement for <strings.h>.
# serial 6
# Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_HEADER_STRINGS_H],
[
dnl Use AC_REQUIRE here, so that the default behavior below is expanded
dnl once only, before all statements that occur in other macros.
AC_REQUIRE([gl_HEADER_STRINGS_H_BODY])
])
AC_DEFUN([gl_HEADER_STRINGS_H_BODY],
[
AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
gl_CHECK_NEXT_HEADERS([strings.h])
if test $ac_cv_header_strings_h = yes; then
HAVE_STRINGS_H=1
else
HAVE_STRINGS_H=0
fi
AC_SUBST([HAVE_STRINGS_H])
dnl Check for declarations of anything we want to poison if the
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[
/* Minix 3.1.8 has a bug: <sys/types.h> must be included before
<strings.h>. */
#include <sys/types.h>
#include <strings.h>
]], [ffs strcasecmp strncasecmp])
])
AC_DEFUN([gl_STRINGS_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
gl_MODULE_INDICATOR_SET_VARIABLE([$1])
])
AC_DEFUN([gl_HEADER_STRINGS_H_DEFAULTS],
[
GNULIB_FFS=0; AC_SUBST([GNULIB_FFS])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_FFS=1; AC_SUBST([HAVE_FFS])
HAVE_STRCASECMP=1; AC_SUBST([HAVE_STRCASECMP])
HAVE_DECL_STRNCASECMP=1; AC_SUBST([HAVE_DECL_STRNCASECMP])
])

View file

@ -1,4 +1,4 @@
# sys_stat_h.m4 serial 26 -*- Autoconf -*-
# sys_stat_h.m4 serial 27 -*- Autoconf -*-
dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -22,6 +22,19 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H],
dnl Ensure the type mode_t gets defined.
AC_REQUIRE([AC_TYPE_MODE_T])
dnl Whether to override 'struct stat'.
m4_ifdef([gl_LARGEFILE], [
AC_REQUIRE([gl_LARGEFILE])
], [
WINDOWS_64_BIT_ST_SIZE=0
])
AC_SUBST([WINDOWS_64_BIT_ST_SIZE])
if test $WINDOWS_64_BIT_ST_SIZE = 1; then
AC_DEFINE([_GL_WINDOWS_64_BIT_ST_SIZE], [1],
[Define to 1 if Gnulib overrides 'struct stat' on Windows so that
struct stat.st_size becomes 64-bit.])
fi
dnl Define types that are supposed to be defined in <sys/types.h> or
dnl <sys/stat.h>.
AC_CHECK_TYPE([nlink_t], [],

View file

@ -1,5 +1,5 @@
# Configure a replacement for <sys/time.h>.
# serial 7
# serial 8
# Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@ -43,9 +43,40 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
]],
[[static struct timeval x; x.tv_sec = x.tv_usec;]])],
[gl_cv_sys_struct_timeval=yes],
[gl_cv_sys_struct_timeval=no])])
[gl_cv_sys_struct_timeval=no])
])
if test $gl_cv_sys_struct_timeval != yes; then
HAVE_STRUCT_TIMEVAL=0
else
dnl On native Windows with a 64-bit 'time_t', 'struct timeval' is defined
dnl (in <sys/time.h> and <winsock2.h> for mingw64, in <winsock2.h> only
dnl for MSVC) with a tv_sec field of type 'long' (32-bit!), which is
dnl smaller than the 'time_t' type mandated by POSIX.
dnl On OpenBSD 5.1 amd64, tv_sec is 64 bits and time_t 32 bits, but
dnl that is good enough.
AC_CACHE_CHECK([for wide-enough struct timeval.tv_sec member],
[gl_cv_sys_struct_timeval_tv_sec],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#if HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include <time.h>
#if HAVE_WINSOCK2_H
# include <winsock2.h>
#endif
]],
[[static struct timeval x;
typedef int verify_tv_sec_type[
sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
];
]])],
[gl_cv_sys_struct_timeval_tv_sec=yes],
[gl_cv_sys_struct_timeval_tv_sec=no])
])
if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
REPLACE_STRUCT_TIMEVAL=1
fi
fi
dnl Check for declarations of anything we want to poison if the
@ -75,4 +106,5 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS],
HAVE_STRUCT_TIMEVAL=1; AC_SUBST([HAVE_STRUCT_TIMEVAL])
HAVE_SYS_TIME_H=1; AC_SUBST([HAVE_SYS_TIME_H])
REPLACE_GETTIMEOFDAY=0; AC_SUBST([REPLACE_GETTIMEOFDAY])
REPLACE_STRUCT_TIMEVAL=0; AC_SUBST([REPLACE_STRUCT_TIMEVAL])
])

View file

@ -1,4 +1,4 @@
# sys_types_h.m4 serial 2
# sys_types_h.m4 serial 4
dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -14,6 +14,9 @@ AC_DEFUN([gl_SYS_TYPES_H],
dnl Ensure the type mode_t gets defined.
AC_REQUIRE([AC_TYPE_MODE_T])
dnl Whether to override the 'off_t' type.
AC_REQUIRE([gl_TYPE_OFF_T])
])
AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],

View file

@ -2,7 +2,7 @@
# Copyright (C) 2000-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc.
# serial 6
# serial 7
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -25,7 +25,7 @@ AC_DEFUN([gl_HEADER_TIME_H_BODY],
AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
])
dnl Define HAVE_STRUCT_TIMESPEC if 'struct timespec' is declared
dnl Check whether 'struct timespec' is declared
dnl in time.h, sys/time.h, or pthread.h.
AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],

View file

@ -17,7 +17,7 @@ AC_DEFUN([gl_TIME_R],
dnl Some systems don't declare localtime_r() and gmtime_r() if _REENTRANT is
dnl not defined.
AC_CHECK_DECLS_ONCE([localtime_r])
AC_CHECK_DECLS([localtime_r], [], [], [[#include <time.h>]])
if test $ac_cv_have_decl_localtime_r = no; then
HAVE_DECL_LOCALTIME_R=0
fi

View file

@ -1,4 +1,4 @@
# trunc.m4 serial 8
# trunc.m4 serial 9
dnl Copyright (C) 2007, 2010-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -43,6 +43,7 @@ AC_DEFUN([gl_FUNC_TRUNC],
fi
m4_ifdef([gl_FUNC_TRUNC_IEEE], [
if test $gl_trunc_required = ieee && test $REPLACE_TRUNC = 0; then
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether trunc works according to ISO C 99 with IEC 60559],
[gl_cv_func_trunc_ieee],
[
@ -68,7 +69,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_trunc_ieee=yes],
[gl_cv_func_trunc_ieee=no],
[gl_cv_func_trunc_ieee="guessing no"])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_trunc_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_trunc_ieee="guessing no" ;;
esac
])
LIBS="$save_LIBS"
])
case "$gl_cv_func_trunc_ieee" in

View file

@ -1,4 +1,4 @@
# unistd_h.m4 serial 63
# unistd_h.m4 serial 65
dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -24,6 +24,9 @@ AC_DEFUN([gl_UNISTD_H],
dnl Ensure the type pid_t gets defined.
AC_REQUIRE([AC_TYPE_PID_T])
dnl Determine WINDOWS_64_BIT_OFF_T.
AC_REQUIRE([gl_TYPE_OFF_T])
dnl Check for declarations of anything we want to poison if the
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[
@ -155,6 +158,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
REPLACE_DUP=0; AC_SUBST([REPLACE_DUP])
REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2])
REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT])
REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE])
REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME])
REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R])

View file

@ -1,4 +1,4 @@
# vasnprintf.m4 serial 34
# vasnprintf.m4 serial 35
dnl Copyright (C) 2002-2004, 2006-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -29,7 +29,7 @@ AC_DEFUN([gl_REPLACE_VASNPRINTF],
gl_PREREQ_ASNPRINTF
])
# Prequisites of lib/printf-args.h, lib/printf-args.c.
# Prerequisites of lib/printf-args.h, lib/printf-args.c.
AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
[
AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
@ -37,7 +37,7 @@ AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
AC_REQUIRE([gt_TYPE_WINT_T])
])
# Prequisites of lib/printf-parse.h, lib/printf-parse.c.
# Prerequisites of lib/printf-parse.h, lib/printf-parse.c.
AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
[
AC_REQUIRE([gl_FEATURES_H])

View file

@ -1,4 +1,4 @@
# visibility.m4 serial 4 (gettext-0.18.2)
# visibility.m4 serial 5 (gettext-0.18.2)
dnl Copyright (C) 2005, 2008, 2010-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -12,7 +12,7 @@ dnl __attribute__((__visibility__("hidden"))) and
dnl __attribute__((__visibility__("default"))).
dnl Does *not* test for __visibility__("protected") - which has tricky
dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
dnl MacOS X.
dnl Mac OS X.
dnl Does *not* test for __visibility__("internal") - which has processor
dnl dependent semantics.
dnl Does *not* test for #pragma GCC visibility push(hidden) - which is

View file

@ -1,4 +1,4 @@
# warn-on-use.m4 serial 4
# warn-on-use.m4 serial 5
dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -18,8 +18,8 @@ dnl with or without modifications, as long as this notice is preserved.
# some systems declare functions in the wrong header, then INCLUDES
# should do likewise.
#
# If you assume C89, then it is generally safe to assume declarations
# for functions declared in that standard (such as gets) without
# It is generally safe to assume declarations for functions declared
# in the intersection of C89 and C11 (such as printf) without
# needing gl_WARN_ON_USE_PREPARE.
AC_DEFUN([gl_WARN_ON_USE_PREPARE],
[

View file

@ -1,4 +1,4 @@
# warnings.m4 serial 5
# warnings.m4 serial 7
dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -14,24 +14,48 @@ m4_ifdef([AS_VAR_APPEND],
[m4_define([gl_AS_VAR_APPEND],
[AS_VAR_SET([$1], [AS_VAR_GET([$1])$2])])])
# gl_WARN_ADD(PARAMETER, [VARIABLE = WARN_CFLAGS])
# ------------------------------------------------
# Adds parameter to WARN_CFLAGS if the compiler supports it. For example,
# gl_WARN_ADD([-Wparentheses]).
AC_DEFUN([gl_WARN_ADD],
dnl FIXME: gl_Warn must be used unquoted until we can assume
dnl autoconf 2.64 or newer.
[AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_$1])dnl
AC_CACHE_CHECK([whether compiler handles $1], m4_defn([gl_Warn]), [
gl_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="${CPPFLAGS} $1"
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([])],
# gl_COMPILER_OPTION_IF(OPTION, [IF-SUPPORTED], [IF-NOT-SUPPORTED],
# [PROGRAM = AC_LANG_PROGRAM()])
# -----------------------------------------------------------------
# Check if the compiler supports OPTION when compiling PROGRAM.
#
# FIXME: gl_Warn must be used unquoted until we can assume Autoconf
# 2.64 or newer.
AC_DEFUN([gl_COMPILER_OPTION_IF],
[AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_[]_AC_LANG_ABBREV[]_$1])dnl
AS_VAR_PUSHDEF([gl_Flags], [_AC_LANG_PREFIX[]FLAGS])dnl
AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], m4_defn([gl_Warn]), [
gl_save_compiler_FLAGS="$gl_Flags"
gl_AS_VAR_APPEND(m4_defn([gl_Flags]), [" $1"])
AC_COMPILE_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([])])],
[AS_VAR_SET(gl_Warn, [yes])],
[AS_VAR_SET(gl_Warn, [no])])
CPPFLAGS="$gl_save_CPPFLAGS"
gl_Flags="$gl_save_compiler_FLAGS"
])
AS_VAR_IF(gl_Warn, [yes],
[gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])])
AS_VAR_IF(gl_Warn, [yes], [$2], [$3])
AS_VAR_POPDEF([gl_Flags])dnl
AS_VAR_POPDEF([gl_Warn])dnl
m4_ifval([$2], [AS_LITERAL_IF([$2], [AC_SUBST([$2])], [])])dnl
])
# gl_WARN_ADD(OPTION, [VARIABLE = WARN_CFLAGS],
# [PROGRAM = AC_LANG_PROGRAM()])
# ---------------------------------------------
# Adds parameter to WARN_CFLAGS if the compiler supports it when
# compiling PROGRAM. For example, gl_WARN_ADD([-Wparentheses]).
#
# If VARIABLE is a variable name, AC_SUBST it.
AC_DEFUN([gl_WARN_ADD],
[gl_COMPILER_OPTION_IF([$1],
[gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])],
[],
[$3])
m4_ifval([$2],
[AS_LITERAL_IF([$2], [AC_SUBST([$2])])],
[AC_SUBST([WARN_CFLAGS])])dnl
])
# Local Variables:
# mode: autoconf
# End:

View file

@ -1,4 +1,4 @@
# wctype_h.m4 serial 16
# wctype_h.m4 serial 17
dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
@ -57,7 +57,8 @@ AC_DEFUN([gl_WCTYPE_H],
#if __GNU_LIBRARY__ == 1
Linux libc5 i18n is broken.
#endif]], [])],
[gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no])
[gl_cv_func_iswcntrl_works="guessing yes"],
[gl_cv_func_iswcntrl_works="guessing no"])
])
])
fi
@ -67,11 +68,10 @@ AC_DEFUN([gl_WCTYPE_H],
fi
AC_SUBST([HAVE_WCTYPE_H])
if test "$gl_cv_func_iswcntrl_works" = no; then
REPLACE_ISWCNTRL=1
else
REPLACE_ISWCNTRL=0
fi
case "$gl_cv_func_iswcntrl_works" in
*yes) REPLACE_ISWCNTRL=0 ;;
*) REPLACE_ISWCNTRL=1 ;;
esac
AC_SUBST([REPLACE_ISWCNTRL])
if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then