summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-08-21 07:30:45 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-08-21 07:30:45 +0000
commit05e03fc6560278ba81f78f397a00319e9df5a5ca (patch)
treeab6aba763c2b2fa08236105ad511b3800f1df3ea /m4
parent0f7a044109b860443ecaa4f8a37652b1b4423057 (diff)
downloadcoreutils-05e03fc6560278ba81f78f397a00319e9df5a5ca.tar.xz
Add a bootstrap procedure, so that the CVS version contains fewer
files and we bootstrap the rest from gnulib, gettext, etc. * README-cvs: New file. * bootstrap: New file. * bootstrap.conf: New file. * .x-sc_trailing_blank: Remove config-log, .gdb-history. Add .po. * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit of gnulib-tool. (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL): (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib. (gl_EARLY): Add. (gl_MACROS): Call just after gl_EARLY, just for clarity. * src/c99-to-c98.diff: Remove patch to ls.c; no longer needed. * src/kill.c (strtoimax): Remove decl. * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves. * src/wc.c: Likewise. * src/ls.c (sort_files): Rewrite to avoid need for C99-style declaration, so that we don't need to patch this file. * src/printf.c (strtoimax, strtoumax): Remove decls. * src/su.c: Include getpass.h. (getpass): remove. * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h. Include inttypes.h unconditionally; remove decls it handles. * lib/Makefile.am: include gnulib.mk, so that we can remove most of this file. (AM_CPPFLAGS): Don't mention -I$(srcdir), since that's now done for us. (noinst_LIBRARIES, LDDADD, DEFS): Remove. (libcoreutils_a_SOURCES): Trim down greatly, just to the files that aren't in gnulib. Remove defns gnulib does for us. * m4/check-decl.m4 (gl_CHECK_DECLS): Don't include stdio.h, string.h, stdlib.h, unistd.h, sys/time.h, time.h. Use AC_CHECK_DECLS_ONCE for free, getenv, geteuid, getlogin, getuid, lseek, malloc, memchr, realloc. Don't check for getutent, memrchr, nanosleep, stpcpy, strndup, strnlen, strstr, strtoul, strtoull. (_gl_DECL_HEADERS): Remove; all uses removed. * m4/jm-macros.m4 (gl_MACROS): Move AC_PREREQ into configure.ac for the benefit of gnulib-tool. Call gl_INIT. Do not call or require macros that gnulib will handle for us. Don't check for fchmod, hasmntopt, isascii, lchown, listmntent, mempcpy, realpath, wcrtomb, tzset. (gl_CHECK_ALL_HEADERS): Don't check for sys/statvfs.h, sys/vfs.h, sys/mount.h. (gl_CHECK_ALL_TYPES): Require AC_TYPE_UNSIGNED_LONG_LONG_INT. Don't check for struct stat.st_blksize. Don't require AC_STRUCT_ST_DM_MODE, gt_TYPE_SSIZE_T, gl_AC_TYPE_UINT32_T, gl_AC_TYPE_UINTMAX_T, gl_AC_TYPE_UINTPTR_T, gl_AC_TYPE_UNSIGNED_LONG_LONG. * m4/prereq.m4 (gl_PREREQ): Require gl_FUNC_XFTS, gl_ROOT_DEV_INO. Don't require macros that gnulib does for us. * m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Don't check for sys/sysmacros.h. Don't check for statvfs. Use AC_CHECK_HEADERS_ONCE for netinet/in.h, nfs/nfs_clnt.h, nfs/vfs.h. Don't require gl_AC_TYPE_LONG_LONG, gt_HEADER_INTTYPES_H.
Diffstat (limited to 'm4')
-rw-r--r--m4/ChangeLog135
-rw-r--r--m4/check-decl.m459
-rw-r--r--m4/jm-macros.m494
-rw-r--r--m4/prereq.m4171
-rw-r--r--m4/stat-prog.m411
5 files changed, 172 insertions, 298 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog
index a531c6665..7d9763744 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,138 @@
+2006-08-20 Paul Eggert <eggert@cs.ucla.edu>
+
+ Add a bootstrap procedure, so that the CVS version contains fewer
+ files and we bootstrap the rest from gnulib, gettext, etc.
+ * check-decl.m4 (gl_CHECK_DECLS):
+ Don't include stdio.h, string.h, stdlib.h, unistd.h, sys/time.h,
+ time.h. Use AC_CHECK_DECLS_ONCE for free, getenv, geteuid, getlogin,
+ getuid, lseek, malloc, memchr, realloc. Don't check for getutent,
+ memrchr, nanosleep, stpcpy, strndup, strnlen, strstr, strtoul,
+ strtoull.
+ (_gl_DECL_HEADERS): Remove; all uses removed.
+ * jm-macros.m4 (gl_MACROS): Move AC_PREREQ into configure.ac
+ for the benefit of gnulib-tool. Call gl_INIT.
+ Do not call or require the following, since gnulib now does this:
+ gl_HOST_OS, gl_ASSERT, gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE,
+ gl_CHECK_TYPE_STRUCT_DIRENT_D_INO, gl_FUNC_DIRFD, AC_FUNC_ACL,
+ gl_FUNC_LCHMOD, gl_FUNC_LCHOWN, gl_FUNC_RMDIR_NOTEMPTY,
+ gl_FUNC_CHOWN, AC_FUNC_LSTAT, AC_FUNC_STRERROR_R,
+ gl_FUNC_GROUP_MEMBER, gl_AC_FUNC_LINK_FOLLOWS_SYMLINK,
+ gl_FUNC_FPENDING, gt_INTTYPES_PRI, gl_ULLONG_MAX,
+ gl_FUNC_GETGROUPS, AC_FUNC_ALLOCA, AC_FUNC_GETLOADAVG,
+ gl_SYS_PROC_UPTIME, gl_FUNC_FTRUNCATE, AC_REPLACE_FUNCS(raise),
+ AC_CHECK_FUNCS_ONCE(gettimeofday), AC_FUNC_GETTIMEOFDAY_CLOBBER,
+ AC_FUNC_CLOSEDIR_VOID, AC_FUNC_STRTOD, gl_GLIBC21, AM_ICONV,
+ gl_FUNC_UNLINK_BUSY_TEXT, gl_FSUSAGE, gl_MOUNTLIST, gl_AC_DOS,
+ AC_FUNC_CANONICALIZE_FILE_NAME, gl_FUNC_FREE, gl_FUNC_CHDIR_LONG,
+ gl_FUNC_XFTS, gl_ROOT_DEV_INO, gl_VERSION_ETC, gl_DIACRIT,
+ gl_TYPE_SOCKLEN_T, gl_FPRINTFTIME, gl_CHDIR_SAFER.
+ Don't check for fchmod, hasmntopt, isascii, lchown, listmntent,
+ mempcpy, realpath, wcrtomb, tzset.
+ (gl_CHECK_ALL_HEADERS): Don't check for sys/statvfs.h, sys/vfs.h,
+ sys/mount.h.
+ (gl_CHECK_ALL_TYPES): Require AC_TYPE_UNSIGNED_LONG_LONG_INT.
+ Don't check for struct stat.st_blksize.
+ Don't require AC_STRUCT_ST_DM_MODE, gt_TYPE_SSIZE_T,
+ gl_AC_TYPE_UINT32_T, gl_AC_TYPE_UINTMAX_T, gl_AC_TYPE_UINTPTR_T,
+ gl_AC_TYPE_UNSIGNED_LONG_LONG.
+ * prereq.m4 (gl_PREREQ): Require gl_FUNC_XFTS, gl_ROOT_DEV_INO.
+ Don't require AM_STDBOOL_H, gl_ALLOCSA, gl_BACKUPFILE,
+ gl_BASENAME, gl_C_STRTOD, gl_C_STRTOLD, gl_CANON_HOST, gl_CLOEXEC,
+ gl_CLOSE_STREAM, gl_CLOSEOUT, gl_DIRNAME, gl_ERROR, gl_EXCLUDE,
+ gl_EXITFAIL, gl_FCNTL_SAFER, gl_FILEBLOCKS, gl_FILEMODE,
+ gl_FILE_NAME_CONCAT, gl_FILE_TYPE, gl_FSUSAGE, gl_FOPEN_SAFER,
+ gl_FUNC_ALLOCA, gl_FUNC_ATEXIT, gl_FUNC_DUP2, gl_FUNC_FNMATCH_GNU,
+ gl_FUNC_GETHOSTNAME, gl_FUNC_GETLINE, AC_FUNC_GETLOADAVG,
+ gl_FUNC_GETPASS_GNU, gl_FUNC_GETUSERSHELL, gl_FUNC_LSTAT,
+ gl_FUNC_MEMCHR, gl_FUNC_MEMCPY, gl_FUNC_MEMMOVE, gl_FUNC_MEMPCPY,
+ gl_FUNC_MEMRCHR, gl_FUNC_MEMSET, gl_FUNC_MKDIR_TRAILING_SLASH,
+ gl_FUNC_MKTIME, gl_FUNC_MKSTEMP,
+ gl_FUNC_READLINK, gl_FUNC_RMDIR, gl_FUNC_RPMATCH, gt_FUNC_SETENV,
+ gl_FUNC_SIG2STR, gl_FUNC_SNPRINTF, gl_FUNC_STPCPY,
+ gl_FUNC_STRCSPN, gl_FUNC_STRDUP, gl_FUNC_STRNDUP, gl_FUNC_STRNLEN,
+ gl_FUNC_STRPBRK, gl_FUNC_STRSTR, gl_FUNC_STRTOD,
+ gl_FUNC_STRTOIMAX, gl_FUNC_STRTOLL, gl_FUNC_STRTOL,
+ gl_FUNC_STRTOULL, gl_FUNC_STRTOUL, gl_FUNC_STRTOUMAX,
+ gl_FUNC_STRVERSCMP, gl_FUNC_TZSET_CLOBBER, gl_FUNC_VASNPRINTF,
+ gl_FUNC_VASPRINTF, gl_FUNC_WCWIDTH, gl_GETADDRINFO, gl_GETDATE,
+ gl_GETHRXTIME, gl_GETNDELIM2, gl_GETOPT, gl_GETPAGESIZE,
+ gl_GETTIME, gl_GETUGROUPS, gl_HARD_LOCALE, gl_HASH, gl_HASH_PJW,
+ gl_HEADER_ARPA_INET, gl_HEADER_NETINET_IN, gl_HEADER_SYS_SOCKET,
+ gl_HUMAN, gl_IDCACHE, gl_INET_NTOP, gl_INTTOSTR, gl_LINEBUFFER,
+ gl_LOCALCHARSET, gl_LONG_OPTIONS, gl_MBCHAR, gl_MBITER,
+ gl_MBSWIDTH, gl_MD5, gl_MEMCOLL, gl_MKANCESDIRS, gl_MKDIR_PARENTS,
+ gl_MODECHANGE, gl_MOUNTLIST, gl_OBSTACK, gl_PATHMAX, gl_PHYSMEM,
+ gl_POSIXTM, gl_POSIXVER, gl_QUOTEARG, gl_QUOTE, gl_READTOKENS,
+ gl_READUTMP, gl_REGEX, gl_SAFE_READ, gl_SAFE_WRITE, gl_SAME,
+ gl_SAVEDIR, gl_SAVE_CWD, gl_SETTIME, gl_SHA1, gl_STAT_MACROS,
+ gl_STAT_TIME, gl_STDARG_H, gl_STDINT_H, gl_STDLIB_SAFER,
+ gl_STRCASE, gl_STRIPSLASH, gl_TIMESPEC, gl_TIME_R,
+ gl_TYPE_SOCKLEN_T, gl_UNICODEIO, gl_UNISTD_SAFER, gl_UNLINKDIR,
+ gl_USERSPEC, gl_UTIMECMP, gl_UTIMENS, gl_XALLOC, gl_XGETCWD,
+ gl_XNANOSLEEP, gl_XREADLINK, gl_XSTRTOD, gl_XSTRTOL, gl_XSTRTOLD,
+ gl_YESNO, AC_FUNC_CALLOC, gl_FUNC_GLIBC_UNLOCKED_IO,
+ gl_FUNC_GNU_STRFTIME, AC_FUNC_MALLOC, gl_FUNC_MEMCMP,
+ gl_FUNC_NANOSLEEP, gl_FUNC_PUTENV, AC_FUNC_REALLOC, gl_FUNC_UTIME,
+ gl_XSTRTOIMAX, gl_XSTRTOUMAX, vb_FUNC_RENAME, gl_FUNC_FTS,
+ gl_MEMCASECMP, gl_STRIPSLASH, gl_LINEBUFFER, gl_ARGMATCH,
+ gl_CYCLE_CHECK, gl_EUIDACCESS_STAT, since gnulib handles this.
+ * stat-prog.m4 (cu_PREREQ_STAT_PROG): Don't check for
+ sys/sysmacros.h. Don't check for statvfs. Use AC_CHECK_HEADERS_ONCE
+ for netinet/in.h, nfs/nfs_clnt.h, nfs/vfs.h.
+ Don't require gl_AC_TYPE_LONG_LONG, gt_HEADER_INTTYPES_H.
+
+ * absolute-header.m4, acl.m4, alloca.m4, allocsa.m4, arpa_inet_h.m4:
+ * assert.m4, atexit.m4, backupfile.m4, basename.m4, bison.m4:
+ * c-strtod.m4, c.m4, calloc.m4, canon-host.m4, canonicalize.m4:
+ * chdir-long.m4, chdir-safer.m4, chown.m4, clock_time.m4:
+ * cloexec.m4, close-stream.m4, closeout.m4, codeset.m4:
+ * cycle-check.m4, d-ino.m4, d-type.m4, dev-ino.m4, diacrit.m4:
+ * dirfd.m4, dirname.m4, dos.m4, double-slash-root.m4, dup2.m4:
+ * eealloc.m4, eoverflow.m4, error.m4, euidaccess.m4, exclude.m4:
+ * exitfail.m4, extensions.m4, fcntl-safer.m4, file-type.m4:
+ * fileblocks.m4, filemode.m4, filenamecat.m4, fnmatch.m4:
+ * fpending.m4, fprintftime.m4, free.m4, fstypename.m4, fsusage.m4:
+ * ftruncate.m4, fts.m4, getaddrinfo.m4, getcwd-abort-bug.m4:
+ * getcwd-path-max.m4, getcwd.m4, getdate.m4, getdelim.m4:
+ * getgroups.m4, gethostname.m4, gethrxtime.m4, getline.m4:
+ * getndelim2.m4, getopt.m4, getpagesize.m4, getpass.m4, gettext.m4:
+ * gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4:
+ * glibc21.m4, group-member.m4, hard-locale.m4, hash-pjw.m4, hash.m4:
+ * host-os.m4, human.m4, iconv.m4, idcache.m4, inet_ntop.m4:
+ * intmax_t.m4, inttostr.m4, inttypes-h.m4, inttypes-pri.m4:
+ * inttypes.m4, inttypes_h.m4, isc-posix.m4, jm-winsz1.m4:
+ * jm-winsz2.m4, lchmod.m4, lchown.m4, lib-ignore.m4, lib-ld.m4:
+ * lib-link.m4, lib-prefix.m4, linebuffer.m4, link-follow.m4:
+ * localcharset.m4, long-options.m4, longdouble.m4, longlong.m4:
+ * ls-mntd-fs.m4, lstat.m4, mbchar.m4, mbiter.m4, mbrtowc.m4:
+ * mbstate_t.m4, mbswidth.m4, md5.m4, memcasecmp.m4, memchr.m4:
+ * memcmp.m4, memcoll.m4, memcpy.m4, memmove.m4, mempcpy.m4:
+ * memrchr.m4, memset.m4, mkancesdirs.m4, mkdir-p.m4, mkdir-slash.m4:
+ * mkstemp.m4, mktime.m4, modechange.m4, mountlist.m4, nanosleep.m4:
+ * netinet_in_h.m4, nls.m4, obstack.m4, openat.m4, pathmax.m4:
+ * perl.m4, physmem.m4, po.m4, posixtm.m4, posixver.m4, progtest.m4:
+ * putenv.m4, quote.m4, quotearg.m4, readlink.m4, readtokens.m4:
+ * readutmp.m4, regex.m4, rename.m4, rmdir-errno.m4, rmdir.m4:
+ * rpmatch.m4, safe-read.m4, safe-write.m4, same-inode.m4, same.m4:
+ * save-cwd.m4, savedir.m4, setenv.m4, settime.m4, sha1.m4:
+ * sig2str.m4, signed.m4, snprintf.m4, socklen.m4, sockpfaf.m4:
+ * ssize_t.m4, st_dm_mode.m4, stat-macros.m4, stat-time.m4:
+ * stdarg.m4, stdbool.m4, stdint.m4, stdint_h.m4, stdio-safer.m4:
+ * stdlib-safer.m4, stpcpy.m4, strcase.m4, strcspn.m4, strdup.m4:
+ * strftime.m4, stripslash.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:
+ * sys_socket_h.m4, time_r.m4, timespec.m4, tm_gmtoff.m4, tzset.m4:
+ * uint32_t.m4, uintmax_t.m4, uintptr_t.m4, ullong_max.m4:
+ * ulonglong.m4, unicodeio.m4, unistd-safer.m4, unlink-busy.m4:
+ * unlinkdir.m4, unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4:
+ * utime.m4, utimecmp.m4, utimens.m4, utimes-null.m4, utimes.m4:
+ * vasnprintf.m4, vasprintf.m4, version-etc.m4, wchar_t.m4:
+ * wcwidth.m4, wint_t.m4, xalloc.m4, xgetcwd.m4, xnanosleep.m4:
+ * xreadlink.m4, xstrtod.m4, xstrtoimax.m4, xstrtol.m4:
+ * xstrtoumax.m4, yesno.m4:
+ Remove from CVS, since ../bootstrap generates them automatically.
+
2006-08-18 Bruno Haible <bruno@clisp.org>
* ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
diff --git a/m4/check-decl.m4 b/m4/check-decl.m4
index 0c714edc3..d5203529d 100644
--- a/m4/check-decl.m4
+++ b/m4/check-decl.m4
@@ -1,4 +1,4 @@
-#serial 22
+#serial 23
# Check declarations for this package.
dnl Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
@@ -14,30 +14,13 @@ dnl Putting it in a separate file like this helps share it between
dnl different packages.
AC_DEFUN([gl_CHECK_DECLS],
[
- AC_REQUIRE([_gl_DECL_HEADERS])
AC_REQUIRE([AC_HEADER_TIME])
- headers='
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <unistd.h>
+ AC_CHECK_HEADERS_ONCE(grp.h pwd.h)
+ headers='
#include <sys/types.h>
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
-#endif
-#if HAVE_UTMP_H
-# include <utmp.h>
-#endif
+#include <unistd.h>
#if HAVE_GRP_H
# include <grp.h>
@@ -47,36 +30,20 @@ AC_DEFUN([gl_CHECK_DECLS],
# include <pwd.h>
#endif
'
-
AC_CHECK_DECLS([
- free,
- getenv,
- geteuid,
getgrgid,
- getlogin,
getpwuid,
- getuid,
- getutent,
- lseek,
- malloc,
- memchr,
- memrchr,
- nanosleep,
- realloc,
- stpcpy,
- strndup,
- strnlen,
- strstr,
- strtoul,
- strtoull,
ttyname], , , $headers)
AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
-])
-dnl FIXME: when autoconf has support for it.
-dnl This is a little helper so we can require these header checks.
-AC_DEFUN([_gl_DECL_HEADERS],
-[
- AC_CHECK_HEADERS_ONCE(grp.h pwd.h sys/time.h utmp.h)
+ AC_CHECK_DECLS_ONCE([free])
+ AC_CHECK_DECLS_ONCE([getenv])
+ AC_CHECK_DECLS_ONCE([geteuid])
+ AC_CHECK_DECLS_ONCE([getlogin])
+ AC_CHECK_DECLS_ONCE([getuid])
+ AC_CHECK_DECLS_ONCE([lseek])
+ AC_CHECK_DECLS_ONCE([malloc])
+ AC_CHECK_DECLS_ONCE([memchr])
+ AC_CHECK_DECLS_ONCE([realloc])
])
diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4
index ad7177a96..0b63c4641 100644
--- a/m4/jm-macros.m4
+++ b/m4/jm-macros.m4
@@ -1,4 +1,4 @@
-#serial 102 -*- autoconf -*-
+#serial 103 -*- autoconf -*-
dnl Misc type-related macros for coreutils.
@@ -23,7 +23,7 @@ dnl Misc type-related macros for coreutils.
AC_DEFUN([gl_MACROS],
[
- AC_PREREQ(2.60)
+ gl_INIT
GNU_PACKAGE="GNU $PACKAGE"
AC_DEFINE_UNQUOTED(GNU_PACKAGE, "$GNU_PACKAGE",
@@ -40,44 +40,13 @@ AC_DEFUN([gl_MACROS],
gl_CHECK_ALL_TYPES
- AC_REQUIRE([gl_HOST_OS])
- AC_REQUIRE([gl_ASSERT])
- AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE])
- AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO])
AC_REQUIRE([gl_CHECK_DECLS])
AC_REQUIRE([gl_PREREQ])
- AC_REQUIRE([gl_FUNC_DIRFD])
- AC_REQUIRE([AC_FUNC_ACL])
- AC_REQUIRE([gl_FUNC_LCHMOD])
- AC_REQUIRE([gl_FUNC_LCHOWN])
- AC_REQUIRE([gl_FUNC_RMDIR_NOTEMPTY])
- AC_REQUIRE([gl_FUNC_CHOWN])
- AC_REQUIRE([AC_FUNC_LSTAT])
- AC_REQUIRE([AC_FUNC_STRERROR_R])
- AC_REQUIRE([gl_FUNC_GROUP_MEMBER])
- AC_REQUIRE([gl_AC_FUNC_LINK_FOLLOWS_SYMLINK])
- AC_REQUIRE([gl_FUNC_FPENDING])
-
- # This is for od and stat, and any other program that
- # uses the PRI.MAX macros from inttypes.h.
- AC_REQUIRE([gt_INTTYPES_PRI])
- AC_REQUIRE([gl_ULLONG_MAX])
-
- AC_REQUIRE([gl_FUNC_GETGROUPS])
-
AC_REQUIRE([AC_FUNC_FSEEKO])
- AC_REQUIRE([AC_FUNC_ALLOCA])
AC_CONFIG_LIBOBJ_DIR([lib])
- AC_FUNC_GETLOADAVG([lib])
-
- AC_REQUIRE([gl_SYS_PROC_UPTIME])
- AC_REQUIRE([gl_FUNC_FTRUNCATE])
-
- # raise is used by at least sort and ls.
- AC_REPLACE_FUNCS(raise)
# By default, argmatch should fail calling usage (1).
AC_DEFINE(ARGMATCH_DIE, [usage (1)],
@@ -85,35 +54,22 @@ AC_DEFUN([gl_MACROS],
AC_DEFINE(ARGMATCH_DIE_DECL, [extern void usage ()],
[Define to the declaration of the xargmatch failure function.])
- dnl Used to define SETVBUF in sys2.h.
- dnl This evokes the following warning from autoconf:
- dnl ...: warning: AC_TRY_RUN called without default to allow cross compiling
+ dnl Used to define SETVBUF in ../src/system.h.
AC_FUNC_SETVBUF_REVERSED
- # used by sleep and shred
+ # used by ls
AC_REQUIRE([gl_CLOCK_TIME])
- AC_CHECK_FUNCS_ONCE(gettimeofday)
- AC_FUNC_GETTIMEOFDAY_CLOBBER
# used by shred
AC_CHECK_FUNCS_ONCE(directio)
- AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID])
-
AC_CHECK_FUNCS_ONCE( \
endgrent \
endpwent \
- fchmod \
fchown \
ftruncate \
- hasmntopt \
- isascii \
iswspace \
- lchown \
- listmntent \
- mempcpy \
mkfifo \
mbrlen \
- realpath \
setgroups \
sethostname \
siginterrupt \
@@ -121,12 +77,8 @@ AC_DEFUN([gl_MACROS],
sysctl \
sysinfo \
tcgetpgrp \
- wcrtomb \
- tzset \
)
- AC_FUNC_STRTOD
-
AC_REQUIRE([cu_PREREQ_STAT_PROG])
# for dd.c and shred.c
@@ -157,32 +109,15 @@ AC_DEFUN([gl_MACROS],
])
AC_REQUIRE([AM_LANGINFO_CODESET])
- AC_REQUIRE([gl_GLIBC21])
- AM_ICONV
- gl_FUNC_UNLINK_BUSY_TEXT
- # These tests are for df.
- AC_REQUIRE([gl_FSUSAGE])
- AC_REQUIRE([gl_MOUNTLIST])
+ # Build df only if there's a point to it.
if test $gl_cv_list_mounted_fs = yes && test $gl_cv_fs_space = yes; then
DF_PROG='df$(EXEEXT)'
fi
- AC_REQUIRE([gl_AC_DOS])
- AC_REQUIRE([AC_FUNC_CANONICALIZE_FILE_NAME])
# If any of these functions don't exist (e.g. DJGPP 2.03),
# use the corresponding stub.
AC_CHECK_FUNC([fchdir], , [AC_LIBOBJ(fchdir-stub)])
-
- AC_REQUIRE([gl_FUNC_FREE])
- AC_REQUIRE([gl_FUNC_CHDIR_LONG])
- AC_REQUIRE([gl_FUNC_XFTS])
- AC_REQUIRE([gl_ROOT_DEV_INO])
- AC_REQUIRE([gl_VERSION_ETC])
- AC_REQUIRE([gl_DIACRIT])
- AC_REQUIRE([gl_TYPE_SOCKLEN_T])
- AC_REQUIRE([gl_FPRINTFTIME])
- AC_REQUIRE([gl_CHDIR_SAFER])
])
AC_DEFUN([gl_CHECK_ALL_HEADERS],
@@ -195,15 +130,13 @@ AC_DEFUN([gl_CHECK_ALL_HEADERS],
sys/ioctl.h \
sys/param.h \
sys/resource.h \
- sys/statvfs.h \
sys/systeminfo.h \
sys/time.h \
- sys/vfs.h \
sys/wait.h \
syslog.h \
termios.h \
)
- AC_CHECK_HEADERS(sys/mount.h sys/sysctl.h, [], [],
+ AC_CHECK_HEADERS(sys/sysctl.h, [], [],
[AC_INCLUDES_DEFAULT
[#if HAVE_SYS_PARAM_H
#include <sys/param.h>
@@ -228,18 +161,16 @@ AC_DEFUN([gl_CHECK_ALL_TYPES],
AC_REQUIRE([AC_C_VOLATILE])
AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_C_LONG_DOUBLE])
+ AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
AC_REQUIRE([gl_CHECK_ALL_HEADERS])
AC_CHECK_MEMBERS(
- [struct stat.st_author,
- struct stat.st_blksize],,,
+ [struct stat.st_author],,,
[$ac_includes_default
#include <sys/stat.h>
])
AC_REQUIRE([AC_STRUCT_ST_BLOCKS])
- AC_REQUIRE([AC_STRUCT_ST_DM_MODE])
-
AC_REQUIRE([AC_TYPE_GETGROUPS])
AC_REQUIRE([AC_TYPE_MBSTATE_T])
AC_REQUIRE([AC_TYPE_MODE_T])
@@ -249,17 +180,10 @@ AC_DEFUN([gl_CHECK_ALL_TYPES],
AC_REQUIRE([AC_TYPE_UID_T])
AC_CHECK_TYPE(ino_t, unsigned long int)
- gt_TYPE_SSIZE_T
-
- dnl This relies on the fact that autoconf 2.14a's implementation of
+ dnl This relies on the fact that Autoconf's implementation of
dnl AC_CHECK_TYPE checks includes unistd.h.
AC_CHECK_TYPE(major_t, unsigned int)
AC_CHECK_TYPE(minor_t, unsigned int)
- AC_REQUIRE([gl_AC_TYPE_UINT32_T])
- AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])
- AC_REQUIRE([gl_AC_TYPE_UINTPTR_T])
- AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG])
-
AC_REQUIRE([AC_HEADER_MAJOR])
])
diff --git a/m4/prereq.m4 b/m4/prereq.m4
index 116372bbc..d3ecc90eb 100644
--- a/m4/prereq.m4
+++ b/m4/prereq.m4
@@ -1,4 +1,4 @@
-#serial 72
+#serial 73
dnl We use gl_ for non Autoconf macros.
m4_pattern_forbid([^gl_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl
@@ -7,7 +7,7 @@ m4_pattern_forbid([^gl_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl
# directory of the coreutils package.
-# Copyright (C) 1998 2000, 2001, 2003, 2004, 2005, 2006 Free Software
+# Copyright (C) 1998, 2000, 2001, 2003, 2004, 2005, 2006 Free Software
# Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -29,172 +29,25 @@ m4_pattern_forbid([^gl_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl
AC_DEFUN([gl_PREREQ],
[
- # We don't yet use c-stack.c.
+ # gnulib settings.
+ AC_REQUIRE([gl_FUNC_NONREENTRANT_EUIDACCESS])
+
+ # We don't use c-stack.c.
# AC_REQUIRE([gl_C_STACK])
- AC_REQUIRE([AM_STDBOOL_H])
- AC_REQUIRE([gl_ALLOCSA])
- AC_REQUIRE([gl_BACKUPFILE])
- AC_REQUIRE([gl_BASENAME])
- AC_REQUIRE([gl_C_STRTOD])
- AC_REQUIRE([gl_C_STRTOLD])
- AC_REQUIRE([gl_CANON_HOST])
- AC_REQUIRE([gl_CLOEXEC])
- AC_REQUIRE([gl_CLOSE_STREAM])
- AC_REQUIRE([gl_CLOSEOUT])
- AC_REQUIRE([gl_DIRNAME])
- AC_REQUIRE([gl_ERROR])
- AC_REQUIRE([gl_EXCLUDE])
- AC_REQUIRE([gl_EXITFAIL])
- AC_REQUIRE([gl_FCNTL_SAFER])
+ # Invoke macros of modules that may migrate into gnulib.
+ # There's no need to list gnulib modules here, since gnulib-tool
+ # handles that; see ../bootstrap.conf.
+ AC_REQUIRE([gl_EUIDACCESS_STAT])
AC_REQUIRE([gl_FD_REOPEN])
- AC_REQUIRE([gl_FILEBLOCKS])
- AC_REQUIRE([gl_FILEMODE])
- AC_REQUIRE([gl_FILE_NAME_CONCAT])
- AC_REQUIRE([gl_FILE_TYPE])
- AC_REQUIRE([gl_FSUSAGE])
- AC_REQUIRE([gl_FOPEN_SAFER])
- AC_REQUIRE([gl_FUNC_ALLOCA])
- AC_REQUIRE([gl_FUNC_ATEXIT])
- AC_REQUIRE([gl_FUNC_DUP2])
- AC_REQUIRE([gl_FUNC_FNMATCH_GNU])
- AC_REQUIRE([gl_FUNC_GETHOSTNAME])
- AC_REQUIRE([gl_FUNC_GETLINE])
- AC_REQUIRE([AC_FUNC_GETLOADAVG])
- AC_REQUIRE([gl_FUNC_GETPASS_GNU])
- AC_REQUIRE([gl_FUNC_GETUSERSHELL])
- AC_REQUIRE([gl_FUNC_LSTAT])
- AC_REQUIRE([gl_FUNC_MEMCHR])
- AC_REQUIRE([gl_FUNC_MEMCPY])
- AC_REQUIRE([gl_FUNC_MEMMOVE])
- AC_REQUIRE([gl_FUNC_MEMPCPY])
- AC_REQUIRE([gl_FUNC_MEMRCHR])
- AC_REQUIRE([gl_FUNC_MEMSET])
- AC_REQUIRE([gl_FUNC_MKDIR_TRAILING_SLASH])
- AC_REQUIRE([gl_FUNC_MKTIME])
- AC_REQUIRE([gl_FUNC_MKSTEMP])
- AC_REQUIRE([gl_FUNC_NONREENTRANT_EUIDACCESS])
- AC_REQUIRE([gl_FUNC_READLINK])
- AC_REQUIRE([gl_FUNC_RMDIR])
- AC_REQUIRE([gl_FUNC_RPMATCH])
- AC_REQUIRE([gt_FUNC_SETENV])
- AC_REQUIRE([gl_FUNC_SIG2STR])
- AC_REQUIRE([gl_FUNC_SNPRINTF])
- 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_TZSET_CLOBBER])
- AC_REQUIRE([gl_FUNC_VASNPRINTF])
- AC_REQUIRE([gl_FUNC_VASPRINTF])
- AC_REQUIRE([gl_FUNC_WCWIDTH])
- AC_REQUIRE([gl_GETADDRINFO])
- AC_REQUIRE([gl_GETDATE])
- AC_REQUIRE([gl_GETHRXTIME])
- AC_REQUIRE([gl_GETNDELIM2])
- AC_REQUIRE([gl_GETOPT])
- AC_REQUIRE([gl_GETPAGESIZE])
- AC_REQUIRE([gl_GETTIME])
- AC_REQUIRE([gl_GETUGROUPS])
- AC_REQUIRE([gl_HARD_LOCALE])
- AC_REQUIRE([gl_HASH])
- AC_REQUIRE([gl_HASH_PJW])
- AC_REQUIRE([gl_HEADER_ARPA_INET])
- AC_REQUIRE([gl_HEADER_NETINET_IN])
- AC_REQUIRE([gl_HEADER_SYS_SOCKET])
- AC_REQUIRE([gl_HUMAN])
- AC_REQUIRE([gl_IDCACHE])
- AC_REQUIRE([gl_INET_NTOP])
- AC_REQUIRE([gl_INTTOSTR])
- AC_REQUIRE([gl_LINEBUFFER])
- AC_REQUIRE([gl_LOCALCHARSET])
- AC_REQUIRE([gl_LONG_OPTIONS])
- AC_REQUIRE([gl_MBCHAR])
- AC_REQUIRE([gl_MBITER])
- AC_REQUIRE([gl_MBSWIDTH])
- AC_REQUIRE([gl_MD5])
- AC_REQUIRE([gl_MEMCOLL])
+ AC_REQUIRE([gl_FUNC_XFTS])
AC_REQUIRE([gl_MEMXFRM])
- AC_REQUIRE([gl_MKANCESDIRS])
- AC_REQUIRE([gl_MKDIR_PARENTS])
- AC_REQUIRE([gl_MODECHANGE])
- AC_REQUIRE([gl_MOUNTLIST])
- AC_REQUIRE([gl_OBSTACK])
- AC_REQUIRE([gl_PATHMAX])
- AC_REQUIRE([gl_PHYSMEM])
- AC_REQUIRE([gl_POSIXTM])
- AC_REQUIRE([gl_POSIXVER])
- AC_REQUIRE([gl_QUOTEARG])
- AC_REQUIRE([gl_QUOTE])
AC_REQUIRE([gl_RANDINT])
AC_REQUIRE([gl_RANDPERM])
AC_REQUIRE([gl_RANDREAD])
- AC_REQUIRE([gl_READTOKENS])
- 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_SHA1])
+ AC_REQUIRE([gl_ROOT_DEV_INO])
AC_REQUIRE([gl_SHA256])
AC_REQUIRE([gl_SHA512])
- AC_REQUIRE([gl_STAT_MACROS])
- AC_REQUIRE([gl_STAT_TIME])
- AC_REQUIRE([gl_STDARG_H])
- AC_REQUIRE([gl_STDINT_H])
- AC_REQUIRE([gl_STDLIB_SAFER])
- AC_REQUIRE([gl_STRCASE])
AC_REQUIRE([gl_STRINTCMP])
AC_REQUIRE([gl_STRNUMCMP])
- AC_REQUIRE([gl_STRIPSLASH])
- AC_REQUIRE([gl_TIMESPEC])
- AC_REQUIRE([gl_TIME_R])
- AC_REQUIRE([gl_TYPE_SOCKLEN_T])
- AC_REQUIRE([gl_UNICODEIO])
- AC_REQUIRE([gl_UNISTD_SAFER])
- AC_REQUIRE([gl_UNLINKDIR])
- AC_REQUIRE([gl_USERSPEC])
- AC_REQUIRE([gl_UTIMECMP])
- AC_REQUIRE([gl_UTIMENS])
- AC_REQUIRE([gl_XALLOC])
- AC_REQUIRE([gl_XGETCWD])
- AC_REQUIRE([gl_XNANOSLEEP])
- AC_REQUIRE([gl_XREADLINK])
- AC_REQUIRE([gl_XSTRTOD])
- AC_REQUIRE([gl_XSTRTOL])
- AC_REQUIRE([gl_XSTRTOLD])
- AC_REQUIRE([gl_YESNO])
- AC_REQUIRE([AC_FUNC_CALLOC])
- AC_REQUIRE([gl_FUNC_GLIBC_UNLOCKED_IO])
- AC_REQUIRE([gl_FUNC_GNU_STRFTIME])
- AC_REQUIRE([AC_FUNC_MALLOC])
- AC_REQUIRE([gl_FUNC_MEMCMP])
- AC_REQUIRE([gl_FUNC_NANOSLEEP])
- AC_REQUIRE([gl_FUNC_PUTENV])
- AC_REQUIRE([AC_FUNC_REALLOC])
- AC_REQUIRE([gl_FUNC_UTIME])
- AC_REQUIRE([gl_XSTRTOIMAX])
- AC_REQUIRE([gl_XSTRTOUMAX])
- AC_REQUIRE([vb_FUNC_RENAME])
- AC_REQUIRE([gl_FUNC_FTS])
- AC_REQUIRE([gl_MEMCASECMP])
- AC_REQUIRE([gl_STRIPSLASH])
- AC_REQUIRE([gl_LINEBUFFER])
- AC_REQUIRE([gl_ARGMATCH])
- AC_REQUIRE([gl_CYCLE_CHECK])
- AC_REQUIRE([gl_EUIDACCESS_STAT])
])
diff --git a/m4/stat-prog.m4 b/m4/stat-prog.m4
index 4505f54a3..17ec1e958 100644
--- a/m4/stat-prog.m4
+++ b/m4/stat-prog.m4
@@ -1,4 +1,4 @@
-# stat-prog.m4 serial 3
+# stat-prog.m4 serial 4
# Record the prerequisites of src/stat.c from the coreutils package.
# Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
@@ -21,20 +21,15 @@
AC_DEFUN([cu_PREREQ_STAT_PROG],
[
- AC_CHECK_HEADERS_ONCE(sys/param.h sys/sysmacros.h sys/statvfs.h sys/vfs.h)
+ AC_CHECK_HEADERS_ONCE(sys/param.h sys/statvfs.h sys/vfs.h)
AC_CHECK_HEADERS(sys/mount.h, [], [],
[AC_INCLUDES_DEFAULT
[#if HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif]])
- AC_CHECK_FUNCS_ONCE(statvfs)
# For `struct statfs' on Ultrix 4.4.
- AC_CHECK_HEADERS([netinet/in.h nfs/nfs_clnt.h nfs/vfs.h],,,
- [AC_INCLUDES_DEFAULT])
-
- AC_REQUIRE([gl_AC_TYPE_LONG_LONG])
- AC_REQUIRE([gt_HEADER_INTTYPES_H])
+ AC_CHECK_HEADERS_ONCE([netinet/in.h nfs/nfs_clnt.h nfs/vfs.h])
statxfs_includes="\
$ac_includes_default