1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-02-14 19:32:10 +02:00

Update from gnulib.

This commit is contained in:
Paul Eggert
2006-07-09 16:59:35 +00:00
parent cb052e4f6c
commit fbb436b3f8
30 changed files with 211 additions and 268 deletions

View File

@@ -1,3 +1,94 @@
2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
Update from gnulib, as follows:
2006-07-06 Derek R. Price <derek@ximbiot.com>
and Paul Eggert <eggert@cs.ucla.edu>
* backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
of invoking obsolescent AC_HEADER_DIRENT macro.
* d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
* d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
* dirfd.m4 (gl_FUNC_DIRFD): Likewise.
* fts.m4 (gl_FUNC_FTS_CORE): Likewise.
* getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
* savedir.m4 (gl_SAVEDIR): Likewise.
2006-07-06 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
expand to nothing, so add a shell command to avoid syntax error.
* getpass.m4 (gl_PREREQ_GETPASS): Likewise.
2006-07-06 Paul Eggert <eggert@cs.ucla.edu>
* fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
no longer needed. Check for isblank decl.
* mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
* regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
of existence.
2006-07-05 Paul Eggert <eggert@cs.ucla.edu>
* xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
rather than AC_CHECK_DECLS for strtoimax and strtoumax.
* getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer needed.
All uses removed.
* strtol.m4 (gl_PREREQ_STRTOL): Likewise.
* strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
* exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer needed.
* getdate.m4 (gl_GETDATE): Likewise.
* getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
* memcasecmp.m4 (gl_MEMCASECMP): Likewise.
* strtod.m4 (gl_FUNC_STRTOD): Likewise.
* strtol.m4 (gl_PREREQ_STRTOL): Likewise.
* strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
* xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
* exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
needed.
2006-07-05 Derek R. Price <derek@ximbiot.com>
* calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
no longer needed.
* exclude.m4 (gl_EXCLUDE): Likewise.
* getdate.m4 (gl_GETDATE): Likewise.
* getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
* memcasecmp.m4 (gl_MEMCASECMP): Likewise.
* strtod.m4 (gl_FUNC_STRTOD): Likewise.
* strtol.m4 (gl_PREREQ_STRTOL): Likewise.
* xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
2006-07-05 Eric Blake <ebb9@byu.net>
* sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
to avoid 'header present but could not be compiled' on cygwin.
2006-07-03 Bruno Haible <bruno@clisp.org>
* strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
the function exists, before testing against AIX.
Reported by Martin Lambers <marlam@marlam.de>.
2006-07-04 Paul Eggert <eggert@cs.ucla.edu>
* absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
to the absolute name, not just one, to bypass Sun C 5.8's
"warning: #include of /usr/include/... may be non-portable".
2006-07-03 Paul Eggert <eggert@cs.ucla.edu>
* absolute-header.m4: Renamed from full-header-path.m4.
This is to keep the terminology clean; POSIX talks about
"absolute pathnames", not "full pathnames", but the GNU
Coding Standards say to use "path" for something else;
so use "absolute" to keep both sides happy.
(gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
Set gl_absolute_header, not gl_full_header_path.
Set gl_cv_absolute_<header>, not gl_full_path_<header>.
Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
All uses changed.
2006-07-08 Jim Meyering <jim@meyering.net>
* link-follow.m4: Remove one of two adjacent "whether"s in a comment.

43
m4/absolute-header.m4 Normal file
View File

@@ -0,0 +1,43 @@
# absolute-header.m4 serial 4
dnl Copyright (C) 2006 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 Derek Price.
# gl_ABSOLUTE_HEADER(HEADER1 HEADER2 ...)
# ---------------------------------------
# Find the absolute name of a header file, assuming the header exists.
# If the header were sys/inttypes.h, this macro would define
# ABSOLUTE_SYS_INTTYPES_H to the `<>' quoted absolute name of sys/inttypes.h
# in config.h
# (e.g. `#define ABSOLUTE_SYS_INTTYPES_H <///usr/include/sys/inttypes.h>').
# The three "///" are to pacify Sun C 5.8, which otherwise would say
# "warning: #include of /usr/include/... may be non-portable".
AC_DEFUN([gl_ABSOLUTE_HEADER],
[AC_LANG_PREPROC_REQUIRE()dnl
AC_FOREACH([gl_HEADER_NAME], [$1],
[AS_VAR_PUSHDEF([gl_absolute_header],
[gl_cv_absolute_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl
AC_CACHE_CHECK([absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>],
m4_quote(m4_defn([gl_absolute_header])),
[AS_VAR_PUSHDEF([ac_header_exists],
[ac_cv_header_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl
AC_CHECK_HEADERS_ONCE(m4_quote(m4_defn([gl_HEADER_NAME])))dnl
if test AS_VAR_GET(ac_header_exists) = yes; then
AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]])])
dnl eval is necessary to expand ac_cpp.
dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
AS_VAR_SET(gl_absolute_header,
[`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
sed -n '\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1#;s#^/[^/]#//&#;p;q;}'`])
fi
AS_VAR_POPDEF([ac_header_exists])dnl
])dnl
AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_quote(m4_defn([gl_HEADER_NAME]))),
[<AS_VAR_GET(gl_absolute_header)>],
[Define this to an absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>.])
AS_VAR_POPDEF([gl_absolute_header])dnl
])dnl
])# gl_ABSOLUTE_HEADER

View File

@@ -1,5 +1,5 @@
# backupfile.m4 serial 9
dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# backupfile.m4 serial 10
dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 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.
@@ -10,7 +10,7 @@ AC_DEFUN([gl_BACKUPFILE],
AC_LIBOBJ([backupfile])
dnl Prerequisites of lib/backupfile.c.
AC_REQUIRE([AC_HEADER_DIRENT])
AC_CHECK_HEADERS_ONCE([dirent.h])
AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO])
AC_REQUIRE([gl_AC_DOS])
AC_REQUIRE([AC_SYS_LONG_FILE_NAMES])

View File

@@ -1,6 +1,6 @@
# calloc.m4 serial 5
# calloc.m4 serial 6
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
# Copyright (C) 2004, 2005, 2006 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.
@@ -16,8 +16,7 @@
# -------------------------------------
# If `calloc (0, 0)' is properly handled, run IF-WORKS, otherwise, IF-NOT.
AC_DEFUN([_AC_FUNC_CALLOC_IF],
[AC_REQUIRE([AC_HEADER_STDC])dnl
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
[AC_REQUIRE([AC_TYPE_SIZE_T])dnl
AC_CACHE_CHECK([for GNU libc compatible calloc], ac_cv_func_calloc_0_nonnull,
[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
[exit (!calloc (0, 0) || calloc ((size_t) -1 / 8 + 1, 8));])],

View File

@@ -61,6 +61,8 @@ AC_DEFUN([gl_CHECK_DECLS],
strtoul,
strtoull,
ttyname], , , $headers)
AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
])
dnl FIXME: when autoconf has support for it.

View File

@@ -1,11 +1,11 @@
#serial 7
#serial 8
dnl From Jim Meyering.
dnl
dnl Check whether struct dirent has a member named d_ino.
dnl
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004 Free Software
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2006 Free Software
# Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -13,7 +13,7 @@ dnl
# with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO],
[AC_REQUIRE([AC_HEADER_DIRENT])dnl
[AC_CHECK_HEADERS_ONCE([dirent.h])dnl
AC_CACHE_CHECK([for d_ino member in directory struct],
jm_cv_struct_dirent_d_ino,
[AC_TRY_LINK(dnl
@@ -21,18 +21,10 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO],
#include <sys/types.h>
#ifdef HAVE_DIRENT_H
# include <dirent.h>
#else /* not HAVE_DIRENT_H */
#else
# define dirent direct
# ifdef HAVE_SYS_NDIR_H
# include <sys/ndir.h>
# endif /* HAVE_SYS_NDIR_H */
# ifdef HAVE_SYS_DIR_H
# include <sys/dir.h>
# endif /* HAVE_SYS_DIR_H */
# ifdef HAVE_NDIR_H
# include <ndir.h>
# endif /* HAVE_NDIR_H */
#endif /* HAVE_DIRENT_H */
# include <ndir.h>
#endif
],
[struct dirent dp; dp.d_ino = 0;],

View File

@@ -1,11 +1,11 @@
#serial 8
#serial 9
dnl From Jim Meyering.
dnl
dnl Check whether struct dirent has a member named d_type.
dnl
# Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
# Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software
# Foundation, Inc.
#
# This file is free software; the Free Software Foundation
@@ -13,7 +13,7 @@ dnl
# with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE],
[AC_REQUIRE([AC_HEADER_DIRENT])dnl
[AC_CHECK_HEADERS_ONCE([dirent.h])dnl
AC_CACHE_CHECK([for d_type member in directory struct],
jm_cv_struct_dirent_d_type,
[AC_TRY_LINK(dnl
@@ -21,18 +21,10 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE],
#include <sys/types.h>
#ifdef HAVE_DIRENT_H
# include <dirent.h>
#else /* not HAVE_DIRENT_H */
#else
# define dirent direct
# ifdef HAVE_SYS_NDIR_H
# include <sys/ndir.h>
# endif /* HAVE_SYS_NDIR_H */
# ifdef HAVE_SYS_DIR_H
# include <sys/dir.h>
# endif /* HAVE_SYS_DIR_H */
# ifdef HAVE_NDIR_H
# include <ndir.h>
# endif /* HAVE_NDIR_H */
#endif /* HAVE_DIRENT_H */
# include <ndir.h>
#endif
],
[struct dirent dp; dp.d_type = 0;],

View File

@@ -1,4 +1,4 @@
#serial 11 -*- Autoconf -*-
#serial 12 -*- Autoconf -*-
dnl Find out how to get the file descriptor associated with an open DIR*.
@@ -17,23 +17,15 @@ AC_DEFUN([gl_FUNC_DIRFD],
dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
AC_REQUIRE([AC_PROG_CPP])
AC_REQUIRE([AC_PROG_EGREP])
AC_REQUIRE([AC_HEADER_DIRENT])
AC_CHECK_HEADERS_ONCE([dirent.h])dnl
dirfd_headers='
#if HAVE_DIRENT_H
# include <dirent.h>
#else /* not HAVE_DIRENT_H */
#else
# define dirent direct
# if HAVE_SYS_NDIR_H
# include <sys/ndir.h>
# endif /* HAVE_SYS_NDIR_H */
# if HAVE_SYS_DIR_H
# include <sys/dir.h>
# endif /* HAVE_SYS_DIR_H */
# if HAVE_NDIR_H
# include <ndir.h>
# endif /* HAVE_NDIR_H */
#endif /* HAVE_DIRENT_H */
# include <ndir.h>
#endif
'
AC_CHECK_FUNCS(dirfd)
AC_CHECK_DECLS([dirfd], , , $dirfd_headers)

View File

@@ -1,5 +1,5 @@
# exclude.m4 serial 5
dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
# exclude.m4 serial 6
dnl Copyright (C) 2002, 2003, 2005, 2006 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.
@@ -8,9 +8,4 @@ AC_DEFUN([gl_EXCLUDE],
[
AC_LIBSOURCES([exclude.c, exclude.h])
AC_LIBOBJ([exclude])
dnl Prerequisites of lib/exclude.c.
AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_HEADER_STDC])
AC_CHECK_FUNCS_ONCE(isascii)
])

View File

@@ -1,5 +1,5 @@
# fileblocks.m4 serial 3
dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc.
# fileblocks.m4 serial 4
dnl Copyright (C) 2002, 2005, 2006 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.
@@ -16,4 +16,5 @@ AC_DEFUN([gl_FILEBLOCKS],
# Prerequisites of lib/fileblocks.c.
AC_DEFUN([gl_PREREQ_FILEBLOCKS], [
AC_CHECK_HEADERS_ONCE(sys/param.h)
:
])

View File

@@ -63,7 +63,7 @@ AS_IF([test $$2 = yes], [$3], [$4])
AC_DEFUN([_AC_LIBOBJ_FNMATCH],
[AC_REQUIRE([AC_FUNC_ALLOCA])dnl
AC_REQUIRE([AC_TYPE_MBSTATE_T])dnl
AC_CHECK_DECLS([getenv])
AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
AC_CHECK_FUNCS([btowc mbsrtowcs mempcpy wmemchr wmemcpy wmempcpy])
AC_CHECK_HEADERS([wchar.h wctype.h])
AC_LIBOBJ([fnmatch])

View File

@@ -1,4 +1,4 @@
#serial 7
#serial 8
dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -30,6 +30,5 @@ AC_DEFUN([gl_FUNC_FTS_CORE],
AC_REQUIRE([gl_FUNC_OPENAT])
# Checks for header files.
AC_REQUIRE([AC_HEADER_DIRENT])
AC_CHECK_HEADERS_ONCE([sys/param.h])
AC_CHECK_HEADERS_ONCE([dirent.h sys/param.h])dnl
])

View File

@@ -1,41 +0,0 @@
# full-header-path.m4 serial 2
dnl Copyright (C) 2006 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 Derek Price.
# gl_FULL_HEADER_PATH(HEADER1 HEADER2 ...)
# ----------------------------------------
# Find the full path to a header file, assuming the header exists.
# If the header were sys/inttypes.h, this macro would define
# FULL_PATH_SYS_INTTYPES_H to the `<>' quoted full path to sys/inttypes.h
# in config.h
# (e.g. `#define FULL_PATH_SYS_INTTYPES_H </usr/include/sys/inttypes.h>').
AC_DEFUN([gl_FULL_HEADER_PATH],
[AC_LANG_PREPROC_REQUIRE()dnl
AC_FOREACH([gl_HEADER_NAME], [$1],
[AS_VAR_PUSHDEF([gl_full_header_path],
[gl_cv_full_path_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl
AC_CACHE_CHECK([full path to <]m4_quote(m4_defn([gl_HEADER_NAME]))[>],
m4_quote(m4_defn([gl_full_header_path])),
[AS_VAR_PUSHDEF([ac_header_exists],
[ac_cv_header_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl
AC_CHECK_HEADERS_ONCE(m4_quote(m4_defn([gl_HEADER_NAME])))dnl
if test AS_VAR_GET(ac_header_exists) = yes; then
AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]])])
dnl eval is necessary to expand ac_cpp.
dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
AS_VAR_SET(gl_full_header_path,
[`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
sed -n '\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1#;p;q;}'`])
fi
AS_VAR_POPDEF([ac_header_exists])dnl
])dnl
AC_DEFINE_UNQUOTED(AS_TR_CPP([FULL_PATH_]m4_quote(m4_defn([gl_HEADER_NAME]))),
[<AS_VAR_GET(gl_full_header_path)>],
[Define this to the full path to <]m4_quote(m4_defn([gl_HEADER_NAME]))[>.])
AS_VAR_POPDEF([gl_full_header_path])dnl
])dnl
])# gl_FULL_HEADER_PATH

View File

@@ -61,7 +61,7 @@ AC_DEFUN([gl_FUNC_GETCWD],
AC_DEFUN([gl_PREREQ_GETCWD],
[
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([AC_HEADER_DIRENT])
AC_CHECK_HEADERS_ONCE([dirent.h])dnl
AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO])
:
])

View File

@@ -1,5 +1,5 @@
# getdate.m4 serial 8
dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# getdate.m4 serial 9
dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 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.
@@ -29,8 +29,6 @@ AC_DEFUN([gl_GETDATE],
dnl Prerequisites of lib/getdate.y.
AC_REQUIRE([gl_BISON])
AC_REQUIRE([gl_C_COMPOUND_LITERALS])
AC_REQUIRE([AC_HEADER_STDC])
AC_CHECK_FUNCS_ONCE(isascii)
AC_STRUCT_TIMEZONE
AC_REQUIRE([gl_CLOCK_TIME])
AC_REQUIRE([gl_TM_GMTOFF])

View File

@@ -1,4 +1,4 @@
# getpass.m4 serial 7
# getpass.m4 serial 8
dnl Copyright (C) 2002-2003, 2005-2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -42,4 +42,5 @@ AC_DEFUN([gl_PREREQ_GETPASS], [
AC_CHECK_DECLS_ONCE([fputs_unlocked])
AC_CHECK_DECLS_ONCE([funlockfile])
AC_CHECK_DECLS_ONCE([putc_unlocked])
:
])

View File

@@ -1,5 +1,5 @@
# getusershell.m4 serial 3
dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
# getusershell.m4 serial 4
dnl Copyright (C) 2002, 2003, 2006 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.
@@ -7,13 +7,4 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_GETUSERSHELL],
[
AC_REPLACE_FUNCS(getusershell)
if test $ac_cv_func_getusershell = no; then
gl_PREREQ_GETUSERSHELL
fi
])
# Prerequisites of lib/getusershell.c.
AC_DEFUN([gl_PREREQ_GETUSERSHELL], [
AC_REQUIRE([AC_HEADER_STDC])
AC_CHECK_FUNCS_ONCE(isascii)
])

View File

@@ -1,4 +1,4 @@
#serial 99 -*- autoconf -*-
#serial 100 -*- autoconf -*-
dnl Misc type-related macros for coreutils.
@@ -231,8 +231,6 @@ AC_DEFUN([gl_CHECK_ALL_TYPES],
AC_REQUIRE([AC_C_LONG_DOUBLE])
AC_REQUIRE([gl_CHECK_ALL_HEADERS])
AC_REQUIRE([AC_HEADER_DIRENT])
AC_REQUIRE([AC_HEADER_STDC])
AC_CHECK_MEMBERS(
[struct stat.st_author,
struct stat.st_blksize],,,
@@ -265,6 +263,4 @@ AC_DEFUN([gl_CHECK_ALL_TYPES],
AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG])
AC_REQUIRE([AC_HEADER_MAJOR])
AC_REQUIRE([AC_HEADER_DIRENT])
])

View File

@@ -1,5 +1,5 @@
#serial 3
dnl Copyright (C) 2005 Free Software Foundation, Inc.
#serial 4
dnl Copyright (C) 2005, 2006 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.
@@ -8,8 +8,4 @@ AC_DEFUN([gl_MEMCASECMP],
[
AC_LIBSOURCES([memcasecmp.c, memcasecmp.h])
AC_LIBOBJ([memcasecmp])
dnl Prerequisites of lib/memcasecmp.c.
AC_REQUIRE([AC_HEADER_STDC])
AC_CHECK_FUNCS_ONCE(isascii)
])

View File

@@ -1,6 +1,6 @@
#serial 12
#serial 13
# Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
# Copyright (C) 2001, 2003, 2004, 2005, 2006 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.
@@ -67,6 +67,5 @@ AC_DEFUN([gl_PREREQ_TEMPNAME],
[
AC_CHECK_HEADERS_ONCE(sys/time.h)
AC_CHECK_FUNCS(__secure_getenv gettimeofday)
AC_CHECK_DECLS_ONCE(getenv)
AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])
])

View File

@@ -1,86 +0,0 @@
# onceonly_2_57.m4 serial 3
dnl Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.
dnl This file defines some "once only" variants of standard autoconf macros.
dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS
dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS
dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS
dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC
dnl The advantage is that the check for each of the headers/functions/decls
dnl will be put only once into the 'configure' file. It keeps the size of
dnl the 'configure' file down, and avoids redundant output when 'configure'
dnl is run.
dnl The drawback is that the checks cannot be conditionalized. If you write
dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
dnl empty, and the check will be inserted before the body of the AC_DEFUNed
dnl function.
dnl This is like onceonly.m4, except that it uses diversions to named sections
dnl DEFAULTS and INIT_PREPARE in order to check all requested headers at once,
dnl thus reducing the size of 'configure'. Works with autoconf-2.57. The
dnl size reduction is ca. 9%.
dnl Autoconf version 2.57 or newer is recommended.
AC_PREREQ(2.57)
# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
:
AC_FOREACH([gl_HEADER_NAME], [$1], [
AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
[./-], [___])), [
m4_divert_text([INIT_PREPARE],
[gl_header_list="$gl_header_list gl_HEADER_NAME"])
gl_HEADERS_EXPANSION
AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_HEADER_NAME])),
[Define to 1 if you have the <]m4_defn([gl_HEADER_NAME])[> header file.])
])
AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
[./-], [___])))
])
])
m4_define([gl_HEADERS_EXPANSION], [
m4_divert_text([DEFAULTS], [gl_header_list=])
AC_CHECK_HEADERS([$gl_header_list])
m4_define([gl_HEADERS_EXPANSION], [])
])
# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
:
AC_FOREACH([gl_FUNC_NAME], [$1], [
AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [
m4_divert_text([INIT_PREPARE],
[gl_func_list="$gl_func_list gl_FUNC_NAME"])
gl_FUNCS_EXPANSION
AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_FUNC_NAME])),
[Define to 1 if you have the `]m4_defn([gl_FUNC_NAME])[' function.])
])
AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
])
])
m4_define([gl_FUNCS_EXPANSION], [
m4_divert_text([DEFAULTS], [gl_func_list=])
AC_CHECK_FUNCS([$gl_func_list])
m4_define([gl_FUNCS_EXPANSION], [])
])
# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
# AC_CHECK_DECLS(DECL1, DECL2, ...).
AC_DEFUN([AC_CHECK_DECLS_ONCE], [
:
AC_FOREACH([gl_DECL_NAME], [$1], [
AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [
AC_CHECK_DECLS(m4_defn([gl_DECL_NAME]))
])
AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]))
])
])

View File

@@ -166,5 +166,6 @@ AC_DEFUN([gl_PREREQ_REGEX],
AC_REQUIRE([gl_C_RESTRICT])
AC_REQUIRE([AM_LANGINFO_CODESET])
AC_CHECK_HEADERS_ONCE([locale.h wchar.h wctype.h])
AC_CHECK_FUNCS_ONCE([isblank mbrtowc mempcpy wcrtomb wcscoll])
AC_CHECK_FUNCS_ONCE([mbrtowc mempcpy wcrtomb wcscoll])
AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
])

View File

@@ -1,4 +1,4 @@
# savedir.m4 serial 5
# savedir.m4 serial 7
dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -10,5 +10,5 @@ AC_DEFUN([gl_SAVEDIR],
AC_LIBOBJ([savedir])
dnl Prerequisites of lib/savedir.c.
AC_REQUIRE([AC_HEADER_DIRENT])
AC_CHECK_HEADERS_ONCE([dirent.h])dnl
])

View File

@@ -1,4 +1,4 @@
# sockpfaf.m4 serial 3
# sockpfaf.m4 serial 4
dnl Copyright (C) 2004, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -13,7 +13,8 @@ dnl From Bruno Haible.
AC_DEFUN([gl_SOCKET_FAMILIES],
[
AC_CHECK_HEADERS_ONCE(sys/socket.h netinet/in.h winsock2.h)
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
AC_CHECK_HEADERS_ONCE([netinet/in.h])
AC_MSG_CHECKING(for IPv4 sockets)
AC_CACHE_VAL(gl_cv_socket_ipv4,

View File

@@ -1,4 +1,4 @@
# stdint.m4 serial 13
# stdint.m4 serial 14
dnl Copyright (C) 2001-2002, 2004-2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -49,9 +49,9 @@ AC_DEFUN([gl_STDINT_H],
dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_stdint_h.
if test $ac_cv_header_stdint_h = yes; then
gl_FULL_HEADER_PATH([stdint.h])
FULL_PATH_STDINT_H="<$gl_cv_full_path_stdint_h>"
AC_SUBST([FULL_PATH_STDINT_H])
gl_ABSOLUTE_HEADER([stdint.h])
ABSOLUTE_STDINT_H="<$gl_cv_absolute_stdint_h>"
AC_SUBST([ABSOLUTE_STDINT_H])
HAVE_STDINT_H=1
else
HAVE_STDINT_H=0
@@ -59,7 +59,7 @@ AC_DEFUN([gl_STDINT_H],
AC_SUBST([HAVE_STDINT_H])
dnl Now see whether we need a substitute <stdint.h>. Use
dnl FULL_PATH_STDINT_H, not <stdint.h>, so that it also works during
dnl ABSOLUTE_STDINT_H, not <stdint.h>, so that it also works during
dnl a "config.status --recheck" if a stdint.h has been
dnl created in the build directory.
if test $ac_cv_header_stdint_h = yes; then
@@ -70,7 +70,7 @@ AC_DEFUN([gl_STDINT_H],
AC_LANG_PROGRAM([[
#include <stddef.h>
#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
#include FULL_PATH_STDINT_H
#include ABSOLUTE_STDINT_H
#ifdef INT8_MAX
int8_t a1 = INT8_MAX;
#endif

View File

@@ -1,4 +1,4 @@
# strndup.m4 serial 6
# strndup.m4 serial 7
dnl Copyright (C) 2002-2003, 2005-2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -27,13 +27,15 @@ AC_DEFUN([gl_FUNC_STRNDUP],
return s[13] != '\0';]])],
[gl_cv_func_strndup=yes],
[gl_cv_func_strndup=no],
[AC_EGREP_CPP([too risky], [
[AC_CHECK_FUNC([strndup],
[AC_EGREP_CPP([too risky], [
#ifdef _AIX
too risky
too risky
#endif
],
[gl_cv_func_strndup=no],
[gl_cv_func_strndup=yes])])])
],
[gl_cv_func_strndup=no],
[gl_cv_func_strndup=yes])],
[gl_cv_func_strndup=no])])])
if test $gl_cv_func_strndup = yes; then
AC_DEFINE([HAVE_STRNDUP], 1,
[Define if you have the strndup() function and it works.])

View File

@@ -1,5 +1,5 @@
# strtod.m4 serial 4
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
# strtod.m4 serial 5
dnl Copyright (C) 2002, 2003, 2006 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.
@@ -16,7 +16,4 @@ AC_DEFUN([gl_FUNC_STRTOD],
# Prerequisites of lib/strtod.c.
# The need for pow() is already handled by AC_FUNC_STRTOD.
AC_DEFUN([gl_PREREQ_STRTOD], [
AC_REQUIRE([AC_HEADER_STDC])
AC_CHECK_FUNCS_ONCE(isascii)
])
AC_DEFUN([gl_PREREQ_STRTOD], [:])

View File

@@ -1,5 +1,5 @@
# strtol.m4 serial 3
dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
# strtol.m4 serial 4
dnl Copyright (C) 2002, 2003, 2006 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.
@@ -7,13 +7,4 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_STRTOL],
[
AC_REPLACE_FUNCS(strtol)
if test $ac_cv_func_strtol = no; then
gl_PREREQ_STRTOL
fi
])
# Prerequisites of lib/strtol.c.
AC_DEFUN([gl_PREREQ_STRTOL], [
AC_REQUIRE([AC_HEADER_STDC])
AC_CHECK_FUNCS_ONCE(isascii)
])

View File

@@ -1,5 +1,5 @@
# strtoul.m4 serial 2
dnl Copyright (C) 2002 Free Software Foundation, Inc.
# strtoul.m4 serial 3
dnl Copyright (C) 2002, 2006 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.
@@ -7,12 +7,4 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_STRTOUL],
[
AC_REPLACE_FUNCS(strtoul)
if test $ac_cv_func_strtoul = no; then
gl_PREREQ_STRTOUL
fi
])
# Prerequisites of lib/strtoul.c.
AC_DEFUN([gl_PREREQ_STRTOUL], [
gl_PREREQ_STRTOL
])

View File

@@ -1,5 +1,5 @@
#serial 7
dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
#serial 8
dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 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.
@@ -25,9 +25,8 @@ AC_DEFUN([gl_PREREQ_XSTRTOL_H],
AC_DEFUN([gl_PREREQ_XSTRTOL],
[
AC_REQUIRE([gl_PREREQ_XSTRTOL_H])
AC_REQUIRE([AC_HEADER_STDC])
AC_CHECK_FUNCS_ONCE(isascii)
AC_CHECK_DECLS([strtoimax, strtoumax])
AC_CHECK_DECLS_ONCE([strtoimax])
AC_CHECK_DECLS_ONCE([strtoumax])
])
# Prerequisites of lib/xstrtoul.c.