Get files from the gnulib and po repositories, instead of relying

on them being in our CVS.  Upgrade to latest versions of gnulib and Automake.
This commit is contained in:
Paul Eggert
2004-04-28 20:00:56 +00:00
parent f97de3247f
commit 1f65350a16
103 changed files with 492 additions and 24580 deletions

View File

@@ -1,8 +1,12 @@
Makefile
Makefile.in
alloca.m4
codeset.m4
dirname.m4
dos.m4
error.m4
getopt.m4
gettext.m4
glibc21.m4
hash.m4
iconv.m4
intdiv0.m4
inttypes-pri.m4
@@ -13,9 +17,20 @@ lcmessage.m4
lib-ld.m4
lib-link.m4
lib-prefix.m4
mbrtowc.m4
mbswidth.m4
nls.m4
obstack.m4
onceonly.m4
po.m4
progtest.m4
quote.m4
quotearg.m4
stdbool.m4
stdint_h.m4
stpcpy.m4
strnlen.m4
uintmax_t.m4
ulonglong.m4
unlocked-io.m4
xalloc.m4

View File

@@ -1,13 +0,0 @@
## Process this file with automake to produce Makefile.in -*-Makefile-*-
EXTRA_DIST = \
alloca.m4 dirname.m4 dmalloc.m4 dos.m4 error.m4 getopt.m4 hash.m4 \
m4.m4 malloc.m4 \
mbrtowc.m4 mbswidth.m4 memchr.m4 memcmp.m4 memrchr.m4 \
obstack.m4 onceonly.m4 \
prereq.m4 quote.m4 quotearg.m4 \
realloc.m4 stdbool.m4 \
stpcpy.m4 strnlen.m4 strtol.m4 strtoul.m4 \
subpipe.m4 timevar.m4 unlocked-io.m4 warning.m4 xalloc.m4 \
gettext.m4 iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 progtest.m4 \
codeset.m4 glibc21.m4 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 \
isc-posix.m4 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4

View File

@@ -1,36 +0,0 @@
# alloca.m4 serial 2 (gettext-0.12)
dnl Copyright (C) 2002-2003 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.
AC_DEFUN([gl_FUNC_ALLOCA],
[
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_FUNC_ALLOCA])
if test $ac_cv_func_alloca_works = no; then
gl_PREREQ_ALLOCA
fi
# Define an additional variable used in the Makefile substitution.
AC_EGREP_CPP([Need own alloca], [
#if defined __GNUC__ || defined _MSC_VER || !HAVE_ALLOCA_H
Need own alloca
#endif
],
ALLOCA_H=alloca.h,
ALLOCA_H=)
AC_SUBST([ALLOCA_H])
])
# Prerequisites of lib/alloca.c.
# STACK_DIRECTION is already handled by AC_FUNC_ALLOCA.
AC_DEFUN([gl_PREREQ_ALLOCA], [
AC_CHECK_HEADERS_ONCE(stdlib.h string.h)
])

View File

@@ -1,25 +0,0 @@
# dirname.m4 serial 1
dnl Copyright (C) 2002 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.
AC_DEFUN([gl_DIRNAME],
[
dnl Prerequisites of lib/dirname.h.
AC_REQUIRE([jm_AC_DOS])
dnl Prerequisites of lib/dirname.c.
AC_REQUIRE([AC_HEADER_STDC])
AC_CHECK_HEADERS_ONCE(string.h)
dnl Prerequisites of lib/basename.c.
AC_REQUIRE([AC_HEADER_STDC])
AC_CHECK_HEADERS_ONCE(string.h)
dnl Prerequisites of lib/stripslash.c.
AC_REQUIRE([AC_HEADER_STDC])
AC_CHECK_HEADERS_ONCE(string.h)
])

View File

@@ -1,53 +0,0 @@
#serial 5
# Define some macros required for proper operation of code in lib/*.c
# on MSDOS/Windows systems.
# From Jim Meyering.
AC_DEFUN([jm_AC_DOS],
[
AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
[
AC_TRY_COMPILE([],
[#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
neither MSDOS nor Windows
#endif],
[ac_cv_win_or_dos=yes],
[ac_cv_win_or_dos=no])
])
if test x"$ac_cv_win_or_dos" = xyes; then
ac_fs_accepts_drive_letter_prefix=1
ac_fs_backslash_is_file_name_separator=1
else
ac_fs_accepts_drive_letter_prefix=0
ac_fs_backslash_is_file_name_separator=0
fi
AH_VERBATIM(FILESYSTEM_PREFIX_LEN,
[#if FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
# define FILESYSTEM_PREFIX_LEN(Filename) \
((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
#else
# define FILESYSTEM_PREFIX_LEN(Filename) 0
#endif])
AC_DEFINE_UNQUOTED([FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX],
$ac_fs_accepts_drive_letter_prefix,
[Define on systems for which file names may have a so-called
`drive letter' prefix, define this to compute the length of that
prefix, including the colon.])
AH_VERBATIM(ISSLASH,
[#if FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
#else
# define ISSLASH(C) ((C) == '/')
#endif])
AC_DEFINE_UNQUOTED([FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR],
$ac_fs_backslash_is_file_name_separator,
[Define if the backslash character may also serve as a file name
component separator.])
])

View File

@@ -1,18 +0,0 @@
#serial 7
AC_DEFUN([gl_ERROR],
[
AC_FUNC_ERROR_AT_LINE
dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
jm_PREREQ_ERROR
])
# Prerequisites of lib/error.c.
AC_DEFUN([jm_PREREQ_ERROR],
[
AC_REQUIRE([AC_HEADER_STDC])
AC_REQUIRE([AC_FUNC_VPRINTF])
AC_CHECK_FUNCS(strerror)
AC_CHECK_DECLS([strerror])
AC_FUNC_STRERROR_R
])

View File

@@ -1,13 +0,0 @@
# getopt.m4 serial 1
dnl Copyright (C) 2002 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.
AC_DEFUN([gl_GETOPT],
[
dnl Prerequisites of lib/getopt.c.
AC_CHECK_HEADERS_ONCE(string.h)
])

View File

@@ -1,15 +0,0 @@
# hash.m4 serial 1
dnl Copyright (C) 2002 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.
AC_DEFUN([gl_HASH],
[
dnl Prerequisites of lib/hash.c.
AC_CHECK_HEADERS_ONCE(stdlib.h)
AC_HEADER_STDBOOL
AC_CHECK_DECLS_ONCE(free malloc)
])

View File

@@ -1,25 +0,0 @@
# malloc.m4 serial 7
dnl Copyright (C) 2002 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 From Jim Meyering.
dnl Determine whether malloc accepts 0 as its argument.
dnl If it doesn't, arrange to use the replacement function.
AC_DEFUN([jm_FUNC_MALLOC],
[
AC_REQUIRE([AC_FUNC_MALLOC])
dnl autoconf < 2.57 used the symbol ac_cv_func_malloc_works.
if test X"$ac_cv_func_malloc_0_nonnull" = Xno || test X"$ac_cv_func_malloc_works" = Xno; then
gl_PREREQ_MALLOC
fi
])
# Prerequisites of lib/malloc.c.
AC_DEFUN([gl_PREREQ_MALLOC], [
:
])

View File

@@ -1,27 +0,0 @@
# mbrtowc.m4 serial 5
dnl Copyright (C) 2001-2002 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 From Paul Eggert
dnl This file can be removed, and jm_FUNC_MBRTOWC replaced with
dnl AC_FUNC_MBRTOWC, when autoconf 2.57 can be assumed everywhere.
AC_DEFUN([jm_FUNC_MBRTOWC],
[
AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
jm_cv_func_mbrtowc,
[AC_TRY_LINK(
[#include <wchar.h>],
[mbstate_t state; return ! (sizeof state && mbrtowc);],
jm_cv_func_mbrtowc=yes,
jm_cv_func_mbrtowc=no)])
if test $jm_cv_func_mbrtowc = yes; then
AC_DEFINE(HAVE_MBRTOWC, 1,
[Define to 1 if mbrtowc and mbstate_t are properly declared.])
fi
])

View File

@@ -1,36 +0,0 @@
#serial 9
dnl autoconf tests required for use of mbswidth.c
dnl From Bruno Haible.
AC_DEFUN([gl_MBSWIDTH],
[
AC_CHECK_HEADERS_ONCE(wchar.h wctype.h)
AC_CHECK_FUNCS_ONCE(isascii iswprint mbsinit)
AC_CHECK_FUNCS(iswcntrl wcwidth)
jm_FUNC_MBRTOWC
AC_CACHE_CHECK([whether wcwidth is declared], ac_cv_have_decl_wcwidth,
[AC_TRY_COMPILE([
/* AIX 3.2.5 declares wcwidth in <string.h>. */
#if HAVE_STRING_H
# include <string.h>
#endif
#if HAVE_WCHAR_H
# include <wchar.h>
#endif
], [
#ifndef wcwidth
char *p = (char *) wcwidth;
#endif
], ac_cv_have_decl_wcwidth=yes, ac_cv_have_decl_wcwidth=no)])
if test $ac_cv_have_decl_wcwidth = yes; then
ac_val=1
else
ac_val=0
fi
AC_DEFINE_UNQUOTED(HAVE_DECL_WCWIDTH, $ac_val,
[Define to 1 if you have the declaration of wcwidth(), and to 0 otherwise.])
AC_TYPE_MBSTATE_T
])

View File

@@ -1,21 +0,0 @@
# memchr.m4 serial 1
dnl Copyright (C) 2002 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.
AC_DEFUN([gl_FUNC_MEMCHR],
[
AC_REPLACE_FUNCS(memchr)
if test $ac_cv_func_memchr = no; then
jm_PREREQ_MEMCHR
fi
])
# Prerequisites of lib/memchr.c.
AC_DEFUN([jm_PREREQ_MEMCHR], [
AC_CHECK_HEADERS_ONCE(limits.h stdlib.h)
AC_CHECK_HEADERS(bp-sym.h)
])

View File

@@ -1,22 +0,0 @@
# memcmp.m4 serial 8
dnl Copyright (C) 2002 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.
AC_DEFUN([jm_FUNC_MEMCMP],
[
AC_REQUIRE([AC_FUNC_MEMCMP])
if test $ac_cv_func_memcmp_working = no; then
AC_DEFINE(memcmp, rpl_memcmp,
[Define to rpl_memcmp if the replacement function should be used.])
gl_PREREQ_MEMCMP
fi
])
# Prerequisites of lib/memcmp.c.
AC_DEFUN([gl_PREREQ_MEMCMP], [
AC_CHECK_HEADERS_ONCE(string.h)
])

View File

@@ -1,23 +0,0 @@
# memrchr.m4 serial 1
dnl Copyright (C) 2002 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.
AC_DEFUN([gl_FUNC_MEMRCHR],
[
dnl Persuade glibc <string.h> to declare memrchr().
AC_REQUIRE([AC_GNU_SOURCE])
AC_REPLACE_FUNCS(memrchr)
if test $ac_cv_func_memrchr = no; then
gl_PREREQ_MEMRCHR
fi
])
# Prerequisites of lib/memrchr.c.
AC_DEFUN([gl_PREREQ_MEMRCHR], [
AC_CHECK_HEADERS_ONCE(limits.h)
])

View File

@@ -1,24 +0,0 @@
# obstack.m4 serial 1
dnl Copyright (C) 2002 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.
AC_DEFUN([gl_OBSTACK],
[
dnl Prerequisites of lib/obstack.h.
AC_CHECK_HEADERS_ONCE(stddef.h string.h)
AC_FUNC_OBSTACK
dnl Note: AC_FUNC_OBSTACK does AC_LIBSOURCES([obstack.h, obstack.c]).
if test $ac_cv_func_obstack = no; then
gl_PREREQ_OBSTACK
fi
])
# Prerequisites of lib/obstack.c.
AC_DEFUN([gl_PREREQ_OBSTACK], [
AC_CHECK_HEADERS_ONCE(stdlib.h)
])

View File

@@ -1,63 +0,0 @@
# onceonly.m4 serial 3 (gettext-0.12)
dnl Copyright (C) 2002, 2003 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 Autoconf version 2.57 or newer is recommended.
AC_PREREQ(2.54)
# 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(m4_defn([gl_HEADER_NAME]),
[-./], [___])), [
AC_CHECK_HEADERS(gl_HEADER_NAME)
])
AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
[-./], [___])))
])
])
# 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]), [
AC_CHECK_FUNCS(m4_defn([gl_FUNC_NAME]))
])
AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
])
])
# 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

@@ -1,63 +0,0 @@
#serial 27
dnl These are the prerequisite macros for files in the lib/
dnl directories of the fileutils, sh-utils, and textutils packages.
AC_DEFUN([jm_PREREQ],
[
gl_BACKUPFILE
jm_PREREQ_C_STACK
gl_CANON_HOST
gl_DIRNAME
jm_PREREQ_ERROR
gl_EXCLUDE
gl_GETPAGESIZE
gl_HARD_LOCALE
gl_HASH
gl_HUMAN
gl_MBSWIDTH
gl_FUNC_MEMCHR
gl_PHYSMEM
gl_POSIXVER
gl_QUOTEARG
gl_READUTMP
gl_REGEX
jm_PREREQ_STAT
gl_FUNC_STRNLEN
gl_XGETCWD
gl_XREADLINK
])
AC_DEFUN([jm_PREREQ_STAT],
[
AC_CHECK_HEADERS(sys/sysmacros.h sys/statvfs.h sys/vfs.h inttypes.h)
AC_CHECK_HEADERS(sys/param.h sys/mount.h)
AC_CHECK_FUNCS(statvfs)
jm_AC_TYPE_LONG_LONG
statxfs_includes="\
$ac_includes_default
#if HAVE_SYS_STATVFS_H
# include <sys/statvfs.h>
#endif
#if HAVE_SYS_VFS_H
# include <sys/vfs.h>
#endif
#if ( ! HAVE_SYS_STATVFS_H && ! HAVE_SYS_VFS_H && HAVE_SYS_MOUNT_H && HAVE_SYS_PARAM_H )
/* NetBSD 1.5.2 needs these, for the declaration of struct statfs. */
# include <sys/param.h>
# include <sys/mount.h>
#endif
"
AC_CHECK_MEMBERS([struct statfs.f_basetype],,,[$statxfs_includes])
AC_CHECK_MEMBERS([struct statvfs.f_basetype],,,[$statxfs_includes])
AC_CHECK_MEMBERS([struct statfs.f_fstypename],,,[$statxfs_includes])
AC_CHECK_MEMBERS([struct statfs.f_type],,,[$statxfs_includes])
AC_CHECK_MEMBERS([struct statvfs.f_type],,,[$statxfs_includes])
AC_CHECK_MEMBERS([struct statfs.f_fsid.__val],,,[$statxfs_includes])
AC_CHECK_MEMBERS([struct statvfs.f_fsid.__val],,,[$statxfs_includes])
AC_CHECK_MEMBERS([struct statfs.f_namemax],,,[$statxfs_includes])
AC_CHECK_MEMBERS([struct statvfs.f_namemax],,,[$statxfs_includes])
AC_CHECK_MEMBERS([struct statfs.f_namelen],,,[$statxfs_includes])
AC_CHECK_MEMBERS([struct statvfs.f_namelen],,,[$statxfs_includes])
])

View File

@@ -1,13 +0,0 @@
# quote.m4 serial 2
dnl Copyright (C) 2002, 2003 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.
AC_DEFUN([gl_QUOTE],
[
dnl Prerequisites of lib/quote.c.
dnl (none)
])

View File

@@ -1,16 +0,0 @@
# quotearg.m4 serial 1
dnl Copyright (C) 2002 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.
AC_DEFUN([gl_QUOTEARG],
[
dnl Prerequisites of lib/quotearg.c.
AC_CHECK_HEADERS_ONCE(wchar.h wctype.h)
AC_CHECK_FUNCS_ONCE(iswprint mbsinit)
AC_TYPE_MBSTATE_T
jm_FUNC_MBRTOWC
])

View File

@@ -1,25 +0,0 @@
# realloc.m4 serial 7
dnl Copyright (C) 2002 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 From Jim Meyering.
dnl Determine whether realloc works when both arguments are 0.
dnl If it doesn't, arrange to use the replacement function.
AC_DEFUN([jm_FUNC_REALLOC],
[
AC_REQUIRE([AC_FUNC_REALLOC])
dnl autoconf < 2.57 used the symbol ac_cv_func_realloc_works.
if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
gl_PREREQ_REALLOC
fi
])
# Prerequisites of lib/realloc.c.
AC_DEFUN([gl_PREREQ_REALLOC], [
:
])

View File

@@ -1,89 +0,0 @@
# Check for stdbool.h that conforms to C99.
# Copyright (C) 2002-2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# Prepare for substituting <stdbool.h> if it is not supported.
AC_DEFUN([AM_STDBOOL_H],
[
AC_REQUIRE([AC_HEADER_STDBOOL])
# Define two additional variables used in the Makefile substitution.
if test "$ac_cv_header_stdbool_h" = yes; then
STDBOOL_H=''
else
STDBOOL_H='stdbool.h'
fi
AC_SUBST([STDBOOL_H])
if test "$ac_cv_type__Bool" = yes; then
HAVE__BOOL=1
else
HAVE__BOOL=0
fi
AC_SUBST([HAVE__BOOL])
])
# This macro is only needed in autoconf <= 2.54. Newer versions of autoconf
# have this macro built-in.
AC_DEFUN([AC_HEADER_STDBOOL],
[AC_CACHE_CHECK([for stdbool.h that conforms to C99],
[ac_cv_header_stdbool_h],
[AC_TRY_COMPILE(
[
#include <stdbool.h>
#ifndef bool
"error: bool is not defined"
#endif
#ifndef false
"error: false is not defined"
#endif
#if false
"error: false is not 0"
#endif
#ifndef true
"error: false is not defined"
#endif
#if true != 1
"error: true is not 1"
#endif
#ifndef __bool_true_false_are_defined
"error: __bool_true_false_are_defined is not defined"
#endif
struct s { _Bool s: 1; _Bool t; } s;
char a[true == 1 ? 1 : -1];
char b[false == 0 ? 1 : -1];
char c[__bool_true_false_are_defined == 1 ? 1 : -1];
char d[(bool) -0.5 == true ? 1 : -1];
bool e = &s;
char f[(_Bool) -0.0 == false ? 1 : -1];
char g[true];
char h[sizeof (_Bool)];
char i[sizeof s.t];
],
[ return !a + !b + !c + !d + !e + !f + !g + !h + !i; ],
[ac_cv_header_stdbool_h=yes],
[ac_cv_header_stdbool_h=no])])
AC_CHECK_TYPES([_Bool])
if test $ac_cv_header_stdbool_h = yes; then
AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.])
fi])

View File

@@ -1,24 +0,0 @@
# stpcpy.m4 serial 1
dnl Copyright (C) 2002 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.
AC_DEFUN([gl_FUNC_STPCPY],
[
dnl Persuade glibc <string.h> to declare stpcpy().
AC_REQUIRE([AC_GNU_SOURCE])
AC_REPLACE_FUNCS(stpcpy)
if test $ac_cv_func_stpcpy = no; then
gl_PREREQ_STPCPY
fi
])
# Prerequisites of lib/stpcpy.c.
AC_DEFUN([gl_PREREQ_STPCPY], [
:
])

View File

@@ -1,32 +0,0 @@
# strnlen.m4 serial 2
dnl Copyright (C) 2002-2003 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.
AC_DEFUN([gl_FUNC_STRNLEN],
[
dnl Persuade glibc <string.h> to declare strnlen().
AC_REQUIRE([AC_GNU_SOURCE])
AC_FUNC_STRNLEN
if test $ac_cv_func_strnlen_working = no; then
# This is necessary because automake-1.6.1 doens't understand
# that the above use of AC_FUNC_STRNLEN means we may have to use
# lib/strnlen.c.
#AC_LIBOBJ(strnlen)
AC_DEFINE(strnlen, rpl_strnlen,
[Define to rpl_strnlen if the replacement function should be used.])
gl_PREREQ_STRNLEN
fi
])
# Prerequisites of lib/strnlen.c.
AC_DEFUN([gl_PREREQ_STRNLEN], [
AC_REQUIRE([AC_HEADER_STDC])
AC_CHECK_HEADERS_ONCE(memory.h string.h)
AC_CHECK_DECLS(memchr)
])

View File

@@ -1,22 +0,0 @@
# strtol.m4 serial 1
dnl Copyright (C) 2002 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.
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_HEADERS_ONCE(limits.h)
AC_CHECK_FUNCS_ONCE(isascii)
])

View File

@@ -1,20 +0,0 @@
# strtoul.m4 serial 1
dnl Copyright (C) 2002 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.
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,22 +0,0 @@
#serial 7 -*- autoconf -*-
dnl From Jim Meyering.
dnl
dnl See if the glibc *_unlocked I/O macros or functions are available.
dnl Use only those *_unlocked macros or functions that are declared
dnl (because some of them were declared in Solaris 2.5.1 but were removed
dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run
dnl on Solaris 2.6).
AC_DEFUN([jm_FUNC_GLIBC_UNLOCKED_IO],
[
dnl Persuade glibc <stdio.h> to declare fgets_unlocked(), fputs_unlocked()
dnl etc.
AC_REQUIRE([AC_GNU_SOURCE])
AC_CHECK_DECLS_ONCE(
[clearerr_unlocked feof_unlocked ferror_unlocked
fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked
fread_unlocked fwrite_unlocked getc_unlocked
getchar_unlocked putc_unlocked putchar_unlocked])
])

View File

@@ -1,26 +0,0 @@
# xalloc.m4 serial 1
dnl Copyright (C) 2002 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.
AC_DEFUN([gl_XALLOC],
[
gl_PREREQ_XMALLOC
gl_PREREQ_XSTRDUP
])
# Prerequisites of lib/xmalloc.c.
AC_DEFUN([gl_PREREQ_XMALLOC], [
AC_REQUIRE([AC_HEADER_STDC])
AC_REQUIRE([jm_FUNC_MALLOC])
AC_REQUIRE([jm_FUNC_REALLOC])
])
# Prerequisites of lib/xstrdup.c.
AC_DEFUN([gl_PREREQ_XSTRDUP], [
AC_REQUIRE([AC_HEADER_STDC])
AC_CHECK_HEADERS_ONCE(string.h)
])