summaryrefslogtreecommitdiff
path: root/gl/m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4')
-rw-r--r--gl/m4/alphasort.m421
-rw-r--r--gl/m4/argp.m461
-rw-r--r--gl/m4/closedir.m425
-rw-r--r--gl/m4/dirent_h.m464
-rw-r--r--gl/m4/dirname.m419
-rw-r--r--gl/m4/double-slash-root.m438
-rw-r--r--gl/m4/eealloc.m431
-rw-r--r--gl/m4/environ.m447
-rw-r--r--gl/m4/error.m427
-rw-r--r--gl/m4/exponentf.m492
-rw-r--r--gl/m4/exponentl.m498
-rw-r--r--gl/m4/frexp.m4172
-rw-r--r--gl/m4/frexpl.m4231
-rw-r--r--gl/m4/fseterr.m410
-rw-r--r--gl/m4/getopt.m4368
-rw-r--r--gl/m4/getsubopt.m420
-rw-r--r--gl/m4/gnulib-cache.m413
-rw-r--r--gl/m4/gnulib-comp.m4440
-rw-r--r--gl/m4/isnand.m496
-rw-r--r--gl/m4/isnanf.m4188
-rw-r--r--gl/m4/isnanl.m4255
-rw-r--r--gl/m4/ldexpl.m4133
-rw-r--r--gl/m4/malloca.m415
-rw-r--r--gl/m4/mempcpy.m426
-rw-r--r--gl/m4/nocrash.m4130
-rw-r--r--gl/m4/opendir.m425
-rw-r--r--gl/m4/printf-frexp.m438
-rw-r--r--gl/m4/printf-frexpl.m448
-rw-r--r--gl/m4/putenv.m456
-rw-r--r--gl/m4/rawmemchr.m420
-rw-r--r--gl/m4/readdir.m415
-rw-r--r--gl/m4/scandir.m421
-rw-r--r--gl/m4/setenv.m4160
-rw-r--r--gl/m4/signbit.m4365
-rw-r--r--gl/m4/sleep.m462
-rw-r--r--gl/m4/stdarg.m478
-rw-r--r--gl/m4/strchrnul.m450
-rw-r--r--gl/m4/sysexits.m444
-rw-r--r--gl/m4/version-etc.m433
-rw-r--r--gl/m4/vfprintf-posix.m4110
-rw-r--r--gl/m4/vprintf-posix.m425
41 files changed, 20 insertions, 3750 deletions
diff --git a/gl/m4/alphasort.m4 b/gl/m4/alphasort.m4
deleted file mode 100644
index bb5e9d0976..0000000000
--- a/gl/m4/alphasort.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-# alphasort.m4 serial 2
-dnl Copyright (C) 2009-2013 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_ALPHASORT],
-[
- AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
-
- dnl Persuade glibc and Solaris <dirent.h> to declare alphasort().
- AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
-
- AC_CHECK_FUNCS([alphasort])
- if test $ac_cv_func_alphasort = no; then
- HAVE_ALPHASORT=0
- fi
-])
-
-# Prerequisites of lib/alphasort.c.
-AC_DEFUN([gl_PREREQ_ALPHASORT], [:])
diff --git a/gl/m4/argp.m4 b/gl/m4/argp.m4
deleted file mode 100644
index 4445d8e6c3..0000000000
--- a/gl/m4/argp.m4
+++ /dev/null
@@ -1,61 +0,0 @@
-# argp.m4 serial 14
-dnl Copyright (C) 2003-2013 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_ARGP],
-[
- AC_REQUIRE([AC_C_INLINE])
- AC_REQUIRE([AC_C_RESTRICT])
- AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
-
- AC_CHECK_DECLS([program_invocation_name], [],
- [AC_DEFINE([GNULIB_PROGRAM_INVOCATION_NAME], [1],
- [Define to 1 to add extern declaration of program_invocation_name to argp.h])],
- [[#include <errno.h>]])
- AC_CHECK_DECLS([program_invocation_short_name], [],
- [AC_DEFINE([GNULIB_PROGRAM_INVOCATION_SHORT_NAME], [1],
- [Define to 1 to add extern declaration of program_invocation_short_name to argp.h])],
- [[#include <errno.h>]])
-
- # Check if program_invocation_name and program_invocation_short_name
- # are defined elsewhere. It is improbable that only one of them will
- # be defined and other not, I prefer to stay on the safe side and to
- # test each one separately.
- AC_MSG_CHECKING([whether program_invocation_name is defined])
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <argp.h>]],
- [[program_invocation_name = "test";]])],
- [AC_DEFINE([HAVE_PROGRAM_INVOCATION_NAME], [1],
- [Define if program_invocation_name is defined])
- AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])])
-
- AC_MSG_CHECKING([whether program_invocation_short_name is defined])
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <argp.h>]],
- [[program_invocation_short_name = "test";]])],
- [AC_DEFINE([HAVE_PROGRAM_INVOCATION_SHORT_NAME], [1],
- [Define if program_invocation_short_name is defined])
- AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])])
-
- AC_CHECK_DECLS_ONCE([clearerr_unlocked])
- AC_CHECK_DECLS_ONCE([feof_unlocked])
- AC_CHECK_DECLS_ONCE([ferror_unlocked])
- AC_CHECK_DECLS_ONCE([fflush_unlocked])
- AC_CHECK_DECLS_ONCE([fgets_unlocked])
- AC_CHECK_DECLS_ONCE([fputc_unlocked])
- AC_CHECK_DECLS_ONCE([fputs_unlocked])
- AC_CHECK_DECLS_ONCE([fread_unlocked])
- AC_CHECK_DECLS_ONCE([fwrite_unlocked])
- AC_CHECK_DECLS_ONCE([getc_unlocked])
- AC_CHECK_DECLS_ONCE([getchar_unlocked])
- AC_CHECK_DECLS_ONCE([putc_unlocked])
- AC_CHECK_DECLS_ONCE([putchar_unlocked])
- AC_CHECK_FUNCS_ONCE([flockfile funlockfile])
- AC_CHECK_HEADERS_ONCE([features.h linewrap.h])
-])
-
-dnl argp-parse.c depends on GNU getopt internals, therefore use GNU getopt
-dnl always.
-AC_DEFUN([gl_REPLACE_GETOPT_ALWAYS], [])
diff --git a/gl/m4/closedir.m4 b/gl/m4/closedir.m4
deleted file mode 100644
index bb8708b69b..0000000000
--- a/gl/m4/closedir.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-# closedir.m4 serial 2
-dnl Copyright (C) 2011-2013 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_CLOSEDIR],
-[
- AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
-
- AC_CHECK_FUNCS([closedir])
- if test $ac_cv_func_closedir = no; then
- HAVE_CLOSEDIR=0
- fi
- dnl Replace closedir() for supporting the gnulib-defined fchdir() function,
- dnl to keep fchdir's bookkeeping up-to-date.
- m4_ifdef([gl_FUNC_FCHDIR], [
- gl_TEST_FCHDIR
- if test $HAVE_FCHDIR = 0; then
- if test $HAVE_CLOSEDIR = 1; then
- REPLACE_CLOSEDIR=1
- fi
- fi
- ])
-])
diff --git a/gl/m4/dirent_h.m4 b/gl/m4/dirent_h.m4
deleted file mode 100644
index 54c1663431..0000000000
--- a/gl/m4/dirent_h.m4
+++ /dev/null
@@ -1,64 +0,0 @@
-# dirent_h.m4 serial 16
-dnl Copyright (C) 2008-2013 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 Written by Bruno Haible.
-
-AC_DEFUN([gl_DIRENT_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_DIRENT_H_DEFAULTS])
-
- dnl <dirent.h> is always overridden, because of GNULIB_POSIXCHECK.
- gl_CHECK_NEXT_HEADERS([dirent.h])
- if test $ac_cv_header_dirent_h = yes; then
- HAVE_DIRENT_H=1
- else
- HAVE_DIRENT_H=0
- fi
- AC_SUBST([HAVE_DIRENT_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([[#include <dirent.h>
- ]], [alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir])
-])
-
-AC_DEFUN([gl_DIRENT_MODULE_INDICATOR],
-[
- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
- AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
- gl_MODULE_INDICATOR_SET_VARIABLE([$1])
- dnl Define it also as a C macro, for the benefit of the unit tests.
- gl_MODULE_INDICATOR_FOR_TESTS([$1])
-])
-
-AC_DEFUN([gl_DIRENT_H_DEFAULTS],
-[
- AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR
- GNULIB_OPENDIR=0; AC_SUBST([GNULIB_OPENDIR])
- GNULIB_READDIR=0; AC_SUBST([GNULIB_READDIR])
- GNULIB_REWINDDIR=0; AC_SUBST([GNULIB_REWINDDIR])
- GNULIB_CLOSEDIR=0; AC_SUBST([GNULIB_CLOSEDIR])
- GNULIB_DIRFD=0; AC_SUBST([GNULIB_DIRFD])
- GNULIB_FDOPENDIR=0; AC_SUBST([GNULIB_FDOPENDIR])
- GNULIB_SCANDIR=0; AC_SUBST([GNULIB_SCANDIR])
- GNULIB_ALPHASORT=0; AC_SUBST([GNULIB_ALPHASORT])
- dnl Assume proper GNU behavior unless another module says otherwise.
- HAVE_OPENDIR=1; AC_SUBST([HAVE_OPENDIR])
- HAVE_READDIR=1; AC_SUBST([HAVE_READDIR])
- HAVE_REWINDDIR=1; AC_SUBST([HAVE_REWINDDIR])
- HAVE_CLOSEDIR=1; AC_SUBST([HAVE_CLOSEDIR])
- HAVE_DECL_DIRFD=1; AC_SUBST([HAVE_DECL_DIRFD])
- HAVE_DECL_FDOPENDIR=1;AC_SUBST([HAVE_DECL_FDOPENDIR])
- HAVE_FDOPENDIR=1; AC_SUBST([HAVE_FDOPENDIR])
- HAVE_SCANDIR=1; AC_SUBST([HAVE_SCANDIR])
- HAVE_ALPHASORT=1; AC_SUBST([HAVE_ALPHASORT])
- REPLACE_OPENDIR=0; AC_SUBST([REPLACE_OPENDIR])
- REPLACE_CLOSEDIR=0; AC_SUBST([REPLACE_CLOSEDIR])
- REPLACE_DIRFD=0; AC_SUBST([REPLACE_DIRFD])
- REPLACE_FDOPENDIR=0; AC_SUBST([REPLACE_FDOPENDIR])
-])
diff --git a/gl/m4/dirname.m4 b/gl/m4/dirname.m4
deleted file mode 100644
index 5897a2a8b3..0000000000
--- a/gl/m4/dirname.m4
+++ /dev/null
@@ -1,19 +0,0 @@
-#serial 10 -*- autoconf -*-
-dnl Copyright (C) 2002-2006, 2009-2013 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_DIRNAME],
-[
- AC_REQUIRE([gl_DIRNAME_LGPL])
-])
-
-AC_DEFUN([gl_DIRNAME_LGPL],
-[
- dnl Prerequisites of lib/dirname.h.
- AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
-
- dnl No prerequisites of lib/basename-lgpl.c, lib/dirname-lgpl.c,
- dnl lib/stripslash.c.
-])
diff --git a/gl/m4/double-slash-root.m4 b/gl/m4/double-slash-root.m4
deleted file mode 100644
index bd6f867143..0000000000
--- a/gl/m4/double-slash-root.m4
+++ /dev/null
@@ -1,38 +0,0 @@
-# double-slash-root.m4 serial 4 -*- Autoconf -*-
-dnl Copyright (C) 2006, 2008-2013 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_DOUBLE_SLASH_ROOT],
-[
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_CACHE_CHECK([whether // is distinct from /], [gl_cv_double_slash_root],
- [ if test x"$cross_compiling" = xyes ; then
- # When cross-compiling, there is no way to tell whether // is special
- # short of a list of hosts. However, the only known hosts to date
- # that have a distinct // are Apollo DomainOS (too old to port to),
- # Cygwin, and z/OS. If anyone knows of another system for which // has
- # special semantics and is distinct from /, please report it to
- # <bug-gnulib@gnu.org>.
- case $host in
- *-cygwin | i370-ibm-openedition)
- gl_cv_double_slash_root=yes ;;
- *)
- # Be optimistic and assume that / and // are the same when we
- # don't know.
- gl_cv_double_slash_root='unknown, assuming no' ;;
- esac
- else
- set x `ls -di / // 2>/dev/null`
- if test "$[2]" = "$[4]" && wc //dev/null >/dev/null 2>&1; then
- gl_cv_double_slash_root=no
- else
- gl_cv_double_slash_root=yes
- fi
- fi])
- if test "$gl_cv_double_slash_root" = yes; then
- AC_DEFINE([DOUBLE_SLASH_IS_DISTINCT_ROOT], [1],
- [Define to 1 if // is a file system root distinct from /.])
- fi
-])
diff --git a/gl/m4/eealloc.m4 b/gl/m4/eealloc.m4
deleted file mode 100644
index c640ec1299..0000000000
--- a/gl/m4/eealloc.m4
+++ /dev/null
@@ -1,31 +0,0 @@
-# eealloc.m4 serial 3
-dnl Copyright (C) 2003, 2009-2013 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_EEALLOC],
-[
- AC_REQUIRE([gl_EEMALLOC])
- AC_REQUIRE([gl_EEREALLOC])
-])
-
-AC_DEFUN([gl_EEMALLOC],
-[
- _AC_FUNC_MALLOC_IF(
- [gl_cv_func_malloc_0_nonnull=1],
- [gl_cv_func_malloc_0_nonnull=0])
- AC_DEFINE_UNQUOTED([MALLOC_0_IS_NONNULL], [$gl_cv_func_malloc_0_nonnull],
- [If malloc(0) is != NULL, define this to 1. Otherwise define this
- to 0.])
-])
-
-AC_DEFUN([gl_EEREALLOC],
-[
- _AC_FUNC_REALLOC_IF(
- [gl_cv_func_realloc_0_nonnull=1],
- [gl_cv_func_realloc_0_nonnull=0])
- AC_DEFINE_UNQUOTED([REALLOC_0_IS_NONNULL], [$gl_cv_func_realloc_0_nonnull],
- [If realloc(NULL,0) is != NULL, define this to 1. Otherwise define this
- to 0.])
-])
diff --git a/gl/m4/environ.m4 b/gl/m4/environ.m4
deleted file mode 100644
index 593a33ed42..0000000000
--- a/gl/m4/environ.m4
+++ /dev/null
@@ -1,47 +0,0 @@
-# environ.m4 serial 6
-dnl Copyright (C) 2001-2004, 2006-2013 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_ONCE([gl_ENVIRON],
-[
- AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- dnl Persuade glibc <unistd.h> to declare environ.
- AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
-
- AC_CHECK_HEADERS_ONCE([unistd.h])
- gt_CHECK_VAR_DECL(
- [#if HAVE_UNISTD_H
- #include <unistd.h>
- #endif
- /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
- #include <stdlib.h>
- ],
- [environ])
- if test $gt_cv_var_environ_declaration != yes; then
- HAVE_DECL_ENVIRON=0
- fi
-])
-
-# Check if a variable is properly declared.
-# gt_CHECK_VAR_DECL(includes,variable)
-AC_DEFUN([gt_CHECK_VAR_DECL],
-[
- define([gt_cv_var], [gt_cv_var_]$2[_declaration])
- AC_MSG_CHECKING([if $2 is properly declared])
- AC_CACHE_VAL([gt_cv_var], [
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[$1
- extern struct { int foo; } $2;]],
- [[$2.foo = 1;]])],
- [gt_cv_var=no],
- [gt_cv_var=yes])])
- AC_MSG_RESULT([$gt_cv_var])
- if test $gt_cv_var = yes; then
- AC_DEFINE([HAVE_]m4_translit($2, [a-z], [A-Z])[_DECL], 1,
- [Define if you have the declaration of $2.])
- fi
- undefine([gt_cv_var])
-])
diff --git a/gl/m4/error.m4 b/gl/m4/error.m4
deleted file mode 100644
index 29e6fdc9c2..0000000000
--- a/gl/m4/error.m4
+++ /dev/null
@@ -1,27 +0,0 @@
-#serial 14
-
-# Copyright (C) 1996-1998, 2001-2004, 2009-2013 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_ERROR],
-[
- dnl We don't use AC_FUNC_ERROR_AT_LINE any more, because it is no longer
- dnl maintained in Autoconf and because it invokes AC_LIBOBJ.
- AC_CACHE_CHECK([for error_at_line], [ac_cv_lib_error_at_line],
- [AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <error.h>]],
- [[error_at_line (0, 0, "", 0, "an error occurred");]])],
- [ac_cv_lib_error_at_line=yes],
- [ac_cv_lib_error_at_line=no])])
-])
-
-# Prerequisites of lib/error.c.
-AC_DEFUN([gl_PREREQ_ERROR],
-[
- AC_REQUIRE([AC_FUNC_STRERROR_R])
- :
-])
diff --git a/gl/m4/exponentf.m4 b/gl/m4/exponentf.m4
deleted file mode 100644
index 55a04e63cc..0000000000
--- a/gl/m4/exponentf.m4
+++ /dev/null
@@ -1,92 +0,0 @@
-# exponentf.m4 serial 2
-dnl Copyright (C) 2007-2008, 2010-2013 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_FLOAT_EXPONENT_LOCATION],
-[
- AC_CACHE_CHECK([where to find the exponent in a 'float'],
- [gl_cv_cc_float_expbit0],
- [
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
-#include <float.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <string.h>
-#define NWORDS \
- ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
-typedef union { float value; unsigned int word[NWORDS]; } memory_float;
-static unsigned int ored_words[NWORDS];
-static unsigned int anded_words[NWORDS];
-static void add_to_ored_words (float x)
-{
- memory_float m;
- size_t i;
- /* Clear it first, in case
- sizeof (float) < sizeof (memory_float). */
- memset (&m, 0, sizeof (memory_float));
- m.value = x;
- for (i = 0; i < NWORDS; i++)
- {
- ored_words[i] |= m.word[i];
- anded_words[i] &= m.word[i];
- }
-}
-int main ()
-{
- size_t j;
- FILE *fp = fopen ("conftest.out", "w");
- if (fp == NULL)
- return 1;
- for (j = 0; j < NWORDS; j++)
- anded_words[j] = ~ (unsigned int) 0;
- add_to_ored_words (0.25f);
- add_to_ored_words (0.5f);
- add_to_ored_words (1.0f);
- add_to_ored_words (2.0f);
- add_to_ored_words (4.0f);
- /* Remove bits that are common (e.g. if representation of the first mantissa
- bit is explicit). */
- for (j = 0; j < NWORDS; j++)
- ored_words[j] &= ~anded_words[j];
- /* Now find the nonzero word. */
- for (j = 0; j < NWORDS; j++)
- if (ored_words[j] != 0)
- break;
- if (j < NWORDS)
- {
- size_t i;
- for (i = j + 1; i < NWORDS; i++)
- if (ored_words[i] != 0)
- {
- fprintf (fp, "unknown");
- return (fclose (fp) != 0);
- }
- for (i = 0; ; i++)
- if ((ored_words[j] >> i) & 1)
- {
- fprintf (fp, "word %d bit %d", (int) j, (int) i);
- return (fclose (fp) != 0);
- }
- }
- fprintf (fp, "unknown");
- return (fclose (fp) != 0);
-}
- ]])],
- [gl_cv_cc_float_expbit0=`cat conftest.out`],
- [gl_cv_cc_float_expbit0="unknown"],
- [gl_cv_cc_float_expbit0="word 0 bit 23"])
- rm -f conftest.out
- ])
- case "$gl_cv_cc_float_expbit0" in
- word*bit*)
- word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
- bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
- AC_DEFINE_UNQUOTED([FLT_EXPBIT0_WORD], [$word],
- [Define as the word index where to find the exponent of 'float'.])
- AC_DEFINE_UNQUOTED([FLT_EXPBIT0_BIT], [$bit],
- [Define as the bit index in the word where to find bit 0 of the exponent of 'float'.])
- ;;
- esac
-])
diff --git a/gl/m4/exponentl.m4 b/gl/m4/exponentl.m4
deleted file mode 100644
index f877cf140f..0000000000
--- a/gl/m4/exponentl.m4
+++ /dev/null
@@ -1,98 +0,0 @@
-# exponentl.m4 serial 3
-dnl Copyright (C) 2007-2013 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_LONG_DOUBLE_EXPONENT_LOCATION],
-[
- AC_REQUIRE([gl_BIGENDIAN])
- AC_CACHE_CHECK([where to find the exponent in a 'long double'],
- [gl_cv_cc_long_double_expbit0],
- [
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
-#include <float.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <string.h>
-#define NWORDS \
- ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
-typedef union { long double value; unsigned int word[NWORDS]; }
- memory_long_double;
-static unsigned int ored_words[NWORDS];
-static unsigned int anded_words[NWORDS];
-static void add_to_ored_words (long double x)
-{
- memory_long_double m;
- size_t i;
- /* Clear it first, in case
- sizeof (long double) < sizeof (memory_long_double). */
- memset (&m, 0, sizeof (memory_long_double));
- m.value = x;
- for (i = 0; i < NWORDS; i++)
- {
- ored_words[i] |= m.word[i];
- anded_words[i] &= m.word[i];
- }
-}
-int main ()
-{
- size_t j;
- FILE *fp = fopen ("conftest.out", "w");
- if (fp == NULL)
- return 1;
- for (j = 0; j < NWORDS; j++)
- anded_words[j] = ~ (unsigned int) 0;
- add_to_ored_words (0.25L);
- add_to_ored_words (0.5L);
- add_to_ored_words (1.0L);
- add_to_ored_words (2.0L);
- add_to_ored_words (4.0L);
- /* Remove bits that are common (e.g. if representation of the first mantissa
- bit is explicit). */
- for (j = 0; j < NWORDS; j++)
- ored_words[j] &= ~anded_words[j];
- /* Now find the nonzero word. */
- for (j = 0; j < NWORDS; j++)
- if (ored_words[j] != 0)
- break;
- if (j < NWORDS)
- {
- size_t i;
- for (i = j + 1; i < NWORDS; i++)
- if (ored_words[i] != 0)
- {
- fprintf (fp, "unknown");
- return (fclose (fp) != 0);
- }
- for (i = 0; ; i++)
- if ((ored_words[j] >> i) & 1)
- {
- fprintf (fp, "word %d bit %d", (int) j, (int) i);
- return (fclose (fp) != 0);
- }
- }
- fprintf (fp, "unknown");
- return (fclose (fp) != 0);
-}
- ]])],
- [gl_cv_cc_long_double_expbit0=`cat conftest.out`],
- [gl_cv_cc_long_double_expbit0="unknown"],
- [
- dnl When cross-compiling, we don't know. It depends on the
- dnl ABI and compiler version. There are too many cases.
- gl_cv_cc_long_double_expbit0="unknown"
- ])
- rm -f conftest.out
- ])
- case "$gl_cv_cc_long_double_expbit0" in
- word*bit*)
- word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
- bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
- AC_DEFINE_UNQUOTED([LDBL_EXPBIT0_WORD], [$word],
- [Define as the word index where to find the exponent of 'long double'.])
- AC_DEFINE_UNQUOTED([LDBL_EXPBIT0_BIT], [$bit],
- [Define as the bit index in the word where to find bit 0 of the exponent of 'long double'.])
- ;;
- esac
-])
diff --git a/gl/m4/frexp.m4 b/gl/m4/frexp.m4
deleted file mode 100644
index 2eb98a1dcd..0000000000
--- a/gl/m4/frexp.m4
+++ /dev/null
@@ -1,172 +0,0 @@
-# frexp.m4 serial 15
-dnl Copyright (C) 2007-2013 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_FREXP],
-[
- AC_REQUIRE([gl_MATH_H_DEFAULTS])
- AC_REQUIRE([gl_CHECK_FREXP_NO_LIBM])
- FREXP_LIBM=
- if test $gl_cv_func_frexp_no_libm = no; then
- AC_CACHE_CHECK([whether frexp() can be used with libm],
- [gl_cv_func_frexp_in_libm],
- [
- save_LIBS="$LIBS"
- LIBS="$LIBS -lm"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <math.h>
- double x;]],
- [[int e; return frexp (x, &e) > 0;]])],
- [gl_cv_func_frexp_in_libm=yes],
- [gl_cv_func_frexp_in_libm=no])
- LIBS="$save_LIBS"
- ])
- if test $gl_cv_func_frexp_in_libm = yes; then
- FREXP_LIBM=-lm
- fi
- fi
- if test $gl_cv_func_frexp_no_libm = yes \
- || test $gl_cv_func_frexp_in_libm = yes; then
- save_LIBS="$LIBS"
- LIBS="$LIBS $FREXP_LIBM"
- gl_FUNC_FREXP_WORKS
- LIBS="$save_LIBS"
- case "$gl_cv_func_frexp_works" in
- *yes) gl_func_frexp=yes ;;
- *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
- esac
- else
- gl_func_frexp=no
- fi
- if test $gl_func_frexp = yes; then
- AC_DEFINE([HAVE_FREXP], [1],
- [Define if the frexp() function is available and works.])
- fi
- AC_SUBST([FREXP_LIBM])
-])
-
-AC_DEFUN([gl_FUNC_FREXP_NO_LIBM],
-[
- AC_REQUIRE([gl_MATH_H_DEFAULTS])
- AC_REQUIRE([gl_CHECK_FREXP_NO_LIBM])
- if test $gl_cv_func_frexp_no_libm = yes; then
- gl_FUNC_FREXP_WORKS
- case "$gl_cv_func_frexp_works" in
- *yes) gl_func_frexp_no_libm=yes ;;
- *) gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
- esac
- else
- gl_func_frexp_no_libm=no
- dnl Set REPLACE_FREXP here because the system may have frexp in libm.
- REPLACE_FREXP=1
- fi
- if test $gl_func_frexp_no_libm = yes; then
- AC_DEFINE([HAVE_FREXP_IN_LIBC], [1],
- [Define if the frexp() function is available in libc.])
- fi
-])
-
-dnl Test whether frexp() can be used without linking with libm.
-dnl Set gl_cv_func_frexp_no_libm to 'yes' or 'no' accordingly.
-AC_DEFUN([gl_CHECK_FREXP_NO_LIBM],
-[
- AC_CACHE_CHECK([whether frexp() can be used without linking with libm],
- [gl_cv_func_frexp_no_libm],
- [
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <math.h>
- double x;]],
- [[int e; return frexp (x, &e) > 0;]])],
- [gl_cv_func_frexp_no_libm=yes],
- [gl_cv_func_frexp_no_libm=no])
- ])
-])
-
-dnl Test whether frexp() works also on denormalized numbers (this fails e.g. on
-dnl NetBSD 3.0), on infinite numbers (this fails e.g. on IRIX 6.5 and mingw),
-dnl and on negative zero (this fails e.g. on NetBSD 4.99 and mingw).
-AC_DEFUN([gl_FUNC_FREXP_WORKS],
-[
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- AC_CHECK_DECLS_ONCE([alarm])
- AC_CACHE_CHECK([whether frexp works], [gl_cv_func_frexp_works],
- [
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
-#include <float.h>
-#include <math.h>
-#include <string.h>
-#if HAVE_DECL_ALARM
-# include <signal.h>
-# include <unistd.h>
-#endif
-/* 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 Mac OS X 10.5. */
-#if defined __hpux || defined __sgi || defined __ICC
-static double
-compute_minus_zero (void)
-{
- return -DBL_MIN * DBL_MIN;
-}
-# define minus_zero compute_minus_zero ()
-#else
-double minus_zero = -0.0;
-#endif
-int main()
-{
- int result = 0;
- int i;
- volatile double x;
- double zero = 0.0;
-#if HAVE_DECL_ALARM
- /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
- number. Let the test fail in this case. */
- signal (SIGALRM, SIG_DFL);
- alarm (5);
-#endif
- /* Test on denormalized numbers. */
- for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
- ;
- if (x > 0.0)
- {
- int exp;
- double y = frexp (x, &exp);
- /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
- On NetBSD: y = 0.75. Correct: y = 0.5. */
- if (y != 0.5)
- result |= 1;
- }
- /* Test on infinite numbers. */
- x = 1.0 / zero;
- {
- int exp;
- double y = frexp (x, &exp);
- if (y != x)
- result |= 2;
- }
- /* Test on negative zero. */
- x = minus_zero;
- {
- int exp;
- double y = frexp (x, &exp);
- if (memcmp (&y, &x, sizeof x))
- result |= 4;
- }
- return result;
-}]])],
- [gl_cv_func_frexp_works=yes],
- [gl_cv_func_frexp_works=no],
- [case "$host_os" in
- netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
- *) gl_cv_func_frexp_works="guessing yes";;
- esac
- ])
- ])
-])
diff --git a/gl/m4/frexpl.m4 b/gl/m4/frexpl.m4
deleted file mode 100644
index 3b64c52233..0000000000
--- a/gl/m4/frexpl.m4
+++ /dev/null
@@ -1,231 +0,0 @@
-# frexpl.m4 serial 20
-dnl Copyright (C) 2007-2013 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_FREXPL],
-[
- AC_REQUIRE([gl_MATH_H_DEFAULTS])
- AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
-
- dnl Persuade glibc <math.h> to declare frexpl().
- AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
-
- dnl Check whether it's declared.
- dnl Mac OS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
- AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [[#include <math.h>]])
-
- FREXPL_LIBM=
- if test $HAVE_DECL_FREXPL = 1; then
- gl_CHECK_FREXPL_NO_LIBM
- if test $gl_cv_func_frexpl_no_libm = no; then
- AC_CACHE_CHECK([whether frexpl() can be used with libm],
- [gl_cv_func_frexpl_in_libm],
- [
- save_LIBS="$LIBS"
- LIBS="$LIBS -lm"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <math.h>
- long double x;]],
- [[int e; return frexpl (x, &e) > 0;]])],
- [gl_cv_func_frexpl_in_libm=yes],
- [gl_cv_func_frexpl_in_libm=no])
- LIBS="$save_LIBS"
- ])
- if test $gl_cv_func_frexpl_in_libm = yes; then
- FREXPL_LIBM=-lm
- fi
- fi
- if test $gl_cv_func_frexpl_no_libm = yes \
- || test $gl_cv_func_frexpl_in_libm = yes; then
- save_LIBS="$LIBS"
- LIBS="$LIBS $FREXPL_LIBM"
- gl_FUNC_FREXPL_WORKS
- LIBS="$save_LIBS"
- case "$gl_cv_func_frexpl_works" in
- *yes) gl_func_frexpl=yes ;;
- *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
- esac
- else
- gl_func_frexpl=no
- fi
- if test $gl_func_frexpl = yes; then
- AC_DEFINE([HAVE_FREXPL], [1],
- [Define if the frexpl() function is available.])
- fi
- fi
- if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
- dnl Find libraries needed to link lib/frexpl.c.
- if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
- AC_REQUIRE([gl_FUNC_FREXP])
- FREXPL_LIBM="$FREXP_LIBM"
- else
- FREXPL_LIBM=
- fi
- fi
- AC_SUBST([FREXPL_LIBM])
-])
-
-AC_DEFUN([gl_FUNC_FREXPL_NO_LIBM],
-[
- AC_REQUIRE([gl_MATH_H_DEFAULTS])
- AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
- dnl Check whether it's declared.
- dnl Mac OS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
- AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [[#include <math.h>]])
- if test $HAVE_DECL_FREXPL = 1; then
- gl_CHECK_FREXPL_NO_LIBM
- if test $gl_cv_func_frexpl_no_libm = yes; then
- gl_FUNC_FREXPL_WORKS
- case "$gl_cv_func_frexpl_works" in
- *yes) gl_func_frexpl_no_libm=yes ;;
- *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
- esac
- else
- gl_func_frexpl_no_libm=no
- dnl Set REPLACE_FREXPL here because the system may have frexpl in libm.
- REPLACE_FREXPL=1
- fi
- if test $gl_func_frexpl_no_libm = yes; then
- AC_DEFINE([HAVE_FREXPL_IN_LIBC], [1],
- [Define if the frexpl() function is available in libc.])
- fi
- fi
-])
-
-dnl Test whether frexpl() can be used without linking with libm.
-dnl Set gl_cv_func_frexpl_no_libm to 'yes' or 'no' accordingly.
-AC_DEFUN([gl_CHECK_FREXPL_NO_LIBM],
-[
- AC_CACHE_CHECK([whether frexpl() can be used without linking with libm],
- [gl_cv_func_frexpl_no_libm],
- [
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <math.h>
- long double x;]],
- [[int e; return frexpl (x, &e) > 0;]])],
- [gl_cv_func_frexpl_no_libm=yes],
- [gl_cv_func_frexpl_no_libm=no])
- ])
-])
-
-dnl Test whether frexpl() works on finite numbers (this fails on
-dnl Mac OS X 10.4/PowerPC, on AIX 5.1, and on BeOS), on denormalized numbers
-dnl (this fails on Mac OS X 10.5/i386), and also on infinite numbers (this
-dnl fails e.g. on IRIX 6.5 and mingw).
-AC_DEFUN([gl_FUNC_FREXPL_WORKS],
-[
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- AC_CACHE_CHECK([whether frexpl works], [gl_cv_func_frexpl_works],
- [
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
-#include <float.h>
-#include <math.h>
-/* Override the values of <float.h>, like done in float.in.h. */
-#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
-# undef LDBL_MIN_EXP
-# define LDBL_MIN_EXP (-16381)
-#endif
-#if defined __i386__ && defined __FreeBSD__
-# undef LDBL_MIN_EXP
-# define LDBL_MIN_EXP (-16381)
-#endif
-#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
-# undef LDBL_MIN_EXP
-# define LDBL_MIN_EXP DBL_MIN_EXP
-#endif
-#if defined __sgi && (LDBL_MANT_DIG >= 106)
-# if defined __GNUC__
-# undef LDBL_MIN_EXP
-# define LDBL_MIN_EXP DBL_MIN_EXP
-# endif
-#endif
-extern
-#ifdef __cplusplus
-"C"
-#endif
-long double frexpl (long double, int *);
-int main()
-{
- int result = 0;
- volatile long double x;
- /* Test on finite numbers that fails on AIX 5.1. */
- x = 16.0L;
- {
- int exp = -9999;
- frexpl (x, &exp);
- if (exp != 5)
- result |= 1;
- }
- /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
- function returns an invalid (incorrectly normalized) value: it returns
- y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
- but the correct result is
- 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
- x = 1.01L;
- {
- int exp = -9999;
- long double y = frexpl (x, &exp);
- if (!(exp == 1 && y == 0.505L))
- result |= 2;
- }
- /* Test on large finite numbers. This fails on BeOS at i = 16322, while
- LDBL_MAX_EXP = 16384.
- In the loop end test, we test x against Infinity, rather than comparing
- i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
- {
- int i;
- for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
- {
- int exp = -9999;
- frexpl (x, &exp);
- if (exp != i)
- {
- result |= 4;
- break;
- }
- }
- }
- /* Test on denormalized numbers. */
- {
- int i;
- for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
- ;
- if (x > 0.0L)
- {
- int exp;
- long double y = frexpl (x, &exp);
- /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
- exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
- if (exp != LDBL_MIN_EXP - 1)
- result |= 8;
- }
- }
- /* Test on infinite numbers. */
- x = 1.0L / 0.0L;
- {
- int exp;
- long double y = frexpl (x, &exp);
- if (y != x)
- result |= 16;
- }
- return result;
-}]])],
- [gl_cv_func_frexpl_works=yes],
- [gl_cv_func_frexpl_works=no],
- [
-changequote(,)dnl
- case "$host_os" in
- aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
- gl_cv_func_frexpl_works="guessing no";;
- *) gl_cv_func_frexpl_works="guessing yes";;
- esac
-changequote([,])dnl
- ])
- ])
-])
diff --git a/gl/m4/fseterr.m4 b/gl/m4/fseterr.m4
deleted file mode 100644
index b8e044b5b7..0000000000
--- a/gl/m4/fseterr.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-# fseterr.m4 serial 1
-dnl Copyright (C) 2012-2013 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_FSETERR],
-[
- AC_CHECK_FUNCS_ONCE([__fseterr])
-])
diff --git a/gl/m4/getopt.m4 b/gl/m4/getopt.m4
deleted file mode 100644
index 50f4509193..0000000000
--- a/gl/m4/getopt.m4
+++ /dev/null
@@ -1,368 +0,0 @@
-# getopt.m4 serial 44
-dnl Copyright (C) 2002-2006, 2008-2013 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.
-
-# Request a POSIX compliant getopt function.
-AC_DEFUN([gl_FUNC_GETOPT_POSIX],
-[
- m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX])
- AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- AC_REQUIRE([gl_GETOPT_CHECK_HEADERS])
- dnl Other modules can request the gnulib implementation of the getopt
- dnl functions unconditionally, by defining gl_REPLACE_GETOPT_ALWAYS.
- dnl argp.m4 does this.
- m4_ifdef([gl_REPLACE_GETOPT_ALWAYS], [
- REPLACE_GETOPT=1
- ], [
- REPLACE_GETOPT=0
- if test -n "$gl_replace_getopt"; then
- REPLACE_GETOPT=1
- fi
- ])
- if test $REPLACE_GETOPT = 1; then
- dnl Arrange for getopt.h to be created.
- gl_GETOPT_SUBSTITUTE_HEADER
- fi
-])
-
-# Request a POSIX compliant getopt function with GNU extensions (such as
-# options with optional arguments) and the functions getopt_long,
-# getopt_long_only.
-AC_DEFUN([gl_FUNC_GETOPT_GNU],
-[
- m4_divert_text([INIT_PREPARE], [gl_getopt_required=GNU])
-
- AC_REQUIRE([gl_FUNC_GETOPT_POSIX])
-])
-
-# Determine whether to replace the entire getopt facility.
-AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
-[
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- AC_REQUIRE([AC_PROG_AWK]) dnl for awk that supports ENVIRON
-
- dnl Persuade Solaris <unistd.h> to declare optarg, optind, opterr, optopt.
- AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
-
- gl_CHECK_NEXT_HEADERS([getopt.h])
- if test $ac_cv_header_getopt_h = yes; then
- HAVE_GETOPT_H=1
- else
- HAVE_GETOPT_H=0
- fi
- AC_SUBST([HAVE_GETOPT_H])
-
- gl_replace_getopt=
-
- dnl Test whether <getopt.h> is available.
- if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
- AC_CHECK_HEADERS([getopt.h], [], [gl_replace_getopt=yes])
- fi
-
- dnl Test whether the function getopt_long is available.
- if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
- AC_CHECK_FUNCS([getopt_long_only], [], [gl_replace_getopt=yes])
- fi
-
- dnl POSIX 2008 does not specify leading '+' behavior, but see
- dnl http://austingroupbugs.net/view.php?id=191 for a recommendation on
- dnl the next version of POSIX. For now, we only guarantee leading '+'
- dnl behavior with getopt-gnu.
- if test -z "$gl_replace_getopt"; then
- AC_CACHE_CHECK([whether getopt is POSIX compatible],
- [gl_cv_func_getopt_posix],
- [
- dnl Merging these three different test programs into a single one
- dnl would require a reset mechanism. On BSD systems, it can be done
- dnl through 'optreset'; on some others (glibc), it can be done by
- dnl setting 'optind' to 0; on others again (HP-UX, IRIX, OSF/1,
- dnl Solaris 9, musl libc), there is no such mechanism.
- if test $cross_compiling = no; then
- dnl Sanity check. Succeeds everywhere (except on MSVC,
- dnl which lacks <unistd.h> and getopt() entirely).
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-
-int
-main ()
-{
- static char program[] = "program";
- static char a[] = "-a";
- static char foo[] = "foo";
- static char bar[] = "bar";
- char *argv[] = { program, a, foo, bar, NULL };
- int c;
-
- c = getopt (4, argv, "ab");
- if (!(c == 'a'))
- return 1;
- c = getopt (4, argv, "ab");
- if (!(c == -1))
- return 2;
- if (!(optind == 2))
- return 3;
- return 0;
-}
-]])],
- [gl_cv_func_getopt_posix=maybe],
- [gl_cv_func_getopt_posix=no])
- if test $gl_cv_func_getopt_posix = maybe; then
- dnl Sanity check with '+'. Succeeds everywhere (except on MSVC,
- dnl which lacks <unistd.h> and getopt() entirely).
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-
-int
-main ()
-{
- static char program[] = "program";
- static char donald[] = "donald";
- static char p[] = "-p";
- static char billy[] = "billy";
- static char duck[] = "duck";
- static char a[] = "-a";
- static char bar[] = "bar";
- char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
- int c;
-
- c = getopt (7, argv, "+abp:q:");
- if (!(c == -1))
- return 4;
- if (!(strcmp (argv[0], "program") == 0))
- return 5;
- if (!(strcmp (argv[1], "donald") == 0))
- return 6;
- if (!(strcmp (argv[2], "-p") == 0))
- return 7;
- if (!(strcmp (argv[3], "billy") == 0))
- return 8;
- if (!(strcmp (argv[4], "duck") == 0))
- return 9;
- if (!(strcmp (argv[5], "-a") == 0))
- return 10;
- if (!(strcmp (argv[6], "bar") == 0))
- return 11;
- if (!(optind == 1))
- return 12;
- return 0;
-}
-]])],
- [gl_cv_func_getopt_posix=maybe],
- [gl_cv_func_getopt_posix=no])
- fi
- if test $gl_cv_func_getopt_posix = maybe; then
- dnl Detect Mac OS X 10.5, AIX 7.1, mingw bug.
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-
-int
-main ()
-{
- static char program[] = "program";
- static char ab[] = "-ab";
- char *argv[3] = { program, ab, NULL };
- if (getopt (2, argv, "ab:") != 'a')
- return 13;
- if (getopt (2, argv, "ab:") != '?')
- return 14;
- if (optopt != 'b')
- return 15;
- if (optind != 2)
- return 16;
- return 0;
-}
-]])],
- [gl_cv_func_getopt_posix=yes],
- [gl_cv_func_getopt_posix=no])
- fi
- else
- case "$host_os" in
- darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
- *) gl_cv_func_getopt_posix="guessing yes";;
- esac
- fi
- ])
- case "$gl_cv_func_getopt_posix" in
- *no) gl_replace_getopt=yes ;;
- esac
- fi
-
- if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
- AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_getopt_gnu],
- [# Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
- # optstring is necessary for programs like m4 that have POSIX-mandated
- # semantics for supporting options interspersed with files.
- # Also, since getopt_long is a GNU extension, we require optind=0.
- # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
- # so take care to revert to the correct (non-)export state.
-dnl GNU Coding Standards currently allow awk but not env; besides, env
-dnl is ambiguous with environment values that contain newlines.
- gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
- case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
- xx) gl_had_POSIXLY_CORRECT=exported ;;
- x) gl_had_POSIXLY_CORRECT=yes ;;
- *) gl_had_POSIXLY_CORRECT= ;;
- esac
- POSIXLY_CORRECT=1
- export POSIXLY_CORRECT
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([[#include <getopt.h>
- #include <stddef.h>
- #include <string.h>
- ]GL_NOCRASH[
- ]], [[
- int result = 0;
-
- nocrash_init();
-
- /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
- and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
- OSF/1 5.1, Solaris 10. */
- {
- static char conftest[] = "conftest";
- static char plus[] = "-+";
- char *argv[3] = { conftest, plus, NULL };
- opterr = 0;
- if (getopt (2, argv, "+a") != '?')
- result |= 1;
- }
- /* This code succeeds on glibc 2.8, mingw,
- and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
- IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
- {
- static char program[] = "program";
- static char p[] = "-p";
- static char foo[] = "foo";
- static char bar[] = "bar";
- char *argv[] = { program, p, foo, bar, NULL };
-
- optind = 1;
- if (getopt (4, argv, "p::") != 'p')
- result |= 2;
- else if (optarg != NULL)
- result |= 4;
- else if (getopt (4, argv, "p::") != -1)
- result |= 6;
- else if (optind != 2)
- result |= 8;
- }
- /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
- {
- static char program[] = "program";
- static char foo[] = "foo";
- static char p[] = "-p";
- char *argv[] = { program, foo, p, NULL };
- optind = 0;
- if (getopt (3, argv, "-p") != 1)
- result |= 16;
- else if (getopt (3, argv, "-p") != 'p')
- result |= 16;
- }
- /* This code fails on glibc 2.11. */
- {
- static char program[] = "program";
- static char b[] = "-b";
- static char a[] = "-a";
- char *argv[] = { program, b, a, NULL };
- optind = opterr = 0;
- if (getopt (3, argv, "+:a:b") != 'b')
- result |= 32;
- else if (getopt (3, argv, "+:a:b") != ':')
- result |= 32;
- }
- /* This code dumps core on glibc 2.14. */
- {
- static char program[] = "program";
- static char w[] = "-W";
- static char dummy[] = "dummy";
- char *argv[] = { program, w, dummy, NULL };
- optind = opterr = 1;
- if (getopt (3, argv, "W;") != 'W')
- result |= 64;
- }
- return result;
- ]])],
- [gl_cv_func_getopt_gnu=yes],
- [gl_cv_func_getopt_gnu=no],
- [dnl Cross compiling. Assume the worst, even on glibc platforms.
- gl_cv_func_getopt_gnu="guessing no"
- ])
- case $gl_had_POSIXLY_CORRECT in
- exported) ;;
- yes) AS_UNSET([POSIXLY_CORRECT]); POSIXLY_CORRECT=1 ;;
- *) AS_UNSET([POSIXLY_CORRECT]) ;;
- esac
- ])
- if test "$gl_cv_func_getopt_gnu" != yes; then
- gl_replace_getopt=yes
- else
- AC_CACHE_CHECK([for working GNU getopt_long function],
- [gl_cv_func_getopt_long_gnu],
- [AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <getopt.h>
- #include <stddef.h>
- #include <string.h>
- ]],
- [[static const struct option long_options[] =
- {
- { "xtremely-",no_argument, NULL, 1003 },
- { "xtra", no_argument, NULL, 1001 },
- { "xtreme", no_argument, NULL, 1002 },
- { "xtremely", no_argument, NULL, 1003 },
- { NULL, 0, NULL, 0 }
- };
- /* This code fails on OpenBSD 5.0. */
- {
- static char program[] = "program";
- static char xtremel[] = "--xtremel";
- char *argv[] = { program, xtremel, NULL };
- int option_index;
- optind = 1; opterr = 0;
- if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
- return 1;
- }
- return 0;
- ]])],
- [gl_cv_func_getopt_long_gnu=yes],
- [gl_cv_func_getopt_long_gnu=no],
- [dnl Cross compiling. Guess no on OpenBSD, yes otherwise.
- case "$host_os" in
- openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
- *) gl_cv_func_getopt_long_gnu="guessing yes";;
- esac
- ])
- ])
- case "$gl_cv_func_getopt_long_gnu" in
- *yes) ;;
- *) gl_replace_getopt=yes ;;
- esac
- fi
- fi
-])
-
-AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
-[
- GETOPT_H=getopt.h
- AC_DEFINE([__GETOPT_PREFIX], [[rpl_]],
- [Define to rpl_ if the getopt replacement functions and variables
- should be used.])
- AC_SUBST([GETOPT_H])
-])
-
-# Prerequisites of lib/getopt*.
-AC_DEFUN([gl_PREREQ_GETOPT],
-[
- AC_CHECK_DECLS_ONCE([getenv])
-])
diff --git a/gl/m4/getsubopt.m4 b/gl/m4/getsubopt.m4
deleted file mode 100644
index 4bcfd7ff7c..0000000000
--- a/gl/m4/getsubopt.m4
+++ /dev/null
@@ -1,20 +0,0 @@
-# getsubopt.m4 serial 5
-dnl Copyright (C) 2004, 2007, 2009-2013 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_GETSUBOPT],
-[
- dnl Persuade glibc <stdlib.h> to declare getsubopt().
- AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
-
- AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
- AC_CHECK_FUNCS_ONCE([getsubopt])
- if test $ac_cv_func_getsubopt = no; then
- HAVE_GETSUBOPT=0
- fi
-])
-
-# Prerequisites of lib/getsubopt.c.
-AC_DEFUN([gl_PREREQ_GETSUBOPT], [:])
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4
index 7508887da4..8fd1dab998 100644
--- a/gl/m4/gnulib-cache.m4
+++ b/gl/m4/gnulib-cache.m4
@@ -27,28 +27,24 @@
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lock-tests --avoid=lseek-tests --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files accept alloca alphasort argp base64 bind byteswap c-ctype close connect error extensions func gendocs getaddrinfo getpass getsubopt gettext gettimeofday hash-pjw-bare havelib iconv inet_ntop inet_pton lib-msvc-compat lib-symbol-versions listen maintainer-makefile manywarnings memmem-simple minmax netdb netinet_in pmccabe2html progname read-file recv recvfrom scandir select send sendto servent setsockopt shutdown snprintf socket sockets socklen stdint strcase strndup strtok_r strverscmp sys_socket sys_stat time_r u64 unistd valgrind-tests vasprintf version-etc version-etc-fsf vfprintf-posix vprintf-posix vsnprintf warnings
+# gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lock-tests --avoid=lseek-tests --lgpl=2 --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files accept alloca base64 bind byteswap c-ctype close connect extensions func gendocs getaddrinfo getpass gettext gettimeofday hash-pjw-bare havelib iconv inet_ntop inet_pton lib-msvc-compat lib-symbol-versions listen maintainer-makefile manywarnings memmem-simple minmax netdb netinet_in pmccabe2html read-file recv recvfrom select send sendto servent setsockopt shutdown snprintf socket sockets socklen stdint strcase strndup strtok_r strverscmp sys_socket sys_stat time_r u64 unistd valgrind-tests vasprintf vsnprintf warnings
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([gl/override])
gl_MODULES([
accept
alloca
- alphasort
- argp
base64
bind
byteswap
c-ctype
close
connect
- error
extensions
func
gendocs
getaddrinfo
getpass
- getsubopt
gettext
gettimeofday
hash-pjw-bare
@@ -66,11 +62,9 @@ gl_MODULES([
netdb
netinet_in
pmccabe2html
- progname
read-file
recv
recvfrom
- scandir
select
send
sendto
@@ -93,10 +87,6 @@ gl_MODULES([
unistd
valgrind-tests
vasprintf
- version-etc
- version-etc-fsf
- vfprintf-posix
- vprintf-posix
vsnprintf
warnings
])
@@ -108,6 +98,7 @@ gl_DOC_BASE([doc])
gl_TESTS_BASE([gl/tests])
gl_WITH_TESTS
gl_LIB([libgnu])
+gl_LGPL([2])
gl_MAKEFILE_NAME([])
gl_LIBTOOL
gl_MACRO_PREFIX([gl])
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 44786be30c..eb65fb07f4 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -43,9 +43,6 @@ AC_DEFUN([gl_EARLY],
# Code from module alloca:
# Code from module alloca-opt:
# Code from module alloca-opt-tests:
- # Code from module alphasort:
- # Code from module argp:
- # Code from module argp-tests:
# Code from module arpa_inet:
# Code from module arpa_inet-tests:
# Code from module base64:
@@ -60,21 +57,13 @@ AC_DEFUN([gl_EARLY],
# Code from module c-ctype-tests:
# Code from module close:
# Code from module close-tests:
- # Code from module closedir:
# Code from module connect:
# Code from module connect-tests:
- # Code from module dirent:
- # Code from module dirent-tests:
- # Code from module dirname-lgpl:
# Code from module dosname:
- # Code from module double-slash-root:
# Code from module dup2:
# Code from module dup2-tests:
- # Code from module environ:
- # Code from module environ-tests:
# Code from module errno:
# Code from module errno-tests:
- # Code from module error:
# Code from module extensions:
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
# Code from module extern-inline:
@@ -84,7 +73,6 @@ AC_DEFUN([gl_EARLY],
# Code from module fdopen:
# Code from module fdopen-tests:
# Code from module fgetc-tests:
- # Code from module filename:
# Code from module float:
# Code from module float-tests:
# Code from module fpieee:
@@ -92,17 +80,11 @@ AC_DEFUN([gl_EARLY],
# Code from module fpucw:
# Code from module fputc-tests:
# Code from module fread-tests:
- # Code from module frexp-nolibm:
- # Code from module frexp-nolibm-tests:
- # Code from module frexpl-nolibm:
- # Code from module frexpl-nolibm-tests:
# Code from module fseek:
# Code from module fseek-tests:
# Code from module fseeko:
AC_REQUIRE([AC_FUNC_FSEEKO])
# Code from module fseeko-tests:
- # Code from module fseterr:
- # Code from module fseterr-tests:
# Code from module fstat:
# Code from module fstat-tests:
# Code from module ftell:
@@ -126,14 +108,10 @@ AC_DEFUN([gl_EARLY],
# Code from module getdtablesize-tests:
# Code from module getline:
# Code from module getline-tests:
- # Code from module getopt-gnu:
- # Code from module getopt-posix:
- # Code from module getopt-posix-tests:
# Code from module getpagesize:
# Code from module getpass:
# Code from module getpeername:
# Code from module getpeername-tests:
- # Code from module getsubopt:
# Code from module gettext:
# Code from module gettext-h:
# Code from module gettimeofday:
@@ -158,12 +136,6 @@ AC_DEFUN([gl_EARLY],
# Code from module inttypes-tests:
# Code from module ioctl:
# Code from module ioctl-tests:
- # Code from module isnand-nolibm:
- # Code from module isnand-nolibm-tests:
- # Code from module isnanf-nolibm:
- # Code from module isnanf-nolibm-tests:
- # Code from module isnanl-nolibm:
- # Code from module isnanl-nolibm-tests:
# Code from module largefile:
AC_REQUIRE([AC_SYS_LARGEFILE])
# Code from module lib-msvc-compat:
@@ -175,18 +147,11 @@ AC_DEFUN([gl_EARLY],
# Code from module lstat:
# Code from module lstat-tests:
# Code from module maintainer-makefile:
- # Code from module malloc-gnu:
- # Code from module malloc-gnu-tests:
# Code from module malloc-posix:
- # Code from module malloca:
- # Code from module malloca-tests:
# Code from module manywarnings:
- # Code from module math:
- # Code from module math-tests:
# Code from module memchr:
# Code from module memchr-tests:
# Code from module memmem-simple:
- # Code from module mempcpy:
# Code from module minmax:
# Code from module msvc-inval:
# Code from module msvc-nothrow:
@@ -195,10 +160,8 @@ AC_DEFUN([gl_EARLY],
# Code from module netdb-tests:
# Code from module netinet_in:
# Code from module netinet_in-tests:
- # Code from module nocrash:
# Code from module open:
# Code from module open-tests:
- # Code from module opendir:
# Code from module pathmax:
# Code from module pathmax-tests:
# Code from module perror:
@@ -206,25 +169,14 @@ AC_DEFUN([gl_EARLY],
# Code from module pipe-posix:
# Code from module pipe-posix-tests:
# Code from module pmccabe2html:
- # Code from module printf-frexp:
- # Code from module printf-frexp-tests:
- # Code from module printf-frexpl:
- # Code from module printf-frexpl-tests:
- # Code from module printf-safe:
- # Code from module progname:
- # Code from module putenv:
- # Code from module rawmemchr:
- # Code from module rawmemchr-tests:
# Code from module read-file:
# Code from module read-file-tests:
- # Code from module readdir:
# Code from module realloc-posix:
# Code from module recv:
# Code from module recv-tests:
# Code from module recvfrom:
# Code from module recvfrom-tests:
# Code from module same-inode:
- # Code from module scandir:
# Code from module select:
# Code from module select-tests:
# Code from module send:
@@ -232,19 +184,13 @@ AC_DEFUN([gl_EARLY],
# Code from module sendto:
# Code from module sendto-tests:
# Code from module servent:
- # Code from module setenv:
- # Code from module setenv-tests:
# Code from module setsockopt:
# Code from module setsockopt-tests:
# Code from module shutdown:
# Code from module shutdown-tests:
# Code from module signal-h:
# Code from module signal-h-tests:
- # Code from module signbit:
- # Code from module signbit-tests:
# Code from module size_max:
- # Code from module sleep:
- # Code from module sleep-tests:
# Code from module snippet/_Noreturn:
# Code from module snippet/arg-nonnull:
# Code from module snippet/c++defs:
@@ -261,12 +207,6 @@ AC_DEFUN([gl_EARLY],
# Code from module stat-tests:
# Code from module stdalign:
# Code from module stdalign-tests:
- # Code from module stdarg:
- dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
- dnl for the builtin va_copy to work. With Autoconf 2.60 or later,
- dnl gl_PROG_CC_C99 arranges for this. With older Autoconf gl_PROG_CC_C99
- dnl shouldn't hurt, though installers are on their own to set c99 mode.
- gl_PROG_CC_C99
# Code from module stdbool:
# Code from module stdbool-tests:
# Code from module stddef:
@@ -278,8 +218,6 @@ AC_DEFUN([gl_EARLY],
# Code from module stdlib:
# Code from module stdlib-tests:
# Code from module strcase:
- # Code from module strchrnul:
- # Code from module strchrnul-tests:
# Code from module strdup-posix:
# Code from module strerror:
# Code from module strerror-override:
@@ -312,8 +250,6 @@ AC_DEFUN([gl_EARLY],
# Code from module sys_types-tests:
# Code from module sys_uio:
# Code from module sys_uio-tests:
- # Code from module sysexits:
- # Code from module sysexits-tests:
# Code from module test-framework-sh:
# Code from module test-framework-sh-tests:
# Code from module threadlib:
@@ -325,8 +261,6 @@ AC_DEFUN([gl_EARLY],
# Code from module u64-tests:
# Code from module unistd:
# Code from module unistd-tests:
- # Code from module unsetenv:
- # Code from module unsetenv-tests:
# Code from module useless-if-before-free:
# Code from module valgrind-tests:
# Code from module vasnprintf:
@@ -337,13 +271,6 @@ AC_DEFUN([gl_EARLY],
# Code from module vc-list-files-tests:
# Code from module verify:
# Code from module verify-tests:
- # Code from module version-etc:
- # Code from module version-etc-fsf:
- # Code from module version-etc-tests:
- # Code from module vfprintf-posix:
- # Code from module vfprintf-posix-tests:
- # Code from module vprintf-posix:
- # Code from module vprintf-posix-tests:
# Code from module vsnprintf:
# Code from module vsnprintf-tests:
# Code from module warnings:
@@ -376,16 +303,6 @@ LTALLOCA=`echo "$ALLOCA" | sed -e 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'`
changequote([, ])dnl
AC_SUBST([LTALLOCA])
gl_FUNC_ALLOCA
- gl_FUNC_ALPHASORT
- if test $HAVE_ALPHASORT = 0; then
- AC_LIBOBJ([alphasort])
- gl_PREREQ_ALPHASORT
- fi
- gl_DIRENT_MODULE_INDICATOR([alphasort])
- gl_ARGP
- m4_ifdef([AM_XGETTEXT_OPTION],
- [AM_][XGETTEXT_OPTION([--flag=argp_error:2:c-format])
- AM_][XGETTEXT_OPTION([--flag=argp_failure:4:c-format])])
gl_HEADER_ARPA_INET
AC_PROG_MKDIR_P
gl_FUNC_BASE64
@@ -400,19 +317,11 @@ AC_SUBST([LTALLOCA])
AC_LIBOBJ([close])
fi
gl_UNISTD_MODULE_INDICATOR([close])
- gl_FUNC_CLOSEDIR
- if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
- AC_LIBOBJ([closedir])
- fi
- gl_DIRENT_MODULE_INDICATOR([closedir])
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([connect])
fi
gl_SYS_SOCKET_MODULE_INDICATOR([connect])
- gl_DIRENT_H
- gl_DIRNAME_LGPL
- gl_DOUBLE_SLASH_ROOT
gl_FUNC_DUP2
if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
AC_LIBOBJ([dup2])
@@ -420,14 +329,6 @@ AC_SUBST([LTALLOCA])
fi
gl_UNISTD_MODULE_INDICATOR([dup2])
gl_HEADER_ERRNO_H
- gl_ERROR
- if test $ac_cv_lib_error_at_line = no; then
- AC_LIBOBJ([error])
- gl_PREREQ_ERROR
- fi
- m4_ifdef([AM_XGETTEXT_OPTION],
- [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
- AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
AC_REQUIRE([gl_EXTERN_INLINE])
gl_FLOAT_H
if test $REPLACE_FLOAT_LDBL = 1; then
@@ -436,16 +337,6 @@ AC_SUBST([LTALLOCA])
if test $REPLACE_ITOLD = 1; then
AC_LIBOBJ([itold])
fi
- gl_FUNC_FREXP_NO_LIBM
- if test $gl_func_frexp_no_libm != yes; then
- AC_LIBOBJ([frexp])
- fi
- gl_MATH_MODULE_INDICATOR([frexp])
- gl_FUNC_FREXPL_NO_LIBM
- if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
- AC_LIBOBJ([frexpl])
- fi
- gl_MATH_MODULE_INDICATOR([frexpl])
gl_FUNC_FSEEK
if test $REPLACE_FSEEK = 1; then
AC_LIBOBJ([fseek])
@@ -457,10 +348,6 @@ AC_SUBST([LTALLOCA])
gl_PREREQ_FSEEKO
fi
gl_STDIO_MODULE_INDICATOR([fseeko])
- gl_FUNC_FSETERR
- if test $ac_cv_func___fseterr = no; then
- AC_LIBOBJ([fseterr])
- fi
gl_FUNC_FSTAT
if test $REPLACE_FSTAT = 1; then
AC_LIBOBJ([fstat])
@@ -499,25 +386,6 @@ AC_SUBST([LTALLOCA])
gl_PREREQ_GETLINE
fi
gl_STDIO_MODULE_INDICATOR([getline])
- gl_FUNC_GETOPT_GNU
- if test $REPLACE_GETOPT = 1; then
- AC_LIBOBJ([getopt])
- AC_LIBOBJ([getopt1])
- gl_PREREQ_GETOPT
- dnl Arrange for unistd.h to include getopt.h.
- GNULIB_GL_UNISTD_H_GETOPT=1
- fi
- AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
- gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
- gl_FUNC_GETOPT_POSIX
- if test $REPLACE_GETOPT = 1; then
- AC_LIBOBJ([getopt])
- AC_LIBOBJ([getopt1])
- gl_PREREQ_GETOPT
- dnl Arrange for unistd.h to include getopt.h.
- GNULIB_GL_UNISTD_H_GETOPT=1
- fi
- AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
gl_FUNC_GETPASS
if test $HAVE_GETPASS = 0; then
AC_LIBOBJ([getpass])
@@ -528,12 +396,6 @@ AC_SUBST([LTALLOCA])
AC_LIBOBJ([getpeername])
fi
gl_SYS_SOCKET_MODULE_INDICATOR([getpeername])
- gl_FUNC_GETSUBOPT
- if test $HAVE_GETSUBOPT = 0; then
- AC_LIBOBJ([getsubopt])
- gl_PREREQ_GETSUBOPT
- fi
- gl_STDLIB_MODULE_INDICATOR([getsubopt])
dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
AM_GNU_GETTEXT_VERSION([0.18.1])
AC_SUBST([LIBINTL])
@@ -570,21 +432,6 @@ AC_SUBST([LTALLOCA])
gl_PREREQ_INET_PTON
fi
gl_ARPA_INET_MODULE_INDICATOR([inet_pton])
- gl_FUNC_ISNAND_NO_LIBM
- if test $gl_func_isnand_no_libm != yes; then
- AC_LIBOBJ([isnand])
- gl_PREREQ_ISNAND
- fi
- gl_FUNC_ISNANF_NO_LIBM
- if test $gl_func_isnanf_no_libm != yes; then
- AC_LIBOBJ([isnanf])
- gl_PREREQ_ISNANF
- fi
- gl_FUNC_ISNANL_NO_LIBM
- if test $gl_func_isnanl_no_libm != yes; then
- AC_LIBOBJ([isnanl])
- gl_PREREQ_ISNANL
- fi
AC_REQUIRE([gl_LARGEFILE])
gl_LD_OUTPUT_DEF
gl_LD_VERSION_SCRIPT
@@ -600,17 +447,11 @@ AC_SUBST([LTALLOCA])
gl_UNISTD_MODULE_INDICATOR([lseek])
AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
[AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
- gl_FUNC_MALLOC_GNU
- if test $REPLACE_MALLOC = 1; then
- AC_LIBOBJ([malloc])
- fi
- gl_MODULE_INDICATOR([malloc-gnu])
gl_FUNC_MALLOC_POSIX
if test $REPLACE_MALLOC = 1; then
AC_LIBOBJ([malloc])
fi
gl_STDLIB_MODULE_INDICATOR([malloc-posix])
- gl_MATH_H
gl_FUNC_MEMCHR
if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
AC_LIBOBJ([memchr])
@@ -622,12 +463,6 @@ AC_SUBST([LTALLOCA])
AC_LIBOBJ([memmem])
fi
gl_STRING_MODULE_INDICATOR([memmem])
- gl_FUNC_MEMPCPY
- if test $HAVE_MEMPCPY = 0; then
- AC_LIBOBJ([mempcpy])
- gl_PREREQ_MEMPCPY
- fi
- gl_STRING_MODULE_INDICATOR([mempcpy])
gl_MINMAX
gl_MSVC_INVAL
if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
@@ -641,29 +476,8 @@ AC_SUBST([LTALLOCA])
gl_HEADER_NETDB
gl_HEADER_NETINET_IN
AC_PROG_MKDIR_P
- gl_FUNC_OPENDIR
- if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
- AC_LIBOBJ([opendir])
- fi
- gl_DIRENT_MODULE_INDICATOR([opendir])
AC_PATH_PROG([PMCCABE], [pmccabe], [false])
- gl_FUNC_PRINTF_FREXP
- gl_FUNC_PRINTF_FREXPL
- m4_divert_text([INIT_PREPARE], [gl_printf_safe=yes])
- AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
- AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
- gl_FUNC_RAWMEMCHR
- if test $HAVE_RAWMEMCHR = 0; then
- AC_LIBOBJ([rawmemchr])
- gl_PREREQ_RAWMEMCHR
- fi
- gl_STRING_MODULE_INDICATOR([rawmemchr])
gl_PREREQ_READ_FILE
- gl_FUNC_READDIR
- if test $HAVE_READDIR = 0; then
- AC_LIBOBJ([readdir])
- fi
- gl_DIRENT_MODULE_INDICATOR([readdir])
gl_FUNC_REALLOC_POSIX
if test $REPLACE_REALLOC = 1; then
AC_LIBOBJ([realloc])
@@ -679,12 +493,6 @@ AC_SUBST([LTALLOCA])
AC_LIBOBJ([recvfrom])
fi
gl_SYS_SOCKET_MODULE_INDICATOR([recvfrom])
- gl_FUNC_SCANDIR
- if test $HAVE_SCANDIR = 0; then
- AC_LIBOBJ([scandir])
- gl_PREREQ_SCANDIR
- fi
- gl_DIRENT_MODULE_INDICATOR([scandir])
gl_FUNC_SELECT
if test $REPLACE_SELECT = 1; then
AC_LIBOBJ([select])
@@ -712,19 +520,7 @@ AC_SUBST([LTALLOCA])
fi
gl_SYS_SOCKET_MODULE_INDICATOR([shutdown])
gl_SIGNAL_H
- gl_SIGNBIT
- if test $REPLACE_SIGNBIT = 1; then
- AC_LIBOBJ([signbitf])
- AC_LIBOBJ([signbitd])
- AC_LIBOBJ([signbitl])
- fi
- gl_MATH_MODULE_INDICATOR([signbit])
gl_SIZE_MAX
- gl_FUNC_SLEEP
- if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
- AC_LIBOBJ([sleep])
- fi
- gl_UNISTD_MODULE_INDICATOR([sleep])
gl_FUNC_SNPRINTF
gl_STDIO_MODULE_INDICATOR([snprintf])
gl_MODULE_INDICATOR([snprintf])
@@ -747,7 +543,6 @@ AC_SUBST([LTALLOCA])
gl_TYPE_SOCKLEN_T
gt_TYPE_SSIZE_T
gl_STDALIGN_H
- gl_STDARG_H
AM_STDBOOL_H
gl_STDDEF_H
gl_STDINT_H
@@ -762,30 +557,12 @@ AC_SUBST([LTALLOCA])
AC_LIBOBJ([strncasecmp])
gl_PREREQ_STRNCASECMP
fi
- gl_FUNC_STRCHRNUL
- if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
- AC_LIBOBJ([strchrnul])
- gl_PREREQ_STRCHRNUL
- fi
- gl_STRING_MODULE_INDICATOR([strchrnul])
gl_FUNC_STRDUP_POSIX
if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
AC_LIBOBJ([strdup])
gl_PREREQ_STRDUP
fi
gl_STRING_MODULE_INDICATOR([strdup])
- gl_FUNC_STRERROR
- if test $REPLACE_STRERROR = 1; then
- AC_LIBOBJ([strerror])
- fi
- gl_MODULE_INDICATOR([strerror])
- gl_STRING_MODULE_INDICATOR([strerror])
- AC_REQUIRE([gl_HEADER_ERRNO_H])
- AC_REQUIRE([gl_FUNC_STRERROR_0])
- if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
- AC_LIBOBJ([strerror-override])
- gl_PREREQ_SYS_H_WINSOCK2
- fi
gl_HEADER_STRING_H
gl_HEADER_STRINGS_H
gl_FUNC_STRNDUP
@@ -823,7 +600,6 @@ AC_SUBST([LTALLOCA])
AC_PROG_MKDIR_P
gl_HEADER_SYS_UIO
AC_PROG_MKDIR_P
- gl_SYSEXITS
gl_HEADER_TIME_H
gl_TIME_R
if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
@@ -839,11 +615,6 @@ AC_SUBST([LTALLOCA])
m4_ifdef([AM_XGETTEXT_OPTION],
[AM_][XGETTEXT_OPTION([--flag=asprintf:2:c-format])
AM_][XGETTEXT_OPTION([--flag=vasprintf:2:c-format])])
- gl_VERSION_ETC
- gl_FUNC_VFPRINTF_POSIX
- gl_STDIO_MODULE_INDICATOR([vfprintf-posix])
- gl_FUNC_VPRINTF_POSIX
- gl_STDIO_MODULE_INDICATOR([vprintf-posix])
gl_FUNC_VSNPRINTF
gl_STDIO_MODULE_INDICATOR([vsnprintf])
gl_WCHAR_H
@@ -894,8 +665,6 @@ changequote([, ])dnl
AC_SUBST([gltests_WITNESS])
gl_module_indicator_condition=$gltests_WITNESS
m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
- gl_ENVIRON
- gl_UNISTD_MODULE_INDICATOR([environ])
gl_FCNTL_H
gl_FUNC_FDOPEN
if test $REPLACE_FDOPEN = 1; then
@@ -938,10 +707,6 @@ changequote([, ])dnl
AC_LIBOBJ([ioctl])
fi
gl_SYS_IOCTL_MODULE_INDICATOR([ioctl])
- gl_DOUBLE_EXPONENT_LOCATION
- gl_FLOAT_EXPONENT_LOCATION
- gl_LONG_DOUBLE_EXPONENT_LOCATION
- AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
gl_LOCK
gl_MODULE_INDICATOR([lock])
gl_FUNC_LSTAT
@@ -950,7 +715,6 @@ changequote([, ])dnl
gl_PREREQ_LSTAT
fi
gl_SYS_STAT_MODULE_INDICATOR([lstat])
- gl_MALLOCA
dnl Check for prerequisites for memory fence checks.
gl_FUNC_MMAP_ANON
AC_CHECK_HEADERS_ONCE([sys/mman.h])
@@ -972,26 +736,7 @@ changequote([, ])dnl
AC_LIBOBJ([pipe])
fi
gl_UNISTD_MODULE_INDICATOR([pipe])
- gl_FUNC_PUTENV
- if test $REPLACE_PUTENV = 1; then
- AC_LIBOBJ([putenv])
- gl_PREREQ_PUTENV
- fi
- gl_STDLIB_MODULE_INDICATOR([putenv])
- dnl Check for prerequisites for memory fence checks.
- gl_FUNC_MMAP_ANON
- AC_CHECK_HEADERS_ONCE([sys/mman.h])
- AC_CHECK_FUNCS_ONCE([mprotect])
AC_CHECK_HEADERS_ONCE([sys/wait.h])
- gl_FUNC_SETENV
- if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
- AC_LIBOBJ([setenv])
- fi
- gl_STDLIB_MODULE_INDICATOR([setenv])
- AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION])
- AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION])
- AC_REQUIRE([gl_LONG_DOUBLE_EXPONENT_LOCATION])
- AC_CHECK_DECLS_ONCE([alarm])
gl_FUNC_STAT
if test $REPLACE_STAT = 1; then
AC_LIBOBJ([stat])
@@ -1000,6 +745,18 @@ changequote([, ])dnl
gl_SYS_STAT_MODULE_INDICATOR([stat])
AC_REQUIRE([gt_TYPE_WCHAR_T])
AC_REQUIRE([gt_TYPE_WINT_T])
+ gl_FUNC_STRERROR
+ if test $REPLACE_STRERROR = 1; then
+ AC_LIBOBJ([strerror])
+ fi
+ gl_MODULE_INDICATOR([strerror])
+ gl_STRING_MODULE_INDICATOR([strerror])
+ AC_REQUIRE([gl_HEADER_ERRNO_H])
+ AC_REQUIRE([gl_FUNC_STRERROR_0])
+ if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
+ AC_LIBOBJ([strerror-override])
+ gl_PREREQ_SYS_H_WINSOCK2
+ fi
gl_FUNC_STRERROR_R
if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
AC_LIBOBJ([strerror_r])
@@ -1019,12 +776,6 @@ changequote([, ])dnl
AC_PROG_MKDIR_P
AC_CHECK_FUNCS_ONCE([shutdown])
gl_THREADLIB
- gl_FUNC_UNSETENV
- if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
- AC_LIBOBJ([unsetenv])
- gl_PREREQ_UNSETENV
- fi
- gl_STDLIB_MODULE_INDICATOR([unsetenv])
gl_VALGRIND_TESTS
abs_aux_dir=`cd "$ac_aux_dir"; pwd`
AC_SUBST([abs_aux_dir])
@@ -1134,55 +885,26 @@ AC_DEFUN([gl_FILE_LIST], [
lib/accept.c
lib/alloca.c
lib/alloca.in.h
- lib/alphasort.c
- lib/argp-ba.c
- lib/argp-eexst.c
- lib/argp-fmtstream.c
- lib/argp-fmtstream.h
- lib/argp-fs-xinl.c
- lib/argp-help.c
- lib/argp-namefrob.h
- lib/argp-parse.c
- lib/argp-pin.c
- lib/argp-pv.c
- lib/argp-pvh.c
- lib/argp-xinl.c
- lib/argp.h
lib/arpa_inet.in.h
lib/asnprintf.c
lib/asprintf.c
lib/base64.c
lib/base64.h
- lib/basename-lgpl.c
lib/bind.c
lib/byteswap.in.h
lib/c-ctype.c
lib/c-ctype.h
lib/close.c
- lib/closedir.c
lib/connect.c
- lib/dirent-private.h
- lib/dirent.in.h
- lib/dirname-lgpl.c
- lib/dirname.h
- lib/dosname.h
lib/dup2.c
lib/errno.in.h
- lib/error.c
- lib/error.h
lib/fd-hook.c
lib/fd-hook.h
- lib/filename.h
lib/float+.h
lib/float.c
lib/float.in.h
- lib/fpucw.h
- lib/frexp.c
- lib/frexpl.c
lib/fseek.c
lib/fseeko.c
- lib/fseterr.c
- lib/fseterr.h
lib/fstat.c
lib/ftell.c
lib/ftello.c
@@ -1190,38 +912,22 @@ AC_DEFUN([gl_FILE_LIST], [
lib/getaddrinfo.c
lib/getdelim.c
lib/getline.c
- lib/getopt.c
- lib/getopt.in.h
- lib/getopt1.c
- lib/getopt_int.h
lib/getpass.c
lib/getpass.h
lib/getpeername.c
- lib/getsubopt.c
lib/gettext.h
lib/gettimeofday.c
lib/hash-pjw-bare.c
lib/hash-pjw-bare.h
lib/inet_ntop.c
lib/inet_pton.c
- lib/intprops.h
- lib/isnan.c
- lib/isnand-nolibm.h
- lib/isnand.c
- lib/isnanf-nolibm.h
- lib/isnanf.c
- lib/isnanl-nolibm.h
- lib/isnanl.c
lib/itold.c
lib/listen.c
lib/lseek.c
lib/malloc.c
- lib/math.c
- lib/math.in.h
lib/memchr.c
lib/memchr.valgrind
lib/memmem.c
- lib/mempcpy.c
lib/minmax.h
lib/msvc-inval.c
lib/msvc-inval.h
@@ -1229,43 +935,27 @@ AC_DEFUN([gl_FILE_LIST], [
lib/msvc-nothrow.h
lib/netdb.in.h
lib/netinet_in.in.h
- lib/opendir.c
lib/printf-args.c
lib/printf-args.h
- lib/printf-frexp.c
- lib/printf-frexp.h
- lib/printf-frexpl.c
- lib/printf-frexpl.h
lib/printf-parse.c
lib/printf-parse.h
- lib/progname.c
- lib/progname.h
- lib/rawmemchr.c
- lib/rawmemchr.valgrind
lib/read-file.c
lib/read-file.h
- lib/readdir.c
lib/realloc.c
lib/recv.c
lib/recvfrom.c
- lib/scandir.c
lib/select.c
lib/send.c
lib/sendto.c
lib/setsockopt.c
lib/shutdown.c
lib/signal.in.h
- lib/signbitd.c
- lib/signbitf.c
- lib/signbitl.c
lib/size_max.h
- lib/sleep.c
lib/snprintf.c
lib/socket.c
lib/sockets.c
lib/sockets.h
lib/stdalign.in.h
- lib/stdarg.in.h
lib/stdbool.in.h
lib/stddef.in.h
lib/stdint.in.h
@@ -1274,15 +964,9 @@ AC_DEFUN([gl_FILE_LIST], [
lib/stdlib.in.h
lib/str-two-way.h
lib/strcasecmp.c
- lib/strchrnul.c
- lib/strchrnul.valgrind
lib/strdup.c
- lib/strerror-override.c
- lib/strerror-override.h
- lib/strerror.c
lib/string.in.h
lib/strings.in.h
- lib/stripslash.c
lib/strncasecmp.c
lib/strndup.c
lib/strnlen.c
@@ -1295,7 +979,6 @@ AC_DEFUN([gl_FILE_LIST], [
lib/sys_time.in.h
lib/sys_types.in.h
lib/sys_uio.in.h
- lib/sysexits.in.h
lib/time.in.h
lib/time_r.c
lib/u64.c
@@ -1306,11 +989,6 @@ AC_DEFUN([gl_FILE_LIST], [
lib/vasnprintf.h
lib/vasprintf.c
lib/verify.h
- lib/version-etc-fsf.c
- lib/version-etc.c
- lib/version-etc.h
- lib/vfprintf.c
- lib/vprintf.c
lib/vsnprintf.c
lib/w32sock.h
lib/wchar.in.h
@@ -1318,25 +996,14 @@ AC_DEFUN([gl_FILE_LIST], [
lib/xsize.h
m4/00gnulib.m4
m4/alloca.m4
- m4/alphasort.m4
- m4/argp.m4
m4/arpa_inet_h.m4
m4/base64.m4
m4/byteswap.m4
m4/close.m4
- m4/closedir.m4
m4/codeset.m4
- m4/dirent_h.m4
- m4/dirname.m4
- m4/double-slash-root.m4
m4/dup2.m4
- m4/eealloc.m4
- m4/environ.m4
m4/errno_h.m4
- m4/error.m4
m4/exponentd.m4
- m4/exponentf.m4
- m4/exponentl.m4
m4/extensions.m4
m4/extern-inline.m4
m4/fcntl-o.m4
@@ -1344,11 +1011,8 @@ AC_DEFUN([gl_FILE_LIST], [
m4/fdopen.m4
m4/float_h.m4
m4/fpieee.m4
- m4/frexp.m4
- m4/frexpl.m4
m4/fseek.m4
m4/fseeko.m4
- m4/fseterr.m4
m4/fstat.m4
m4/ftell.m4
m4/ftello.m4
@@ -1359,10 +1023,8 @@ AC_DEFUN([gl_FILE_LIST], [
m4/getdelim.m4
m4/getdtablesize.m4
m4/getline.m4
- m4/getopt.m4
m4/getpagesize.m4
m4/getpass.m4
- m4/getsubopt.m4
m4/gettext.m4
m4/gettimeofday.m4
m4/glibc2.m4
@@ -1383,14 +1045,10 @@ AC_DEFUN([gl_FILE_LIST], [
m4/inttypes.m4
m4/inttypes_h.m4
m4/ioctl.m4
- m4/isnand.m4
- m4/isnanf.m4
- m4/isnanl.m4
m4/largefile.m4
m4/lcmessage.m4
m4/ld-output-def.m4
m4/ld-version-script.m4
- m4/ldexpl.m4
m4/lib-ld.m4
m4/lib-link.m4
m4/lib-prefix.m4
@@ -1399,12 +1057,10 @@ AC_DEFUN([gl_FILE_LIST], [
m4/lseek.m4
m4/lstat.m4
m4/malloc.m4
- m4/malloca.m4
m4/manywarnings.m4
m4/math_h.m4
m4/memchr.m4
m4/memmem.m4
- m4/mempcpy.m4
m4/minmax.m4
m4/mmap-anon.m4
m4/mode_t.m4
@@ -1414,32 +1070,21 @@ AC_DEFUN([gl_FILE_LIST], [
m4/netdb_h.m4
m4/netinet_in_h.m4
m4/nls.m4
- m4/nocrash.m4
m4/off_t.m4
m4/open.m4
- m4/opendir.m4
m4/pathmax.m4
m4/perror.m4
m4/pipe.m4
m4/po.m4
- m4/printf-frexp.m4
- m4/printf-frexpl.m4
m4/printf-posix.m4
m4/printf.m4
m4/progtest.m4
- m4/putenv.m4
- m4/rawmemchr.m4
m4/read-file.m4
- m4/readdir.m4
m4/realloc.m4
- m4/scandir.m4
m4/select.m4
m4/servent.m4
- m4/setenv.m4
m4/signal_h.m4
- m4/signbit.m4
m4/size_max.m4
- m4/sleep.m4
m4/snprintf.m4
m4/socketlib.m4
m4/sockets.m4
@@ -1448,7 +1093,6 @@ AC_DEFUN([gl_FILE_LIST], [
m4/ssize_t.m4
m4/stat.m4
m4/stdalign.m4
- m4/stdarg.m4
m4/stdbool.m4
m4/stddef_h.m4
m4/stdint.m4
@@ -1456,7 +1100,6 @@ AC_DEFUN([gl_FILE_LIST], [
m4/stdio_h.m4
m4/stdlib_h.m4
m4/strcase.m4
- m4/strchrnul.m4
m4/strdup.m4
m4/strerror.m4
m4/strerror_r.m4
@@ -1474,7 +1117,6 @@ AC_DEFUN([gl_FILE_LIST], [
m4/sys_time_h.m4
m4/sys_types_h.m4
m4/sys_uio_h.m4
- m4/sysexits.m4
m4/threadlib.m4
m4/time_h.m4
m4/time_r.m4
@@ -1484,10 +1126,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/valgrind-tests.m4
m4/vasnprintf.m4
m4/vasprintf.m4
- m4/version-etc.m4
- m4/vfprintf-posix.m4
m4/visibility.m4
- m4/vprintf-posix.m4
m4/vsnprintf.m4
m4/warn-on-use.m4
m4/warnings.m4
@@ -1495,18 +1134,11 @@ AC_DEFUN([gl_FILE_LIST], [
m4/wchar_t.m4
m4/wint_t.m4
m4/xsize.m4
- tests/infinity.h
tests/init.sh
tests/macros.h
- tests/minus-zero.h
- tests/nan.h
- tests/randomd.c
- tests/randoml.c
tests/signature.h
tests/test-accept.c
tests/test-alloca-opt.c
- tests/test-argp-2.sh
- tests/test-argp.c
tests/test-arpa_inet.c
tests/test-base64.c
tests/test-binary-io.c
@@ -1516,20 +1148,14 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-c-ctype.c
tests/test-close.c
tests/test-connect.c
- tests/test-dirent.c
tests/test-dup2.c
- tests/test-environ.c
tests/test-errno.c
tests/test-fcntl-h.c
tests/test-fdopen.c
tests/test-fgetc.c
tests/test-float.c
- tests/test-fprintf-posix.h
tests/test-fputc.c
tests/test-fread.c
- tests/test-frexp.c
- tests/test-frexp.h
- tests/test-frexpl.c
tests/test-fseek.c
tests/test-fseek.sh
tests/test-fseek2.sh
@@ -1540,7 +1166,6 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-fseeko3.sh
tests/test-fseeko4.c
tests/test-fseeko4.sh
- tests/test-fseterr.c
tests/test-fstat.c
tests/test-ftell.c
tests/test-ftell.sh
@@ -1561,9 +1186,6 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-getdelim.c
tests/test-getdtablesize.c
tests/test-getline.c
- tests/test-getopt.c
- tests/test-getopt.h
- tests/test-getopt_long.h
tests/test-getpeername.c
tests/test-gettimeofday.c
tests/test-iconv.c
@@ -1574,18 +1196,9 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-intprops.c
tests/test-inttypes.c
tests/test-ioctl.c
- tests/test-isnand-nolibm.c
- tests/test-isnand.h
- tests/test-isnanf-nolibm.c
- tests/test-isnanf.h
- tests/test-isnanl-nolibm.c
- tests/test-isnanl.h
tests/test-listen.c
tests/test-lstat.c
tests/test-lstat.h
- tests/test-malloc-gnu.c
- tests/test-malloca.c
- tests/test-math.c
tests/test-memchr.c
tests/test-netdb.c
tests/test-netinet_in.c
@@ -1596,11 +1209,6 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-perror.sh
tests/test-perror2.c
tests/test-pipe.c
- tests/test-printf-frexp.c
- tests/test-printf-frexpl.c
- tests/test-printf-posix.h
- tests/test-printf-posix.output
- tests/test-rawmemchr.c
tests/test-read-file.c
tests/test-recv.c
tests/test-recvfrom.c
@@ -1612,12 +1220,9 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-select.h
tests/test-send.c
tests/test-sendto.c
- tests/test-setenv.c
tests/test-setsockopt.c
tests/test-shutdown.c
tests/test-signal-h.c
- tests/test-signbit.c
- tests/test-sleep.c
tests/test-snprintf.c
tests/test-sockets.c
tests/test-stat.c
@@ -1628,7 +1233,6 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-stdint.c
tests/test-stdio.c
tests/test-stdlib.c
- tests/test-strchrnul.c
tests/test-strerror.c
tests/test-strerror_r.c
tests/test-string.c
@@ -1645,30 +1249,24 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-sys_types.c
tests/test-sys_uio.c
tests/test-sys_wait.h
- tests/test-sysexits.c
tests/test-time.c
tests/test-u64.c
tests/test-unistd.c
- tests/test-unsetenv.c
tests/test-vasnprintf.c
tests/test-vasprintf.c
tests/test-vc-list-files-cvs.sh
tests/test-vc-list-files-git.sh
tests/test-verify.c
tests/test-verify.sh
- tests/test-version-etc.c
- tests/test-version-etc.sh
- tests/test-vfprintf-posix.c
- tests/test-vfprintf-posix.sh
- tests/test-vprintf-posix.c
- tests/test-vprintf-posix.sh
tests/test-vsnprintf.c
tests/test-wchar.c
tests/zerosize-ptr.h
tests=lib/binary-io.c
tests=lib/binary-io.h
+ tests=lib/dosname.h
tests=lib/fcntl.in.h
tests=lib/fdopen.c
+ tests=lib/fpucw.h
tests=lib/ftruncate.c
tests=lib/getcwd-lgpl.c
tests=lib/getdtablesize.c
@@ -1677,24 +1275,22 @@ AC_DEFUN([gl_FILE_LIST], [
tests=lib/glthread/lock.h
tests=lib/glthread/threadlib.c
tests=lib/ignore-value.h
+ tests=lib/intprops.h
tests=lib/inttypes.in.h
tests=lib/ioctl.c
tests=lib/lstat.c
- tests=lib/malloca.c
- tests=lib/malloca.h
- tests=lib/malloca.valgrind
tests=lib/open.c
tests=lib/pathmax.h
tests=lib/perror.c
tests=lib/pipe.c
- tests=lib/putenv.c
tests=lib/same-inode.h
- tests=lib/setenv.c
tests=lib/stat.c
+ tests=lib/strerror-override.c
+ tests=lib/strerror-override.h
+ tests=lib/strerror.c
tests=lib/strerror_r.c
tests=lib/symlink.c
tests=lib/sys_ioctl.in.h
- tests=lib/unsetenv.c
tests=lib/w32sock.h
top/GNUmakefile
top/maint.mk
diff --git a/gl/m4/isnand.m4 b/gl/m4/isnand.m4
deleted file mode 100644
index ee05e0f93c..0000000000
--- a/gl/m4/isnand.m4
+++ /dev/null
@@ -1,96 +0,0 @@
-# isnand.m4 serial 11
-dnl Copyright (C) 2007-2013 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 how to get or define isnand().
-
-AC_DEFUN([gl_FUNC_ISNAND],
-[
- AC_REQUIRE([gl_MATH_H_DEFAULTS])
- ISNAND_LIBM=
- gl_HAVE_ISNAND_NO_LIBM
- if test $gl_cv_func_isnand_no_libm = no; then
- gl_HAVE_ISNAND_IN_LIBM
- if test $gl_cv_func_isnand_in_libm = yes; then
- ISNAND_LIBM=-lm
- fi
- fi
- dnl The variable gl_func_isnand set here is used by isnan.m4.
- if test $gl_cv_func_isnand_no_libm = yes \
- || test $gl_cv_func_isnand_in_libm = yes; then
- gl_func_isnand=yes
- else
- gl_func_isnand=no
- HAVE_ISNAND=0
- fi
- AC_SUBST([ISNAND_LIBM])
-])
-
-dnl Check how to get or define isnand() without linking with libm.
-
-AC_DEFUN([gl_FUNC_ISNAND_NO_LIBM],
-[
- gl_HAVE_ISNAND_NO_LIBM
- gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
- if test $gl_cv_func_isnand_no_libm = yes; then
- AC_DEFINE([HAVE_ISNAND_IN_LIBC], [1],
- [Define if the isnan(double) function is available in libc.])
- fi
-])
-
-dnl Prerequisites of replacement isnand definition. It does not need -lm.
-AC_DEFUN([gl_PREREQ_ISNAND],
-[
- AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION])
-])
-
-dnl Test whether isnand() can be used with libm.
-
-AC_DEFUN([gl_HAVE_ISNAND_IN_LIBM],
-[
- AC_CACHE_CHECK([whether isnan(double) can be used with libm],
- [gl_cv_func_isnand_in_libm],
- [
- save_LIBS="$LIBS"
- LIBS="$LIBS -lm"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <math.h>
- #if __GNUC__ >= 4
- # undef isnand
- # define isnand(x) __builtin_isnan ((double)(x))
- #elif defined isnan
- # undef isnand
- # define isnand(x) isnan ((double)(x))
- #endif
- double x;]],
- [[return isnand (x);]])],
- [gl_cv_func_isnand_in_libm=yes],
- [gl_cv_func_isnand_in_libm=no])
- LIBS="$save_LIBS"
- ])
-])
-
-AC_DEFUN([gl_HAVE_ISNAND_NO_LIBM],
-[
- AC_CACHE_CHECK([whether isnan(double) can be used without linking with libm],
- [gl_cv_func_isnand_no_libm],
- [
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <math.h>
- #if __GNUC__ >= 4
- # undef isnand
- # define isnand(x) __builtin_isnan ((double)(x))
- #else
- # undef isnand
- # define isnand(x) isnan ((double)(x))
- #endif
- double x;]],
- [[return isnand (x);]])],
- [gl_cv_func_isnand_no_libm=yes],
- [gl_cv_func_isnand_no_libm=no])
- ])
-])
diff --git a/gl/m4/isnanf.m4 b/gl/m4/isnanf.m4
deleted file mode 100644
index f01886a683..0000000000
--- a/gl/m4/isnanf.m4
+++ /dev/null
@@ -1,188 +0,0 @@
-# isnanf.m4 serial 14
-dnl Copyright (C) 2007-2013 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 how to get or define isnanf().
-
-AC_DEFUN([gl_FUNC_ISNANF],
-[
- AC_REQUIRE([gl_MATH_H_DEFAULTS])
- ISNANF_LIBM=
- gl_HAVE_ISNANF_NO_LIBM
- if test $gl_cv_func_isnanf_no_libm = no; then
- gl_HAVE_ISNANF_IN_LIBM
- if test $gl_cv_func_isnanf_in_libm = yes; then
- ISNANF_LIBM=-lm
- fi
- fi
- dnl The variable gl_func_isnanf set here is used by isnan.m4.
- if test $gl_cv_func_isnanf_no_libm = yes \
- || test $gl_cv_func_isnanf_in_libm = yes; then
- save_LIBS="$LIBS"
- LIBS="$LIBS $ISNANF_LIBM"
- gl_ISNANF_WORKS
- LIBS="$save_LIBS"
- case "$gl_cv_func_isnanf_works" in
- *yes) gl_func_isnanf=yes ;;
- *) gl_func_isnanf=no; ISNANF_LIBM= ;;
- esac
- else
- gl_func_isnanf=no
- fi
- if test $gl_func_isnanf != yes; then
- HAVE_ISNANF=0
- fi
- AC_SUBST([ISNANF_LIBM])
-])
-
-dnl Check how to get or define isnanf() without linking with libm.
-
-AC_DEFUN([gl_FUNC_ISNANF_NO_LIBM],
-[
- gl_HAVE_ISNANF_NO_LIBM
- if test $gl_cv_func_isnanf_no_libm = yes; then
- gl_ISNANF_WORKS
- fi
- if test $gl_cv_func_isnanf_no_libm = yes \
- && { case "$gl_cv_func_isnanf_works" in
- *yes) true;;
- *) false;;
- esac
- }; then
- gl_func_isnanf_no_libm=yes
- AC_DEFINE([HAVE_ISNANF_IN_LIBC], [1],
- [Define if the isnan(float) function is available in libc.])
- else
- gl_func_isnanf_no_libm=no
- fi
-])
-
-dnl Prerequisites of replacement isnanf definition. It does not need -lm.
-AC_DEFUN([gl_PREREQ_ISNANF],
-[
- gl_FLOAT_EXPONENT_LOCATION
-])
-
-dnl Test whether isnanf() can be used without libm.
-AC_DEFUN([gl_HAVE_ISNANF_NO_LIBM],
-[
- AC_CACHE_CHECK([whether isnan(float) can be used without linking with libm],
- [gl_cv_func_isnanf_no_libm],
- [
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <math.h>
- #if __GNUC__ >= 4
- # undef isnanf
- # define isnanf(x) __builtin_isnanf ((float)(x))
- #elif defined isnan
- # undef isnanf
- # define isnanf(x) isnan ((float)(x))
- #endif
- float x;]],
- [[return isnanf (x);]])],
- [gl_cv_func_isnanf_no_libm=yes],
- [gl_cv_func_isnanf_no_libm=no])
- ])
-])
-
-dnl Test whether isnanf() can be used with libm.
-AC_DEFUN([gl_HAVE_ISNANF_IN_LIBM],
-[
- AC_CACHE_CHECK([whether isnan(float) can be used with libm],
- [gl_cv_func_isnanf_in_libm],
- [
- save_LIBS="$LIBS"
- LIBS="$LIBS -lm"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <math.h>
- #if __GNUC__ >= 4
- # undef isnanf
- # define isnanf(x) __builtin_isnanf ((float)(x))
- #elif defined isnan
- # undef isnanf
- # define isnanf(x) isnan ((float)(x))
- #endif
- float x;]],
- [[return isnanf (x);]])],
- [gl_cv_func_isnanf_in_libm=yes],
- [gl_cv_func_isnanf_in_libm=no])
- LIBS="$save_LIBS"
- ])
-])
-
-dnl Test whether isnanf() rejects Infinity (this fails on Solaris 2.5.1),
-dnl recognizes a NaN (this fails on IRIX 6.5 with cc), and recognizes a NaN
-dnl with in-memory representation 0x7fbfffff (this fails on IRIX 6.5).
-AC_DEFUN([gl_ISNANF_WORKS],
-[
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION])
- AC_CACHE_CHECK([whether isnan(float) works], [gl_cv_func_isnanf_works],
- [
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
-#include <math.h>
-#if __GNUC__ >= 4
-# undef isnanf
-# define isnanf(x) __builtin_isnanf ((float)(x))
-#elif defined isnan
-# undef isnanf
-# define isnanf(x) isnan ((float)(x))
-#endif
-/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
-#ifdef __DECC
-static float
-NaN ()
-{
- static float zero = 0.0f;
- return zero / zero;
-}
-#else
-# define NaN() (0.0f / 0.0f)
-#endif
-#define NWORDS \
- ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
-typedef union { unsigned int word[NWORDS]; float value; } memory_float;
-int main()
-{
- int result = 0;
-
- if (isnanf (1.0f / 0.0f))
- result |= 1;
-
- if (!isnanf (NaN ()))
- result |= 2;
-
-#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
- /* The isnanf function should be immune against changes in the sign bit and
- in the mantissa bits. The xor operation twiddles a bit that can only be
- a sign bit or a mantissa bit. */
- if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
- {
- memory_float m;
-
- m.value = NaN ();
- /* Set the bits below the exponent to 01111...111. */
- m.word[0] &= -1U << FLT_EXPBIT0_BIT;
- m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
- if (!isnanf (m.value))
- result |= 4;
- }
-#endif
-
- return result;
-}]])],
- [gl_cv_func_isnanf_works=yes],
- [gl_cv_func_isnanf_works=no],
- [case "$host_os" in
- irix* | solaris*) gl_cv_func_isnanf_works="guessing no";;
- *) gl_cv_func_isnanf_works="guessing yes";;
- esac
- ])
- ])
-])
diff --git a/gl/m4/isnanl.m4 b/gl/m4/isnanl.m4
deleted file mode 100644
index ed5bbf8ba2..0000000000
--- a/gl/m4/isnanl.m4
+++ /dev/null
@@ -1,255 +0,0 @@
-# isnanl.m4 serial 17
-dnl Copyright (C) 2007-2013 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_ISNANL],
-[
- AC_REQUIRE([gl_MATH_H_DEFAULTS])
- ISNANL_LIBM=
- gl_HAVE_ISNANL_NO_LIBM
- if test $gl_cv_func_isnanl_no_libm = no; then
- gl_HAVE_ISNANL_IN_LIBM
- if test $gl_cv_func_isnanl_in_libm = yes; then
- ISNANL_LIBM=-lm
- fi
- fi
- dnl The variable gl_func_isnanl set here is used by isnan.m4.
- if test $gl_cv_func_isnanl_no_libm = yes \
- || test $gl_cv_func_isnanl_in_libm = yes; then
- save_LIBS="$LIBS"
- LIBS="$LIBS $ISNANL_LIBM"
- gl_FUNC_ISNANL_WORKS
- LIBS="$save_LIBS"
- case "$gl_cv_func_isnanl_works" in
- *yes) gl_func_isnanl=yes ;;
- *) gl_func_isnanl=no; ISNANL_LIBM= ;;
- esac
- else
- gl_func_isnanl=no
- fi
- if test $gl_func_isnanl != yes; then
- HAVE_ISNANL=0
- fi
- AC_SUBST([ISNANL_LIBM])
-])
-
-AC_DEFUN([gl_FUNC_ISNANL_NO_LIBM],
-[
- gl_HAVE_ISNANL_NO_LIBM
- gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
- if test $gl_func_isnanl_no_libm = yes; then
- gl_FUNC_ISNANL_WORKS
- case "$gl_cv_func_isnanl_works" in
- *yes) ;;
- *) gl_func_isnanl_no_libm=no ;;
- esac
- fi
- if test $gl_func_isnanl_no_libm = yes; then
- AC_DEFINE([HAVE_ISNANL_IN_LIBC], [1],
- [Define if the isnan(long double) function is available in libc.])
- fi
-])
-
-dnl Prerequisites of replacement isnanl definition. It does not need -lm.
-AC_DEFUN([gl_PREREQ_ISNANL],
-[
- gl_LONG_DOUBLE_EXPONENT_LOCATION
- AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
-])
-
-dnl Test whether isnanl() can be used without libm.
-AC_DEFUN([gl_HAVE_ISNANL_NO_LIBM],
-[
- AC_CACHE_CHECK([whether isnan(long double) can be used without linking with libm],
- [gl_cv_func_isnanl_no_libm],
- [
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <math.h>
- #if __GNUC__ >= 4
- # undef isnanl
- # define isnanl(x) __builtin_isnanl ((long double)(x))
- #elif defined isnan
- # undef isnanl
- # define isnanl(x) isnan ((long double)(x))
- #endif
- long double x;]],
- [[return isnanl (x);]])],
- [gl_cv_func_isnanl_no_libm=yes],
- [gl_cv_func_isnanl_no_libm=no])
- ])
-])
-
-dnl Test whether isnanl() can be used with libm.
-AC_DEFUN([gl_HAVE_ISNANL_IN_LIBM],
-[
- AC_CACHE_CHECK([whether isnan(long double) can be used with libm],
- [gl_cv_func_isnanl_in_libm],
- [
- save_LIBS="$LIBS"
- LIBS="$LIBS -lm"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <math.h>
- #if __GNUC__ >= 4
- # undef isnanl
- # define isnanl(x) __builtin_isnanl ((long double)(x))
- #elif defined isnan
- # undef isnanl
- # define isnanl(x) isnan ((long double)(x))
- #endif
- long double x;]],
- [[return isnanl (x);]])],
- [gl_cv_func_isnanl_in_libm=yes],
- [gl_cv_func_isnanl_in_libm=no])
- LIBS="$save_LIBS"
- ])
-])
-
-dnl Test whether isnanl() recognizes all numbers which are neither finite nor
-dnl infinite. This test fails e.g. on NetBSD/i386 and on glibc/ia64.
-dnl Also, the GCC >= 4.0 built-in __builtin_isnanl does not pass the tests
-dnl - for pseudo-denormals on i686 and x86_64,
-dnl - for pseudo-zeroes, unnormalized numbers, and pseudo-denormals on ia64.
-AC_DEFUN([gl_FUNC_ISNANL_WORKS],
-[
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([gl_BIGENDIAN])
- AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- AC_CACHE_CHECK([whether isnanl works], [gl_cv_func_isnanl_works],
- [
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
-#include <float.h>
-#include <limits.h>
-#include <math.h>
-#if __GNUC__ >= 4
-# undef isnanl
-# define isnanl(x) __builtin_isnanl ((long double)(x))
-#elif defined isnan
-# undef isnanl
-# define isnanl(x) isnan ((long double)(x))
-#endif
-#define NWORDS \
- ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
-typedef union { unsigned int word[NWORDS]; long double value; }
- memory_long_double;
-/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
- runtime type conversion. */
-#ifdef __sgi
-static long double NaNl ()
-{
- double zero = 0.0;
- return zero / zero;
-}
-#else
-# define NaNl() (0.0L / 0.0L)
-#endif
-int main ()
-{
- int result = 0;
-
- if (!isnanl (NaNl ()))
- result |= 1;
-
- {
- memory_long_double m;
- unsigned int i;
-
- /* The isnanl function should be immune against changes in the sign bit and
- in the mantissa bits. The xor operation twiddles a bit that can only be
- a sign bit or a mantissa bit (since the exponent never extends to
- bit 31). */
- m.value = NaNl ();
- m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
- for (i = 0; i < NWORDS; i++)
- m.word[i] |= 1;
- if (!isnanl (m.value))
- result |= 1;
- }
-
-#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
-/* Representation of an 80-bit 'long double' as an initializer for a sequence
- of 'unsigned int' words. */
-# ifdef WORDS_BIGENDIAN
-# define LDBL80_WORDS(exponent,manthi,mantlo) \
- { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
- ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
- (unsigned int) (mantlo) << 16 \
- }
-# else
-# define LDBL80_WORDS(exponent,manthi,mantlo) \
- { mantlo, manthi, exponent }
-# endif
- { /* Quiet NaN. */
- static memory_long_double x =
- { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
- if (!isnanl (x.value))
- result |= 2;
- }
- {
- /* Signalling NaN. */
- static memory_long_double x =
- { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
- if (!isnanl (x.value))
- result |= 2;
- }
- /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
- Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
- Intel IA-64 Architecture Software Developer's Manual, Volume 1:
- Application Architecture.
- Table 5-2 "Floating-Point Register Encodings"
- Figure 5-6 "Memory to Floating-Point Register Data Translation"
- */
- { /* Pseudo-NaN. */
- static memory_long_double x =
- { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
- if (!isnanl (x.value))
- result |= 4;
- }
- { /* Pseudo-Infinity. */
- static memory_long_double x =
- { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
- if (!isnanl (x.value))
- result |= 8;
- }
- { /* Pseudo-Zero. */
- static memory_long_double x =
- { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
- if (!isnanl (x.value))
- result |= 16;
- }
- { /* Unnormalized number. */
- static memory_long_double x =
- { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
- if (!isnanl (x.value))
- result |= 32;
- }
- { /* Pseudo-Denormal. */
- static memory_long_double x =
- { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
- if (!isnanl (x.value))
- result |= 64;
- }
-#endif
-
- return result;
-}]])],
- [gl_cv_func_isnanl_works=yes],
- [gl_cv_func_isnanl_works=no],
- [case "$host_cpu" in
- # Guess no on ia64, x86_64, i386.
- ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
- *)
- case "$host_os" in
- netbsd*) gl_cv_func_isnanl_works="guessing no";;
- *) gl_cv_func_isnanl_works="guessing yes";;
- esac
- ;;
- esac
- ])
- ])
-])
diff --git a/gl/m4/ldexpl.m4 b/gl/m4/ldexpl.m4
deleted file mode 100644
index 1223711469..0000000000
--- a/gl/m4/ldexpl.m4
+++ /dev/null
@@ -1,133 +0,0 @@
-# ldexpl.m4 serial 16
-dnl Copyright (C) 2007-2013 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_LDEXPL],
-[
- AC_REQUIRE([gl_MATH_H_DEFAULTS])
- AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
- AC_REQUIRE([gl_FUNC_ISNANL]) dnl for ISNANL_LIBM
-
- dnl Persuade glibc <math.h> to declare ldexpl().
- AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
-
- dnl Check whether it's declared.
- dnl Mac OS X 10.3 has ldexpl() in libc but doesn't declare it in <math.h>.
- AC_CHECK_DECL([ldexpl], , [HAVE_DECL_LDEXPL=0], [[#include <math.h>]])
-
- LDEXPL_LIBM=
- if test $HAVE_DECL_LDEXPL = 1; then
- gl_CHECK_LDEXPL_NO_LIBM
- if test $gl_cv_func_ldexpl_no_libm = no; then
- AC_CACHE_CHECK([whether ldexpl() can be used with libm],
- [gl_cv_func_ldexpl_in_libm],
- [
- save_LIBS="$LIBS"
- LIBS="$LIBS -lm"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <math.h>
- long double x;]],
- [[return ldexpl (x, -1) > 0;]])],
- [gl_cv_func_ldexpl_in_libm=yes],
- [gl_cv_func_ldexpl_in_libm=no])
- LIBS="$save_LIBS"
- ])
- if test $gl_cv_func_ldexpl_in_libm = yes; then
- LDEXPL_LIBM=-lm
- fi
- fi
- if test $gl_cv_func_ldexpl_no_libm = yes \
- || test $gl_cv_func_ldexpl_in_libm = yes; then
- save_LIBS="$LIBS"
- LIBS="$LIBS $LDEXPL_LIBM"
- gl_FUNC_LDEXPL_WORKS
- LIBS="$save_LIBS"
- case "$gl_cv_func_ldexpl_works" in
- *yes) gl_func_ldexpl=yes ;;
- *) gl_func_ldexpl=no; REPLACE_LDEXPL=1 ;;
- esac
- else
- gl_func_ldexpl=no
- fi
- if test $gl_func_ldexpl = yes; then
- AC_DEFINE([HAVE_LDEXPL], [1],
- [Define if the ldexpl() function is available.])
- fi
- fi
- if test $HAVE_DECL_LDEXPL = 0 || test $gl_func_ldexpl = no; then
- dnl Find libraries needed to link lib/ldexpl.c.
- if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
- AC_REQUIRE([gl_FUNC_LDEXP])
- LDEXPL_LIBM="$LDEXP_LIBM"
- else
- LDEXPL_LIBM="$ISNANL_LIBM"
- fi
- fi
- AC_SUBST([LDEXPL_LIBM])
-])
-
-dnl Test whether ldexpl() can be used without linking with libm.
-dnl Set gl_cv_func_ldexpl_no_libm to 'yes' or 'no' accordingly.
-AC_DEFUN([gl_CHECK_LDEXPL_NO_LIBM],
-[
- AC_CACHE_CHECK([whether ldexpl() can be used without linking with libm],
- [gl_cv_func_ldexpl_no_libm],
- [
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <math.h>
- long double x;]],
- [[return ldexpl (x, -1) > 0;]])],
- [gl_cv_func_ldexpl_no_libm=yes],
- [gl_cv_func_ldexpl_no_libm=no])
- ])
-])
-
-dnl Test whether ldexpl() works on finite numbers (this fails on AIX 5.1
-dnl and Mac OS X 10.4/PowerPC).
-AC_DEFUN([gl_FUNC_LDEXPL_WORKS],
-[
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- AC_CACHE_CHECK([whether ldexpl works], [gl_cv_func_ldexpl_works],
- [
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
-#include <math.h>
-extern
-#ifdef __cplusplus
-"C"
-#endif
-long double ldexpl (long double, int);
-int main()
-{
- int result = 0;
- {
- volatile long double x = 1.0;
- volatile long double y = ldexpl (x, -1);
- if (y != 0.5L)
- result |= 1;
- }
- {
- volatile long double x = 1.73205L;
- volatile long double y = ldexpl (x, 0);
- if (y != x)
- result |= 2;
- }
- return result;
-}]])],
- [gl_cv_func_ldexpl_works=yes],
- [gl_cv_func_ldexpl_works=no],
- [
-changequote(,)dnl
- case "$host_os" in
- aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no";;
- *) gl_cv_func_ldexpl_works="guessing yes";;
- esac
-changequote([,])dnl
- ])
- ])
-])
diff --git a/gl/m4/malloca.m4 b/gl/m4/malloca.m4
deleted file mode 100644
index 791ce10d5f..0000000000
--- a/gl/m4/malloca.m4
+++ /dev/null
@@ -1,15 +0,0 @@
-# malloca.m4 serial 1
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2013 Free Software Foundation,
-dnl 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_MALLOCA],
-[
- dnl Use the autoconf tests for alloca(), but not the AC_SUBSTed variables
- dnl @ALLOCA@ and @LTALLOCA@.
- dnl gl_FUNC_ALLOCA dnl Already brought in by the module dependencies.
- AC_REQUIRE([gl_EEMALLOC])
- AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
-])
diff --git a/gl/m4/mempcpy.m4 b/gl/m4/mempcpy.m4
deleted file mode 100644
index a48f2d107c..0000000000
--- a/gl/m4/mempcpy.m4
+++ /dev/null
@@ -1,26 +0,0 @@
-# mempcpy.m4 serial 11
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2013 Free Software Foundation,
-dnl 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_MEMPCPY],
-[
- dnl Persuade glibc <string.h> to declare mempcpy().
- AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
-
- dnl The mempcpy() declaration in lib/string.in.h uses 'restrict'.
- AC_REQUIRE([AC_C_RESTRICT])
-
- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
- AC_CHECK_FUNCS([mempcpy])
- if test $ac_cv_func_mempcpy = no; then
- HAVE_MEMPCPY=0
- fi
-])
-
-# Prerequisites of lib/mempcpy.c.
-AC_DEFUN([gl_PREREQ_MEMPCPY], [
- :
-])
diff --git a/gl/m4/nocrash.m4 b/gl/m4/nocrash.m4
deleted file mode 100644
index 105b884f18..0000000000
--- a/gl/m4/nocrash.m4
+++ /dev/null
@@ -1,130 +0,0 @@
-# nocrash.m4 serial 4
-dnl Copyright (C) 2005, 2009-2013 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 Based on libsigsegv, from Bruno Haible and Paolo Bonzini.
-
-AC_PREREQ([2.13])
-
-dnl Expands to some code for use in .c programs that will cause the configure
-dnl test to exit instead of crashing. This is useful to avoid triggering
-dnl action from a background debugger and to avoid core dumps.
-dnl Usage: ...
-dnl ]GL_NOCRASH[
-dnl ...
-dnl int main() { nocrash_init(); ... }
-AC_DEFUN([GL_NOCRASH],[[
-#include <stdlib.h>
-#if defined __MACH__ && defined __APPLE__
-/* Avoid a crash on Mac OS X. */
-#include <mach/mach.h>
-#include <mach/mach_error.h>
-#include <mach/thread_status.h>
-#include <mach/exception.h>
-#include <mach/task.h>
-#include <pthread.h>
-/* The exception port on which our thread listens. */
-static mach_port_t our_exception_port;
-/* The main function of the thread listening for exceptions of type
- EXC_BAD_ACCESS. */
-static void *
-mach_exception_thread (void *arg)
-{
- /* Buffer for a message to be received. */
- struct {
- mach_msg_header_t head;
- mach_msg_body_t msgh_body;
- char data[1024];
- } msg;
- mach_msg_return_t retval;
- /* Wait for a message on the exception port. */
- retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
- our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
- if (retval != MACH_MSG_SUCCESS)
- abort ();
- exit (1);
-}
-static void
-nocrash_init (void)
-{
- mach_port_t self = mach_task_self ();
- /* Allocate a port on which the thread shall listen for exceptions. */
- if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
- == KERN_SUCCESS) {
- /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
- if (mach_port_insert_right (self, our_exception_port, our_exception_port,
- MACH_MSG_TYPE_MAKE_SEND)
- == KERN_SUCCESS) {
- /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
- for us. */
- exception_mask_t mask = EXC_MASK_BAD_ACCESS;
- /* Create the thread listening on the exception port. */
- pthread_attr_t attr;
- pthread_t thread;
- if (pthread_attr_init (&attr) == 0
- && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
- && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
- pthread_attr_destroy (&attr);
- /* Replace the exception port info for these exceptions with our own.
- Note that we replace the exception port for the entire task, not only
- for a particular thread. This has the effect that when our exception
- port gets the message, the thread specific exception port has already
- been asked, and we don't need to bother about it.
- See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
- task_set_exception_ports (self, mask, our_exception_port,
- EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
- }
- }
- }
-}
-#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Avoid a crash on native Windows. */
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <winerror.h>
-static LONG WINAPI
-exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
-{
- switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
- {
- case EXCEPTION_ACCESS_VIOLATION:
- case EXCEPTION_IN_PAGE_ERROR:
- case EXCEPTION_STACK_OVERFLOW:
- case EXCEPTION_GUARD_PAGE:
- case EXCEPTION_PRIV_INSTRUCTION:
- case EXCEPTION_ILLEGAL_INSTRUCTION:
- case EXCEPTION_DATATYPE_MISALIGNMENT:
- case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
- case EXCEPTION_NONCONTINUABLE_EXCEPTION:
- exit (1);
- }
- return EXCEPTION_CONTINUE_SEARCH;
-}
-static void
-nocrash_init (void)
-{
- SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
-}
-#else
-/* Avoid a crash on POSIX systems. */
-#include <signal.h>
-/* A POSIX signal handler. */
-static void
-exception_handler (int sig)
-{
- exit (1);
-}
-static void
-nocrash_init (void)
-{
-#ifdef SIGSEGV
- signal (SIGSEGV, exception_handler);
-#endif
-#ifdef SIGBUS
- signal (SIGBUS, exception_handler);
-#endif
-}
-#endif
-]])
diff --git a/gl/m4/opendir.m4 b/gl/m4/opendir.m4
deleted file mode 100644
index d411680561..0000000000
--- a/gl/m4/opendir.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-# opendir.m4 serial 2
-dnl Copyright (C) 2011-2013 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_OPENDIR],
-[
- AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
-
- AC_CHECK_FUNCS([opendir])
- if test $ac_cv_func_opendir = no; then
- HAVE_OPENDIR=0
- fi
- dnl Replace opendir() for supporting the gnulib-defined fchdir() function,
- dnl to keep fchdir's bookkeeping up-to-date.
- m4_ifdef([gl_FUNC_FCHDIR], [
- gl_TEST_FCHDIR
- if test $HAVE_FCHDIR = 0; then
- if test $HAVE_OPENDIR = 1; then
- REPLACE_OPENDIR=1
- fi
- fi
- ])
-])
diff --git a/gl/m4/printf-frexp.m4 b/gl/m4/printf-frexp.m4
deleted file mode 100644
index 8b373b1910..0000000000
--- a/gl/m4/printf-frexp.m4
+++ /dev/null
@@ -1,38 +0,0 @@
-# printf-frexp.m4 serial 5
-dnl Copyright (C) 2007, 2009-2013 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 how to define printf_frexp() without linking with libm.
-
-AC_DEFUN([gl_FUNC_PRINTF_FREXP],
-[
- AC_REQUIRE([gl_CHECK_FREXP_NO_LIBM])
- if test $gl_cv_func_frexp_no_libm = yes; then
- gl_FUNC_FREXP_WORKS
- case "$gl_cv_func_frexp_works" in
- *yes)
- AC_DEFINE([HAVE_FREXP_IN_LIBC], [1],
- [Define if the frexp function is available in libc.])
- ;;
- esac
- fi
-
- AC_CACHE_CHECK([whether ldexp can be used without linking with libm],
- [gl_cv_func_ldexp_no_libm],
- [
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <math.h>
- double x;
- int y;]],
- [[return ldexp (x, y) < 1;]])],
- [gl_cv_func_ldexp_no_libm=yes],
- [gl_cv_func_ldexp_no_libm=no])
- ])
- if test $gl_cv_func_ldexp_no_libm = yes; then
- AC_DEFINE([HAVE_LDEXP_IN_LIBC], [1],
- [Define if the ldexp function is available in libc.])
- fi
-])
diff --git a/gl/m4/printf-frexpl.m4 b/gl/m4/printf-frexpl.m4
deleted file mode 100644
index f1ce4c8a3d..0000000000
--- a/gl/m4/printf-frexpl.m4
+++ /dev/null
@@ -1,48 +0,0 @@
-# printf-frexpl.m4 serial 10
-dnl Copyright (C) 2007, 2009-2013 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 how to define printf_frexpl() without linking with libm.
-
-AC_DEFUN([gl_FUNC_PRINTF_FREXPL],
-[
- AC_REQUIRE([gl_MATH_H_DEFAULTS])
- AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
-
- dnl Subset of gl_FUNC_FREXPL_NO_LIBM.
- gl_CHECK_FREXPL_NO_LIBM
- if test $gl_cv_func_frexpl_no_libm = yes; then
- gl_FUNC_FREXPL_WORKS
- case "$gl_cv_func_frexpl_works" in
- *yes) gl_func_frexpl_no_libm=yes ;;
- *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
- esac
- else
- gl_func_frexpl_no_libm=no
- dnl Set REPLACE_FREXPL here because the system may have frexpl in libm.
- REPLACE_FREXPL=1
- fi
- if test $gl_func_frexpl_no_libm = yes; then
- AC_DEFINE([HAVE_FREXPL_IN_LIBC], [1],
- [Define if the frexpl function is available in libc.])
- dnl Also check whether it's declared.
- dnl Mac OS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
- AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [[#include <math.h>]])
- fi
-
- gl_CHECK_LDEXPL_NO_LIBM
- if test $gl_cv_func_ldexpl_no_libm = yes; then
- gl_FUNC_LDEXPL_WORKS
- case "$gl_cv_func_ldexpl_works" in
- *yes)
- AC_DEFINE([HAVE_LDEXPL_IN_LIBC], [1],
- [Define if the ldexpl function is available in libc.])
- dnl Also check whether it's declared.
- dnl Mac OS X 10.3 has ldexpl() in libc but doesn't declare it in <math.h>.
- AC_CHECK_DECL([ldexpl], , [HAVE_DECL_LDEXPL=0], [[#include <math.h>]])
- ;;
- esac
- fi
-])
diff --git a/gl/m4/putenv.m4 b/gl/m4/putenv.m4
deleted file mode 100644
index c33b5b5170..0000000000
--- a/gl/m4/putenv.m4
+++ /dev/null
@@ -1,56 +0,0 @@
-# putenv.m4 serial 20
-dnl Copyright (C) 2002-2013 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 From Jim Meyering.
-dnl
-dnl Check whether putenv ("FOO") removes FOO from the environment.
-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],[[
- /* Put it in env. */
- if (putenv ("CONFTEST_putenv=val"))
- return 1;
-
- /* Try to remove it. */
- if (putenv ("CONFTEST_putenv"))
- return 2;
-
- /* Make sure it was deleted. */
- if (getenv ("CONFTEST_putenv") != 0)
- return 3;
-
- return 0;
- ]])],
- gl_cv_func_svid_putenv=yes,
- gl_cv_func_svid_putenv=no,
- dnl When crosscompiling, assume putenv is broken.
- [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
- ])
- ])
- case "$gl_cv_func_svid_putenv" in
- *yes) ;;
- *)
- REPLACE_PUTENV=1
- ;;
- esac
-])
-
-# Prerequisites of lib/putenv.c.
-AC_DEFUN([gl_PREREQ_PUTENV],
-[
- AC_CHECK_DECLS([_putenv])
-])
diff --git a/gl/m4/rawmemchr.m4 b/gl/m4/rawmemchr.m4
deleted file mode 100644
index 8c500547c5..0000000000
--- a/gl/m4/rawmemchr.m4
+++ /dev/null
@@ -1,20 +0,0 @@
-# rawmemchr.m4 serial 2
-dnl Copyright (C) 2003, 2007-2013 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_RAWMEMCHR],
-[
- dnl Persuade glibc <string.h> to declare rawmemchr().
- AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
-
- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
- AC_CHECK_FUNCS([rawmemchr])
- if test $ac_cv_func_rawmemchr = no; then
- HAVE_RAWMEMCHR=0
- fi
-])
-
-# Prerequisites of lib/strchrnul.c.
-AC_DEFUN([gl_PREREQ_RAWMEMCHR], [:])
diff --git a/gl/m4/readdir.m4 b/gl/m4/readdir.m4
deleted file mode 100644
index 4269bb486a..0000000000
--- a/gl/m4/readdir.m4
+++ /dev/null
@@ -1,15 +0,0 @@
-# readdir.m4 serial 1
-dnl Copyright (C) 2011-2013 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_READDIR],
-[
- AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
-
- AC_CHECK_FUNCS([readdir])
- if test $ac_cv_func_readdir = no; then
- HAVE_READDIR=0
- fi
-])
diff --git a/gl/m4/scandir.m4 b/gl/m4/scandir.m4
deleted file mode 100644
index a7834ae1ec..0000000000
--- a/gl/m4/scandir.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-# scandir.m4 serial 2
-dnl Copyright (C) 2009-2013 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_SCANDIR],
-[
- AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
-
- dnl Persuade glibc and Solaris <dirent.h> to declare scandir().
- AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
-
- AC_CHECK_FUNCS([scandir])
- if test $ac_cv_func_scandir = no; then
- HAVE_SCANDIR=0
- fi
-])
-
-# Prerequisites of lib/scandir.c.
-AC_DEFUN([gl_PREREQ_SCANDIR], [:])
diff --git a/gl/m4/setenv.m4 b/gl/m4/setenv.m4
deleted file mode 100644
index cb5351a07b..0000000000
--- a/gl/m4/setenv.m4
+++ /dev/null
@@ -1,160 +0,0 @@
-# setenv.m4 serial 26
-dnl Copyright (C) 2001-2004, 2006-2013 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_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
- AC_CACHE_CHECK([whether setenv validates arguments],
- [gl_cv_func_setenv_works],
- [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
- #include <stdlib.h>
- #include <errno.h>
- #include <string.h>
- ]], [[
- int result = 0;
- {
- if (setenv ("", "", 0) != -1)
- result |= 1;
- else if (errno != EINVAL)
- result |= 2;
- }
- {
- if (setenv ("a", "=", 1) != 0)
- result |= 4;
- else if (strcmp (getenv ("a"), "=") != 0)
- result |= 8;
- }
- return result;
- ]])],
- [gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no],
- [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
-])
-
-# Like gl_FUNC_SETENV, except prepare for separate compilation
-# (no REPLACE_SETENV, no AC_LIBOBJ).
-AC_DEFUN([gl_FUNC_SETENV_SEPARATE],
-[
- AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
- AC_CHECK_DECLS_ONCE([setenv])
- if test $ac_cv_have_decl_setenv = no; then
- HAVE_DECL_SETENV=0
- fi
- AC_CHECK_FUNCS_ONCE([setenv])
- gl_PREREQ_SETENV
-])
-
-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
- fi
- AC_CHECK_FUNCS([unsetenv])
- if test $ac_cv_func_unsetenv = no; then
- HAVE_UNSETENV=0
- else
- HAVE_UNSETENV=1
- dnl Some BSDs return void, failing to do error checking.
- AC_CACHE_CHECK([for unsetenv() return type], [gt_cv_func_unsetenv_ret],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
-#undef _BSD
-#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
-#include <stdlib.h>
-extern
-#ifdef __cplusplus
-"C"
-#endif
-int unsetenv (const char *name);
- ]],
- [[]])],
- [gt_cv_func_unsetenv_ret='int'],
- [gt_cv_func_unsetenv_ret='void'])])
- if test $gt_cv_func_unsetenv_ret = 'void'; then
- AC_DEFINE([VOID_UNSETENV], [1], [Define to 1 if unsetenv returns void
- instead of int.])
- REPLACE_UNSETENV=1
- fi
-
- dnl Solaris 10 unsetenv does not remove all copies of a name.
- dnl Haiku alpha 2 unsetenv gets confused by assignment to environ.
- dnl OpenBSD 4.7 unsetenv("") does not fail.
- AC_CACHE_CHECK([whether unsetenv obeys POSIX],
- [gl_cv_func_unsetenv_works],
- [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
- #include <stdlib.h>
- #include <errno.h>
- extern char **environ;
- ]], [[
- char entry1[] = "a=1";
- char entry2[] = "b=2";
- char *env[] = { entry1, entry2, NULL };
- if (putenv ((char *) "a=1")) return 1;
- if (putenv (entry2)) return 2;
- entry2[0] = 'a';
- unsetenv ("a");
- if (getenv ("a")) return 3;
- if (!unsetenv ("") || errno != EINVAL) return 4;
- entry2[0] = 'b';
- environ = env;
- if (!getenv ("a")) return 5;
- entry2[0] = 'a';
- unsetenv ("a");
- if (getenv ("a")) return 6;
- ]])],
- [gl_cv_func_unsetenv_works=yes], [gl_cv_func_unsetenv_works=no],
- [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
-])
-
-# Prerequisites of lib/setenv.c.
-AC_DEFUN([gl_PREREQ_SETENV],
-[
- AC_REQUIRE([AC_FUNC_ALLOCA])
- AC_REQUIRE([gl_ENVIRON])
- AC_CHECK_HEADERS_ONCE([unistd.h])
- AC_CHECK_HEADERS([search.h])
- AC_CHECK_FUNCS([tsearch])
-])
-
-# Prerequisites of lib/unsetenv.c.
-AC_DEFUN([gl_PREREQ_UNSETENV],
-[
- AC_REQUIRE([gl_ENVIRON])
- AC_CHECK_HEADERS_ONCE([unistd.h])
-])
diff --git a/gl/m4/signbit.m4 b/gl/m4/signbit.m4
deleted file mode 100644
index d58caaf058..0000000000
--- a/gl/m4/signbit.m4
+++ /dev/null
@@ -1,365 +0,0 @@
-# signbit.m4 serial 13
-dnl Copyright (C) 2007-2013 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_SIGNBIT],
-[
- AC_REQUIRE([gl_MATH_H_DEFAULTS])
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- AC_CACHE_CHECK([for signbit macro], [gl_cv_func_signbit],
- [
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
-#include <math.h>
-/* If signbit is defined as a function, don't use it, since calling it for
- 'float' or 'long double' arguments would involve conversions.
- If signbit is not declared at all but exists as a library function, don't
- use it, since the prototype may not match.
- If signbit is not declared at all but exists as a compiler built-in, don't
- use it, since it's preferable to use __builtin_signbit* (no warnings,
- no conversions). */
-#ifndef signbit
-# error "signbit should be a macro"
-#endif
-#include <string.h>
-]gl_SIGNBIT_TEST_PROGRAM
-])],
- [gl_cv_func_signbit=yes],
- [gl_cv_func_signbit=no],
- [case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_signbit="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_signbit="guessing no" ;;
- esac
- ])
- ])
- dnl GCC 4.0 and newer provides three built-ins for signbit.
- dnl They can be used without warnings, also in C++, regardless of <math.h>.
- dnl But they may expand to calls to functions, which may or may not be in
- dnl libc.
- AC_CACHE_CHECK([for signbit compiler built-ins], [gl_cv_func_signbit_gcc],
- [
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
-#if __GNUC__ >= 4
-# define signbit(x) \
- (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
- sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
- __builtin_signbitf (x))
-#else
-# error "signbit should be three compiler built-ins"
-#endif
-#include <string.h>
-]gl_SIGNBIT_TEST_PROGRAM
-])],
- [gl_cv_func_signbit_gcc=yes],
- [gl_cv_func_signbit_gcc=no],
- [case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_signbit_gcc="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_signbit_gcc="guessing no" ;;
- esac
- ])
- ])
- dnl Use the compiler built-ins whenever possible, because they are more
- dnl efficient than the system library functions (if they exist).
- case "$gl_cv_func_signbit_gcc" in
- *yes)
- REPLACE_SIGNBIT_USING_GCC=1
- ;;
- *)
- case "$gl_cv_func_signbit" in
- *yes) ;;
- *)
- dnl REPLACE_SIGNBIT=1 makes sure the signbit[fdl] functions get built.
- REPLACE_SIGNBIT=1
- gl_FLOAT_SIGN_LOCATION
- gl_DOUBLE_SIGN_LOCATION
- gl_LONG_DOUBLE_SIGN_LOCATION
- if test "$gl_cv_cc_float_signbit" = unknown; then
- dnl Test whether copysignf() is declared.
- AC_CHECK_DECLS([copysignf], , , [[#include <math.h>]])
- if test "$ac_cv_have_decl_copysignf" = yes; then
- dnl Test whether copysignf() can be used without libm.
- AC_CACHE_CHECK([whether copysignf can be used without linking with libm],
- [gl_cv_func_copysignf_no_libm],
- [
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <math.h>
- float x, y;]],
- [[return copysignf (x, y) < 0;]])],
- [gl_cv_func_copysignf_no_libm=yes],
- [gl_cv_func_copysignf_no_libm=no])
- ])
- if test $gl_cv_func_copysignf_no_libm = yes; then
- AC_DEFINE([HAVE_COPYSIGNF_IN_LIBC], [1],
- [Define if the copysignf function is declared in <math.h> and available in libc.])
- fi
- fi
- fi
- if test "$gl_cv_cc_double_signbit" = unknown; then
- dnl Test whether copysign() is declared.
- AC_CHECK_DECLS([copysign], , , [[#include <math.h>]])
- if test "$ac_cv_have_decl_copysign" = yes; then
- dnl Test whether copysign() can be used without libm.
- AC_CACHE_CHECK([whether copysign can be used without linking with libm],
- [gl_cv_func_copysign_no_libm],
- [
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <math.h>
- double x, y;]],
- [[return copysign (x, y) < 0;]])],
- [gl_cv_func_copysign_no_libm=yes],
- [gl_cv_func_copysign_no_libm=no])
- ])
- if test $gl_cv_func_copysign_no_libm = yes; then
- AC_DEFINE([HAVE_COPYSIGN_IN_LIBC], [1],
- [Define if the copysign function is declared in <math.h> and available in libc.])
- fi
- fi
- fi
- if test "$gl_cv_cc_long_double_signbit" = unknown; then
- dnl Test whether copysignl() is declared.
- AC_CHECK_DECLS([copysignl], , , [[#include <math.h>]])
- if test "$ac_cv_have_decl_copysignl" = yes; then
- dnl Test whether copysignl() can be used without libm.
- AC_CACHE_CHECK([whether copysignl can be used without linking with libm],
- [gl_cv_func_copysignl_no_libm],
- [
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <math.h>
- long double x, y;]],
- [[return copysignl (x, y) < 0;]])],
- [gl_cv_func_copysignl_no_libm=yes],
- [gl_cv_func_copysignl_no_libm=no])
- ])
- if test $gl_cv_func_copysignl_no_libm = yes; then
- AC_DEFINE([HAVE_COPYSIGNL_IN_LIBC], [1],
- [Define if the copysignl function is declared in <math.h> and available in libc.])
- fi
- fi
- fi
- ;;
- esac
- ;;
- esac
-])
-
-AC_DEFUN([gl_SIGNBIT_TEST_PROGRAM], [[
-/* Global variables.
- Needed because GCC 4 constant-folds __builtin_signbitl (literal)
- but cannot constant-fold __builtin_signbitl (variable). */
-float vf;
-double vd;
-long double vl;
-int main ()
-{
-/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
- So we use -p0f and -p0d instead. */
-float p0f = 0.0f;
-float m0f = -p0f;
-double p0d = 0.0;
-double m0d = -p0d;
-/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
- So we use another constant expression instead.
- But that expression does not work on other platforms, such as when
- cross-compiling to PowerPC on Mac OS X 10.5. */
-long double p0l = 0.0L;
-#if defined __hpux || defined __sgi
-long double m0l = -LDBL_MIN * LDBL_MIN;
-#else
-long double m0l = -p0l;
-#endif
- int result = 0;
- if (signbit (vf)) /* link check */
- vf++;
- {
- float plus_inf = 1.0f / p0f;
- float minus_inf = -1.0f / p0f;
- if (!(!signbit (255.0f)
- && signbit (-255.0f)
- && !signbit (p0f)
- && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
- && !signbit (plus_inf)
- && signbit (minus_inf)))
- result |= 1;
- }
- if (signbit (vd)) /* link check */
- vd++;
- {
- double plus_inf = 1.0 / p0d;
- double minus_inf = -1.0 / p0d;
- if (!(!signbit (255.0)
- && signbit (-255.0)
- && !signbit (p0d)
- && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
- && !signbit (plus_inf)
- && signbit (minus_inf)))
- result |= 2;
- }
- if (signbit (vl)) /* link check */
- vl++;
- {
- long double plus_inf = 1.0L / p0l;
- long double minus_inf = -1.0L / p0l;
- if (signbit (255.0L))
- result |= 4;
- if (!signbit (-255.0L))
- result |= 4;
- if (signbit (p0l))
- result |= 8;
- if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
- result |= 16;
- if (signbit (plus_inf))
- result |= 32;
- if (!signbit (minus_inf))
- result |= 64;
- }
- return result;
-}
-]])
-
-AC_DEFUN([gl_FLOAT_SIGN_LOCATION],
-[
- gl_FLOATTYPE_SIGN_LOCATION([float], [gl_cv_cc_float_signbit], [f], [FLT])
-])
-
-AC_DEFUN([gl_DOUBLE_SIGN_LOCATION],
-[
- gl_FLOATTYPE_SIGN_LOCATION([double], [gl_cv_cc_double_signbit], [], [DBL])
-])
-
-AC_DEFUN([gl_LONG_DOUBLE_SIGN_LOCATION],
-[
- gl_FLOATTYPE_SIGN_LOCATION([long double], [gl_cv_cc_long_double_signbit], [L], [LDBL])
-])
-
-AC_DEFUN([gl_FLOATTYPE_SIGN_LOCATION],
-[
- AC_CACHE_CHECK([where to find the sign bit in a '$1'],
- [$2],
- [
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
-#include <stddef.h>
-#include <stdio.h>
-#define NWORDS \
- ((sizeof ($1) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
-typedef union { $1 value; unsigned int word[NWORDS]; }
- memory_float;
-static memory_float plus = { 1.0$3 };
-static memory_float minus = { -1.0$3 };
-int main ()
-{
- size_t j, k, i;
- unsigned int m;
- FILE *fp = fopen ("conftest.out", "w");
- if (fp == NULL)
- return 1;
- /* Find the different bit. */
- k = 0; m = 0;
- for (j = 0; j < NWORDS; j++)
- {
- unsigned int x = plus.word[j] ^ minus.word[j];
- if ((x & (x - 1)) || (x && m))
- {
- /* More than one bit difference. */
- fprintf (fp, "unknown");
- return 2;
- }
- if (x)
- {
- k = j;
- m = x;
- }
- }
- if (m == 0)
- {
- /* No difference. */
- fprintf (fp, "unknown");
- return 3;
- }
- /* Now m = plus.word[k] ^ ~minus.word[k]. */
- if (plus.word[k] & ~minus.word[k])
- {
- /* Oh? The sign bit is set in the positive and cleared in the negative
- numbers? */
- fprintf (fp, "unknown");
- return 4;
- }
- for (i = 0; ; i++)
- if ((m >> i) & 1)
- break;
- fprintf (fp, "word %d bit %d", (int) k, (int) i);
- if (fclose (fp) != 0)
- return 5;
- return 0;
-}
- ]])],
- [$2=`cat conftest.out`],
- [$2="unknown"],
- [
- dnl When cross-compiling, we don't know. It depends on the
- dnl ABI and compiler version. There are too many cases.
- $2="unknown"
- ])
- rm -f conftest.out
- ])
- case "$]$2[" in
- word*bit*)
- word=`echo "$]$2[" | sed -e 's/word //' -e 's/ bit.*//'`
- bit=`echo "$]$2[" | sed -e 's/word.*bit //'`
- AC_DEFINE_UNQUOTED([$4][_SIGNBIT_WORD], [$word],
- [Define as the word index where to find the sign of '$1'.])
- AC_DEFINE_UNQUOTED([$4][_SIGNBIT_BIT], [$bit],
- [Define as the bit index in the word where to find the sign of '$1'.])
- ;;
- esac
-])
-
-# Expands to code that defines a function signbitf(float).
-# It extracts the sign bit of a non-NaN value.
-AC_DEFUN([gl_FLOAT_SIGNBIT_CODE],
-[
- gl_FLOATTYPE_SIGNBIT_CODE([float], [f], [f])
-])
-
-# Expands to code that defines a function signbitd(double).
-# It extracts the sign bit of a non-NaN value.
-AC_DEFUN([gl_DOUBLE_SIGNBIT_CODE],
-[
- gl_FLOATTYPE_SIGNBIT_CODE([double], [d], [])
-])
-
-# Expands to code that defines a function signbitl(long double).
-# It extracts the sign bit of a non-NaN value.
-AC_DEFUN([gl_LONG_DOUBLE_SIGNBIT_CODE],
-[
- gl_FLOATTYPE_SIGNBIT_CODE([long double], [l], [L])
-])
-
-AC_DEFUN([gl_FLOATTYPE_SIGNBIT_CODE],
-[[
-static int
-signbit$2 ($1 value)
-{
- typedef union { $1 f; unsigned char b[sizeof ($1)]; } float_union;
- static float_union plus_one = { 1.0$3 }; /* unused bits are zero here */
- static float_union minus_one = { -1.0$3 }; /* unused bits are zero here */
- /* Compute the sign bit mask as the XOR of plus_one and minus_one. */
- float_union u;
- unsigned int i;
- u.f = value;
- for (i = 0; i < sizeof ($1); i++)
- if (u.b[i] & (plus_one.b[i] ^ minus_one.b[i]))
- return 1;
- return 0;
-}
-]])
diff --git a/gl/m4/sleep.m4 b/gl/m4/sleep.m4
deleted file mode 100644
index a27baa6d5b..0000000000
--- a/gl/m4/sleep.m4
+++ /dev/null
@@ -1,62 +0,0 @@
-# sleep.m4 serial 7
-dnl Copyright (C) 2007-2013 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_SLEEP],
-[
- AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- dnl We expect to see the declaration of sleep() in a header file.
- dnl Older versions of mingw have a sleep() function that is an alias to
- dnl _sleep() in MSVCRT. It has a different signature than POSIX sleep():
- dnl it takes the number of milliseconds as argument and returns void.
- dnl mingw does not declare this function.
- AC_CHECK_DECLS([sleep], , , [[#include <unistd.h>]])
- AC_CHECK_FUNCS_ONCE([sleep])
- if test $ac_cv_have_decl_sleep != yes; then
- HAVE_SLEEP=0
- else
- dnl Cygwin 1.5.x has a bug where sleep can't exceed 49.7 days.
- AC_CACHE_CHECK([for working sleep], [gl_cv_func_sleep_works],
- [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-#include <errno.h>
-#include <unistd.h>
-#include <signal.h>
-static void
-handle_alarm (int sig)
-{
- if (sig != SIGALRM)
- _exit (2);
-}
-]], [[
- /* Failure to compile this test due to missing alarm is okay,
- since all such platforms (mingw) also lack sleep. */
- unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */
- unsigned int remaining;
- signal (SIGALRM, handle_alarm);
- alarm (1);
- remaining = sleep (pentecost);
- if (remaining > pentecost)
- return 3;
- if (remaining <= pentecost - 10)
- return 4;
- return 0;
- ]])],
- [gl_cv_func_sleep_works=yes], [gl_cv_func_sleep_works=no],
- [case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_sleep_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_sleep_works="guessing no" ;;
- esac
- ])])
- case "$gl_cv_func_sleep_works" in
- *yes) ;;
- *)
- REPLACE_SLEEP=1
- ;;
- esac
- fi
-])
diff --git a/gl/m4/stdarg.m4 b/gl/m4/stdarg.m4
deleted file mode 100644
index c087f61ed3..0000000000
--- a/gl/m4/stdarg.m4
+++ /dev/null
@@ -1,78 +0,0 @@
-# stdarg.m4 serial 6
-dnl Copyright (C) 2006, 2008-2013 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 From Bruno Haible.
-dnl Provide a working va_copy in combination with <stdarg.h>.
-
-AC_DEFUN([gl_STDARG_H],
-[
- STDARG_H=''
- NEXT_STDARG_H='<stdarg.h>'
- AC_MSG_CHECKING([for va_copy])
- AC_CACHE_VAL([gl_cv_func_va_copy], [
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <stdarg.h>]],
- [[
-#ifndef va_copy
-void (*func) (va_list, va_list) = va_copy;
-#endif
- ]])],
- [gl_cv_func_va_copy=yes],
- [gl_cv_func_va_copy=no])])
- AC_MSG_RESULT([$gl_cv_func_va_copy])
- if test $gl_cv_func_va_copy = no; then
- dnl Provide a substitute.
- dnl Usually a simple definition in <config.h> is enough. Not so on AIX 5
- dnl with some versions of the /usr/vac/bin/cc compiler. It has an <stdarg.h>
- dnl which does '#undef va_copy', leading to a missing va_copy symbol. For
- dnl this platform, we use an <stdarg.h> substitute. But we cannot use this
- dnl approach on other platforms, because <stdarg.h> often defines only
- dnl preprocessor macros and gl_ABSOLUTE_HEADER, gl_CHECK_NEXT_HEADERS do
- dnl not work in this situation.
- AC_EGREP_CPP([vaccine],
- [#if defined _AIX && !defined __GNUC__
- AIX vaccine
- #endif
- ], [gl_aixcc=yes], [gl_aixcc=no])
- if test $gl_aixcc = yes; then
- dnl Provide a substitute <stdarg.h> file.
- STDARG_H=stdarg.h
- gl_NEXT_HEADERS([stdarg.h])
- dnl Fallback for the case when <stdarg.h> contains only macro definitions.
- if test "$gl_cv_next_stdarg_h" = '""'; then
- gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
- NEXT_STDARG_H="$gl_cv_next_stdarg_h"
- fi
- else
- dnl Provide a substitute in <config.h>, either __va_copy or as a simple
- dnl assignment.
- gl_CACHE_VAL_SILENT([gl_cv_func___va_copy], [
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <stdarg.h>]],
- [[
-#ifndef __va_copy
-error, bail out
-#endif
- ]])],
- [gl_cv_func___va_copy=yes],
- [gl_cv_func___va_copy=no])])
- if test $gl_cv_func___va_copy = yes; then
- AC_DEFINE([va_copy], [__va_copy],
- [Define as a macro for copying va_list variables.])
- else
- AH_VERBATIM([gl_VA_COPY], [/* A replacement for va_copy, if needed. */
-#define gl_va_copy(a,b) ((a) = (b))])
- AC_DEFINE([va_copy], [gl_va_copy],
- [Define as a macro for copying va_list variables.])
- fi
- fi
- fi
- AC_SUBST([STDARG_H])
- AM_CONDITIONAL([GL_GENERATE_STDARG_H], [test -n "$STDARG_H"])
- AC_SUBST([NEXT_STDARG_H])
-])
diff --git a/gl/m4/strchrnul.m4 b/gl/m4/strchrnul.m4
deleted file mode 100644
index b59eda9d72..0000000000
--- a/gl/m4/strchrnul.m4
+++ /dev/null
@@ -1,50 +0,0 @@
-# strchrnul.m4 serial 9
-dnl Copyright (C) 2003, 2007, 2009-2013 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_STRCHRNUL],
-[
- dnl Persuade glibc <string.h> to declare strchrnul().
- AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
-
- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
- AC_CHECK_FUNCS([strchrnul])
- if test $ac_cv_func_strchrnul = no; then
- HAVE_STRCHRNUL=0
- else
- AC_CACHE_CHECK([whether strchrnul works],
- [gl_cv_func_strchrnul_works],
- [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-#include <string.h> /* for strchrnul */
-]], [[const char *buf = "a";
- return strchrnul (buf, 'b') != buf + 1;
- ]])],
- [gl_cv_func_strchrnul_works=yes],
- [gl_cv_func_strchrnul_works=no],
- [dnl Cygwin 1.7.9 introduced strchrnul, but it was broken until 1.7.10
- AC_EGREP_CPP([Lucky user],
- [
-#if defined __CYGWIN__
- #include <cygwin/version.h>
- #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
- Lucky user
- #endif
-#else
- Lucky user
-#endif
- ],
- [gl_cv_func_strchrnul_works="guessing yes"],
- [gl_cv_func_strchrnul_works="guessing no"])
- ])
- ])
- case "$gl_cv_func_strchrnul_works" in
- *yes) ;;
- *) REPLACE_STRCHRNUL=1 ;;
- esac
- fi
-])
-
-# Prerequisites of lib/strchrnul.c.
-AC_DEFUN([gl_PREREQ_STRCHRNUL], [:])
diff --git a/gl/m4/sysexits.m4 b/gl/m4/sysexits.m4
deleted file mode 100644
index bd8abaa0d4..0000000000
--- a/gl/m4/sysexits.m4
+++ /dev/null
@@ -1,44 +0,0 @@
-# sysexits.m4 serial 6
-dnl Copyright (C) 2003, 2005, 2007, 2009-2013 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_SYSEXITS],
-[
- AC_CHECK_HEADERS_ONCE([sysexits.h])
- if test $ac_cv_header_sysexits_h = yes; then
- HAVE_SYSEXITS_H=1
- gl_CHECK_NEXT_HEADERS([sysexits.h])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sysexits.h>]],
- [[switch (0)
- {
- case EX_OK:
- case EX_USAGE:
- case EX_DATAERR:
- case EX_NOINPUT:
- case EX_NOUSER:
- case EX_NOHOST:
- case EX_UNAVAILABLE:
- case EX_SOFTWARE:
- case EX_OSERR:
- case EX_OSFILE:
- case EX_CANTCREAT:
- case EX_IOERR:
- case EX_TEMPFAIL:
- case EX_PROTOCOL:
- case EX_NOPERM:
- case EX_CONFIG:
- break;
- }
- ]])],
- [SYSEXITS_H=],
- [SYSEXITS_H=sysexits.h])
- else
- HAVE_SYSEXITS_H=0
- SYSEXITS_H=sysexits.h
- fi
- AC_SUBST([HAVE_SYSEXITS_H])
- AC_SUBST([SYSEXITS_H])
- AM_CONDITIONAL([GL_GENERATE_SYSEXITS_H], [test -n "$SYSEXITS_H"])
-])
diff --git a/gl/m4/version-etc.m4 b/gl/m4/version-etc.m4
deleted file mode 100644
index 5dbef8e5ba..0000000000
--- a/gl/m4/version-etc.m4
+++ /dev/null
@@ -1,33 +0,0 @@
-# version-etc.m4 serial 1
-# Copyright (C) 2009-2013 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.
-
-dnl $1 - configure flag and define name
-dnl $2 - human readable description
-m4_define([gl_VERSION_ETC_FLAG],
-[dnl
- AC_ARG_WITH([$1], [AS_HELP_STRING([--with-$1], [$2])],
- [dnl
- case $withval in
- yes|no) ;;
- *) AC_DEFINE_UNQUOTED(AS_TR_CPP([PACKAGE_$1]), ["$withval"], [$2]) ;;
- esac
- ])
-])
-
-AC_DEFUN([gl_VERSION_ETC],
-[dnl
- gl_VERSION_ETC_FLAG([packager],
- [String identifying the packager of this software])
- gl_VERSION_ETC_FLAG([packager-version],
- [Packager-specific version information])
- gl_VERSION_ETC_FLAG([packager-bug-reports],
- [Packager info for bug reports (URL/e-mail/...)])
- if test "X$with_packager" = "X" && \
- test "X$with_packager_version$with_packager_bug_reports" != "X"
- then
- AC_MSG_ERROR([The --with-packager-{bug-reports,version} options require --with-packager])
- fi
-])
diff --git a/gl/m4/vfprintf-posix.m4 b/gl/m4/vfprintf-posix.m4
deleted file mode 100644
index 47a4645b9f..0000000000
--- a/gl/m4/vfprintf-posix.m4
+++ /dev/null
@@ -1,110 +0,0 @@
-# vfprintf-posix.m4 serial 14
-dnl Copyright (C) 2007-2013 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_VFPRINTF_POSIX],
-[
- AC_REQUIRE([gl_PRINTF_SIZES_C99])
- AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
- AC_REQUIRE([gl_PRINTF_INFINITE])
- AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE])
- AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
- AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
- AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
- AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
- AC_REQUIRE([gl_PRINTF_POSITIONS])
- AC_REQUIRE([gl_PRINTF_FLAG_GROUPING])
- AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST])
- AC_REQUIRE([gl_PRINTF_FLAG_ZERO])
- AC_REQUIRE([gl_PRINTF_PRECISION])
- AC_REQUIRE([gl_PRINTF_ENOMEM])
- gl_cv_func_vfprintf_posix=no
- case "$gl_cv_func_printf_sizes_c99" in
- *yes)
- case "$gl_cv_func_printf_long_double" in
- *yes)
- case "$gl_cv_func_printf_infinite" in
- *yes)
- case "$gl_cv_func_printf_infinite_long_double" in
- *yes)
- case "$gl_cv_func_printf_directive_a" in
- *yes)
- case "$gl_cv_func_printf_directive_f" in
- *yes)
- case "$gl_cv_func_printf_directive_n" in
- *yes)
- case "$gl_cv_func_printf_directive_ls" in
- *yes)
- case "$gl_cv_func_printf_positions" in
- *yes)
- case "$gl_cv_func_printf_flag_grouping" in
- *yes)
- case "$gl_cv_func_printf_flag_leftadjust" in
- *yes)
- case "$gl_cv_func_printf_flag_zero" in
- *yes)
- case "$gl_cv_func_printf_precision" in
- *yes)
- case "$gl_cv_func_printf_enomem" in
- *yes)
- # vfprintf exists and is
- # already POSIX compliant.
- gl_cv_func_vfprintf_posix=yes
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- if test $gl_cv_func_vfprintf_posix = no; then
- gl_PREREQ_VASNPRINTF_LONG_DOUBLE
- gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
- gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
- gl_PREREQ_VASNPRINTF_DIRECTIVE_A
- gl_PREREQ_VASNPRINTF_DIRECTIVE_F
- gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
- gl_PREREQ_VASNPRINTF_FLAG_GROUPING
- gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
- gl_PREREQ_VASNPRINTF_FLAG_ZERO
- gl_PREREQ_VASNPRINTF_PRECISION
- gl_PREREQ_VASNPRINTF_ENOMEM
- gl_REPLACE_VASNPRINTF
- gl_REPLACE_VFPRINTF
- fi
-])
-
-AC_DEFUN([gl_REPLACE_VFPRINTF],
-[
- AC_REQUIRE([gl_STDIO_H_DEFAULTS])
- AC_LIBOBJ([vfprintf])
- REPLACE_VFPRINTF=1
- AC_DEFINE([REPLACE_VFPRINTF_POSIX], [1],
- [Define if vfprintf is overridden by a POSIX compliant gnulib implementation.])
- gl_PREREQ_VFPRINTF
-])
-
-AC_DEFUN([gl_PREREQ_VFPRINTF], [:])
diff --git a/gl/m4/vprintf-posix.m4 b/gl/m4/vprintf-posix.m4
deleted file mode 100644
index 8a4eb19cfb..0000000000
--- a/gl/m4/vprintf-posix.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-# vprintf-posix.m4 serial 3
-dnl Copyright (C) 2007-2013 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_VPRINTF_POSIX],
-[
- AC_REQUIRE([gl_FUNC_VFPRINTF_POSIX])
- if test $gl_cv_func_vfprintf_posix = no; then
- gl_REPLACE_VPRINTF
- fi
-])
-
-AC_DEFUN([gl_REPLACE_VPRINTF],
-[
- AC_REQUIRE([gl_STDIO_H_DEFAULTS])
- AC_LIBOBJ([vprintf])
- REPLACE_VPRINTF=1
- AC_DEFINE([REPLACE_VPRINTF_POSIX], [1],
- [Define if vprintf is overridden by a POSIX compliant gnulib implementation.])
- gl_PREREQ_VPRINTF
-])
-
-AC_DEFUN([gl_PREREQ_VPRINTF], [:])