summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-08-17 17:57:38 +0000
committerJim Meyering <jim@meyering.net>2003-08-17 17:57:38 +0000
commit69d741ae8e8fcd1c18c965bac6e7cf147e96361b (patch)
tree62e073815068d79325944748054095e31aba1134 /m4
parent56f3c86407c47dde33e1c558312525a4a671b157 (diff)
downloadcoreutils-69d741ae8e8fcd1c18c965bac6e7cf147e96361b.tar.xz
Sync with gnulib.
Diffstat (limited to 'm4')
-rw-r--r--m4/ChangeLog36
-rw-r--r--m4/acl.m47
-rw-r--r--m4/c-stack.m49
-rw-r--r--m4/check-decl.m43
-rw-r--r--m4/chown.m449
-rw-r--r--m4/d-ino.m46
-rw-r--r--m4/d-type.m46
-rw-r--r--m4/fsusage.m450
-rw-r--r--m4/ftruncate.m418
-rw-r--r--m4/getcwd.m43
-rw-r--r--m4/getgroups.m412
-rw-r--r--m4/getline.m41
-rw-r--r--m4/getndelim2.m41
-rw-r--r--m4/gettext.m4237
-rw-r--r--m4/gettimeofday.m426
-rw-r--r--m4/group-member.m427
-rw-r--r--m4/host-os.m43
-rw-r--r--m4/intmax_t.m44
-rw-r--r--m4/inttypes-pri.m48
-rw-r--r--m4/jm-macros.m484
-rw-r--r--m4/lchown.m412
-rw-r--r--m4/lib-ld.m417
-rw-r--r--m4/lib-link.m411
-rw-r--r--m4/lib-prefix.m413
-rw-r--r--m4/longlong.m428
-rw-r--r--m4/ls-mntd-fs.m438
-rw-r--r--m4/lstat.m439
-rw-r--r--m4/mbrtowc.m45
-rw-r--r--m4/mbswidth.m410
-rw-r--r--m4/memcmp.m425
-rw-r--r--m4/mkdir-slash.m410
-rw-r--r--m4/mkstemp.m421
-rw-r--r--m4/nanosleep.m410
-rw-r--r--m4/onceonly.m451
-rw-r--r--m4/prereq.m4310
-rw-r--r--m4/progtest.m466
-rw-r--r--m4/putenv.m417
-rw-r--r--m4/readdir.m46
-rw-r--r--m4/regex.m42
-rw-r--r--m4/rename.m416
-rw-r--r--m4/stat.m437
-rw-r--r--m4/tzset.m48
-rw-r--r--m4/utimbuf.m48
-rw-r--r--m4/utime.m419
-rw-r--r--m4/vasnprintf.m47
-rw-r--r--m4/xstrtoimax.m440
-rw-r--r--m4/xstrtoumax.m441
47 files changed, 639 insertions, 818 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog
index 198c7c9b9..4d2cebee8 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,39 @@
+2003-08-16 Paul Eggert <eggert@twinsun.com>
+
+ Sync with gnulib.
+
+ * gettextext.m4: New file.
+
+ * atexit.m4, backupfile.m4, canon-host.m4, clock_time.m4,
+ closeout.m4, dirname.m4, dup2.m4, euidaccess.m4, exclude.m4,
+ exitfail.m4, file-type.m4, fileblocks.m4, filemode.m4, getdate.m4,
+ gethostname.m4, getloadavg.m4, getopt.m4, getpagesize.m4,
+ getpass.m4, getusershell.m4, hard-locale.m4, hash.m4, malloc.m4,
+ memchr.m4, memcpy.m4, memmove.m4, memrchr.m4, memset.m4,
+ modechange.m4, mountlist.m4, obstack.m4, path-concat.m4,
+ pathmax.m4, physmem.m4, posixtm.m4, posixver.m4, quote.m4,
+ quotearg.m4, readlink.m4, readutmp.m4, realloc.m4, rmdir.m4,
+ rpmatch.m4, safe-read.m4, safe-write.m4, same.m4, save-cwd.m4,
+ savedir.m4, settime.m4, sha.m4, sig2str.m4, stdio-safer.m4,
+ stpcpy.m4, strcase.m4, strcspn.m4, strdup.m4, strndup.m4,
+ strnlen.m4, strpbrk.m4, strstr.m4, strtod.m4, strtoimax.m4,
+ strtol.m4, strtoll.m4, strtoul.m4, strtoull.m4, strtoumax.m4,
+ strverscmp.m4, ulonglong.m4, unicodeio.m4, unistd-safer.m4,
+ userspec.m4, xalloc.m4, xgetcwd.m4, xreadlink.m4, xstrtod.m4,
+ xstrtol.m4, yesno.m4: New files, from gnulib.
+
+ * acl.m4, check-decl.m4, chown.m4, c-stack.m4, d-ino.m4,
+ d-type.m4, fileblocks.m4, fsusage.m4, ftruncate.m4, getcwd.m4,
+ getgroups.m4, getline.m4, getndelim2.m4, gettext.m4,
+ gettimeofday.m4, group-member.m4, host-os.m4, iconv.m4,
+ intmax_t.m4, inttypes-pri.m4, jm-macros.m4, lchown.m4, lib-ld.m4,
+ lib-link.m4, lib-prefix.m4, longdouble.m4, longlong.m4,
+ ls-mntd-fs.m4, lstat.m4, mbrtowc.m4, mbswidth.m4, memcmp.m4,
+ mkdir-slash.m4, mkstemp.m4, nanosleep.m4, onceonly.m4, prereq.m4,
+ progtest.m4, putenv.m4, readdir.m4, rename.m4, stat.m4, tzset.m4,
+ utimbuf.m4, utime.m4, vasnprintf.m4, xstrtoimax.m4, xstrtoumax.m4:
+ Sync with gnulib.
+
2003-08-15 Jim Meyering <jim@meyering.net>
* utimes.m4 (gl_FUNC_UTIMES): Use `conftest.utimes' as the test
diff --git a/m4/acl.m4 b/m4/acl.m4
index f5ffa3d27..9c7d44649 100644
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -19,5 +19,8 @@
# Written by Paul Eggert.
AC_DEFUN([AC_FUNC_ACL],
- [AC_CHECK_HEADERS(sys/acl.h)
- AC_CHECK_FUNCS(acl)])
+[
+ dnl Prerequisites of lib/acl.c.
+ AC_CHECK_HEADERS(sys/acl.h)
+ AC_CHECK_FUNCS(acl)
+])
diff --git a/m4/c-stack.m4 b/m4/c-stack.m4
index 666a8ee06..8049d96bd 100644
--- a/m4/c-stack.m4
+++ b/m4/c-stack.m4
@@ -148,6 +148,13 @@ AC_DEFUN([jm_PREREQ_C_STACK],
AC_CHECK_DECLS([getcontext], , , [#include <ucontext.h>])
AC_CHECK_DECLS([sigaltstack], , , [#include <signal.h>])
- AC_CHECK_HEADERS(sys/resource.h ucontext.h unistd.h)
+ AC_CHECK_HEADERS_ONCE(sys/time.h unistd.h)
+ AC_CHECK_HEADERS(sys/resource.h ucontext.h)
AC_CHECK_TYPES([stack_t], , , [#include <signal.h>])])
+
+AC_DEFUN([gl_C_STACK],
+[
+ dnl Prerequisites of lib/c-stack.c.
+ jm_PREREQ_C_STACK
+])
diff --git a/m4/check-decl.m4 b/m4/check-decl.m4
index 22f0361d8..b374705a0 100644
--- a/m4/check-decl.m4
+++ b/m4/check-decl.m4
@@ -1,4 +1,4 @@
-#serial 19
+#serial 18
dnl This is just a wrapper function to encapsulate this kludge.
dnl Putting it in a separate file like this helps share it between
@@ -52,7 +52,6 @@ AC_DEFUN([jm_CHECK_DECLS],
'
AC_CHECK_DECLS([
- euidaccess,
free,
getenv,
geteuid,
diff --git a/m4/chown.m4 b/m4/chown.m4
index 1f3f51b46..86c5fc754 100644
--- a/m4/chown.m4
+++ b/m4/chown.m4
@@ -1,4 +1,4 @@
-#serial 7
+#serial 8
dnl From Jim Meyering.
dnl Determine whether chown accepts arguments of -1 for uid and gid.
@@ -6,44 +6,19 @@ dnl If it doesn't, arrange to use the replacement function.
dnl
AC_DEFUN([jm_FUNC_CHOWN],
-[AC_REQUIRE([AC_TYPE_UID_T])dnl
- test -z "$ac_cv_header_unistd_h" \
- && AC_CHECK_HEADERS(unistd.h)
- AC_CACHE_CHECK([for working chown], jm_cv_func_working_chown,
- [AC_TRY_RUN([
-# include <sys/types.h>
-# include <sys/stat.h>
-# include <fcntl.h>
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
-
- int
- main ()
- {
- char *f = "conftest.chown";
- struct stat before, after;
-
- if (creat (f, 0600) < 0)
- exit (1);
- if (stat (f, &before) < 0)
- exit (1);
- if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
- exit (1);
- if (stat (f, &after) < 0)
- exit (1);
- exit ((before.st_uid == after.st_uid
- && before.st_gid == after.st_gid) ? 0 : 1);
- }
- ],
- jm_cv_func_working_chown=yes,
- jm_cv_func_working_chown=no,
- dnl When crosscompiling, assume chown is broken.
- jm_cv_func_working_chown=no)
- ])
- if test $jm_cv_func_working_chown = no; then
+[
+ AC_REQUIRE([AC_TYPE_UID_T])dnl
+ AC_REQUIRE([AC_FUNC_CHOWN])
+ if test $ac_cv_func_chown_works = no; then
AC_LIBOBJ(chown)
AC_DEFINE(chown, rpl_chown,
[Define to rpl_chown if the replacement function should be used.])
+ gl_PREREQ_CHOWN
fi
])
+
+# Prerequisites of lib/chown.c.
+AC_DEFUN([gl_PREREQ_CHOWN],
+[
+ AC_CHECK_HEADERS_ONCE(unistd.h)
+])
diff --git a/m4/d-ino.m4 b/m4/d-ino.m4
index 6ca60dc5e..d2555e90a 100644
--- a/m4/d-ino.m4
+++ b/m4/d-ino.m4
@@ -1,4 +1,4 @@
-#serial 4
+#serial 5
dnl From Jim Meyering.
dnl
@@ -35,8 +35,8 @@ AC_DEFUN([jm_CHECK_TYPE_STRUCT_DIRENT_D_INO],
)
if test $jm_cv_struct_dirent_d_ino = yes; then
AC_DEFINE(D_INO_IN_DIRENT, 1,
- [Define if there is a member named d_ino in the struct describing
- directory headers.])
+ [Define if there is a member named d_ino in the struct describing
+ directory headers.])
fi
]
)
diff --git a/m4/d-type.m4 b/m4/d-type.m4
index ae0ba57c3..c69436d3c 100644
--- a/m4/d-type.m4
+++ b/m4/d-type.m4
@@ -1,4 +1,4 @@
-#serial 5
+#serial 6
dnl From Jim Meyering.
dnl
@@ -35,8 +35,8 @@ AC_DEFUN([jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE],
)
if test $jm_cv_struct_dirent_d_type = yes; then
AC_DEFINE(HAVE_STRUCT_DIRENT_D_TYPE, 1,
- [Define if there is a member named d_type in the struct describing
- directory headers.])
+ [Define if there is a member named d_type in the struct describing
+ directory headers.])
fi
]
)
diff --git a/m4/fsusage.m4 b/m4/fsusage.m4
index ad63154ac..a0ab1e15f 100644
--- a/m4/fsusage.m4
+++ b/m4/fsusage.m4
@@ -1,7 +1,18 @@
-#serial 9
+#serial 11
# From fileutils/configure.in
+AC_DEFUN([gl_FSUSAGE],
+[
+ AC_CHECK_HEADERS_ONCE(sys/param.h)
+ AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs_types.h)
+ jm_FILE_SYSTEM_USAGE([gl_cv_fs_space=yes], [gl_cv_fs_space=no])
+ if test $gl_cv_fs_space = yes; then
+ AC_LIBOBJ(fsusage)
+ gl_PREREQ_FSUSAGE_EXTRA
+ fi
+])
+
# Try to determine how a program can obtain filesystem usage information.
# If successful, define the appropriate symbol (see fsusage.c) and
# execute ACTION-IF-FOUND. Otherwise, execute ACTION-IF-NOT-FOUND.
@@ -196,3 +207,40 @@ fi
AS_IF([test $ac_fsusage_space = yes], [$1], [$2])
])
+
+
+# Check for SunOS statfs brokenness wrt partitions 2GB and larger.
+# If <sys/vfs.h> exists and struct statfs has a member named f_spare,
+# enable the work-around code in fsusage.c.
+AC_DEFUN([jm_STATFS_TRUNCATES],
+[
+ AC_MSG_CHECKING([for statfs that truncates block counts])
+ AC_CACHE_VAL(fu_cv_sys_truncating_statfs,
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#if !defined(sun) && !defined(__sun)
+choke -- this is a workaround for a Sun-specific problem
+#endif
+#include <sys/types.h>
+#include <sys/vfs.h>]],
+ [[struct statfs t; long c = *(t.f_spare);]])],
+ [fu_cv_sys_truncating_statfs=yes],
+ [fu_cv_sys_truncating_statfs=no])])
+ if test $fu_cv_sys_truncating_statfs = yes; then
+ AC_DEFINE(STATFS_TRUNCATES_BLOCK_COUNTS, 1,
+ [Define if the block counts reported by statfs may be truncated to 2GB
+ and the correct values may be stored in the f_spare array.
+ (SunOS 4.1.2, 4.1.3, and 4.1.3_U1 are reported to have this problem.
+ SunOS 4.1.1 seems not to be affected.)])
+ fi
+ AC_MSG_RESULT($fu_cv_sys_truncating_statfs)
+])
+
+
+# Prerequisites of lib/fsusage.c not done by jm_FILE_SYSTEM_USAGE.
+AC_DEFUN([gl_PREREQ_FSUSAGE_EXTRA],
+[
+ AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])
+ AC_CHECK_HEADERS_ONCE(fcntl.h)
+ AC_CHECK_HEADERS(dustat.h sys/fs/s5param.h sys/filsys.h sys/statfs.h sys/statvfs.h)
+ jm_STATFS_TRUNCATES
+])
diff --git a/m4/ftruncate.m4 b/m4/ftruncate.m4
index 0397a000c..ec593a96d 100644
--- a/m4/ftruncate.m4
+++ b/m4/ftruncate.m4
@@ -1,14 +1,18 @@
-#serial 4
+#serial 5
# See if we need to emulate a missing ftruncate function using fcntl or chsize.
AC_DEFUN([jm_FUNC_FTRUNCATE],
[
- AC_CHECK_FUNCS(ftruncate, , [ftruncate_missing=yes])
-
- if test "$ftruncate_missing" = yes; then
- AC_CHECK_HEADERS([unistd.h])
- AC_CHECK_FUNCS([chsize])
- AC_LIBOBJ(ftruncate)
+ AC_REPLACE_FUNCS(ftruncate)
+ if test $ac_cv_func_ftruncate = no; then
+ gl_PREREQ_FTRUNCATE
fi
])
+
+# Prerequisites of lib/ftruncate.c.
+AC_DEFUN([gl_PREREQ_FTRUNCATE],
+[
+ AC_CHECK_HEADERS_ONCE(unistd.h)
+ AC_CHECK_FUNCS(chsize)
+])
diff --git a/m4/getcwd.m4 b/m4/getcwd.m4
index 1e1b80efa..7790dde1a 100644
--- a/m4/getcwd.m4
+++ b/m4/getcwd.m4
@@ -19,7 +19,8 @@
# Written by Paul Eggert.
AC_DEFUN([AC_FUNC_GETCWD_NULL],
- [AC_CHECK_HEADERS(stdlib.h unistd.h)
+ [
+ AC_CHECK_HEADERS_ONCE(stdlib.h unistd.h)
AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result],
[ac_cv_func_getcwd_null],
[AC_TRY_RUN(
diff --git a/m4/getgroups.m4 b/m4/getgroups.m4
index 06213ae49..8f3101056 100644
--- a/m4/getgroups.m4
+++ b/m4/getgroups.m4
@@ -1,14 +1,22 @@
-#serial 7
+#serial 8
dnl From Jim Meyering.
dnl A wrapper around AC_FUNC_GETGROUPS.
AC_DEFUN([jm_FUNC_GETGROUPS],
-[AC_REQUIRE([AC_FUNC_GETGROUPS])dnl
+[
+ AC_REQUIRE([AC_FUNC_GETGROUPS])
if test $ac_cv_func_getgroups_works = no; then
AC_LIBOBJ(getgroups)
AC_DEFINE(getgroups, rpl_getgroups,
[Define as rpl_getgroups if getgroups doesn't work right.])
+ gl_PREREQ_GETGROUPS
fi
test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
])
+
+# Prerequisites of lib/getgroups.c.
+AC_DEFUN([gl_PREREQ_GETGROUPS],
+[
+ AC_REQUIRE([AC_TYPE_GETGROUPS])
+])
diff --git a/m4/getline.m4 b/m4/getline.m4
index 6308cb790..606a989b9 100644
--- a/m4/getline.m4
+++ b/m4/getline.m4
@@ -56,6 +56,7 @@ AC_DEFUN([AM_FUNC_GETLINE],
AC_DEFINE([getline], [gnu_getline],
[Define to a replacement function name for getline().])
AC_LIBOBJ(getline)
+ AC_LIBOBJ(getndelim2)
gl_PREREQ_GETLINE
gl_PREREQ_GETNDELIM2
fi
diff --git a/m4/getndelim2.m4 b/m4/getndelim2.m4
index db483281e..6715c53cd 100644
--- a/m4/getndelim2.m4
+++ b/m4/getndelim2.m4
@@ -8,6 +8,7 @@ dnl the same distribution terms as the rest of that program.
AC_DEFUN([gl_GETNDELIM2],
[
+ AC_LIBOBJ(getndelim2)
gl_PREREQ_GETNDELIM2
])
diff --git a/m4/gettext.m4 b/m4/gettext.m4
index 877e1e42d..16070b40a 100644
--- a/m4/gettext.m4
+++ b/m4/gettext.m4
@@ -1,5 +1,5 @@
-# gettext.m4 serial 17 (gettext-0.11.5)
-dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+# gettext.m4 serial 20 (gettext-0.12)
+dnl Copyright (C) 1995-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
@@ -17,7 +17,7 @@ dnl They are *not* in the public domain.
dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-dnl Bruno Haible <haible@clisp.cons.org>, 2000-2002.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
dnl Macro to add for using GNU gettext.
@@ -92,13 +92,8 @@ AC_DEFUN([AM_GNU_GETTEXT],
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
])
- AC_MSG_CHECKING([whether NLS is requested])
- dnl Default is enabled NLS
- AC_ARG_ENABLE(nls,
- [ --disable-nls do not use Native Language Support],
- USE_NLS=$enableval, USE_NLS=yes)
- AC_MSG_RESULT($USE_NLS)
- AC_SUBST(USE_NLS)
+ dnl Set USE_NLS.
+ AM_NLS
ifelse(gt_included_intl, yes, [
BUILD_INCLUDED_LIBINTL=no
@@ -216,7 +211,8 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
if test "$gt_cv_func_gnugettext_libc" = "yes" \
|| { test "$gt_cv_func_gnugettext_libintl" = "yes" \
- && test "$PACKAGE" != gettext; }; then
+ && test "$PACKAGE" != gettext-runtime \
+ && test "$PACKAGE" != gettext-tools; }; then
gt_use_preinstalled_gnugettext=yes
else
dnl Reset the values set by searching for libintl.
@@ -235,7 +231,6 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
if test "$nls_cv_use_gnu_gettext" = "yes"; then
dnl Mark actions used to generate GNU NLS library.
- INTLOBJS="\$(GETTOBJS)"
BUILD_INCLUDED_LIBINTL=yes
USE_INCLUDED_LIBINTL=yes
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
@@ -260,6 +255,22 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
fi
fi
+ AC_MSG_CHECKING([whether to use NLS])
+ AC_MSG_RESULT([$USE_NLS])
+ if test "$USE_NLS" = "yes"; then
+ AC_MSG_CHECKING([where the gettext function comes from])
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
+ gt_source="external libintl"
+ else
+ gt_source="libc"
+ fi
+ else
+ gt_source="included intl directory"
+ fi
+ AC_MSG_RESULT([$gt_source])
+ fi
+
if test "$USE_NLS" = "yes"; then
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
@@ -283,7 +294,7 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
ifelse(gt_included_intl, yes, [
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
dnl to 'yes' because some of the testsuite requires it.
- if test "$PACKAGE" = gettext; then
+ if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
BUILD_INCLUDED_LIBINTL=yes
fi
@@ -291,7 +302,6 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
AC_SUBST(BUILD_INCLUDED_LIBINTL)
AC_SUBST(USE_INCLUDED_LIBINTL)
AC_SUBST(CATOBJEXT)
- AC_SUBST(INTLOBJS)
dnl For backward compatibility. Some configure.ins may be using this.
nls_cv_header_intl=
@@ -309,6 +319,12 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
GENCAT=gencat
AC_SUBST(GENCAT)
+ dnl For backward compatibility. Some Makefiles may be using this.
+ if test "$USE_INCLUDED_LIBINTL" = yes; then
+ INTLOBJS="\$(GETTOBJS)"
+ fi
+ AC_SUBST(INTLOBJS)
+
dnl Enable libtool support if the surrounding package wishes it.
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
@@ -325,179 +341,6 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
])
-dnl Checks for all prerequisites of the po subdirectory,
-dnl except for USE_NLS.
-AC_DEFUN([AM_PO_SUBDIRS],
-[
- AC_REQUIRE([AC_PROG_MAKE_SET])dnl
- AC_REQUIRE([AC_PROG_INSTALL])dnl
- AC_REQUIRE([AM_MKINSTALLDIRS])dnl
-
- dnl Perform the following tests also if --disable-nls has been given,
- dnl because they are needed for "make dist" to work.
-
- dnl Search for GNU msgfmt in the PATH.
- dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
- dnl The second test excludes FreeBSD msgfmt.
- AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
- [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
- (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
- :)
- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-
- dnl Search for GNU xgettext 0.11 or newer in the PATH.
- dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
- dnl The second test excludes FreeBSD xgettext.
- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
- [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
- (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
- :)
- dnl Remove leftover from FreeBSD xgettext call.
- rm -f messages.po
-
- dnl Search for GNU msgmerge 0.11 or newer in the PATH.
- AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
- [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
-
- dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
- dnl Test whether we really found GNU msgfmt.
- if test "$GMSGFMT" != ":"; then
- dnl If it is no GNU msgfmt we define it as : so that the
- dnl Makefiles still can work.
- if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
- (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
- : ;
- else
- GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
- AC_MSG_RESULT(
- [found $GMSGFMT program is not GNU msgfmt; ignore it])
- GMSGFMT=":"
- fi
- fi
-
- dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
- dnl Test whether we really found GNU xgettext.
- if test "$XGETTEXT" != ":"; then
- dnl If it is no GNU xgettext we define it as : so that the
- dnl Makefiles still can work.
- if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
- (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
- : ;
- else
- AC_MSG_RESULT(
- [found xgettext program is not GNU xgettext; ignore it])
- XGETTEXT=":"
- fi
- dnl Remove leftover from FreeBSD xgettext call.
- rm -f messages.po
- fi
-
- AC_OUTPUT_COMMANDS([
- for ac_file in $CONFIG_FILES; do
- # Support "outfile[:infile[:infile...]]"
- case "$ac_file" in
- *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- esac
- # PO directories have a Makefile.in generated from Makefile.in.in.
- case "$ac_file" in */Makefile.in)
- # Adjust a relative srcdir.
- ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
- ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
- ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
- # In autoconf-2.13 it is called $ac_given_srcdir.
- # In autoconf-2.50 it is called $srcdir.
- test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
- case "$ac_given_srcdir" in
- .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
- /*) top_srcdir="$ac_given_srcdir" ;;
- *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
- if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
- rm -f "$ac_dir/POTFILES"
- test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
- cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
- # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
- # on $ac_dir but don't depend on user-specified configuration
- # parameters.
- if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
- # The LINGUAS file contains the set of available languages.
- if test -n "$ALL_LINGUAS"; then
- test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
- fi
- ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
- # Hide the ALL_LINGUAS assigment from automake.
- eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
- fi
- case "$ac_given_srcdir" in
- .) srcdirpre= ;;
- *) srcdirpre='$(srcdir)/' ;;
- esac
- POFILES=
- GMOFILES=
- UPDATEPOFILES=
- DUMMYPOFILES=
- for lang in $ALL_LINGUAS; do
- POFILES="$POFILES $srcdirpre$lang.po"
- GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
- UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
- DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
- done
- # CATALOGS depends on both $ac_dir and the user's LINGUAS
- # environment variable.
- INST_LINGUAS=
- if test -n "$ALL_LINGUAS"; then
- for presentlang in $ALL_LINGUAS; do
- useit=no
- if test "%UNSET%" != "$LINGUAS"; then
- desiredlanguages="$LINGUAS"
- else
- desiredlanguages="$ALL_LINGUAS"
- fi
- for desiredlang in $desiredlanguages; do
- # Use the presentlang catalog if desiredlang is
- # a. equal to presentlang, or
- # b. a variant of presentlang (because in this case,
- # presentlang can be used as a fallback for messages
- # which are not translated in the desiredlang catalog).
- case "$desiredlang" in
- "$presentlang"*) useit=yes;;
- esac
- done
- if test $useit = yes; then
- INST_LINGUAS="$INST_LINGUAS $presentlang"
- fi
- done
- fi
- CATALOGS=
- if test -n "$INST_LINGUAS"; then
- for lang in $INST_LINGUAS; do
- CATALOGS="$CATALOGS $lang.gmo"
- done
- fi
- test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
- sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
- for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
- if test -f "$f"; then
- case "$f" in
- *.orig | *.bak | *~) ;;
- *) cat "$f" >> "$ac_dir/Makefile" ;;
- esac
- fi
- done
- fi
- ;;
- esac
- done],
- [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
- # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
- # from automake.
- eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
- # Capture the value of LINGUAS because we need it to compute CATALOGS.
- LINGUAS="${LINGUAS-%UNSET%}"
- ])
-])
-
-
dnl Checks for all prerequisites of the intl subdirectory,
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
@@ -519,13 +362,15 @@ AC_DEFUN([AM_INTL_SUBDIR],
AC_REQUIRE([jm_GLIBC21])dnl
AC_REQUIRE([gt_INTDIV0])dnl
AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
+ AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
AC_REQUIRE([gt_INTTYPES_PRI])dnl
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
stdlib.h string.h unistd.h sys/param.h])
AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
-strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
+strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \
+__fsetlocking])
AM_ICONV
AM_LANGINFO_CODESET
@@ -566,21 +411,5 @@ changequote([,])dnl
])
-AC_DEFUN([AM_MKINSTALLDIRS],
-[
- dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
- dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
- dnl Try to locate is.
- MKINSTALLDIRS=
- if test -n "$ac_aux_dir"; then
- MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
- fi
- if test -z "$MKINSTALLDIRS"; then
- MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
- fi
- AC_SUBST(MKINSTALLDIRS)
-])
-
-
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4
index 2ac299257..e7a5a6db6 100644
--- a/m4/gettimeofday.m4
+++ b/m4/gettimeofday.m4
@@ -1,4 +1,4 @@
-#serial 2
+#serial 4
dnl From Jim Meyering.
dnl
@@ -12,7 +12,7 @@ dnl the wrapper functions that work around the problem.
AC_DEFUN([AC_FUNC_GETTIMEOFDAY_CLOBBER],
[
AC_REQUIRE([AC_HEADER_TIME])
- AC_CHECK_HEADERS(string.h stdlib.h)
+ AC_CHECK_HEADERS_ONCE(stdlib.h string.h)
AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer],
jm_cv_func_gettimeofday_clobber,
[AC_TRY_RUN([
@@ -58,17 +58,25 @@ main ()
jm_cv_func_gettimeofday_clobber=yes)
])
if test $jm_cv_func_gettimeofday_clobber = yes; then
- # Caution: the following few lines should be the same
- # as those in gettimeofday.m4.
- AC_LIBOBJ(gettimeofday)
- AC_DEFINE(gmtime, rpl_gmtime,
- [Define to rpl_gmtime if the replacement function should be used.])
- AC_DEFINE(localtime, rpl_localtime,
- [Define to rpl_localtime if the replacement function should be used.])
+ gl_GETTIMEOFDAY_REPLACE_LOCALTIME
AC_DEFINE(gettimeofday, rpl_gettimeofday,
[Define to rpl_gettimeofday if the replacement function should be used.])
AC_DEFINE(GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, 1,
[Define if gettimeofday clobbers localtime's static buffer.])
+ gl_PREREQ_GETTIMEOFDAY
fi
])
+
+AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [
+ AC_LIBOBJ(gettimeofday)
+ AC_DEFINE(gmtime, rpl_gmtime,
+ [Define to rpl_gmtime if the replacement function should be used.])
+ AC_DEFINE(localtime, rpl_localtime,
+ [Define to rpl_localtime if the replacement function should be used.])
+])
+
+# Prerequisites of lib/gettimeofday.c.
+AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [
+ AC_REQUIRE([AC_HEADER_TIME])
+])
diff --git a/m4/group-member.m4 b/m4/group-member.m4
index 2a8f0427e..36fda49f1 100644
--- a/m4/group-member.m4
+++ b/m4/group-member.m4
@@ -1,11 +1,24 @@
-#serial 3
+#serial 4
dnl Written by Jim Meyering
AC_DEFUN([jm_FUNC_GROUP_MEMBER],
- [
- dnl Do this replacement check manually because I want the hyphen
- dnl (not the underscore) in the filename.
- AC_CHECK_FUNC(group_member, , [AC_LIBOBJ(group-member)])
- ]
-)
+[
+ dnl Persuade glibc <unistd.h> to declare group_member().
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ dnl Do this replacement check manually because I want the hyphen
+ dnl (not the underscore) in the filename.
+ AC_CHECK_FUNC(group_member, , [
+ AC_LIBOBJ(group-member)
+ gl_PREREQ_GROUP_MEMBER
+ ])
+])
+
+# Prerequisites of lib/group-member.c.
+AC_DEFUN([gl_PREREQ_GROUP_MEMBER],
+[
+ AC_REQUIRE([AC_HEADER_STDC])
+ AC_CHECK_HEADERS_ONCE(unistd.h)
+ AC_REQUIRE([AC_FUNC_GETGROUPS])
+])
diff --git a/m4/host-os.m4 b/m4/host-os.m4
index d2ed937f8..fc9d06506 100644
--- a/m4/host-os.m4
+++ b/m4/host-os.m4
@@ -1,4 +1,4 @@
-#serial 2
+#serial 3
dnl From Paul Eggert.
@@ -30,6 +30,7 @@ AC_DEFUN([UTILS_HOST_OS],
openbsd*) os='OpenBSD';;
nsk*) os='NonStop Kernel';;
nonstopux*) os='NonStop-UX';;
+ netbsd*-gnu*) os='GNU/NetBSD';;
netbsd*) os='NetBSD';;
msdosdjgpp*) os='DJGPP';;
mpeix*) os='MPE/iX';;
diff --git a/m4/intmax_t.m4 b/m4/intmax_t.m4
index 745ccaa4d..1dc190f68 100644
--- a/m4/intmax_t.m4
+++ b/m4/intmax_t.m4
@@ -1,5 +1,5 @@
-# intmax_t.m4 serial 1
-dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+# intmax_t.m4 serial 2
+dnl Copyright (C) 1997-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
diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4
index f931b0098..fd007c312 100644
--- a/m4/inttypes-pri.m4
+++ b/m4/inttypes-pri.m4
@@ -1,4 +1,4 @@
-# inttypes-pri.m4 serial 1001 (based on gettext-0.11.4's `serial 1')
+# inttypes-pri.m4 serial 1 (gettext-0.11.4)
dnl Copyright (C) 1997-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
@@ -13,10 +13,8 @@ dnl From Bruno Haible.
AC_DEFUN([gt_INTTYPES_PRI],
[
- # autoconf-2.52 has a proper check for inttypes.h.
- AC_PREREQ(2.52)
-
- if test $ac_cv_header_inttypes_h = yes; then
+ AC_REQUIRE([gt_HEADER_INTTYPES_H])
+ if test $gt_cv_header_inttypes_h = yes; then
AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
gt_cv_inttypes_pri_broken,
[
diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4
index 35a84c917..65c9ebf0a 100644
--- a/m4/jm-macros.m4
+++ b/m4/jm-macros.m4
@@ -1,4 +1,4 @@
-#serial 66 -*- autoconf -*-
+#serial 68 -*- autoconf -*-
m4_undefine([AC_LANG_SOURCE(C)])
dnl The following is identical to the definition in c.m4
@@ -38,11 +38,8 @@ AC_DEFUN([jm_MACROS],
AC_REQUIRE([AC_ISC_POSIX])dnl
jm_CHECK_ALL_TYPES
- gl_REGEX
AC_REQUIRE([UTILS_HOST_OS])
- AC_REQUIRE([UTILS_FUNC_MKDIR_TRAILING_SLASH])
- AC_REQUIRE([jm_BISON])
AC_REQUIRE([jm_ASSERT])
AC_REQUIRE([jm_CHECK_TYPE_STRUCT_UTIMBUF])
AC_REQUIRE([jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE])
@@ -57,25 +54,11 @@ AC_DEFUN([jm_MACROS],
AC_REQUIRE([jm_FUNC_LCHOWN])
AC_REQUIRE([fetish_FUNC_RMDIR_NOTEMPTY])
AC_REQUIRE([jm_FUNC_CHOWN])
- AC_REQUIRE([gl_FUNC_MKTIME])
- AC_REQUIRE([jm_FUNC_LSTAT])
AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
- AC_REQUIRE([jm_FUNC_STAT])
- AC_REQUIRE([AC_FUNC_REALLOC])
- AC_REQUIRE([AC_FUNC_MALLOC])
AC_REQUIRE([AC_FUNC_STRERROR_R])
- AC_REQUIRE([jm_FUNC_NANOSLEEP])
- AC_REQUIRE([jm_FUNC_MEMCMP])
- AC_REQUIRE([gl_MEMCOLL])
- AC_REQUIRE([jm_FUNC_GLIBC_UNLOCKED_IO])
AC_REQUIRE([jm_FUNC_GROUP_MEMBER])
- AC_REQUIRE([jm_FUNC_PUTENV])
AC_REQUIRE([jm_AFS])
- AC_REQUIRE([jm_AC_PREREQ_XSTRTOUMAX])
- AC_REQUIRE([jm_AC_PREREQ_XSTRTOIMAX])
AC_REQUIRE([jm_AC_FUNC_LINK_FOLLOWS_SYMLINK])
- AC_REQUIRE([gl_FUNC_FNMATCH_GNU])
- AC_REQUIRE([jm_FUNC_GNU_STRFTIME])
AC_REQUIRE([jm_FUNC_FPENDING])
# This is for od and stat, and any other program that
@@ -86,38 +69,16 @@ AC_DEFUN([jm_MACROS],
AC_REQUIRE([AC_FUNC_FSEEKO])
AC_REQUIRE([AC_FUNC_ALLOCA])
- AC_REQUIRE([gl_FUNC_ALLOCA])
-
- AC_REQUIRE([gl_ERROR])
AC_CONFIG_LIBOBJ_DIR([lib])
- AC_FUNC_GETLOADAVG
+ AC_FUNC_GETLOADAVG([lib])
AC_REQUIRE([jm_SYS_PROC_UPTIME])
AC_REQUIRE([jm_FUNC_FTRUNCATE])
- AC_REQUIRE([vb_FUNC_RENAME])
-
- AC_REPLACE_FUNCS(strcasecmp strncasecmp)
- AC_REPLACE_FUNCS(dup2)
- AC_REPLACE_FUNCS(gethostname getusershell)
- AC_REPLACE_FUNCS(sig2str)
- AC_REPLACE_FUNCS(strcspn stpcpy strstr strtol strtoul)
- AC_REPLACE_FUNCS(strpbrk)
- AC_REPLACE_FUNCS(euidaccess memcmp rmdir rpmatch strndup strverscmp)
- AC_REPLACE_FUNCS(atexit)
- AC_REPLACE_FUNCS(getpass)
# raise is used by at least sort and ls.
AC_REPLACE_FUNCS(raise)
- dnl used by e.g. intl/*domain.c and lib/canon-host.c
- AC_REPLACE_FUNCS(strdup)
-
- AC_REPLACE_FUNCS(memchr memcpy memmove memrchr memset)
- AC_CHECK_FUNCS(getpagesize)
-
- AC_REQUIRE([UTILS_FUNC_MKSTEMP])
-
# By default, argmatch should fail calling usage (1).
AC_DEFINE(ARGMATCH_DIE, [usage (1)],
[Define to the function xargmatch calls on failures.])
@@ -130,37 +91,18 @@ AC_DEFUN([jm_MACROS],
AC_FUNC_SETVBUF_REVERSED
# used by sleep and shred
- # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
- # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
-
- # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
- # programs in the package would end up linked with that potentially-shared
- # library, inducing unnecessary run-time overhead.
- fetish_saved_libs=$LIBS
- AC_SEARCH_LIBS(clock_gettime, [rt posix4],
- [LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
- AC_SUBST(LIB_CLOCK_GETTIME)
- AC_CHECK_FUNCS(clock_gettime clock_settime)
- LIBS=$fetish_saved_libs
+ AC_REQUIRE([gl_CLOCK_TIME])
AC_CHECK_FUNCS(gettimeofday)
AC_FUNC_GETTIMEOFDAY_CLOBBER
AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID])
- AC_REQUIRE([jm_FUNC_UTIME])
- AC_REQUIRE([gl_FUNC_VASPRINTF])
- AC_REQUIRE([gl_FUNC_VASNPRINTF])
AC_CHECK_FUNCS( \
- bcopy \
endgrent \
endpwent \
- fchdir \
fdatasync \
- ftime \
ftruncate \
- getcwd \
gethrtime \
- getmntinfo \
hasmntopt \
isascii \
iswspace \
@@ -184,10 +126,6 @@ AC_DEFUN([jm_MACROS],
# for test.c
AC_CHECK_FUNCS(setreuid setregid)
- AM_FUNC_GETLINE
- gl_GETNDELIM2
- AC_FUNC_OBSTACK
-
AC_FUNC_STRTOD
AC_REQUIRE([UTILS_SYS_OPEN_MAX])
AC_REQUIRE([GL_FUNC_GETCWD_PATH_MAX])
@@ -217,13 +155,10 @@ AC_DEFUN([jm_MACROS],
jm_FUNC_UNLINK_BUSY_TEXT
# These tests are for df.
- jm_LIST_MOUNTED_FILESYSTEMS([list_mounted_fs=yes], [list_mounted_fs=no])
- jm_FSTYPENAME
- jm_FILE_SYSTEM_USAGE([space=yes], [space=no])
- if test $list_mounted_fs = yes && test $space = yes; then
+ AC_REQUIRE([gl_FSUSAGE])
+ AC_REQUIRE([gl_MOUNTLIST])
+ if test $gl_cv_list_mounted_fs = yes && test $gl_cv_fs_space = yes; then
DF_PROG='df$(EXEEXT)'
- AC_LIBOBJ(fsusage)
- AC_LIBOBJ(mountlist)
fi
AC_REQUIRE([jm_AC_DOS])
AC_REQUIRE([AC_FUNC_CANONICALIZE_FILE_NAME])
@@ -232,10 +167,6 @@ AC_DEFUN([jm_MACROS],
# use the corresponding stub.
AC_CHECK_FUNC([fchdir], , [AC_LIBOBJ(fchdir-stub)])
AC_CHECK_FUNC([fchown], , [AC_LIBOBJ(fchown-stub)])
- AC_CHECK_FUNC([lstat], , [AC_LIBOBJ(lstat-stub)])
- AC_CHECK_FUNC([readlink], , [AC_LIBOBJ(readlink-stub)])
- AC_REQUIRE([AM_STDBOOL_H])
-
])
# These tests must be run before any use of AC_CHECK_TYPE,
@@ -315,12 +246,9 @@ AC_DEFUN([jm_CHECK_ALL_TYPES],
])
AC_REQUIRE([AC_STRUCT_ST_BLOCKS])
- AC_REQUIRE([AC_STRUCT_TM])
- AC_REQUIRE([AC_STRUCT_TIMEZONE])
AC_REQUIRE([AC_HEADER_STAT])
AC_REQUIRE([AC_STRUCT_ST_MTIM_NSEC])
AC_REQUIRE([AC_STRUCT_ST_DM_MODE])
- AC_REQUIRE([gl_TIMESPEC])
AC_REQUIRE([AC_TYPE_GETGROUPS])
AC_REQUIRE([AC_TYPE_MODE_T])
diff --git a/m4/lchown.m4 b/m4/lchown.m4
index 9e4fb6fc5..e0875fc34 100644
--- a/m4/lchown.m4
+++ b/m4/lchown.m4
@@ -1,4 +1,4 @@
-#serial 2
+#serial 3
dnl From Jim Meyering.
dnl Provide lchown on systems that lack it.
@@ -7,4 +7,14 @@ AC_DEFUN([jm_FUNC_LCHOWN],
[
AC_REQUIRE([AC_TYPE_UID_T])
AC_REPLACE_FUNCS(lchown)
+ if test $ac_cv_func_lchown = no; then
+ gl_PREREQ_LCHOWN
+ fi
+])
+
+# Prerequisites of lib/lchown.c.
+AC_DEFUN([gl_PREREQ_LCHOWN],
+[
+ AC_REQUIRE([AC_HEADER_STAT])
+ :
])
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4
index 1532a2959..11d0ce773 100644
--- a/m4/lib-ld.m4
+++ b/m4/lib-ld.m4
@@ -1,4 +1,4 @@
-# lib-ld.m4 serial 2
+# lib-ld.m4 serial 2 (gettext-0.12)
dnl Copyright (C) 1996-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
@@ -29,6 +29,19 @@ AC_DEFUN([AC_LIB_PROG_LD],
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
@@ -67,7 +80,7 @@ else
fi
AC_CACHE_VAL(acl_cv_path_LD,
[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4
index 6b9425105..eeb200d26 100644
--- a/m4/lib-link.m4
+++ b/m4/lib-link.m4
@@ -1,5 +1,5 @@
-# lib-link.m4 serial 3 (gettext-0.11.3)
-dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
+# lib-link.m4 serial 4 (gettext-0.12)
+dnl Copyright (C) 2001-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
@@ -92,8 +92,7 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
dnl Determine the platform dependent parameters needed to use rpath:
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
-dnl hardcode_direct, hardcode_minus_L,
-dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
+dnl hardcode_direct, hardcode_minus_L.
AC_DEFUN([AC_LIB_RPATH],
[
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
@@ -114,8 +113,6 @@ AC_DEFUN([AC_LIB_RPATH],
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
hardcode_direct="$acl_cv_hardcode_direct"
hardcode_minus_L="$acl_cv_hardcode_minus_L"
- sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
- sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
dnl Determine whether the user wants rpath handling at all.
AC_ARG_ENABLE(rpath,
[ --disable-rpath do not hardcode runtime library paths],
@@ -135,7 +132,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
eval additional_includedir=\"$includedir\"
eval additional_libdir=\"$libdir\"
])
- AC_ARG_WITH([lib$1-prefix],
+ AC_LIB_ARG_WITH([lib$1-prefix],
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
--without-lib$1-prefix don't search for lib$1 in includedir and libdir],
[
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4
index b8b79ab9a..c719bc809 100644
--- a/m4/lib-prefix.m4
+++ b/m4/lib-prefix.m4
@@ -1,5 +1,5 @@
-# lib-prefix.m4 serial 1 (gettext-0.11)
-dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
+# lib-prefix.m4 serial 2 (gettext-0.12)
+dnl Copyright (C) 2001-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
@@ -8,6 +8,13 @@ dnl the same distribution terms as the rest of that program.
dnl From Bruno Haible.
+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+dnl require excessive bracketing.
+ifdef([AC_HELP_STRING],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
dnl to access previously installed libraries. The basic assumption is that
dnl a user will want packages to use other packages he previously installed
@@ -26,7 +33,7 @@ AC_DEFUN([AC_LIB_PREFIX],
eval additional_includedir=\"$includedir\"
eval additional_libdir=\"$libdir\"
])
- AC_ARG_WITH([lib-prefix],
+ AC_LIB_ARG_WITH([lib-prefix],
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
--without-lib-prefix don't search for libraries in includedir and libdir],
[
diff --git a/m4/longlong.m4 b/m4/longlong.m4
index daa95c075..d7d7350b3 100644
--- a/m4/longlong.m4
+++ b/m4/longlong.m4
@@ -1,4 +1,10 @@
-#serial 2
+# longlong.m4 serial 4
+dnl Copyright (C) 1999-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 From Paul Eggert.
@@ -7,29 +13,13 @@ dnl From Paul Eggert.
AC_DEFUN([jm_AC_TYPE_LONG_LONG],
[
AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
- [AC_TRY_LINK([long long ll = 1; int i = 63;],
+ [AC_TRY_LINK([long long ll = 1LL; int i = 63;],
[long long llmax = (long long) -1;
return ll << i | ll >> i | llmax / ll | llmax % ll;],
ac_cv_type_long_long=yes,
ac_cv_type_long_long=no)])
if test $ac_cv_type_long_long = yes; then
AC_DEFINE(HAVE_LONG_LONG, 1,
- [Define if you have the long long type.])
- fi
-])
-
-# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
-
-AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
-[
- AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
- [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
- [unsigned long long ullmax = (unsigned long long) -1;
- return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
- ac_cv_type_unsigned_long_long=yes,
- ac_cv_type_unsigned_long_long=no)])
- if test $ac_cv_type_unsigned_long_long = yes; then
- AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
- [Define if you have the unsigned long long type.])
+ [Define if you have the 'long long' type.])
fi
])
diff --git a/m4/ls-mntd-fs.m4 b/m4/ls-mntd-fs.m4
index 3ba42a315..26d64d74b 100644
--- a/m4/ls-mntd-fs.m4
+++ b/m4/ls-mntd-fs.m4
@@ -1,4 +1,4 @@
-#serial 12
+#serial 13
dnl From Jim Meyering.
dnl
@@ -10,7 +10,8 @@ dnl
AC_DEFUN([jm_LIST_MOUNTED_FILESYSTEMS],
[
AC_CHECK_FUNCS(listmntent getmntinfo)
-AC_CHECK_HEADERS(mntent.h sys/param.h sys/ucred.h sys/mount.h sys/fs_types.h)
+AC_CHECK_HEADERS_ONCE(sys/param.h)
+AC_CHECK_HEADERS(mntent.h sys/ucred.h sys/mount.h sys/fs_types.h)
getfsstat_includes="\
$ac_includes_default
#if HAVE_SYS_PARAM_H
@@ -63,7 +64,7 @@ yes
ac_list_mounted_fs=found
AC_DEFINE(MOUNTED_LISTMNTENT, 1,
[Define if there is a function named listmntent that can be used to
- list all mounted filesystems. (UNICOS)])
+ list all mounted filesystems. (UNICOS)])
fi
fi
@@ -79,8 +80,8 @@ if test -z "$ac_list_mounted_fs"; then
ac_list_mounted_fs=found
AC_DEFINE(MOUNTED_VMOUNT, 1,
[Define if there is a function named mntctl that can be used to read
- the list of mounted filesystems, and there is a system header file
- that declares `struct vmount.' (AIX)])
+ the list of mounted filesystems, and there is a system header file
+ that declares `struct vmount.' (AIX)])
fi
fi
@@ -117,9 +118,9 @@ if test $ac_cv_func_getmntent = yes; then
if test $fu_cv_sys_mounted_getmntent1 = yes; then
ac_list_mounted_fs=found
AC_DEFINE(MOUNTED_GETMNTENT1, 1,
- [Define if there is a function named getmntent for reading the list
- of mounted filesystems, and that function takes a single argument.
- (4.3BSD, SunOS, HP-UX, Dynix, Irix)])
+ [Define if there is a function named getmntent for reading the list
+ of mounted filesystems, and that function takes a single argument.
+ (4.3BSD, SunOS, HP-UX, Dynix, Irix)])
fi
fi
@@ -134,8 +135,8 @@ if test $ac_cv_func_getmntent = yes; then
if test $fu_cv_sys_mounted_getmntent2 = yes; then
ac_list_mounted_fs=found
AC_DEFINE(MOUNTED_GETMNTENT2, 1,
- [Define if there is a function named getmntent for reading the list of
- mounted filesystems, and that function takes two arguments. (SVR4)])
+ [Define if there is a function named getmntent for reading the list of
+ mounted filesystems, and that function takes two arguments. (SVR4)])
fi
fi
@@ -166,7 +167,7 @@ if test -z "$ac_list_mounted_fs"; then
ac_list_mounted_fs=found
AC_DEFINE(MOUNTED_GETFSSTAT, 1,
[Define if there is a function named getfsstat for reading the
- list of mounted filesystems. (DEC Alpha running OSF/1)])
+ list of mounted filesystems. (DEC Alpha running OSF/1)])
fi
fi
@@ -184,9 +185,9 @@ if test -z "$ac_list_mounted_fs"; then
if test $fu_cv_sys_mounted_fread_fstyp = yes; then
ac_list_mounted_fs=found
AC_DEFINE(MOUNTED_FREAD_FSTYP, 1,
-[Define if (like SVR2) there is no specific function for reading the
- list of mounted filesystems, and your system has these header files:
- <sys/fstyp.h> and <sys/statfs.h>. (SVR3)])
+ [Define if (like SVR2) there is no specific function for reading the
+ list of mounted filesystems, and your system has these header files:
+ <sys/fstyp.h> and <sys/statfs.h>. (SVR3)])
fi
fi
@@ -204,7 +205,7 @@ if test -z "$ac_list_mounted_fs"; then
ac_list_mounted_fs=found
AC_DEFINE(MOUNTED_GETMNTINFO, 1,
[Define if there is a function named getmntinfo for reading the
- list of mounted filesystems. (4.4BSD, Darwin)])
+ list of mounted filesystems. (4.4BSD, Darwin)])
fi
fi
@@ -222,7 +223,7 @@ if test -z "$ac_list_mounted_fs"; then
ac_list_mounted_fs=found
AC_DEFINE(MOUNTED_GETMNT, 1,
[Define if there is a function named getmnt for reading the list of
- mounted filesystems. (Ultrix)])
+ mounted filesystems. (Ultrix)])
fi
fi
@@ -243,7 +244,7 @@ if test -z "$ac_list_mounted_fs"; then
ac_list_mounted_fs=found
AC_DEFINE(MOUNTED_FS_STAT_DEV, 1,
[Define if there are functions named next_dev and fs_stat_dev for
- reading the list of mounted filesystems. (BeOS)])
+ reading the list of mounted filesystems. (BeOS)])
fi
fi
@@ -259,7 +260,8 @@ if test -z "$ac_list_mounted_fs"; then
ac_list_mounted_fs=found
AC_DEFINE(MOUNTED_FREAD, 1,
[Define if there is no specific function for reading the list of
- mounted filesystems. fread will be used to read /etc/mnttab. (SVR2) ])
+ mounted filesystems. fread will be used to read /etc/mnttab.
+ (SVR2) ])
fi
fi
diff --git a/m4/lstat.m4 b/m4/lstat.m4
index 3c87b9b2b..ea0c89494 100644
--- a/m4/lstat.m4
+++ b/m4/lstat.m4
@@ -1,4 +1,4 @@
-#serial 7
+#serial 9
dnl From Jim Meyering.
dnl Determine whether lstat has the bug that it succeeds when given the
@@ -11,30 +11,17 @@ dnl
AC_DEFUN([jm_FUNC_LSTAT],
[
- AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
- AC_CACHE_CHECK([whether lstat accepts an empty string],
- jm_cv_func_lstat_empty_string_bug,
- [AC_TRY_RUN([
-# include <sys/types.h>
-# include <sys/stat.h>
-
- int
- main ()
- {
- struct stat sbuf;
- exit (lstat ("", &sbuf) ? 1 : 0);
- }
- ],
- jm_cv_func_lstat_empty_string_bug=yes,
- jm_cv_func_lstat_empty_string_bug=no,
- dnl When crosscompiling, assume lstat is broken.
- jm_cv_func_lstat_empty_string_bug=yes)
- ])
- if test $jm_cv_func_lstat_empty_string_bug = yes; then
- AC_LIBOBJ(lstat)
- AC_DEFINE(HAVE_LSTAT_EMPTY_STRING_BUG, 1,
-[Define if lstat has the bug that it succeeds when given the zero-length
- file name argument. The lstat from SunOS4.1.4 and the Hurd as of 1998-11-01)
- do this. ])
+ AC_FUNC_LSTAT
+ dnl Note: AC_FUNC_LSTAT does AC_LIBOBJ(lstat).
+ if test $ac_cv_func_lstat_empty_string_bug = yes; then
+ gl_PREREQ_LSTAT
fi
])
+
+# Prerequisites of lib/lstat.c.
+AC_DEFUN([gl_PREREQ_LSTAT],
+[
+ AC_REQUIRE([AC_HEADER_STAT])
+ AC_CHECK_HEADERS_ONCE(stdlib.h)
+ AC_CHECK_DECLS_ONCE(free)
+])
diff --git a/m4/mbrtowc.m4 b/m4/mbrtowc.m4
index 037984763..21e9daaba 100644
--- a/m4/mbrtowc.m4
+++ b/m4/mbrtowc.m4
@@ -1,4 +1,4 @@
-# mbrtowc.m4 serial 4 (fileutils-4.1.3)
+# 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
@@ -8,6 +8,9 @@ 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],
diff --git a/m4/mbswidth.m4 b/m4/mbswidth.m4
index eaf552bf0..d7981ca39 100644
--- a/m4/mbswidth.m4
+++ b/m4/mbswidth.m4
@@ -1,13 +1,13 @@
-#serial 7
+#serial 9
dnl autoconf tests required for use of mbswidth.c
dnl From Bruno Haible.
-AC_DEFUN([jm_PREREQ_MBSWIDTH],
+AC_DEFUN([gl_MBSWIDTH],
[
- AC_REQUIRE([AC_HEADER_STDC])
- AC_CHECK_HEADERS(limits.h stdlib.h string.h wchar.h wctype.h)
- AC_CHECK_FUNCS(isascii iswcntrl iswprint mbsinit wcwidth)
+ 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,
diff --git a/m4/memcmp.m4 b/m4/memcmp.m4
index 1de340938..4442e47b6 100644
--- a/m4/memcmp.m4
+++ b/m4/memcmp.m4
@@ -1,9 +1,22 @@
-#serial 7
+# 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])dnl
- 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.])
- fi
+[
+ 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)
])
diff --git a/m4/mkdir-slash.m4 b/m4/mkdir-slash.m4
index 18f835a9d..3ca909e6c 100644
--- a/m4/mkdir-slash.m4
+++ b/m4/mkdir-slash.m4
@@ -1,4 +1,4 @@
-#serial 1
+#serial 2
# On some systems, mkdir ("foo/", 0700) fails because of the trailing slash.
# On such systems, arrange to use a wrapper function that removes any
@@ -31,5 +31,13 @@ AC_DEFUN([UTILS_FUNC_MKDIR_TRAILING_SLASH],
AC_LIBOBJ(mkdir)
AC_DEFINE(mkdir, rpl_mkdir,
[Define to rpl_mkdir if the replacement function should be used.])
+ gl_PREREQ_MKDIR
fi
])
+
+# Prerequisites of lib/mkdir.c.
+AC_DEFUN([gl_PREREQ_MKDIR],
+[
+ AC_CHECK_HEADERS_ONCE(stdlib.h string.h)
+ AC_CHECK_DECLS_ONCE(free)
+])
diff --git a/m4/mkstemp.m4 b/m4/mkstemp.m4
index 56729bec1..0322da349 100644
--- a/m4/mkstemp.m4
+++ b/m4/mkstemp.m4
@@ -1,4 +1,4 @@
-#serial 1
+#serial 3
# On some hosts (e.g., HP-UX 10.20, SunOS 4.1.4, Solaris 2.5.1), mkstemp has a
# silly limit that it can create no more than 26 files from a given template.
@@ -42,5 +42,24 @@ AC_DEFUN([UTILS_FUNC_MKSTEMP],
AC_LIBOBJ(tempname)
AC_DEFINE(mkstemp, rpl_mkstemp,
[Define to rpl_mkstemp if the replacement function should be used.])
+ gl_PREREQ_MKSTEMP
+ jm_PREREQ_TEMPNAME
fi
])
+
+# Prerequisites of lib/mkstemp.c.
+AC_DEFUN([gl_PREREQ_MKSTEMP],
+[
+])
+
+# Prerequisites of lib/tempname.c.
+AC_DEFUN([jm_PREREQ_TEMPNAME],
+[
+ AC_REQUIRE([AC_HEADER_STDC])
+ AC_REQUIRE([AC_HEADER_STAT])
+ AC_CHECK_HEADERS_ONCE(fcntl.h sys/time.h unistd.h)
+ AC_CHECK_HEADERS(stdint.h)
+ AC_CHECK_FUNCS(__secure_getenv gettimeofday)
+ AC_CHECK_DECLS_ONCE(getenv)
+ AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])
+])
diff --git a/m4/nanosleep.m4 b/m4/nanosleep.m4
index b431456c7..bfe8d5745 100644
--- a/m4/nanosleep.m4
+++ b/m4/nanosleep.m4
@@ -1,4 +1,4 @@
-#serial 8
+#serial 9
dnl From Jim Meyering.
dnl Check for the nanosleep function.
@@ -18,6 +18,7 @@ AC_DEFUN([jm_FUNC_NANOSLEEP],
jm_cv_func_nanosleep_works,
[
AC_REQUIRE([AC_HEADER_TIME])
+ AC_CHECK_HEADERS_ONCE(sys/time.h)
AC_TRY_RUN([
# if TIME_WITH_SYS_TIME
# include <sys/time.h>
@@ -48,7 +49,14 @@ AC_DEFUN([jm_FUNC_NANOSLEEP],
AC_LIBOBJ(nanosleep)
AC_DEFINE(nanosleep, rpl_nanosleep,
[Define to rpl_nanosleep if the replacement function should be used.])
+ gl_PREREQ_NANOSLEEP
fi
LIBS=$nanosleep_save_libs
])
+
+# Prerequisites of lib/nanosleep.c.
+AC_DEFUN([gl_PREREQ_NANOSLEEP],
+[
+ AC_CHECK_HEADERS_ONCE(unistd.h)
+])
diff --git a/m4/onceonly.m4 b/m4/onceonly.m4
index af56aa944..9fc510e06 100644
--- a/m4/onceonly.m4
+++ b/m4/onceonly.m4
@@ -1,5 +1,5 @@
-# onceonly.m4 serial 2
-dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# onceonly_2_57.m4 serial 3
+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
@@ -21,43 +21,66 @@ 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 Taken from Autoconf 2.50; can be removed once we assume 2.50 or later.
-define([m4_quote], [[$*]])
+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.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(defn([gl_HEADER_NAME]),
- [-./], [___])), [
- AC_CHECK_HEADERS(gl_HEADER_NAME)
+ 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_]defn([gl_FUNC_NAME]), [
- AC_CHECK_FUNCS(defn([gl_FUNC_NAME]))
+ 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_]defn([gl_FUNC_NAME]))
+ 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_]defn([gl_DECL_NAME]), [
- AC_CHECK_DECLS(defn([gl_DECL_NAME]))
+ AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [
+ AC_CHECK_DECLS(m4_defn([gl_DECL_NAME]))
])
- AC_REQUIRE([gl_CHECK_DECL_]defn([gl_DECL_NAME]))
+ AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]))
])
])
diff --git a/m4/prereq.m4 b/m4/prereq.m4
index 5ede549d8..83055eeb8 100644
--- a/m4/prereq.m4
+++ b/m4/prereq.m4
@@ -1,4 +1,4 @@
-#serial 34
+#serial 35
dnl We use jm_ for non Autoconf macros.
m4_pattern_forbid([^jm_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl
@@ -9,31 +9,116 @@ m4_pattern_forbid([^gl_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl
AC_DEFUN([jm_PREREQ],
[
- AC_REQUIRE([jm_PREREQ_ADDEXT])
-
# We don't yet use c-stack.c.
- # AC_REQUIRE([jm_PREREQ_C_STACK])
-
- AC_REQUIRE([jm_PREREQ_CANON_HOST])
- AC_REQUIRE([jm_PREREQ_DIRNAME])
- AC_REQUIRE([jm_PREREQ_ERROR])
- AC_REQUIRE([jm_PREREQ_EXCLUDE])
- AC_REQUIRE([jm_PREREQ_GETPAGESIZE])
- AC_REQUIRE([jm_PREREQ_HARD_LOCALE])
- AC_REQUIRE([jm_PREREQ_HASH])
+ # AC_REQUIRE([gl_C_STACK])
+
+ AC_REQUIRE([AM_FUNC_GETLINE])
+ AC_REQUIRE([AM_STDBOOL_H])
+ AC_REQUIRE([UTILS_FUNC_MKDIR_TRAILING_SLASH])
+ AC_REQUIRE([UTILS_FUNC_MKSTEMP])
+ AC_REQUIRE([gl_BACKUPFILE])
+ AC_REQUIRE([gl_CANON_HOST])
+ AC_REQUIRE([gl_CLOSEOUT])
+ AC_REQUIRE([gl_DIRNAME])
+ AC_REQUIRE([gl_ERROR])
+ AC_REQUIRE([gl_EXCLUDE])
+ AC_REQUIRE([gl_EXITFAIL])
+ AC_REQUIRE([gl_FILEBLOCKS])
+ AC_REQUIRE([gl_FILEMODE])
+ AC_REQUIRE([gl_FILE_TYPE])
+ AC_REQUIRE([gl_FSUSAGE])
+ AC_REQUIRE([gl_FUNC_ALLOCA])
+ AC_REQUIRE([gl_FUNC_ATEXIT])
+ AC_REQUIRE([gl_FUNC_DUP2])
+ AC_REQUIRE([gl_FUNC_EUIDACCESS])
+ AC_REQUIRE([gl_FUNC_FNMATCH_GNU])
+ AC_REQUIRE([gl_FUNC_GETHOSTNAME])
+ AC_REQUIRE([gl_FUNC_GETLOADAVG])
+ AC_REQUIRE([gl_FUNC_GETPASS])
+ AC_REQUIRE([gl_FUNC_GETUSERSHELL])
+ AC_REQUIRE([gl_FUNC_MEMCHR])
+ AC_REQUIRE([gl_FUNC_MEMCPY])
+ AC_REQUIRE([gl_FUNC_MEMMOVE])
+ AC_REQUIRE([gl_FUNC_MEMRCHR])
+ AC_REQUIRE([gl_FUNC_MEMSET])
+ AC_REQUIRE([gl_FUNC_MKTIME])
+ AC_REQUIRE([gl_FUNC_READLINK])
+ AC_REQUIRE([gl_FUNC_RMDIR])
+ AC_REQUIRE([gl_FUNC_RPMATCH])
+ AC_REQUIRE([gl_FUNC_SIG2STR])
+ AC_REQUIRE([gl_FUNC_STPCPY])
+ AC_REQUIRE([gl_FUNC_STRCSPN])
+ AC_REQUIRE([gl_FUNC_STRDUP])
+ AC_REQUIRE([gl_FUNC_STRNDUP])
+ AC_REQUIRE([gl_FUNC_STRNLEN])
+ AC_REQUIRE([gl_FUNC_STRPBRK])
+ AC_REQUIRE([gl_FUNC_STRSTR])
+ AC_REQUIRE([gl_FUNC_STRTOD])
+ AC_REQUIRE([gl_FUNC_STRTOIMAX])
+ AC_REQUIRE([gl_FUNC_STRTOLL])
+ AC_REQUIRE([gl_FUNC_STRTOL])
+ AC_REQUIRE([gl_FUNC_STRTOULL])
+ AC_REQUIRE([gl_FUNC_STRTOUL])
+ AC_REQUIRE([gl_FUNC_STRTOUMAX])
+ AC_REQUIRE([gl_FUNC_STRVERSCMP])
+ AC_REQUIRE([gl_FUNC_VASNPRINTF])
+ AC_REQUIRE([gl_FUNC_VASPRINTF])
+ AC_REQUIRE([gl_GETDATE])
+ AC_REQUIRE([gl_GETNDELIM2])
+ AC_REQUIRE([gl_GETOPT])
+ AC_REQUIRE([gl_GETPAGESIZE])
+ AC_REQUIRE([gl_HARD_LOCALE])
+ AC_REQUIRE([gl_HASH])
AC_REQUIRE([gl_HUMAN])
- AC_REQUIRE([jm_PREREQ_MBSWIDTH])
- AC_REQUIRE([jm_PREREQ_MEMCHR])
- AC_REQUIRE([jm_PREREQ_PHYSMEM])
- AC_REQUIRE([jm_PREREQ_POSIXVER])
- AC_REQUIRE([jm_PREREQ_QUOTEARG])
- AC_REQUIRE([jm_PREREQ_READUTMP])
- AC_REQUIRE([jm_PREREQ_STAT])
- AC_REQUIRE([jm_PREREQ_STRNLEN])
- AC_REQUIRE([jm_PREREQ_TEMPNAME]) # called by mkstemp
+ AC_REQUIRE([gl_MBSWIDTH])
+ AC_REQUIRE([gl_MEMCOLL])
+ AC_REQUIRE([gl_MODECHANGE])
+ AC_REQUIRE([gl_MOUNTLIST])
+ AC_REQUIRE([gl_OBSTACK])
+ AC_REQUIRE([gl_PATHMAX])
+ AC_REQUIRE([gl_PATH_CONCAT])
+ AC_REQUIRE([gl_PHYSMEM])
+ AC_REQUIRE([gl_POSIXTM])
+ AC_REQUIRE([gl_POSIXVER])
+ AC_REQUIRE([gl_QUOTEARG])
+ AC_REQUIRE([gl_QUOTE])
+ AC_REQUIRE([gl_READUTMP])
+ AC_REQUIRE([gl_REGEX])
+ AC_REQUIRE([gl_SAFE_READ])
+ AC_REQUIRE([gl_SAFE_WRITE])
+ AC_REQUIRE([gl_SAME])
+ AC_REQUIRE([gl_SAVEDIR])
+ AC_REQUIRE([gl_SAVE_CWD])
+ AC_REQUIRE([gl_SETTIME])
+ AC_REQUIRE([gl_SHA])
+ AC_REQUIRE([gl_STDIO_SAFER])
+ AC_REQUIRE([gl_STRCASE])
+ AC_REQUIRE([gl_TIMESPEC])
+ AC_REQUIRE([gl_UNICODEIO])
+ AC_REQUIRE([gl_UNISTD_SAFER])
+ AC_REQUIRE([gl_USERSPEC])
AC_REQUIRE([gl_UTIMENS])
- AC_REQUIRE([jm_PREREQ_XGETCWD])
- AC_REQUIRE([jm_PREREQ_XREADLINK])
+ AC_REQUIRE([gl_XALLOC])
+ AC_REQUIRE([gl_XGETCWD])
+ AC_REQUIRE([gl_XREADLINK])
+ AC_REQUIRE([gl_XSTRTOD])
+ AC_REQUIRE([gl_XSTRTOL])
+ AC_REQUIRE([gl_YESNO])
+ AC_REQUIRE([jm_FUNC_GLIBC_UNLOCKED_IO])
+ AC_REQUIRE([jm_FUNC_GNU_STRFTIME])
+ AC_REQUIRE([jm_FUNC_LSTAT])
+ AC_REQUIRE([jm_FUNC_MALLOC])
+ AC_REQUIRE([jm_FUNC_MEMCMP])
+ AC_REQUIRE([jm_FUNC_NANOSLEEP])
+ AC_REQUIRE([jm_FUNC_PUTENV])
+ AC_REQUIRE([jm_FUNC_REALLOC])
+ AC_REQUIRE([jm_FUNC_STAT])
+ AC_REQUIRE([jm_FUNC_UTIME])
+ AC_REQUIRE([jm_PREREQ_ADDEXT])
+ AC_REQUIRE([jm_PREREQ_STAT])
+ AC_REQUIRE([jm_XSTRTOIMAX])
+ AC_REQUIRE([jm_XSTRTOUMAX])
+ AC_REQUIRE([vb_FUNC_RENAME])
])
AC_DEFUN([jm_PREREQ_ADDEXT],
@@ -44,147 +129,6 @@ AC_DEFUN([jm_PREREQ_ADDEXT],
AC_CHECK_HEADERS(limits.h string.h unistd.h)
])
-AC_DEFUN([jm_PREREQ_CANON_HOST],
-[
- dnl Add any libraries as early as possible.
- dnl In particular, inet_ntoa needs -lnsl at least on Solaris5.5.1,
- dnl so we have to add -lnsl to LIBS before checking for that function.
- AC_SEARCH_LIBS(gethostbyname, [inet nsl])
-
- dnl These come from -lnsl on Solaris5.5.1.
- AC_CHECK_FUNCS(gethostbyname gethostbyaddr inet_ntoa)
-
- AC_CHECK_HEADERS(unistd.h string.h netdb.h sys/socket.h \
- netinet/in.h arpa/inet.h)
-])
-
-AC_DEFUN([jm_PREREQ_DIRNAME],
-[
- AC_REQUIRE([AC_HEADER_STDC])
- AC_CHECK_HEADERS(string.h)
-])
-
-AC_DEFUN([jm_PREREQ_EXCLUDE],
-[
- AC_REQUIRE([AC_FUNC_FNMATCH_GNU])
- AC_REQUIRE([AC_HEADER_STDBOOL])
-])
-
-AC_DEFUN([jm_PREREQ_GETPAGESIZE],
-[
- AC_CHECK_FUNCS(getpagesize)
- AC_CHECK_HEADERS(OS.h unistd.h)
-])
-
-AC_DEFUN([jm_PREREQ_HARD_LOCALE],
-[
- AC_CHECK_HEADERS(locale.h stdlib.h string.h)
- AC_CHECK_FUNCS(setlocale)
- AC_REQUIRE([AM_C_PROTOTYPES])
-])
-
-AC_DEFUN([jm_PREREQ_HASH],
-[
- AC_CHECK_HEADERS(stdlib.h)
- AC_REQUIRE([AC_HEADER_STDBOOL])
- AC_REQUIRE([jm_CHECK_DECLS])
-])
-
-AC_DEFUN([jm_PREREQ_MEMCHR],
-[
- AC_CHECK_HEADERS(limits.h stdlib.h bp-sym.h)
-])
-
-# Check for the external symbol, _system_configuration,
-# a struct with member `physmem'.
-AC_DEFUN([gl_SYS__SYSTEM_CONFIGURATION],
- [AC_CACHE_CHECK(for external symbol _system_configuration,
- gl_cv_var__system_configuration,
- [AC_LINK_IFELSE([AC_LANG_PROGRAM(
- [[#include <sys/systemcfg.h>
- ]],
- [double x = _system_configuration.physmem;])],
- [gl_cv_var__system_configuration=yes],
- [gl_cv_var__system_configuration=no])])
-
- if test $gl_cv_var__system_configuration = yes; then
- AC_DEFINE(HAVE__SYSTEM_CONFIGURATION, 1,
- [Define to 1 if you have the external variable,
- _system_configuration with a member named physmem.])
- fi
- ]
-)
-
-AC_DEFUN([jm_PREREQ_PHYSMEM],
-[
- AC_CHECK_HEADERS([unistd.h sys/pstat.h sys/sysmp.h sys/sysinfo.h \
- machine/hal_sysinfo.h sys/table.h sys/param.h sys/sysctl.h \
- sys/systemcfg.h],,, [AC_INCLUDES_DEFAULT])
- AC_CHECK_FUNCS(pstat_getstatic pstat_getdynamic sysmp getsysinfo sysctl table)
-
- AC_REQUIRE([gl_SYS__SYSTEM_CONFIGURATION])
-])
-
-AC_DEFUN([jm_PREREQ_POSIXVER],
-[
- AC_CHECK_HEADERS(unistd.h)
- AC_CHECK_DECLS([getenv])
-])
-
-AC_DEFUN([jm_PREREQ_QUOTEARG],
-[
- AC_CHECK_FUNCS(isascii iswprint)
- AC_REQUIRE([jm_FUNC_MBRTOWC])
- AC_REQUIRE([jm_FUNC_MEMCMP])
- AC_CHECK_HEADERS(limits.h stddef.h stdlib.h string.h wchar.h wctype.h)
- AC_REQUIRE([AC_HEADER_STDC])
- AC_REQUIRE([AC_C_BACKSLASH_A])
- AC_REQUIRE([AC_TYPE_MBSTATE_T])
- AC_REQUIRE([AM_C_PROTOTYPES])
-])
-
-AC_DEFUN([jm_PREREQ_READUTMP],
-[
- AC_REQUIRE([AC_HEADER_STDC])
- AC_CHECK_HEADERS(string.h utmp.h utmpx.h sys/param.h)
- AC_CHECK_FUNCS(utmpname)
- AC_CHECK_FUNCS(utmpxname)
- AC_REQUIRE([AM_C_PROTOTYPES])
-
- if test $ac_cv_header_utmp_h = yes || test $ac_cv_header_utmpx_h = yes; then
- utmp_includes="\
-$ac_includes_default
-#ifdef HAVE_UTMPX_H
-# include <utmpx.h>
-#endif
-#ifdef HAVE_UTMP_H
-# include <utmp.h>
-#endif
-"
- AC_CHECK_MEMBERS([struct utmpx.ut_user],,,[$utmp_includes])
- AC_CHECK_MEMBERS([struct utmp.ut_user],,,[$utmp_includes])
- AC_CHECK_MEMBERS([struct utmpx.ut_name],,,[$utmp_includes])
- AC_CHECK_MEMBERS([struct utmp.ut_name],,,[$utmp_includes])
- AC_CHECK_MEMBERS([struct utmpx.ut_type],,,[$utmp_includes])
- AC_CHECK_MEMBERS([struct utmp.ut_type],,,[$utmp_includes])
- AC_CHECK_MEMBERS([struct utmpx.ut_pid],,,[$utmp_includes])
- AC_CHECK_MEMBERS([struct utmp.ut_pid],,,[$utmp_includes])
- AC_CHECK_MEMBERS([struct utmpx.ut_id],,,[$utmp_includes])
- AC_CHECK_MEMBERS([struct utmp.ut_id],,,[$utmp_includes])
-
- AC_CHECK_MEMBERS([struct utmpx.ut_exit.ut_exit],,,[$utmp_includes])
- AC_CHECK_MEMBERS([struct utmp.ut_exit.ut_exit],,,[$utmp_includes])
- AC_CHECK_MEMBERS([struct utmpx.ut_exit.e_exit],,,[$utmp_includes])
- AC_CHECK_MEMBERS([struct utmp.ut_exit.e_exit],,,[$utmp_includes])
-
- AC_CHECK_MEMBERS([struct utmpx.ut_exit.ut_termination],,,[$utmp_includes])
- AC_CHECK_MEMBERS([struct utmp.ut_exit.ut_termination],,,[$utmp_includes])
- AC_CHECK_MEMBERS([struct utmpx.ut_exit.e_termination],,,[$utmp_includes])
- AC_CHECK_MEMBERS([struct utmp.ut_exit.e_termination],,,[$utmp_includes])
- AC_LIBOBJ(readutmp)
- fi
-])
-
AC_DEFUN([jm_PREREQ_STAT],
[
AC_CHECK_HEADERS(sys/sysmacros.h sys/statvfs.h sys/vfs.h inttypes.h)
@@ -230,41 +174,3 @@ $ac_includes_default
AC_CHECK_MEMBERS([struct statfs.f_namelen],,,[$statxfs_includes])
AC_CHECK_MEMBERS([struct statvfs.f_namelen],,,[$statxfs_includes])
])
-
-AC_DEFUN([jm_PREREQ_STRNLEN],
-[
- AC_REQUIRE([AC_FUNC_STRNLEN])
- AC_REQUIRE([AC_HEADER_STDC])
- AC_CHECK_HEADERS(memory.h)
- AC_CHECK_DECLS([memchr])
-
- # This is necessary because automake-1.6.1 doesn't understand
- # that the above use of AC_FUNC_STRNLEN means we may have to use
- # lib/strnlen.c.
- test $ac_cv_func_strnlen_working = yes \
- && AC_LIBOBJ(strnlen)
-])
-
-AC_DEFUN([jm_PREREQ_TEMPNAME],
-[
- AC_REQUIRE([AC_HEADER_STDC])
- AC_REQUIRE([AC_HEADER_STAT])
- AC_CHECK_HEADERS(fcntl.h sys/time.h stdint.h unistd.h)
- AC_CHECK_FUNCS(__secure_getenv gettimeofday)
- AC_CHECK_DECLS([getenv])
- AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])
-])
-
-AC_DEFUN([jm_PREREQ_XGETCWD],
-[
- AC_REQUIRE([AC_C_PROTOTYPES])
- AC_CHECK_HEADERS(limits.h stdlib.h sys/param.h unistd.h)
- AC_CHECK_FUNCS(getcwd)
- AC_REQUIRE([AC_FUNC_GETCWD_NULL])
-])
-
-AC_DEFUN([jm_PREREQ_XREADLINK],
-[
- AC_REQUIRE([AC_C_PROTOTYPES])
- AC_CHECK_HEADERS(limits.h stdlib.h sys/types.h unistd.h)
-])
diff --git a/m4/progtest.m4 b/m4/progtest.m4
index 74c08088d..8fe527cec 100644
--- a/m4/progtest.m4
+++ b/m4/progtest.m4
@@ -1,4 +1,4 @@
-# progtest.m4 serial 3
+# progtest.m4 serial 3 (gettext-0.12)
dnl Copyright (C) 1996-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
@@ -23,31 +23,63 @@ dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
-[# Extract the first word of "$2", so it can be a program name with args.
+[
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2
AC_MSG_CHECKING([for $ac_word])
AC_CACHE_VAL(ac_cv_path_$1,
[case "[$]$1" in
- /*)
- ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
- ;;
+ [[\\/]]* | ?:[[\\/]]*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in ifelse([$5], , $PATH, [$5]); do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if [$3]; then
- ac_cv_path_$1="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
dnl If no 4th arg is given, leave the cache variable unset,
dnl so AC_PATH_PROGS will keep looking.
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
])dnl
- ;;
+ ;;
esac])dnl
$1="$ac_cv_path_$1"
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
diff --git a/m4/putenv.m4 b/m4/putenv.m4
index 39a6e7568..5a7aa4c16 100644
--- a/m4/putenv.m4
+++ b/m4/putenv.m4
@@ -1,10 +1,15 @@
-#serial 5
+# putenv.m4 serial 6
+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
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.
-dnl
AC_DEFUN([jm_FUNC_PUTENV],
[AC_CACHE_CHECK([for SVID conformant putenv], jm_cv_func_svid_putenv,
@@ -36,5 +41,13 @@ AC_DEFUN([jm_FUNC_PUTENV],
AC_LIBOBJ(putenv)
AC_DEFINE(putenv, rpl_putenv,
[Define to rpl_putenv if the replacement function should be used.])
+ gl_PREREQ_PUTENV
fi
])
+
+# Prerequisites of lib/putenv.c.
+AC_DEFUN([gl_PREREQ_PUTENV], [
+ AC_CHECK_HEADERS_ONCE(string.h unistd.h)
+ AC_CHECK_FUNCS_ONCE(memcpy)
+ AC_CHECK_FUNCS(strchr)
+])
diff --git a/m4/readdir.m4 b/m4/readdir.m4
index df48ab1ab..8a29e58bc 100644
--- a/m4/readdir.m4
+++ b/m4/readdir.m4
@@ -1,4 +1,4 @@
-#serial 5
+#serial 6
dnl SunOS's readdir is broken in such a way that rm.c has to add extra code
dnl to test whether a NULL return value really means there are no more files
@@ -18,7 +18,7 @@ dnl Written by Jim Meyering.
AC_DEFUN([GL_FUNC_READDIR],
[dnl
AC_REQUIRE([AC_HEADER_DIRENT])
-AC_CHECK_HEADERS(string.h)
+AC_CHECK_HEADERS_ONCE(string.h)
AC_CACHE_CHECK([for working readdir], gl_cv_func_working_readdir,
[dnl
# Arrange for deletion of the temporary directory this test creates, in
@@ -130,6 +130,6 @@ AC_CACHE_CHECK([for working readdir], gl_cv_func_working_readdir,
if test $gl_cv_func_working_readdir = yes; then
AC_DEFINE(HAVE_WORKING_READDIR, 1,
-[Define if readdir is found to work properly in some unusual cases. ])
+ [Define if readdir is found to work properly in some unusual cases. ])
fi
])
diff --git a/m4/regex.m4 b/m4/regex.m4
index 41c3c8705..93efa3af4 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -1,4 +1,4 @@
-#serial 17
+#serial 19
dnl Initially derived from code in GNU grep.
dnl Mostly written by Jim Meyering.
diff --git a/m4/rename.m4 b/m4/rename.m4
index 4ce7f472d..a2e0d74fd 100644
--- a/m4/rename.m4
+++ b/m4/rename.m4
@@ -1,4 +1,4 @@
-#serial 3
+#serial 5
dnl From Volker Borchert.
dnl Determine whether rename works for source paths with a trailing slash.
@@ -33,8 +33,18 @@ AC_DEFUN([vb_FUNC_RENAME],
])
if test $vb_cv_func_rename_trailing_slash_bug = yes; then
AC_LIBOBJ(rename)
+ AC_DEFINE(rename, rpl_rename,
+ [Define to rpl_rename if the replacement function should be used.])
AC_DEFINE(RENAME_TRAILING_SLASH_BUG, 1,
-[Define if rename does not work for source paths with a trailing slash,
- like the one from SunOS 4.1.1_U1.])
+ [Define if rename does not work for source paths with a trailing slash,
+ like the one from SunOS 4.1.1_U1.])
+ gl_PREREQ_RENAME
fi
])
+
+# Prerequisites of lib/rename.c.
+AC_DEFUN([gl_PREREQ_RENAME],
+[
+ AC_CHECK_HEADERS_ONCE(stdlib.h string.h)
+ AC_CHECK_DECLS_ONCE(free)
+])
diff --git a/m4/stat.m4 b/m4/stat.m4
index ba93e6e8f..bdfee5cb3 100644
--- a/m4/stat.m4
+++ b/m4/stat.m4
@@ -1,4 +1,4 @@
-#serial 7
+#serial 9
dnl From Jim Meyering.
dnl Determine whether stat has the bug that it succeeds when given the
@@ -11,30 +11,15 @@ dnl
AC_DEFUN([jm_FUNC_STAT],
[
- AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
- AC_CACHE_CHECK([whether stat accepts an empty string],
- jm_cv_func_stat_empty_string_bug,
- [AC_TRY_RUN([
-# include <sys/types.h>
-# include <sys/stat.h>
-
- int
- main ()
- {
- struct stat sbuf;
- exit (stat ("", &sbuf) ? 1 : 0);
- }
- ],
- jm_cv_func_stat_empty_string_bug=yes,
- jm_cv_func_stat_empty_string_bug=no,
- dnl When crosscompiling, assume stat is broken.
- jm_cv_func_stat_empty_string_bug=yes)
- ])
- if test $jm_cv_func_stat_empty_string_bug = yes; then
- AC_LIBOBJ(stat)
- AC_DEFINE(HAVE_STAT_EMPTY_STRING_BUG, 1,
-[Define if stat has the bug that it succeeds when given the zero-length
- file name argument. The stat from SunOS4.1.4 and the Hurd as of 1998-11-01)
- do this. ])
+ AC_FUNC_STAT
+ dnl Note: AC_FUNC_STAT does AC_LIBOBJ(stat).
+ if test $ac_cv_func_stat_empty_string_bug = yes; then
+ gl_PREREQ_STAT
fi
])
+
+# Prerequisites of lib/stat.c.
+AC_DEFUN([gl_PREREQ_STAT],
+[
+ :
+])
diff --git a/m4/tzset.m4 b/m4/tzset.m4
index ca93899cd..6df4eb7f9 100644
--- a/m4/tzset.m4
+++ b/m4/tzset.m4
@@ -52,13 +52,7 @@ main ()
[Define to 1 if you have run the test for working tzset.])
if test $gl_cv_func_tzset_clobber = yes; then
- # Caution: the following few lines should be the same
- # as those in gettimeofday.m4.
- AC_LIBOBJ(gettimeofday)
- AC_DEFINE(gmtime, rpl_gmtime,
- [Define to rpl_gmtime if the replacement function should be used.])
- AC_DEFINE(localtime, rpl_localtime,
- [Define to rpl_localtime if the replacement function should be used.])
+ gl_GETTIMEOFDAY_REPLACE_LOCALTIME
AC_DEFINE(tzset, rpl_tzset,
[Define to rpl_tzset if the wrapper function should be used.])
diff --git a/m4/utimbuf.m4 b/m4/utimbuf.m4
index 4ea49523e..21724aafb 100644
--- a/m4/utimbuf.m4
+++ b/m4/utimbuf.m4
@@ -1,4 +1,4 @@
-#serial 4
+#serial 5
dnl From Jim Meyering
@@ -8,7 +8,7 @@ dnl Some systems have utime.h but don't declare the struct anywhere.
AC_DEFUN([jm_CHECK_TYPE_STRUCT_UTIMBUF],
[
- AC_CHECK_HEADERS(utime.h)
+ AC_CHECK_HEADERS_ONCE(sys/time.h utime.h)
AC_REQUIRE([AC_HEADER_TIME])
AC_CACHE_CHECK([for struct utimbuf], fu_cv_sys_struct_utimbuf,
[AC_TRY_COMPILE(
@@ -34,7 +34,7 @@ AC_DEFUN([jm_CHECK_TYPE_STRUCT_UTIMBUF],
if test $fu_cv_sys_struct_utimbuf = yes; then
AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1,
-[Define if struct utimbuf is declared -- usually in <utime.h>.
- Some systems have utime.h but don't declare the struct anywhere. ])
+ [Define if struct utimbuf is declared -- usually in <utime.h>.
+ Some systems have utime.h but don't declare the struct anywhere. ])
fi
])
diff --git a/m4/utime.m4 b/m4/utime.m4
index 34a0d1a1b..e3a159faf 100644
--- a/m4/utime.m4
+++ b/m4/utime.m4
@@ -1,4 +1,4 @@
-#serial 3
+#serial 5
dnl From Jim Meyering
dnl Replace the utime function on systems that need it.
@@ -7,12 +7,19 @@ dnl FIXME
AC_DEFUN([jm_FUNC_UTIME],
[
- AC_CHECK_HEADERS(utime.h)
- AC_REQUIRE([jm_CHECK_TYPE_STRUCT_UTIMBUF])
AC_REQUIRE([AC_FUNC_UTIME_NULL])
-
if test $ac_cv_func_utime_null = no; then
- jm_FUNC_UTIMES_NULL
- AC_REPLACE_FUNCS(utime)
+ AC_LIBOBJ(utime)
+ AC_DEFINE(utime, rpl_utime,
+ [Define to rpl_utime if the replacement function should be used.])
+ gl_PREREQ_UTIME
fi
])
+
+# Prerequisites of lib/utime.c.
+AC_DEFUN([gl_PREREQ_UTIME],
+[
+ AC_CHECK_HEADERS_ONCE(utime.h)
+ AC_REQUIRE([jm_CHECK_TYPE_STRUCT_UTIMBUF])
+ jm_FUNC_UTIMES_NULL
+])
diff --git a/m4/vasnprintf.m4 b/m4/vasnprintf.m4
index 0b405aeaf..2cbee3af9 100644
--- a/m4/vasnprintf.m4
+++ b/m4/vasnprintf.m4
@@ -1,4 +1,4 @@
-# vasnprintf.m4 serial 1
+# vasnprintf.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
@@ -50,10 +50,7 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF],
AC_REQUIRE([gt_TYPE_LONGDOUBLE])
AC_REQUIRE([gt_TYPE_WCHAR_T])
AC_REQUIRE([gt_TYPE_WINT_T])
- AC_CHECK_FUNCS(snprintf)
-
- # Solaris 2.5.1 needs -lw to get the wcslen function.
- AC_SEARCH_LIBS(wcslen, [w])
+ AC_CHECK_FUNCS(snprintf wcslen)
])
# Prerequisites of lib/asnprintf.c.
diff --git a/m4/xstrtoimax.m4 b/m4/xstrtoimax.m4
index 438e8528d..38b4c561b 100644
--- a/m4/xstrtoimax.m4
+++ b/m4/xstrtoimax.m4
@@ -1,41 +1,9 @@
-#serial 2
+#serial 3
dnl Cloned from xstrtoumax.m4. Keep these files in sync.
-# autoconf tests required for use of xstrtoimax.c
-
-AC_DEFUN([jm_AC_PREREQ_XSTRTOIMAX],
+AC_DEFUN([jm_XSTRTOIMAX],
[
+ dnl Prerequisites of lib/xstrtoimax.c.
AC_REQUIRE([jm_AC_TYPE_INTMAX_T])
- AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])
- AC_REQUIRE([jm_AC_TYPE_LONG_LONG])
- AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
- AC_CHECK_DECLS([strtol, strtoul, strtoll, strtoimax, strtoumax])
- AC_CHECK_HEADERS(limits.h stdlib.h inttypes.h)
-
- AC_CACHE_CHECK([whether <inttypes.h> defines strtoimax as a macro],
- jm_cv_func_strtoimax_macro,
- AC_EGREP_CPP([inttypes_h_defines_strtoimax], [#include <inttypes.h>
-#ifdef strtoimax
- inttypes_h_defines_strtoimax
-#endif],
- jm_cv_func_strtoimax_macro=yes,
- jm_cv_func_strtoimax_macro=no))
-
- if test "$jm_cv_func_strtoimax_macro" != yes; then
- AC_REPLACE_FUNCS(strtoimax)
- fi
-
- dnl Only the replacement strtoimax invokes strtol and strtoll,
- dnl so we need the replacements only if strtoimax does not exist.
- case "$jm_cv_func_strtoimax_macro,$ac_cv_func_strtoimax" in
- no,no)
- AC_REPLACE_FUNCS(strtol)
-
- dnl We don't need (and can't compile) the replacement strtoll
- dnl unless the type `long long' exists.
- if test "$ac_cv_type_long_long" = yes; then
- AC_REPLACE_FUNCS(strtoll)
- fi
- ;;
- esac
+ AC_REQUIRE([gl_PREREQ_XSTRTOL])
])
diff --git a/m4/xstrtoumax.m4 b/m4/xstrtoumax.m4
index 9ab71ec6d..4f41061f1 100644
--- a/m4/xstrtoumax.m4
+++ b/m4/xstrtoumax.m4
@@ -1,40 +1,9 @@
-#serial 4
+#serial 5
+dnl Cloned from xstrtoimax.m4. Keep these files in sync.
-# autoconf tests required for use of xstrtoumax.c
-
-AC_DEFUN([jm_AC_PREREQ_XSTRTOUMAX],
+AC_DEFUN([jm_XSTRTOUMAX],
[
- AC_REQUIRE([jm_AC_TYPE_INTMAX_T])
+ dnl Prerequisites of lib/xstrtoumax.c.
AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])
- AC_REQUIRE([jm_AC_TYPE_LONG_LONG])
- AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
- AC_CHECK_DECLS([strtol, strtoul, strtoull, strtoimax, strtoumax])
- AC_CHECK_HEADERS(limits.h stdlib.h inttypes.h)
-
- AC_CACHE_CHECK([whether <inttypes.h> defines strtoumax as a macro],
- jm_cv_func_strtoumax_macro,
- AC_EGREP_CPP([inttypes_h_defines_strtoumax], [#include <inttypes.h>
-#ifdef strtoumax
- inttypes_h_defines_strtoumax
-#endif],
- jm_cv_func_strtoumax_macro=yes,
- jm_cv_func_strtoumax_macro=no))
-
- if test "$jm_cv_func_strtoumax_macro" != yes; then
- AC_REPLACE_FUNCS(strtoumax)
- fi
-
- dnl Only the replacement strtoumax invokes strtoul and strtoull,
- dnl so we need the replacements only if strtoumax does not exist.
- case "$jm_cv_func_strtoumax_macro,$ac_cv_func_strtoumax" in
- no,no)
- AC_REPLACE_FUNCS(strtoul)
-
- dnl We don't need (and can't compile) the replacement strtoull
- dnl unless the type `unsigned long long' exists.
- if test "$ac_cv_type_unsigned_long_long" = yes; then
- AC_REPLACE_FUNCS(strtoull)
- fi
- ;;
- esac
+ AC_REQUIRE([gl_PREREQ_XSTRTOL])
])