summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2007-03-22 21:23:21 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2007-03-22 21:23:21 +0000
commitcbf5993c43f49281173f185863577d86bfac6eae (patch)
tree90737c96cf15b97273a2bdc5950b3cf09f1d94ca /m4
downloadcoreutils-tarball-cbf5993c43f49281173f185863577d86bfac6eae.tar.gz
coreutils-6.9coreutils-6.9
Diffstat (limited to 'm4')
-rw-r--r--m4/ChangeLog5000
-rw-r--r--m4/absolute-header.m444
-rw-r--r--m4/acl.m478
-rw-r--r--m4/alloca.m450
-rw-r--r--m4/allocsa.m415
-rw-r--r--m4/argmatch.m410
-rw-r--r--m4/arpa_inet_h.m418
-rw-r--r--m4/assert.m419
-rw-r--r--m4/atexit.m418
-rw-r--r--m4/autobuild.m434
-rw-r--r--m4/backupfile.m416
-rw-r--r--m4/base64.m416
-rw-r--r--m4/bison.m424
-rw-r--r--m4/boottime.m465
-rw-r--r--m4/c-strtod.m453
-rw-r--r--m4/calloc.m443
-rw-r--r--m4/canon-host.m415
-rw-r--r--m4/canonicalize.m417
-rw-r--r--m4/chdir-long.m438
-rw-r--r--m4/check-decl.m449
-rw-r--r--m4/chown.m483
-rw-r--r--m4/clock_time.m430
-rw-r--r--m4/cloexec.m410
-rw-r--r--m4/close-stream.m413
-rw-r--r--m4/closeout.m413
-rw-r--r--m4/codeset.m421
-rw-r--r--m4/config-h.m413
-rw-r--r--m4/cycle-check.m411
-rw-r--r--m4/d-ino.m435
-rw-r--r--m4/d-type.m435
-rw-r--r--m4/dirfd.m474
-rw-r--r--m4/dirname.m418
-rw-r--r--m4/dos.m471
-rw-r--r--m4/double-slash-root.m438
-rw-r--r--m4/dup2.m415
-rw-r--r--m4/eealloc.m432
-rw-r--r--m4/eoverflow.m470
-rw-r--r--m4/error.m422
-rw-r--r--m4/euidaccess-stat.m411
-rw-r--r--m4/euidaccess.m447
-rw-r--r--m4/exclude.m410
-rw-r--r--m4/exitfail.m413
-rw-r--r--m4/extensions.m458
-rw-r--r--m4/fchdir.m428
-rw-r--r--m4/fcntl-safer.m411
-rw-r--r--m4/fcntl_h.m481
-rw-r--r--m4/fd-reopen.m415
-rw-r--r--m4/file-type.m410
-rw-r--r--m4/fileblocks.m420
-rw-r--r--m4/filemode.m412
-rw-r--r--m4/filenamecat.m413
-rw-r--r--m4/flexmember.m441
-rw-r--r--m4/fnmatch.m4127
-rw-r--r--m4/fpending.m478
-rw-r--r--m4/fprintftime.m410
-rw-r--r--m4/free.m440
-rw-r--r--m4/fstypename.m422
-rw-r--r--m4/fsusage.m4265
-rw-r--r--m4/ftruncate.m446
-rw-r--r--m4/fts.m428
-rw-r--r--m4/getaddrinfo.m488
-rw-r--r--m4/getcwd-abort-bug.m4106
-rw-r--r--m4/getcwd-path-max.m4189
-rw-r--r--m4/getcwd.m464
-rw-r--r--m4/getdate.m433
-rw-r--r--m4/getdelim.m429
-rw-r--r--m4/getgroups.m429
-rw-r--r--m4/gethostname.m418
-rw-r--r--m4/gethrxtime.m474
-rw-r--r--m4/getline.m479
-rw-r--r--m4/getloadavg.m4155
-rw-r--r--m4/getndelim2.m419
-rw-r--r--m4/getopt.m483
-rw-r--r--m4/getpagesize.m413
-rw-r--r--m4/getpass.m447
-rw-r--r--m4/gettext.m4420
-rw-r--r--m4/gettime.m415
-rw-r--r--m4/gettimeofday.m4101
-rw-r--r--m4/getugroups.m413
-rw-r--r--m4/getusershell.m410
-rw-r--r--m4/glibc21.m430
-rw-r--r--m4/gnulib-common.m422
-rw-r--r--m4/gnulib-comp.m4945
-rw-r--r--m4/group-member.m429
-rw-r--r--m4/hard-locale.m411
-rw-r--r--m4/hash.m413
-rw-r--r--m4/host-os.m482
-rw-r--r--m4/human.m413
-rw-r--r--m4/i-ring.m410
-rw-r--r--m4/iconv.m4101
-rw-r--r--m4/idcache.m410
-rw-r--r--m4/inet_ntop.m419
-rw-r--r--m4/inline.m440
-rw-r--r--m4/intmax_t.m461
-rw-r--r--m4/inttostr.m437
-rw-r--r--m4/inttypes-pri.m436
-rw-r--r--m4/inttypes.m4223
-rw-r--r--m4/inttypes_h.m426
-rw-r--r--m4/isapipe.m489
-rw-r--r--m4/jm-macros.m4180
-rw-r--r--m4/jm-winsz1.m447
-rw-r--r--m4/jm-winsz2.m428
-rw-r--r--m4/lchmod.m414
-rw-r--r--m4/lchown.m419
-rw-r--r--m4/lib-check.m461
-rw-r--r--m4/lib-ignore.m443
-rw-r--r--m4/lib-ld.m4110
-rw-r--r--m4/lib-link.m4709
-rw-r--r--m4/lib-prefix.m4185
-rw-r--r--m4/link-follow.m464
-rw-r--r--m4/localcharset.m416
-rw-r--r--m4/long-options.m412
-rw-r--r--m4/longdouble.m431
-rw-r--r--m4/longlong.m472
-rw-r--r--m4/ls-mntd-fs.m4337
-rw-r--r--m4/lstat.m417
-rw-r--r--m4/mbchar.m413
-rw-r--r--m4/mbiter.m417
-rw-r--r--m4/mbrtowc.m431
-rw-r--r--m4/mbscasecmp.m416
-rw-r--r--m4/mbstate_t.m430
-rw-r--r--m4/mbswidth.m442
-rw-r--r--m4/md5.m414
-rw-r--r--m4/memcasecmp.m410
-rw-r--r--m4/memchr.m418
-rw-r--r--m4/memcmp.m419
-rw-r--r--m4/memcoll.m413
-rw-r--r--m4/memcpy.m418
-rw-r--r--m4/memmove.m418
-rw-r--r--m4/mempcpy.m426
-rw-r--r--m4/memrchr.m425
-rw-r--r--m4/memset.m418
-rw-r--r--m4/memxfrm.m415
-rw-r--r--m4/mkancesdirs.m410
-rw-r--r--m4/mkdir-p.m416
-rw-r--r--m4/mkdir-slash.m448
-rw-r--r--m4/mkstemp.m456
-rw-r--r--m4/mktime.m4227
-rw-r--r--m4/modechange.m410
-rw-r--r--m4/mountlist.m423
-rw-r--r--m4/mpsort.m413
-rw-r--r--m4/nanosleep.m4116
-rw-r--r--m4/netinet_in_h.m432
-rw-r--r--m4/nls.m431
-rw-r--r--m4/openat.m493
-rw-r--r--m4/pathmax.m411
-rw-r--r--m4/perl.m445
-rw-r--r--m4/physmem.m439
-rw-r--r--m4/po.m4428
-rw-r--r--m4/posixtm.m412
-rw-r--r--m4/posixver.m445
-rw-r--r--m4/prereq.m453
-rw-r--r--m4/progtest.m492
-rw-r--r--m4/putenv.m439
-rw-r--r--m4/quote.m413
-rw-r--r--m4/quotearg.m415
-rw-r--r--m4/randint.m412
-rw-r--r--m4/randperm.m410
-rw-r--r--m4/randread.m411
-rw-r--r--m4/readlink.m429
-rw-r--r--m4/readtokens.m413
-rw-r--r--m4/readutmp.m462
-rw-r--r--m4/regex.m4211
-rw-r--r--m4/rename-dest-slash.m441
-rw-r--r--m4/rename.m452
-rw-r--r--m4/rmdir-errno.m449
-rw-r--r--m4/rmdir.m410
-rw-r--r--m4/root-dev-ino.m416
-rw-r--r--m4/rpmatch.m416
-rw-r--r--m4/safe-read.m418
-rw-r--r--m4/safe-write.m418
-rw-r--r--m4/same.m414
-rw-r--r--m4/save-cwd.m412
-rw-r--r--m4/savedir.m410
-rw-r--r--m4/savewd.m49
-rw-r--r--m4/setenv.m482
-rw-r--r--m4/settime.m415
-rw-r--r--m4/sha1.m414
-rw-r--r--m4/sha256.m415
-rw-r--r--m4/sha512.m415
-rw-r--r--m4/sig2str.m419
-rw-r--r--m4/snprintf.m431
-rw-r--r--m4/socklen.m452
-rw-r--r--m4/sockpfaf.m458
-rw-r--r--m4/ssize_t.m421
-rw-r--r--m4/st_dm_mode.m422
-rw-r--r--m4/stat-prog.m487
-rw-r--r--m4/stat-time.m463
-rw-r--r--m4/stdarg.m440
-rw-r--r--m4/stdbool.m4115
-rw-r--r--m4/stdint.m4369
-rw-r--r--m4/stdint_h.m426
-rw-r--r--m4/stdio-safer.m415
-rw-r--r--m4/stdio_h.m443
-rw-r--r--m4/stdlib-safer.m410
-rw-r--r--m4/stdlib_h.m431
-rw-r--r--m4/stpcpy.m423
-rw-r--r--m4/strcspn.m416
-rw-r--r--m4/strdup.m422
-rw-r--r--m4/strftime.m433
-rw-r--r--m4/string_h.m478
-rw-r--r--m4/strndup.m453
-rw-r--r--m4/strnlen.m431
-rw-r--r--m4/strnumcmp.m427
-rw-r--r--m4/strpbrk.m418
-rw-r--r--m4/strtod.m420
-rw-r--r--m4/strtoimax.m434
-rw-r--r--m4/strtol.m410
-rw-r--r--m4/strtoll.m423
-rw-r--r--m4/strtoul.m410
-rw-r--r--m4/strtoull.m423
-rw-r--r--m4/strtoumax.m434
-rw-r--r--m4/strverscmp.m421
-rw-r--r--m4/sys_socket_h.m454
-rw-r--r--m4/sys_stat_h.m432
-rw-r--r--m4/sys_time_h.m461
-rw-r--r--m4/tempname.m422
-rw-r--r--m4/time_h.m476
-rw-r--r--m4/time_r.m441
-rw-r--r--m4/timespec.m416
-rw-r--r--m4/tm_gmtoff.m414
-rw-r--r--m4/tzset.m459
-rw-r--r--m4/unicodeio.m411
-rw-r--r--m4/unistd-safer.m413
-rw-r--r--m4/unistd_h.m451
-rw-r--r--m4/unlink-busy.m435
-rw-r--r--m4/unlinkdir.m433
-rw-r--r--m4/unlocked-io.m442
-rw-r--r--m4/uptime.m423
-rw-r--r--m4/userspec.m413
-rw-r--r--m4/utimbuf.m439
-rw-r--r--m4/utime.m430
-rw-r--r--m4/utimecmp.m414
-rw-r--r--m4/utimens.m415
-rw-r--r--m4/utimes-null.m441
-rw-r--r--m4/utimes.m483
-rw-r--r--m4/vasnprintf.m468
-rw-r--r--m4/vasprintf.m443
-rw-r--r--m4/wchar.m429
-rw-r--r--m4/wchar_t.m420
-rw-r--r--m4/wctype.m441
-rw-r--r--m4/wcwidth.m430
-rw-r--r--m4/wint_t.m428
-rw-r--r--m4/xalloc.m424
-rw-r--r--m4/xfts.m414
-rw-r--r--m4/xgetcwd.m412
-rw-r--r--m4/xnanosleep.m412
-rw-r--r--m4/xstrndup.m415
-rw-r--r--m4/xstrtod.m417
-rw-r--r--m4/xstrtol.m411
-rw-r--r--m4/yesno.m413
251 files changed, 17776 insertions, 0 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog
new file mode 100644
index 0000000..25cac3a
--- /dev/null
+++ b/m4/ChangeLog
@@ -0,0 +1,5000 @@
+2007-01-19 Jim Meyering <jim@meyering.net>
+
+ * .cvsignore, .gitignore: Add more bootstrap-inserted file names.
+
+2006-12-12 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4: Remove AC_FUNC_SETVBUF_REVERSED, now that it's a no-op.
+
+2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
+
+ * sha512.m4 (gl_SHA512): Add u64.h to AC_LIBSOURCES.
+
+2006-10-12 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (coreutils_MACROS): Rename from gl_MACROS, now that
+ most of the gnulib macros have migrated into gnulib.
+ Don't call gl_INIT here (now it's called from configure.ac, directly).
+
+2006-10-07 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (gl_MACROS): Remove use of AC_CONFIG_LIBOBJ_DIR(lib).
+ It is no longer needed, and was causing dependencies to appear
+ in lib/lib/.deps, which provoked a "make distcheck" failure.
+
+2006-09-29 Jim Meyering <jim@meyering.net>
+
+ * readdir.m4: Remove file once again.
+ * jm-macros.m4: Remove reference to gl_FUNC_READDIR.
+
+2006-09-28 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4: Require the new macro.
+ * readdir.m4 (gl_FUNC_READDIR): Rename from GL_FUNC_READDIR.
+ Increment serial number.
+ * readdir.m4: Revivify this file.
+ We need it to work around a bug on Darwin 0.7.x.
+
+2006-09-01 Paul Eggert <eggert@cs.ucla.edu>
+
+ * .cvsignore: Add fcntl_h.m4, getloadavg.m4, inttypes-h.m4,
+ inttypes-prio.m4, inttypes.m,4 isapipe.m4.
+
+ * jm-macros.m4 (gl_MACROS): Call cu_PREREQ_STAT_PROG rather
+ than AC_REQUIREing, so that sys/mount.h isn't tested for after
+ the test result. I'm not sure why this fix is needed, but it
+ works.
+ * stat-prog.m4 (cu_PREREQ_STAT_PROG): Revamp to reflect better
+ what stat.c actually needs.
+
+2006-08-29 Paul Eggert <eggert@cs.ucla.edu>
+
+ * stat-prog.m4 (cu_PREREQ_STAT_PROG): Check for __val versus val
+ components of fsid. Omit some checks that stat.c doesn't care
+ about.
+
+2006-08-26 Paul Eggert <eggert@cs.ucla.edu>
+
+ * .cvsignore: Add config-h.m4.
+
+2006-08-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ * .cvsignore: Remove Makefile, dev-ino.m4, glibc2.m4, intdiv0.m4,
+ inttypes-h.m4, inttypes-pri.m4, jm-glibc-io.m4, lcmessage.m4,
+ lock.m4, printf-posix.m4, same-inode.m4, size_max.m4,
+ uintmax_t.m4, ulonglong.m4, visibility.m4, xsize.m4. Many of
+ these are put in automatically by ../bootstrap, but that's a
+ bootstrap bug that I plan to fix shortly.
+
+2006-08-22 Bruno Haible <bruno@clisp.org>
+
+ BeOS portability.
+ * boottime.m4 (GNULIB_BOOT_TIME): Test also for utmp.h, utmpx.h,
+ OS.h. Don't require to have utmp.h or utmpx.h. Enable boottime
+ support if <OS.h> is found.
+
+2006-08-22 Jim Meyering <jim@meyering.net>
+
+ * .cvsignore: Add files that are now generated by ../bootstrap.
+
+2006-08-21 Paul Eggert <eggert@cs.ucla.edu>
+
+ * argmatch.m4:
+ Remove from CVS, since ../bootstrap generates it automatically.
+
+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
+ sys/statvfs.h. When getmntinfo was found, check its declaration and
+ set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
+ * stat-prog.m4 (cu_PREREQ_STAT_PROG): Test also for f_fstypename
+ in struct statvfs.
+
+2006-08-18 Jim Meyering <jim@meyering.net>
+
+ * gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for CLOCK_REALTIME,
+ since gethrxtime may revert to using clock_gettime via gettime.c.
+ Gabor Z. Papp reported that gethrxtime-using programs failed to
+ link due to unresolved clock_gettime on a linux-2.4.x system.
+
+2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
+
+ * ChangeLog: Add copyright notice.
+ * check-decl.m4: Likewise.
+
+2006-08-15 Jim Meyering <jim@meyering.net>
+
+ * openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
+
+2006-08-10 Jim Meyering <jim@meyering.net>
+
+ Update from gnulib.
+ * cycle-check.m4 (gl_CYCLE_CHECK): Don't mention same-inode.h.
+ Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
+ * dev-ino.m4, same-inode.m4: New files.
+
+2006-08-10 Paul Eggert <eggert@cs.ucla.edu>
+
+ Accommodate new getaddrinfo implementation in gnulib.
+ * arpa_inet_h.m4, inet_ntop.m4, netinet_in_h.m4, snprintf.m4:
+ New files, from gnulib.
+ * prereq.m4 (gl_PREREQ): Require gl_FUNC_SNPRINTF, gl_GETADDRINFO,
+ gl_HEADER_ARPA_INET, gl_HEADER_NETINET_IN, gl_HEADER_SYS_SOCKET,
+ gl_INET_NTOP, gl_TYPE_SOCKEN_T.
+
+2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
+
+ * inttypes-h.m4, stdarg.m4: New files, from gnulib.
+ * prereq.m4 (gl_PREREQ): Require gl_STDARG_H.
+ Require gl_FOPEN_SAFER rather than gl_STDIO_SAFER (due to renaming).
+ * getline.m4, gettext.m4, inttypes-pri.m4, lib-link.m4, localcharset.m4:
+ * mbchar.m4, nls.m4, po.m4, stdint.m4, stdio-safer.m4, unistd-safer.m4:
+ * wcwidth.m4:
+ Update from gnulib.
+
+2006-08-08 Paul Eggert <eggert@cs.ucla.edu>
+
+ * memxfrm.m4, randint.m4, randperm.m4, randread.m4: New files.
+
+ * prereq.m4 (gl_PREREQ): Require gl_MEMXFRM, gl_RANDINT, gl_RANDPERM,
+ gl_RANDREAD.
+
+ * restrict.m4: Remove, now that we assume Autoconf 2.58 or later.
+ All uses of gl_C_RESTRICT changed to AC_C_RESTRICT.
+
+2006-07-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ * close-stream.m4: New file.
+ * prereq.m4 (gl_PREREQ): Require gl_CLOSE_STREAM.
+
+2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
+
+ * mkancesdirs.m4: New file.
+ * afs.m4: Remove; no longer needed.
+ * jm-macros.m4 (gl_MACROS): Remove gl_AFS.
+ * mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c, dirchownmod.h.
+ Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER; no longer needed.
+ Require gl_FUNC_LCHOWN, since dirchownmod.c needs it.
+ * prereq.m4 (gl_PREREQ): Require gl_MKANCESDIRS.
+
+2006-07-11 Eric Blake <ebb9@byu.net>
+
+ * absolute-header.m4: Fix comments to match recent change.
+
+2006-07-10 Derek R. Price <derek@ximbiot.com>
+ and Paul Eggert <eggert@cs.ucla.edu>
+
+ * backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
+ * savedir.m4:
+ Ignore the obsolescent !HAVE_DIRENT_H case. Consolidate NAMLEN
+ macros into the GNU _D_EXACT_NAMLEN.
+
+2006-07-10 Paul Eggert <eggert@cs.ucla.edu>
+
+ * stdint.m4 (gl_STDINT_H): Like yesterday's change to
+ absolute-header.m4. Also, set ABSOLUTE_STDINT_H to a string
+ "no/such/file/stdint.h" when there is no such file, so that
+ the resulting C code can be parsed by dodgy compilers.
+ Problems reported by Bob Proulx.
+
+2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
+
+ * absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
+ around the absolute name, to work around a problem with the HP-UX
+ 11.23 native C compiler, reported by Bob Proulx.
+
+ Update from gnulib, as follows:
+
+ 2006-07-06 Derek R. Price <derek@ximbiot.com>
+ and Paul Eggert <eggert@cs.ucla.edu>
+
+ * backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
+ of invoking obsolescent AC_HEADER_DIRENT macro.
+ * d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
+ * d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
+ * dirfd.m4 (gl_FUNC_DIRFD): Likewise.
+ * fts.m4 (gl_FUNC_FTS_CORE): Likewise.
+ * getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
+ * savedir.m4 (gl_SAVEDIR): Likewise.
+
+ 2006-07-06 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
+ expand to nothing, so add a shell command to avoid syntax error.
+ * getpass.m4 (gl_PREREQ_GETPASS): Likewise.
+
+ 2006-07-06 Paul Eggert <eggert@cs.ucla.edu>
+
+ * fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
+ no longer needed. Check for isblank decl.
+ * mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
+ * regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
+ of existence.
+
+ 2006-07-05 Paul Eggert <eggert@cs.ucla.edu>
+
+ * xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
+ rather than AC_CHECK_DECLS for strtoimax and strtoumax.
+ * getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer needed.
+ All uses removed.
+ * strtol.m4 (gl_PREREQ_STRTOL): Likewise.
+ * strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
+ * exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer needed.
+ * getdate.m4 (gl_GETDATE): Likewise.
+ * getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
+ * memcasecmp.m4 (gl_MEMCASECMP): Likewise.
+ * strtod.m4 (gl_FUNC_STRTOD): Likewise.
+ * strtol.m4 (gl_PREREQ_STRTOL): Likewise.
+ * strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
+ * xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
+ * exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
+ needed.
+
+ 2006-07-05 Derek R. Price <derek@ximbiot.com>
+
+ * calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
+ no longer needed.
+ * exclude.m4 (gl_EXCLUDE): Likewise.
+ * getdate.m4 (gl_GETDATE): Likewise.
+ * getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
+ * memcasecmp.m4 (gl_MEMCASECMP): Likewise.
+ * strtod.m4 (gl_FUNC_STRTOD): Likewise.
+ * strtol.m4 (gl_PREREQ_STRTOL): Likewise.
+ * xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
+
+ 2006-07-05 Eric Blake <ebb9@byu.net>
+
+ * sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
+ to avoid 'header present but could not be compiled' on cygwin.
+
+ 2006-07-03 Bruno Haible <bruno@clisp.org>
+
+ * strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
+ the function exists, before testing against AIX.
+ Reported by Martin Lambers <marlam@marlam.de>.
+
+ 2006-07-04 Paul Eggert <eggert@cs.ucla.edu>
+
+ * absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
+ to the absolute name, not just one, to bypass Sun C 5.8's
+ "warning: #include of /usr/include/... may be non-portable".
+
+ 2006-07-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ * absolute-header.m4: Renamed from full-header-path.m4.
+ This is to keep the terminology clean; POSIX talks about
+ "absolute pathnames", not "full pathnames", but the GNU
+ Coding Standards say to use "path" for something else;
+ so use "absolute" to keep both sides happy.
+ (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
+ Set gl_absolute_header, not gl_full_header_path.
+ Set gl_cv_absolute_<header>, not gl_full_path_<header>.
+ Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
+ All uses changed.
+
+2006-07-08 Jim Meyering <jim@meyering.net>
+
+ * link-follow.m4: Remove one of two adjacent "whether"s in a comment.
+ * getopt.m4: Remove one of two adjacent "your"s in a comment.
+ * autobuild.m4: Remove one of two adjacent "can"s in a comment.
+ * regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a comment.
+
+2006-07-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ * prereq.m4 (gl_PREREQ): Require gl_FUNC_WCWIDTH, to accommodate
+ changes mentioned below.
+ * setenv.m4 (gt_FUNC_SETENV): Undo private change that added an
+ AC_LIBSOURCES line here, since Bruno didn't buy it back. Instead,
+ update ../lib/Makefile.am to mention the files explicitly.
+
+ Sync from gnulib.
+
+ 2006-06-28 Simon Josefsson <jas@extundo.com>
+
+ * getaddrinfo.m4: Look for getnameinfo prototypes too.
+
+ 2006-06-28 Eric Blake <ebb9@byu.net>
+
+ * mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
+ * wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
+
+ 2006-06-22 Simon Josefsson <jas@extundo.com>
+
+ * sockpfaf.m4: Include winsock2.h too, to make it work under
+ MinGW.
+
+ 2006-06-21 Simon Josefsson <jas@extundo.com>
+
+ * getaddrinfo.m4: Don't define WINVER. Look for gethostbyname in
+ -lws2_32 too. Fixes getaddrinfo on Windows 2000, with the price
+ of using the (limited) gnulib implementation on Windows XP.
+
+ 2006-06-17 Bruno Haible <bruno@clisp.org>
+
+ * setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
+ whether errno is declared. Assume <errno.h> declares errno.
+
+ 2006-06-16 Eric Blake <ebb9@byu.net>
+
+ * rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
+ errno.
+
+ 2006-06-15 Eric Blake <ebb9@byu.net>
+
+ * ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
+
+ 2006-04-20 Bruno Haible <bruno@clisp.org>
+
+ * getpass.m4 (gl_PREREQ_GETPASS):
+ Don't call AC_CHECK_DECLS_ONCE with more than
+ one argument, so that the code will be portable to Autoconf 2.60.
+ * unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
+
+ 2006-03-15 Eric Blake <ebb9@byu.net>
+
+ * dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
+
+2006-07-03 Jim Meyering <jim@meyering.net>
+
+ * ftruncate.m4 (gl_FUNC_FTRUNCATE): Adjust diagnostic to recommend
+ ./configure SKIP_FTRUNCATE_CHECK=yes, rather than env ... ./configure.
+ Suggestion from Ralf Wildenhues.
+
+2006-07-02 Paul Eggert <eggert@cs.ucla.edu>
+
+ * stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
+ test cases, so that config.log is a bit easier to follow.
+
+2006-07-02 Jim Meyering <jim@meyering.net>
+
+ * full-header-path.m4: New file, from gnulib. Required by stdint.m4.
+
+2006-07-02 Paul Eggert <eggert@cs.ucla.edu>
+
+ * longlong.m4: Sync from gnulib.
+ * stdint.m4: Likewise.
+ * ulonglong.m4: Likewise.
+
+2006-06-30 Paul Eggert <eggert@cs.ucla.edu>
+
+ * c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
+ Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
+ want to require the building of c-strtod.o.
+ * lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
+ needs -lm directly.
+ * prereq.m4 (gl_PREREQ): Require gl_C_STRTOD and gl_XSTRTOLD.
+ * xstrtod.m4 (gl_XSTRTOLD): New macro.
+
+2006-06-29 Derek R. Price <derek@ximbiot.com>
+
+ * strftime.m4: Don't call AC_FUNC_STRFTIME.
+
+2006-06-28 Paul Eggert <eggert@cs.ucla.edu>
+
+ * jm-macros.m4 (jl_MACROS): Require 2.60, not 2.59d.
+ * jm-macros.m4 (gl_CHECK_ALL_TYPES): Don't require AC_C_CONST, since
+ it's obsolete.
+
+2006-06-28 Derek R. Price <derek@ximbiot.com>
+
+ * fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
+ it's obsolete.
+ * strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
+ * savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
+
+2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
+
+ * lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
+ --as-needed option if available. Problem reported by Albert Chin in
+ <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
+ However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
+ cc merely issues a bunch of annoying warnings for --as-needed
+ (this problem was reported by Bob Proulx). Also, try linking with
+ -lm to detect a bug in binutils 2.16 (this problem was reported
+ by Ralf Wildenhues).
+
+2006-06-18 Jim Meyering <jim@meyering.net>
+
+ Test for a bug that causes glibc's getcwd to suffer a failed assertion.
+ * getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and macro.
+ * getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
+ also check for glibc-2.4's abort-inducing bug.
+
+ * getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
+ Low-probability clean-up should be to use rmdir to get rid of
+ the just-created directory, not unlink.
+
+ * ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
+ configure fail, and request a bug report to inform us about it.
+ Add a comment that, barring reports to the contrary, in 2007 we'll
+ assume ftruncate is universally available.
+
+2006-06-10 Jim Meyering <jim@meyering.net>
+
+ Apply this change from gnulib:
+
+ 2006-05-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ Bruno Haible <bruno@clisp.org>
+
+ * strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
+ check for the declaration of strnlen and a run test that exposes the
+ AIX 5.1 strnlen bug. In the failure case, #define strndup to
+ rpl_strndup.
+
+2006-05-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
+ compile test, for Tru64 4.0D.
+
+2006-05-24 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4: Require autoconf-2.59d, for its fixed version
+ of AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
+
+2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
+
+ * nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
+ gl_ rather than jm_. Link, don't run, so that cross-compiles are
+ allowed. Check that resulting type is arithmetic. Move AC_REQUIRE
+ and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
+ not really conditional on the cache.
+ (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
+
+2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
+
+ * stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
+ test for C99 conformance; (bool) 0.5 is an integer constant
+ expression, but (bool) -0.5 is not. Problem reported by Fedor
+ Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
+
+2006-02-17 Eric Blake <ebb9@byu.net>
+
+ Sync from gnulib.
+ * getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
+
+2006-04-24 Paul Eggert <eggert@cs.ucla.edu>
+
+ * unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
+ to define main with arguments, for C++. Reported by Eric Blake.
+ * getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
+ * fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
+ for 'main', for C99 and C++.
+
+2006-04-24 Paul Eggert <eggert@cs.ucla.edu>
+
+ * fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
+ Don't assume that exit status -1 is valid.
+ * nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
+ * putenv.m4 (gl_FUNC_PUTENV): Likewise.
+ * rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
+ * readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
+ * rename.m4 (vb_FUNC_RENAME): Likewise.
+ * unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
+ not AC_TRY_RUN. Use return, not exit. Don't assume that
+ functions can be used without declaring them, or that you can
+ exit with status -1.
+ * utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
+
+2006-04-17 Paul Eggert <eggert@cs.ucla.edu>
+
+ * filemode.m4 (gl_FILEMODE): Check for strmode declaration.
+
+2006-04-12 Paul Eggert <eggert@cs.ucla.edu>
+
+ * jm-macros.m4 (gl_MACROS): Check for setgroups and sync, since they
+ are not in Interix.
+
+2006-04-11 Paul Eggert <eggert@cs.ucla.edu>
+
+ * time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and time_r.h.
+
+2006-04-09 Paul Eggert <eggert@cs.ucla.edu>
+
+ * regex.m4 (gl_REGEX): Check for new glibc interface to
+ translation table.
+
+2006-03-11 Eric Blake <ebb9@byu.net>
+
+ * double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
+ * dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
+ * dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
+ (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
+
+2006-03-25 Paul Eggert <eggert@cs.ucla.edu>
+
+ * regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
+ REG_SYNTAX_EMACS, and REG_IGNORE_CASE. Settle for the traditional
+ glibc names. Even if glibc is changed to conform to POSIX, the
+ traditional names will be available anyway, since regex depends on
+ the extensions module. Also, fix a longstanding typo in the
+ implementation of Spencer ERE test #75 from grep 2.3. Problems
+ reported by Emanuele Giaquinta. Also, change sense of cached
+ variable, so that the message makes sense.
+
+2006-03-17 Jim Meyering <jim@meyering.net>
+
+ * regex.m4 (gl_REGEX): Fix typo in last change:
+ s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
+
+2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
+
+ * regex.m4 (gl_REGEX): Don't check for off_t, since the code
+ no longer needs it. Instead, check that regoff_t is as least
+ as wide as ptrdiff_t.
+
+ Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
+ so that our regex.h stays compatible with the installed regex.
+ This is helpful for installers who configure --without-included-regex.
+ Problem reported by Emanuele Giaquinta.
+
+2006-03-12 Jim Meyering <jim@meyering.net>
+
+ * chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
+ * cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
+ * same.m4 (gl_SAME): Likewise.
+ * root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
+
+2006-03-12 Paul Eggert <eggert@cs.ucla.edu>
+
+ * prereq.m4 (gl_PREREQ): Require gl_TIME_R.
+ * time_r.m4: New file, from gnulib.
+
+2006-03-01 Paul Eggert <eggert@cs.ucla.edu>
+
+ * clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
+ not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
+ pedantically.
+ * nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
+ * timespec.m4 (gl_TIMESPEC): Likewise.
+
+ * extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
+ not "==". Reported by Ralf Wildenhues.
+
+2006-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
+ gl_CHDIR_SAFER.
+
+2006-02-16 Eric Blake <ebb9@byu.net>
+
+ Sync from gnulib.
+ * sys_socket_h.m4: New file. Solves 'present but cannot compile'
+ warnings on cygwin, which cannot use ws2tcpip.h.
+ * socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.
+ Don't use ws2tcpip.h if sys/socket.h works.
+ * getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use
+ gl_HEADER_SYS_SOCKET.
+ (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is
+ present.
+
+2006-02-14 Simon Josefsson <jas@extundo.com>
+
+ Sync from gnulib.
+ * getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
+ -lws2_32. Protect sys/socket.h and netdb.h #include's. Include
+ ws2tcpip.h with WINVER=0x0501. All for mingw32.
+ * socklen.m4: Look in ws2tcpip.h too, for mingw32.
+
+2006-02-05 Paul Eggert <eggert@cs.ucla.edu>
+
+ * extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
+ __EXTENSIONS__ if this causes compilation to fail. Problem
+ reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
+ c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
+
+2006-01-26 Paul Eggert <eggert@cs.ucla.edu>
+
+ * stdbool.m4 (AC_HEADER_STDBOOL): Sync from gnulib.
+ Use 'defined __GNUC__' rather than __GNUC__.
+
+2006-01-25 Paul Eggert <eggert@cs.ucla.edu>
+
+ * stdbool.m4: Merge from gnulib; we still don't quite match
+ exactly, but we're getting closer.
+ (AC_HEADER_STDBOOL): Add some comments.
+
+2006-01-24 Jim Meyering <jim@meyering.net>
+
+ * openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
+ Reported by Mark D. Baushke.
+
+2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
+
+ * getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
+
+2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
+
+ * lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
+ rather than -Xlinker -z -Xlinker ignore, as it's more portable.
+ Suggested by Bruno Haible.
+
+2006-01-17 Jim Meyering <jim@meyering.net>
+
+ * fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
+
+2006-01-16 Paul Eggert <eggert@cs.ucla.edu>
+
+ * lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
+ it's not portable and it doesn't work with cross-compiles.
+ Problem reported by Bruno Haible. Fix missing-$ typo in
+ 'test "gl_cv_ignore_unused_libraries" ...' that prevented
+ -zignore from being used with Sun's C compiler.
+
+2006-01-13 Jim Meyering <jim@meyering.net>
+
+ * ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke AC_CHECK_FUNCS(getmntent)
+ unconditionally so that tests of $ac_cv_func_getmntent (e.g., in
+ gl_LIST_MOUNTED_FILE_SYSTEMS) need not double-quote uses of that
+ variable, to accommodate the rare case in which getmntent is
+ available in none of the libraries checked. This happens at
+ least on FreeBSD 5.0.
+
+2006-01-11 Paul Eggert <eggert@cs.ucla.edu>
+
+ * prereq.m4 (gl_PREREQ): Require gl_STDINT_H.
+ * stdint.m4: New file, from gnulib.
+
+2006-01-11 Jim Meyering <jim@meyering.net>
+
+ * openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
+ Check for the lchmod function.
+
+2006-01-10 Paul Eggert <eggert@cs.ucla.edu>
+
+ * argmatch.m4 (gl_ARGMATCH): Don't require gl_FUNC_MEMCMP, for the
+ sake of packages that don't want to worry about ancient systems.
+
+ * getaddrinfo.m4, localcharset.m4, md5.m4, memcoll.m4:
+ Sync from gnulib.
+
+2006-01-10 Jim Meyering <jim@meyering.net>
+
+ * fpending.m4: Also include <stdio.h>, for Dragonfly.
+ Patch by Joerg Sonnenberger.
+
+2006-01-06 Paul Eggert <eggert@cs.ucla.edu>
+
+ * lib-ignore.m4: New file.
+
+2006-01-01 Paul Eggert <eggert@cs.ucla.edu>
+
+ * chmod-safer.m4: Remove.
+ * lchmod.m4: New file.
+ * jm-macros.m4 (gl_MACROS): Require gl_FUNC_LCHMOD.
+ Don't require gl_CHDIR_SAFER.
+
+2005-12-21 Jim Meyering <jim@meyering.net>
+
+ * chdir-safer.m4: New file.
+ * jm-macros.m4: Require gl_CHDIR_SAFER.
+
+2005-12-05 Andreas Gruenbacher <agruen@suse.de>
+
+ * acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
+
+2005-12-14 Jim Meyering <jim@meyering.net>
+
+ * fprintftime.m4: New file.
+ * jm-macros.m4: Require gl_FPRINTFTIME.
+
+2005-12-13 Paul Eggert <eggert@cs.ucla.edu>
+
+ * stdbool.m4 (AM_STDBOOL_H): Substitute HAVE__BOOL again, reverting
+ 2005-11-25 change.
+ (AC_HEADER_STDBOOL): Check for buggy compiler that
+ has _Bool but mishandles _Bool |= _Bool.
+
+2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
+
+ * stat-time.m4 (gl_STAT_TIME): Add check for
+ TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
+ porting problem reported by Georg Schwarz in
+ <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
+
+2005-12-02 Paul Eggert <eggert@cs.ucla.edu>
+
+ * socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
+ Use implementation from Albert Chin, with some
+ comments/corrections by Stepan Kasal and myself.
+ * jm-macros.m4 (gl_MACROS): Adjust to renaming.
+
+2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
+
+ * regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
+ statement, to work around an HP-UX 10.20 compiler bug reported by
+ Peter O'Gorman.
+
+2005-12-01 Bruno Haible <bruno@clisp.org>
+
+ Import from gnulib.
+ * mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't compile
+ mbchar.c if they are not both present.
+ * mbiter.m4 (gl_MBITER): Likewise.
+ * strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
+ * strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
+
+2005-11-30 Jim Meyering <jim@meyering.net>
+
+ * openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
+ Require openat-priv.h.
+
+2005-11-25 Paul Eggert <eggert@cs.ucla.edu>
+
+ * stdbool.m4 (AM_STDBOOL_H): Don't bother substituting HAVE__BOOL;
+ no longer needed.
+ (gl_STDBOOL_H): New macro, from gnulib.
+ (AC_HEADER_STDBOOL): Sync with gnulib.
+
+2005-11-20 Jim Meyering <jim@meyering.net>
+
+ * c.m4: Remove spurious space-before-TAB.
+
+ * euidaccess-stat.m4 (gl_EUIDACCESS_STAT): New file/macro.
+ * prereq.m4: Require gl_EUIDACCESS_STAT.
+
+2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
+
+ * c.m4: New file, to work around bugs in AIX cc.
+ Problem reported by James Lemley. This file can go away
+ after Autoconf 2.60 comes out.
+
+2005-11-10 Paul Eggert <eggert@cs.ucla.edu>
+
+ * gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
+ or gettimeofday; no longer needed.
+
+2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
+
+ * chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
+ variables to suggest the intended function of the PATH_MAX check.
+
+2005-10-30 Kean Johnston <jkj@sco.com>
+
+ Trivial changes to support SCO systems.
+ * chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
+ as PATH_MAX.
+ * fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
+ where __ptr is null when no I/O is pending.
+
+2005-08-27 David Madore <david.madore@ens.fr>
+
+ * sha256.m4, sha512.m4: New files.
+ * prereq.m4: Add gl_SHA256 and gl_SHA512.
+
+2005-10-07 Paul Eggert <eggert@cs.ucla.edu>
+
+ * stdbool.m4 (AC_HEADER_STDBOOL): Add an "#ifdef __xlc__" test,
+ since yesterday's attempt didn't work.
+
+2005-10-06 Paul Eggert <eggert@cs.ucla.edu>
+
+ * stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
+ promotes to int, not unsigned int, to catch the AIX 5.3
+ compiler bug.
+
+2005-10-02 Alfred M. Szmidt <ams@gnu.org>
+
+ * chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
+ against `yes', rather than just testing for nonempty.
+
+2005-10-01 Simon Josefsson <jas@extundo.com>
+
+ * getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
+ and Darwin.
+
+2005-10-01 Simon Josefsson <jas@extundo.com>
+
+ * getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use AC_GNU_SOURCE,
+ GNU declares only getaddrinfo as an (POSIX) extension.
+ Check for sys/types.h, sys/socket.h, and netdb.h too,
+ needed by getaddrinfo.h.
+ Check if getaddrinfo, freeaddrinfo and gai_strerror are
+ declared by the POSIX headers.
+ Check if struct addrinfo is declared.
+
+2005-10-01 Jim Meyering <jim@meyering.net>
+
+ * getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
+ libraries [inet nsl socket xnet]. Nelson Beebe reported that with
+ native cc on Solaris 7, getaddrinfo.c requires -lsocket.
+
+2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
+
+ * openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
+
+2005-09-28 Paul Eggert <eggert@cs.ucla.edu>
+
+ * ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
+ defines ULONG_MAX_LT_ULLONG_MAX. Thomas M.Ott reports that
+ ULLONG_MAX doesn't work with 2.7.2.1.
+
+2005-09-26 Jim Meyering <jim@meyering.net>
+
+ * utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
+ from glibc-2.2.5 that fails for read-only files.
+
+2005-09-24 Paul Eggert <eggert@cs.ucla.edu>
+
+ * jm-macros.m4 (gl_MACROS): Check for fchmod and fchown.
+
+ * mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h, and
+ don't compile mbchar.c unless both headers exist. See
+ <http://lists.gnu.org/archive/html/bug-gnulib/2005-09/msg00242.html>.
+
+2005-09-24 Jim Meyering <jim@meyering.net>
+
+ * getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
+ in the inet and nsl libraries. Required on Solaris 5.7.
+
+2005-09-23 Paul Eggert <eggert@cs.ucla.edu>
+
+ * regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
+ and similarly for the other external symbols. Problem reported
+ by James Gallager.
+
+ * fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
+ bug reported by Jim Meyering.
+
+ * jm-macros.m4 (gl_MACROS): Don't require gl_CHECK_TYPE_STRUCT_UTIMBUF.
+ (gl_CHECK_ALL_HEADERS): Don't check for utime.h.
+ * utimens.m4 (gl_UTIMENS): Check for futimesat (Solaris 10).
+ * getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
+ not needed, since socklen is a prerequisite module.
+
+2005-09-23 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (gl_MACROS): AC_REQUIRE([gl_SOCKLEN_T]) here,
+ now that it's no longer required by getaddrinfo.m4.
+
+ Correct build failure (socklen_t not defined) on at least
+ mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
+ * getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
+ * socklen.m4: New file, from gnulib.
+
+2005-09-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ * getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
+
+2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
+
+ * check-decl.m4 (_gl_DECL_HEADERS): Don't bother checking for
+ standard C headers, or for headers we no longer use.
+ * jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_XANSTRFTIME;
+ no longer needed.
+ (gl_CHECK_ALL_HEADERS): Don't check for memory.h, mntent.h, mnttab.h,
+ netdb.h, stdlib.h, stdint.h, string.h, sys/filsys.h, sys/fs/s5param.h,
+ sys/fs_types.h, sys/fstyp.h, sys/mntent.h, sys/socket.h, sys/stafs.h,
+ sys/timeb.h, unistd.h. No longer needed.
+ * prereq.m4 (gl_PREREQ): Require gl_FUNC_GETLINE rather than
+ AM_FUNC_GETLINE. Require gl_FUNC_GETPASS_GNU rather than
+ gl_FUNC_GETPASS. Require gl_MBCHAR and gl_MBITER.
+
+ * xanstrftime.m4: Remove; no longer used.
+
+ * getaddrinfo.m4, getdelim.m4, mbchar.m4, mbiter.m4, sockpfaf.m4:
+ New files, from gnulib.
+
+ * backupfile.m4, bison.m4, calloc.m4:
+ * canonicalize.m4, chown.m4, cloexec.m4, dup2.m4:
+ * fileblocks.m4, free.m4, ftruncate.m4, fts.m4:
+ * getcwd.m4, getopt.m4, getpagesize.m4, getpass.m4:
+ * getugroups.m4, group-member.m4, idcache.m4:
+ * lib-link.m4, lib-prefix.m4, link-follow.m4:
+ * mkdir-p.m4, mkstemp.m4, mktime.m4, mountlist.m4:
+ * nanosleep.m4, onceonly_2_57.m4, pathmax.m4:
+ * physmem.m4, posixver.m4, putenv.m4, safe-read.m4:
+ * same.m4, save-cwd.m4, stdio-safer.m4, strndup.m4:
+ * strnlen.m4, unistd-safer.m4, unlinkdir.m4:
+ * userspec.m4, xreadlink.m4, xstrtod.m4:
+ Sync from gnulib.
+
+ * canon-host.m4, getline.m4, mbrtowc.m4, strcase.m4, strstr.m4:
+ Nontrivial sync from gnulib.
+
+2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
+
+ * jm-macros.m4 (gl_CHECK_ALL_TYPES): Do not require
+ AC_STRUCT_ST_MTIM_NSEC; it's obsolete.
+ * prereq.m4 (gl_PREREQ): Require gl_STAT_TIME.
+
+ Import from gnulib.
+ * st_mtim.m4: Remove. Superseded by...
+ * stat-time.m4: New file.
+ * timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
+ Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
+
+2005-09-13 Jim Meyering <jim@meyering.net>
+
+ * autobuild.m4: New file, from autobuild.
+
+2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
+
+ * regex.m4: Import from gnulib, to fix some 64-bit bugs.
+
+2005-09-01 Jim Meyering <jim@meyering.net>
+
+ * lchown.m4: Require gl_FUNC_CHOWN, for the definition of
+ CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
+ Require gl_STAT_MACROS, too.
+
+2005-08-27 Jim Meyering <jim@meyering.net>
+
+ * fcntl-safer.m4, stdio-safer.m4, unistd-safer.m4: Sync from gnulib.
+
+2005-08-01 Jim Meyering <jim@meyering.net>
+
+ * xanstrftime.m4 (gl_FUNC_XANSTRFTIME): New file/macro.
+ * jm-macros.m4: Require gl_FUNC_XANSTRFTIME.
+
+2005-07-25 Paul Eggert <eggert@cs.ucla.edu>
+
+ * regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_ELSE instead of the
+ obsolescent AC_TRY_RUN. Include the default includes files, for 'exit'.
+
+2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
+
+ * getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
+ (gl_GETDATE): Use it.
+
+2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
+
+ * lib-check.m4 (cu_LIB_CHECK): Remove no-longer-necessary check
+ for fesetround.
+
+2005-07-08 Paul Eggert <eggert@cs.ucla.edu>
+
+ * jm-macros.m4 (gl_CHECK_ALL_HEADERS): Check for stropts.h.
+
+2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
+
+ * backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on pathconf.
+ * same.m4 (gl_SAME): Likewise.
+ Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
+
+ Switch to Isamu Hasegawa's implementation of regex, which is
+ now in gnulib.
+ * regex.m4: Import from gnulib.
+
+2005-07-04 Paul Eggert <eggert@cs.ucla.edu>
+
+ * prereq.m4 (gl_PREREQ): Don't require gl_TYPEOF; no longer needed.
+ * typeof.m4: Remove; no longer needed.
+
+2005-07-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ Remove the dependency of the strftime module on the tzset module.
+ * strftime.m4 (gl_FUNC_STRFTIME): Don't require gl_FUNC_TZSET_CLOBBER.
+ * prereq.m4 (gl_PREREQ): Add gl_FUNC_TZSET_CLOBBER.
+
+2005-07-03 Jim Meyering <jim@meyering.net>
+
+ * lstat.m4 (gl_FUNC_LSTAT): New file, from gnulib.
+ Use AC_LIBSOURCES to require lstat.c and lstat.h.
+ Remove obsolete comment.
+
+2005-07-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ * fts.m4 (gl_FUNC_FTS_CORE): Don't require
+ AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
+ module's job.
+ * jm-macros.m4 (gl_MACROS): Likewise.
+ * prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
+
+2005-07-03 Jim Meyering <jim@meyering.net>
+
+ * fcntl-safer.m4 (gl_FCNTL_SAFER): Add fcntl--.h to the list.
+ * stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h to the list.
+ * stdlib-safer.m4 (gl_STDLIB_SAFER): Add stdlib--.h to the list.
+ * unistd-safer.m4 (gl_UNISTD_SAFER): Add unistd--.h to the list.
+
+2005-07-02 Paul Eggert <eggert@cs.ucla.edu>
+
+ Cleanup to isolate "safer" functions to a small part of the code.
+ * fcntl-safer.m4, fd-reopen.m4, stdlib-safer.m4: New files.
+ * prereq.m4 (gl_PREREQ): Require gl_FCNTL_SAFER,
+ gl_FD_REOPEN, gl_STDLIB_SAFER.
+
+2005-07-02 Jim Meyering <jim@meyering.net>
+
+ * check-decl.m4, chown.m4, free.m4, getcwd.m4, link-follow.m4:
+ * mktime.m4: Assume HAVE_UNISTD_H, i.e., that <unistd.h> works.
+
+2005-07-01 Jim Meyering <jim@meyering.net>
+
+ * chown.m4, cloexec.m4, dup2.m4, fsusage.m4, getcwd.m4, jm-macros.m4:
+ * mkstemp.m4, mountlist.m4, save-cwd.m4, unistd-safer.m4:
+ Don't check for fcntl.h anymore. Now we assume it exists and is usable.
+
+ * getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
+ Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
+ and don't check for fcntl.h).
+
+2005-06-30 Jim Meyering <jim@meyering.net>
+
+ * stdopen.m4 (gl_STDOPEN): New file/macro.
+ * jm-macros.m4: Require it.
+
+2005-06-26 Jim Meyering <jim@meyering.net>
+
+ * diacrit.m4 (gl_DIACRIT): New file/macro.
+ * jm-macros.m4: Require it.
+
+2005-06-25 Jim Meyering <jim@meyering.net>
+
+ * version-etc.m4 (gl_VERSION_ETC): New file/macro.
+ * jm-macros.m4: Require it.
+
+ * root-dev-ino.m4 (gl_ROOT_DEV_INO): New file/macro.
+ * jm-macros.m4: Require it.
+
+2005-06-23 Jim Meyering <jim@meyering.net>
+
+ * xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
+ * xstrtod.m4: Likewise.
+
+2005-06-19 Jim Meyering <jim@meyering.net>
+
+ * xgetcwd.m4 (gl_XGETCWD): Add `AC_LIBOBJ([xgetcwd])'.
+ Register xgetcwd.c and xgetcwd.h via AC_LIBSOURCES.
+
+ * xfts.m4 (gl_FUNC_XFTS): New file/macro.
+ * jm-macros.m4: Require it.
+
+2005-06-13 Jim Meyering <jim@meyering.net>
+
+ * openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
+
+2005-06-02 Paul Eggert <eggert@cs.ucla.edu>
+
+ * extensions.m4: Sync from gnulib; this defines
+ _POSIX_PTHREAD_SEMANTICS for the benefit of Solaris.
+
+2005-06-01 Paul Eggert <eggert@cs.ucla.edu>
+
+ * mkdir-p.m4: Renamed from makepath.m4.
+ (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH. All uses changed.
+ Rename files from makepath.c to mkdir-p.c, and from
+ makepath.h to mkdir-p.h.
+ * filenamecat.m4: Renamed from path-concat.m4.
+ (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT. All uses changed.
+ Rename files from path-concat.c to filenamecat.c,
+ and from path-concat.h to filenamecat.h.
+ * getcwd-path-max.m4: Don't use "path" or "filename" to mean
+ "file name" in local variables or comments.
+ * rename.m4: Likewise.
+
+2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
+
+ * jm-macros.m4 (gl_CHECK_ALL_HEADERS): Check for priv.h.
+
+2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
+
+ * fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
+ and don't require gt_INTTYPES_PRI.
+
+ * prereq.m4 (gl_PREREQ): Require gl_STRINTCMP, gl_STRNUMCMP.
+ * strnumcmp.m4: New file.
+
+2005-05-20 Paul Eggert <eggert@cs.ucla.edu>
+
+ * fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
+ (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
+
+2005-05-20 Eric Blake <ebb9@byu.net> (tiny change)
+
+ * chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
+ of -1.
+
+2005-05-18 Paul Eggert <eggert@cs.ucla.edu>
+
+ * canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
+ Don't check for stddef.h.
+ * fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
+ don't use its results.
+ Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
+ since we include them unconditionally. Don't require
+ AM_STDBOOL_H, since stdbool is a prerequisite.
+ Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
+ since we assume C89 or better.
+ Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
+ as we don't use their results.
+ Don't check for fchdir, memmove, memset, strrchr, as we use
+ them unconditionally.
+ * gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
+ GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
+ * jm-macros.m4 (gl_MACROS): Require AC_FUNC_LSTAT.
+ Don't check for memcpy, strchr, strerror, strrchr, float.h.
+ Use AC_REQUIRE on AM_LANGINFO_CODESET and gl_GLIBC21 rather
+ than invoking them directly.
+ (gl_CHECK_ALL_HEADERS): Don't check for errno.h, float.h,
+ limits.h, stddef.h, since we assume C89 now.
+ * lib-check.m4: Add copyright notice.
+ (cu_LIB_CHECK): Renamed from gl_LIB_CHECK.
+ Don't check for sqrt; factor no longer needs it.
+ Revamp tests for floor, modf, rint, to define SEQ_LIBM.
+ Redo tests for fesetround to act like the other wons.
+ Use "cu_saved_libs" for local var name, not "ac_su_saved_lib".
+ * prereq.m4: Add copyright notice.
+ (gl_PREREQ): Add gl_LOCALCHARSET.
+ * localcharset.m4: New file, from gnulib.
+
+2005-05-16 Jim Meyering <jim@meyering.net>
+
+ * fts.m4 (gl_FUNC_FTS): Don't require AC_FUNC_MALLOC or
+ AC_FUNC_REALLOC. They are not needed.
+
+2005-05-14 Jim Meyering <jim@meyering.net>
+
+ * unlinkdir.m4: Register unlinkdir.c and unlinkdir.h via AC_LIBSOURCES.
+ Add `AC_LIBOBJ([unlinkdir])'.
+
+2005-05-14 Paul Eggert <eggert@cs.ucla.edu>
+
+ * prereqs.m4 (gl_PREREQ): Require gl_UNLINKDIR.
+ * unlinkdir.m4: New file.
+
+2005-05-13 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4: Don't require gl_FUNC_STAT or gl_FUNC_LSTAT.
+ * stat.m4: Remove unnecessary file.
+ * lstat.m4: Remove unnecessary file.
+
+ * readdir.m4 (GL_FUNC_READDIR): Remove, now that remove.c no
+ longer needs it.
+ * jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_READDIR.
+
+2005-05-10 Derek Price <derek@ximbiot.com>
+
+ * getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
+ possible.
+
+2005-05-05 Paul Eggert <eggert@cs.ucla.edu>
+
+ * getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
+ needless checks.
+
+2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
+
+ * getpass.m4, gettext.m4: Sync from gnulib.
+
+2005-04-28 Paul Eggert <eggert@cs.ucla.edu>
+
+ * euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require AC_HEADER_STAT.
+ * jm-macros.m4 (gl_CHECK_ALL_TYPES): Likewise.
+ * lchown.m4 (gl_FUNC_CHOWN): Likewise.
+ (gl_PREREQ_CHOWN): Remove.
+ * lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
+ it. Don't require AC_HEADER_STAT.
+ (gl_PREREQ_LSTAT): Remove.
+ * mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
+ Don't require AC_HEADER_STAT.
+ * prereq.m4 (gl_PREREQ): Require gl_STAT_MACROS.
+ * rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
+ (gl_PREREQ_RMDIR): Remove.
+
+2005-04-27 Paul Eggert <eggert@cs.ucla.edu>
+
+ * stat-macros.m4: New file, from gnulib, except that gl_STAT_MACROS
+ also requires AC_HEADER_STAT.
+ * canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
+ mention stat-macros.h or AC_HEADER_STAT, since we'll make
+ the stat-macros module a prerequisite.
+ * file-type.m4 (gl_FILE_TYPE): Likewise.
+ * filemode.m4 (gl_FILEMODE): Likewise.
+ * makepath.m4 (gl_MAKEPATH): Likewise.
+ * modechange.m4 (gl_MODECHANGE): Likewise.
+
+2005-04-18 Paul Eggert <eggert@cs.ucla.edu>
+
+ * clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
+ variable names.
+ * jm-macros.m4 (gl_MACROS): Use gl_ or coreutils_ rather than fetish_
+ for prefixes.
+ * rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
+ fetish_FUNC_RMDIR_NOTEMPTY. All uses changed. Use gl_ for
+ variable prefixes.
+
+2005-04-11 Paul Eggert <eggert@cs.ucla.edu>
+
+ Add bulletproofing for cases where stdin, stdout, or stderr are closed.
+ * fcntl-safer.m4: Remove.
+ * stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
+ * unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
+ Invoke gl_PREREQ_FD_SAFER.
+ (gl_PREREQ_FD_SAFER): New macro.
+ * prereq.m4 (gl_PREREQ): Don't require gl_FCNTL_SAFER.
+
+2005-04-08 Paul Eggert <eggert@cs.ucla.edu>
+
+ * jm-macros.m4 (gl_MACROS): Check for siginterrupt.
+ * nanosleep.m4 (gl_PREREQ_NANOSLEEP): Likewise.
+ * jm-macros.m4 (gl_CHECK_ALL_TYPES): Do not require AC_TYPE_SIGNAL.
+
+2005-03-30 Paul Eggert <eggert@cs.ucla.edu>
+
+ * readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
+ Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
+ Remove duplicate call to AC_LIBOBJ(readutmp).
+ (gl_PREREQ_READUTMP): Remove. All uses inlined.
+
+2005-03-28 Eric Blake <ebb9@byu.net> (tiny change)
+
+ * getcwd-path-max.m4: Return success on systems such as Cygwin
+ where no absolute path name can be longer than PATH_MAX.
+
+2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
+
+ * canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Add stat-macros.h
+ to AC_LIBSOURCES.
+ * file-type.m4 (gl_FILE_TYPE): Likewise.
+ * filemode.m4 (gl_FILEMODE): Likewise.
+ * makepath.m4 (gl_MAKEPATH): Likewise.
+ * xstrtol.m4 (gl_XSTRTOL): Add xstrtoul.c to AC_LIBSOURCES.
+ Add xstrtoul to AC_LIBOBJ.
+
+ * onceonly.m4: Remove.
+ * onceonly_2_57.m4: Add.
+ This change shrinks "configure" by over 300 kB.
+
+ Another change imported from gnulib.
+ * memcasecmp.m4 (gl_MEMCASECMP): Renamed from gl_FUNC_MEMCASECMP.
+ All uses changed. Require AC_HEADER_STDC instead of invoking it.
+ Remove check for stddef.h, size_t, const, since we now assume
+ C89 or better.
+
+2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
+
+ * gettext.m4, inttypes.m4, isc-posix.m4, lib-link.m4, nls.m4,
+ onceonly.m4, po.m4: Sync from gnulib.
+
+2005-03-17 Jim Meyering <jim@meyering.net>
+
+ * typeof.m4 (gl_TYPEOF): New file/macro.
+ * prereq.m4 (gl_PREREQ): Require gl_TYPEOF.
+
+2005-03-10 Jim Meyering <jim@meyering.net>
+
+ * save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
+
+ * human.m4 (gl_HUMAN): Add intprops.h.
+ * inttostr.m4 (gl_INTTOSTR): Likewise
+ * sig2str.m4 (gl_FUNC_SIG2STR): Likewise.
+ * userspec.m4 (gl_USERSPEC): Likewise.
+ * utimecmp.m4 (gl_UTIMECMP): Likewise.
+ * xnanosleep.m4 (gl_XNANOSLEEP): Likewise.
+
+ * xstrtol.m4 (gl_XSTRTOL): Use AC_LIBSOURCES and AC_LIBOBJ
+ to list the required files.
+
+2005-03-09 Jim Meyering <jim@meyering.net>
+
+ * argmatch.m4, cycle-check.m4: New files.
+ * prereq.m4: Require their macros.
+
+2005-03-01 Paul Eggert <eggert@cs.ucla.edu>
+
+ * xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
+ to detect nanosleep bug.
+
+2005-02-25 Paul Eggert <eggert@cs.ucla.edu>
+
+ * gettext.m4, inttypes-pri.m4, lib-link.m4, lib-prefix.m4, nls.m4,
+ po.m4, progtest.m4: Sync from gnulib.
+
+2005-02-23 Jim Meyering <jim@meyering.net>
+
+ * extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's change.
+ Thanks to Bruno Haible for catching it.
+
+2005-02-22 Jim Meyering <jim@meyering.net>
+
+ * extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo: s/ifndef/ifdef/.
+
+2005-02-21 Paul Eggert <eggert@cs.ucla.edu>
+
+ * xnanosleep.m4: New file.
+ * gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Require gl_CLOCK_TIME,
+ gl_USE_SYSTEM_EXTENSIONS. Check whether CLOCK_MONOTONIC is
+ defined, and set LIB_GETHRXTIME accordingly. This is needed
+ for newer GNU/Linux systems that have clock_gettime, so that they
+ link in the appropriate library for it when needed.
+ * prereq.m4 (gl_PREREQ): Require gl_XNANOSLEEP.
+
+2005-02-20 Paul Eggert <eggert@cs.ucla.edu>
+
+ * gethrxtime.m4: New file.
+ * gettime.m4 (gl_GETTIME): Check for nanotime.
+ * jm-macros.m4 (gl_MACROS): Don't check for gethrtime.
+ * prereq.m4 (gl_PREREQ): Require gl_GETHRXTIME.
+
+2005-02-20 Jim Meyering <jim@meyering.net>
+
+ * stripslash.m4: New file.
+ * linebuffer.m4: New file.
+ * prereq.m4 (gl_PREREQ): Require gl_STRIPSLASH and gl_LINEBUFFER.
+
+2005-02-11 Jim Meyering <jim@meyering.net>
+
+ * inttostr.m4 (gl_INTTOSTR): Use AC_LIBSOURCES to list the
+ required source files.
+
+2005-02-09 Jim Meyering <jim@meyering.net>
+
+ * getcwd.m4 (gl_FUNC_GETCWD_NULL): Use AC_LIBSOURCES to list the
+ required source files.
+
+2005-02-08 Jim Meyering <jim@meyering.net>
+
+ * memcasecmp.m4 (gl_FUNC_MEMCASECMP): New file and macro.
+ * prereq.m4: Require gl_FUNC_MEMCASECMP.
+
+2005-02-07 Jim Meyering <jim@meyering.net>
+
+ * fts.m4 (gl_FUNC_FTS): New file and macro.
+ * prereq.m4: Require gl_FUNC_FTS.
+
+2005-02-06 Jim Meyering <jim@meyering.net>
+
+ * memrchr.m4 (gl_FUNC_MEMRCHR): Check for declaration of memrchr.
+
+ * chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Depend on gl_FUNC_MEMRCHR.
+
+2005-02-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ * memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
+
+2005-01-29 Jim Meyering <jim@meyering.net>
+
+ Use AC_LIBSOURCES to list corresponding source (.c, .h, .y) files
+ so that automake automatically knows to distribute those files.
+ Use AC_LIBOBJ to ensure that automake automatically knows the
+ names of always-compiled source files. Automake already knows
+ the names of conditionally compiled ones, e.g., due to preexisting
+ uses of AC_LIBOBJ and AC_REPLACE_FUNCS.
+ [This is a start. Many still remain to be fixed...]
+
+ * acl.m4, backupfile.m4, c-strtod.m4, canon-host.m4:
+ * canonicalize.m4, cloexec.m4, closeout.m4, dirfd.m4, dirname.m4:
+ * exclude.m4, exitfail.m4, file-type.m4, filemode.m4, fpending.m4:
+ * fsusage.m4, getdate.m4, getline.m4, getpagesize.m4, getpass.m4:
+ * gettime.m4, getugroups.m4, group-member.m4, hard-locale.m4:
+ * hash.m4, human.m4, idcache.m4, long-options.m4, makepath.m4:
+ * md5.m4, memcoll.m4, modechange.m4, mountlist.m4, nanosleep.m4:
+ * path-concat.m4, pathmax.m4, physmem.m4, posixtm.m4, posixver.m4:
+ * quote.m4, quotearg.m4, readtokens.m4, readutmp.m4, safe-read.m4:
+ * safe-write.m4, same.m4, savedir.m4, setenv.m4, settime.m4:
+ * sha1.m4, sig2str.m4, strdup.m4, strftime.m4, strndup.m4:
+ * strverscmp.m4, timespec.m4, unlocked-io.m4, userspec.m4:
+ * utimecmp.m4, utimens.m4, xalloc.m4, yesno.m4:
+
+2005-01-27 Jim Meyering <jim@meyering.net>
+
+ * hash-pjw.m4 (gl_HASH_PJW): New file/macro.
+ * basename.m4 (gl_BASENAME): New file/macro.
+ * prereq.m4: Require gl_HASH_PJW and gl_BASENAME.
+
+2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
+
+ Sync from gnulib.
+ * acl.m4, afs.m4, alloca.m4, assert.m4, atexit.m4,
+ backupfile.m4, bison.m4, c-strtod.m4, calloc.m4,
+ canon-host.m4, canonicalize.m4, clock_time.m4, cloexec.m4,
+ closeout.m4, d-ino.m4, d-type.m4, dirfd.m4, dirname.m4,
+ dos.m4, dup2.m4, error.m4, euidaccess.m4, exclude.m4,
+ exitfail.m4, extensions.m4, fcntl-safer.m4, file-type.m4,
+ fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4, free.m4,
+ fstypename.m4, fsusage.m4, ftruncate.m4, getcwd-path-max.m4,
+ getcwd.m4, getdate.m4, getgroups.m4, gethostname.m4,
+ getline.m4, getndelim2.m4, getopt.m4, getpagesize.m4,
+ getpass.m4, gettime.m4, gettimeofday.m4, getugroups.m4,
+ getusershell.m4, group-member.m4, hard-locale.m4, hash.m4,
+ host-os.m4, human.m4, idcache.m4, inttostr.m4, jm-winsz1.m4,
+ jm-winsz2.m4, link-follow.m4, long-options.m4, ls-mntd-fs.m4,
+ lstat.m4, makepath.m4, md5.m4, memchr.m4, memcmp.m4,
+ memcoll.m4, memcpy.m4, memmove.m4, memrchr.m4, memset.m4,
+ mkdir-slash.m4, mkstemp.m4, mktime.m4, modechange.m4,
+ mountlist.m4, nanosleep.m4, obstack.m4, path-concat.m4,
+ pathmax.m4, perl.m4, physmem.m4, posixtm.m4, posixver.m4,
+ putenv.m4, quote.m4, quotearg.m4, readdir.m4, readtokens.m4,
+ readutmp.m4, regex.m4, rename.m4, restrict.m4, rmdir-errno.m4,
+ rmdir.m4, rpmatch.m4, same.m4, savedir.m4, settime.m4,
+ sha1.m4, sig2str.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
+ stdio-safer.m4, strdup.m4, strftime.m4, strndup.m4,
+ strnlen.m4, strtod.m4, strtoimax.m4, strtol.m4, strtoll.m4,
+ strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4,
+ timespec.m4, tm_gmtoff.m4, tzset.m4, uint32_t.m4,
+ uintptr_t.m4, unistd-safer.m4, unlink-busy.m4, unlocked-io.m4,
+ uptime.m4, userspec.m4, utimbuf.m4, utime.m4, utimecmp.m4,
+ utimens.m4, utimes-null.m4, xalloc.m4, xgetcwd.m4,
+ xreadlink.m4, xstrtod.m4, xstrtoimax.m4, xstrtol.m4,
+ xstrtoumax.m4, yesno.m4:
+ Use an all-permissive copyright notice, recommended by RMS.
+
+2005-01-21 Bruno Haible <bruno@clisp.org>
+
+ Sync from gnulib.
+ * allocsa.m4, chdir-long.m4, chown.m4, codeset.m4, eealloc.m4,
+ eoverflow.m4, glibc21.m4, iconv.m4, intmax_t.m4, inttypes_h.m4,
+ lchown.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4, longdouble.m4,
+ longlong.m4, mbrtowc.m4, mbstate_t.m4, mbswidth.m4, mempcpy.m4,
+ openat.m4, readlink.m4, safe-read.m4, safe-write.m4, setenv.m4,
+ signed.m4, ssize_t.m4, stdbool.m4, stdint_h.m4, stpcpy.m4,
+ strcase.m4, strcspn.m4, strpbrk.m4, strstr.m4, uintmax_t.m4,
+ ullong_max.m4, ulonglong.m4, unicodeio.m4, utimes.m4,
+ vasnprintf.m4, vasprintf.m4, wchar_t.m4, wint_t.m4:
+ Use an all-permissive copyright notice, recommended by RMS.
+
+2005-01-20 Paul Eggert <eggert@cs.ucla.edu>
+
+ * save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume it.
+
+2005-01-14 Jim Meyering <jim@meyering.net>
+
+ * utimes.m4: Work around tests/touch/empty-file failure on a system
+ (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
+ NULL-means-set-to-current-time semantics.
+ Remove temporary file immediately, rather than waiting
+ for configure's at-exit trap code to do it.
+
+2005-01-04 Jim Meyering <jim@meyering.net>
+
+ * chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
+ is sane and DOES follow symlinks. Besides, testing 20 different
+ systems found no broken chown implementations.
+ Prompted by a change in rsync's copy of this macro.
+
+2005-01-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ * ullong_max.m4: New file.
+ * jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
+
+2005-01-03 Jim Meyering <jim@meyering.net>
+
+ * mkstemp.m4 (gl_FUNC_MKSTEMP): Don't `cd' into the temporary
+ subdirectory. That would make the subsequent AC_TRY_RUN macro fail,
+ for lack of the ./confdefs.h file. Instead, use the temporary
+ directory name as a prefix on the template string.
+ Include <unistd.h> for the declaration of close.
+ Remove `.tmp' suffix; mkstemp requires that XXXXXX be a suffix.
+
+2004-12-23 Paul Eggert <eggert@cs.ucla.edu>
+
+ * getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
+
+2004-12-21 Jim Meyering <jim@meyering.net>
+
+ * mkstemp.m4 (gl_FUNC_MKSTEMP): Remove temporary directory right
+ away, rather than waiting for configure's at-exit trap code to do it.
+ Suggestion from Stepan Kasal.
+
+2004-12-20 Jim Meyering <jim@meyering.net>
+
+ * mkstemp.m4: Do the `cd' in a subshell.
+
+ * mkstemp.m4: Rather than using "conftestXXXXXX" as the mkstemp
+ template, use a temporary directory and an 8.3-friendly template
+ to avoid trouble on systems like DJGPP.
+ Reported by Juan M. Guerrero via Stepan Kasal.
+
+2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
+
+ * c-strtod.m4 (gl_C99_STRTOLD): New macro.
+ (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
+
+2004-12-10 Jim Meyering <jim@meyering.net>
+
+ * chdir-long.m4 (gl_FUNC_CHDIR_LONG: Arrange to compile chdir-long.c
+ only on systems that define PATH_MAX.
+
+2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
+
+ * ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
+ spurious "-l"s. Problem reported by Stepan Kasal.
+
+2004-12-06 Paul Eggert <eggert@cs.ucla.edu>
+
+ * ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
+ in Autoconf 2.59. Problem reported by Mark D. Baushke.
+
+2004-12-06 Jim Meyering <jim@meyering.net>
+
+ * save-cwd.m4 (gl_SAVE_CWD): Use AC_LIBSOURCES.
+ Use AC_LIBOBJ(save-cwd).
+ * chdir-long.m4 (gl_FUNC_CHDIR_LONG): Use AC_LIBSOURCES.
+ Use AC_LIBOBJ(chdir-long).
+ * mempcpy.m4 (gl_FUNC_MEMPCPY): Use AC_LIBSOURCES.
+ * lchown.m4 (gl_FUNC_LCHOWN): Likewise.
+ * openat.m4 (gl_FUNC_OPENAT): Likewise.
+ (gl_PREREQ_GETCWD): Use AC_REQUIRE.
+
+2004-12-02 Paul Eggert <eggert@cs.ucla.edu>
+
+ * openat.m4: Add copyright notice.
+ (gl_FUNC_OPENAT): Require gl_USE_SYSTEM_EXTENSIONS, since Solaris
+ requires __EXTENSIONS__ to be defined when compiling pedantically,
+ if you want AT_FDCWD.
+
+2004-12-01 Paul Eggert <eggert@cs.ucla.edu>
+
+ * hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
+ exist.
+ * human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
+ * jm-macros.m4 (gl_MACROS): Assume localeconv exists.
+
+2004-11-30 Paul Eggert <eggert@cs.ucla.edu>
+
+ * getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
+ Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
+
+ * readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
+
+2004-11-30 Jim Meyering <jim@meyering.net>
+
+ * chdir-long.m4: Rename from chdir.m4.
+ * jm-macros.m4 (gl_MACROS): Reflect renaming.
+
+2004-11-28 Jim Meyering <jim@meyering.net>
+
+ * chdir.m4: New file.
+ * openat.m4: New file.
+ * jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR.
+
+2004-11-25 Paul Eggert <eggert@cs.ucla.edu>
+
+ * mempcpy.m4: New file, taken from gnulib.
+ * getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
+ GL_FUNC_GETCWD_PATH_MAX for consistency. All uses changed.
+ Use the _ONCE methods, for efficiency.
+ Check for fcntl.h. In test program, include <errno.h>
+ and <fcntl.h> if available. Remove old K&R cruft from
+ test program. Check for common errors in GNU/Linux,
+ OpenBSD, and Solaris. Just set gl_cv_func_getcwd_path_max;
+ don't do AC_LIBOBJ, as that's getcwd.m4's job.
+ * getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
+ AC_FUNC_GETCWD_NULL. All used changed. Change cache variable
+ name accordingly.
+ (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros. Revamp to
+ accommodate new getcwd.c.
+ * jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
+ * prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
+ * xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
+ that's all we need now.
+
+2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
+
+ * utimens.m4 (gl_UTIMENS): Check for futimes function.
+
+2004-11-23 Sergey Poznyakoff <gray@Mirddin.farlep.net>
+
+ * getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
+ order not to spoil the result of an eventual previous invocation
+ of gl_GETOPT_SUBSTITUTE.
+
+2004-11-17 Paul Eggert <eggert@cs.ucla.edu>
+
+ * calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc implementations
+ that mishandle size_t overflow.
+
+2004-11-16 Paul Eggert <eggert@cs.ucla.edu>
+
+ * canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
+
+2004-11-13 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4: Do require gl_FUNC_FPENDING.
+ * fpending.m4: Restore file.
+
+2004-11-11 Paul Eggert <eggert@cs.ucla.edu>
+
+ * getopt.m4: Sync from gnulib.
+
+2004-11-06 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4: Don't require gl_FUNC_FPENDING.
+ * fpending.m4: Remove file.
+
+2004-11-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ * setenv.m4: New file, from gnulib.
+ * prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
+ * uint32_t.m4: Sync from gnulib.
+
+2004-11-02 Paul Eggert <eggert@cs.ucla.edu>
+
+ * getpass.m4: Sync from gnulib.
+
+2004-10-29 Paul Eggert <eggert@cs.ucla.edu>
+
+ * getpagesize.m4: Sync from gnulib.
+
+2004-10-17 Paul Eggert <eggert@cs.ucla.edu>
+
+ * jm-macros.m4 (gl_MACROS): Check for mbrlen, for pathchk.
+ (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
+
+ Sync from gnulib.
+ * getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
+ implementation of getopt_long.
+
+2004-10-04 Paul Eggert <eggert@cs.ucla.edu>
+
+ Sync from gnulib.
+
+ * xalloc.m4 (gl_PREREQ_XSTRDUP): Remove. All uses removed.
+
+ * unlocked-io.m4: Add copyright notice.
+ (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
+
+2004-10-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ Sync from gnulib.
+ * mbswidth.m4: Add copyright notice.
+ * vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
+ * eoverflow.m4: New file.
+
+2004-08-19 Paul Eggert <eggert@cs.ucla.edu>
+
+ * getopt.m4: Sync from gnulib.
+
+2004-08-11 Paul Eggert <eggert@cs.ucla.edu>
+
+ * obstack.m4 (gl_PREREQ_OBSTACK): Require
+ gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
+
+ * fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
+
+2004-08-09 Paul Eggert <eggert@cs.ucla.edu>
+
+ * sha1.m4: Renamed from sha.m4.
+ (gl_SHA1): Renamed from gl_SHA. All uses changed.
+
+2004-08-08 Simon Josefsson <jas@extundo.com>
+
+ * getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
+ Check getpass declaration.
+
+2004-08-07 Paul Eggert <eggert@cs.ucla.edu>
+
+ * canonicalize.m4, getcwd-path-max.m4, strdup.m4: Merge from gnulib.
+
+2004-08-05 Paul Eggert <eggert@cs.ucla.edu>
+
+ Merge from gnulib.
+
+ * alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
+ for backward compatibility with older code. We need our own
+ alloca.h if _AIX is defined. Define HAVE_ALLOCA if we discover
+ it under some other name, and our alloca.h will define it.
+ * backupfile.m4, calloc.m4, strtoimax.m4, strtoumax.m4:
+ Bump serial number only.
+ * dirfd.m4, intmax_t.m4, inttypes_h.m4, mbrtowc.m4, stdint_h.m4,
+ uintmax_t.m4: Finish renaming jm_ to gl_.
+ * dos.m4 (gl_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
+ * host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
+ * prereq.m4 (gl_PREREQ): Add gl_GETTIME, AC_FUNC_CALLOC.
+ * gettime.m4: New file.
+ * settime.m4: Require gl_TIMESPEC; check for settimeofday, stime.
+ * unlocked-io.m4: Remove -*- autoconf -*-.
+ * xalloc.m4: No longer require AC_FUNC_CALLOC, AC_FUNC_MALLOC,
+ AC_FUNC_REALLOC.
+
+2004-08-04 Paul Eggert <eggert@cs.ucla.edu>
+
+ OpenBSD porting fixes.
+ * boottime.m4: Add copyright notice.
+ (GNULIB_BOOT_TIME): Include sys/param.h before testing
+ for sys/sysctl.h.
+ * fsusage.m4: Add copyright notice.
+ (gl_FSUSAGE): Include sys/param.h before checking for sys/mount.h.
+ * jm-macros.m4: Include copyright notice.
+ (gl_MACROS): Use the _ONCE variants when appropriate.
+ Include sys/param.h before testing for sys/sysctl.h and sys/mount.h.
+ * ls-mntd-fs.m4: Include copyright notice.
+ (gl_LIST_MOUNTED_FILE_SYSTEMS): Include sys/param.h before
+ testing for sys/mount.h.
+ * stat-prog.m4: Include copyright notice.
+ (cu_PREREQ_STAT_PROG): Use the _ONCE variants when appropriate.
+ Include sys/param.h before testing for sys/mount.h.
+
+2004-08-01 Paul Eggert <eggert@cs.ucla.edu>
+
+ * jm-macros.m4 (gl_CHECK_ALL_TYPES):
+ Require gl_AC_TYPE_UINTPTR_T instead of using AC_CHECK_TYPE
+ on uintptr_t. Require gl_AC_TYPE_UINT32_T.
+ * md5.m4 (gl_MD5): Require gl_AC_TYPE_UINT32_T.
+ * uint32_t.m4, uintptr_t.m4: New files.
+
+2004-07-28 Paul Eggert <eggert@cs.ucla.edu>
+
+ * md5.m4 (gl_MD5): Do not require AC_C_INLINE, since it doesn't
+ use inline any more. Require AC_C_BIGENDIAN, though.
+ * sha.m4 (gl_SHA): Require AC_C_BIGENDIAN.
+
+2004-07-27 Paul Eggert <eggert@cs.ucla.edu>
+
+ * euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't bother checking for
+ unistd.h, as autoconf does this for us. Check for libgen.h.
+ Also look for eaccess within -lgen, which is where it is in
+ Solaris. Set LIB_EACCESS accordingly.
+
+ * backupfile.m4 (gl_BACKUPFILE): AC_REQUIRE
+ gl_CHECK_TYPE_STRUCT_DIRENT_D_INO instead of invoking it directly.
+ Do not require AC_FUNC_CLOSEDIR_VOID.
+
+2004-07-25 Paul Eggert <eggert@cs.ucla.edu>
+
+ * jm-macros.m4 (gl_MACROS): Remove test for setreuid and setregid,
+ as test.c no longer uses them directly.
+
+ * euidaccess.m4 (gl_FUNC_NONREENTRANT_EUIDACCESS): New macro.
+ (gl_FUNC_EUIDACCESS): Use AC_CHECK_DECLS_ONCE, not AC_CHECK_DECLS.
+ (gl_PREREQ_EUIDACCESS): Check for eaccess and setregid decls.
+ Require AC_HEADER_STAT.
+
+ * prereq.m4 (gl_PREREQ): Invoke gl_FUNC_NONREENTRANT_EUIDACCESS,
+ not gl_FUNC_EUIDACCESS.
+
+2004-07-23 Paul Eggert <eggert@cs.ucla.edu>
+
+ * prereq.m4 (gl_PREREQ): Add gl_FCNTL_SAFER.
+ * fcntl-safer.m4: New file.
+
+2004-07-12 Paul Eggert <eggert@cs.ucla.edu>
+
+ * c-strtod.m4 (gl_C_STRTOD): Add gl_USE_SYSTEM_EXTENSIONS.
+
+2004-07-11 Paul Eggert <eggert@cs.ucla.edu>
+
+ * c-strtod.m4: New file.
+ * prereq.m4 (gl_PREREQ): Add gl_C_STRTOLD.
+
+2004-04-03 Dmitry V. Levin <ldv@altlinux.org>
+
+ * canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
+ Do not add canonicalize.c here.
+
+2004-07-02 Paul Eggert <eggert@cs.ucla.edu>
+
+ * path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
+ prerequisite modules now handle the DOS stuff.
+ Don't check for unistd.h.
+
+2004-06-30 Paul Eggert <eggert@cs.ucla.edu>
+
+ * dos.m4 (gl_AC_DOS): Define FILE_SYSTEM_PREFIX_LEN, not
+ FILESYSTEM_PREFIX_LEN. Generate
+ FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX, not
+ FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX. Generate
+ FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR, not
+ FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
+ * ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Renamed from
+ gl_LIST_MOUNTED_FILESYSTEMS. All uses changed.
+
+2004-06-25 Jim Meyering <jim@meyering.net>
+
+ * afs.m4 (gl_AFS): Use AC_ARG_WITH instead of ancient, hard-coded
+ AC_MSG_CHECKING/AC_MSG_RESULT etc. From Tim Waugh.
+
+2004-06-15 Paul Eggert <eggert@cs.ucla.edu>
+
+ * getcwd-path-max.m4 (GL_FUNC_GETCWD_PATH_MAX): Fix typo: getcwd
+ was being replaced when it shouldn't have been, and vice versa.
+
+2004-06-09 Jim Meyering <jim@meyering.net>
+
+ * calloc.m4 (AC_FUNC_CALLOC): Remove use of AN_FUNCTION.
+
+2004-06-07 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (gl_MACROS): Check for the directio function.
+
+2004-06-01 Jim Meyering <jim@meyering.net>
+
+ * stdbool.m4: Update from gnulib.
+
+2004-05-29 Jim Meyering <jim@meyering.net>
+
+ * xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_FUNC_CALLOC.
+ * calloc.m4 (AC_FUNC_CALLOC, _AC_FUNC_CALLOC_IF): New file/macros.
+
+2004-05-21 Jim Meyering <jim@meyering.net>
+
+ * free.m4: Update from gnulib (fix reversed test).
+
+2004-05-03 Jim Meyering <jim@meyering.net>
+
+ Temporary work-around for the problem reported here:
+ http://sources.redhat.com/ml/bug-automake/2004/msg00339.html
+
+ * gettext.m4 (AM_GNU_GETTEXT): Don't require AM_INTL_SUBDIR.
+ (AM_INTL_SUBDIR): Comment out definition.
+
+2004-05-01 Jim Meyering <jim@meyering.net>
+
+ * jm-mktime.m4: Remove file. This is now part of mktime.m4.
+ * glibc.m4, c-stack.m4, xsize.m4, size_max.m4: Remove unused files.
+ * printf-posix.m4, lcmessage.m4: Likewise.
+ * gettextext.m4, intdiv0.m4, intmax.m4: Likewise.
+
+ * jm-macros.m4 (gl_MACROS): Move fchown-checking code to chown.m4.
+ * chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
+ See if we need an fchown replacement.
+ (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
+ (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
+ and use the replacement function if we detect either defect.
+
+2004-04-22 Paul Eggert <eggert@twinsun.com>
+
+ * jm-macros.m4 (gl_MACROS): Check for tcgetpgrp.
+
+2004-04-23 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4: Don't check for values.h; it's no longer used.
+
+2004-04-20 Jim Meyering <jim@meyering.net>
+
+ Change UTILS_ to gl_ in AC_DEFINE'd names.
+ Change utils_- and jm_-prefixed variables, too.
+ * mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
+ UTILS_FUNC_MKDIR_TRAILING_SLASH.
+ * mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
+ * host-os.m4 (gl_HOST_OS): Renamed from UTILS_HOST_OS.
+
+ * dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
+ Don't emit trailing blanks.
+ Also rename jm_-prefixed variables to have gl_ prefix.
+
+ * jm-macros.m4: Reflect the renamings.
+ * prereq.m4: Likewise.
+
+2004-04-19 Jim Meyering <jim@meyering.net>
+
+ * readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
+ now that readutmp.c may call `free (0)'.
+
+2004-04-14 Jim Meyering <jim@meyering.net>
+
+ * Makefile.am: Remove file. With automake-1.8.3, it's no longer needed.
+ * Makefile.am.in: Likewise.
+ * Makefile.in: Likewise.
+
+ * stat-prog.m4 (cu_PREREQ_STAT_PROG): Don't use AC_CHECK_HEADERS to
+ check for inttypes.h. Instead, require gt_HEADER_INTTYPES_H.
+
+ * jm-macros.m4: Require cu_PREREQ_STAT_PROG.
+
+ * prereq.m4: Move prerequisite function for src/stat.c to ...
+ * stat-prog.m4 (cu_PREREQ_STAT_PROG): New file. Contents from prereq.m4.
+
+2004-04-13 Jim Meyering <jim@meyering.net>
+
+ Change `jm_' in AC_DEFINE'd names to `gl_'. Update all uses.
+
+ * afs.m4, allocsa.m4, assert.m4, backupfile.m4, bison.m4:
+ * check-decl.m4, chown.m4, d-ino.m4, d-type.m4, dirname.m4:
+ * dos.m4, error.m4, fpending.m4, fstypename.m4, fsusage.m4:
+ * ftruncate.m4, getdate.m4, getgroups.m4, gettext.m4, glibc21.m4:
+ * group-member.m4, human.m4, intmax.m4, intmax_t.m4, inttostr.m4:
+ * inttypes_h.m4, jm-macros.m4, jm-mktime.m4, jm-winsz1.m4:
+ * jm-winsz2.m4, lchown.m4, lib-check.m4, link-follow.m4, longlong.m4:
+ * ls-mntd-fs.m4, lstat.m4, makepath.m4, mbrtowc.m4, mbswidth.m4:
+ * memchr.m4, memcmp.m4, mkstemp.m4, mountlist.m4, nanosleep.m4:
+ * path-concat.m4, perl.m4, prereq.m4, putenv.m4, quotearg.m4:
+ * regex.m4, stat.m4, stdint_h.m4, strftime.m4, strtoimax.m4:
+ * strtoll.m4, strtoull.m4, strtoumax.m4, timespec.m4, uintmax_t.m4:
+ * ulonglong.m4, unlink-busy.m4, unlocked-io.m4, uptime.m4, utimbuf.m4:
+ * utime.m4, utimens.m4, utimes-null.m4, vasnprintf.m4, xstrtoimax.m4:
+ * xstrtol.m4, xstrtoumax.m4: Change jm_ to gl_ in AC_DEFINE'd names.
+
+2004-03-27 Paul Eggert <eggert@twinsun.com>
+
+ * utimecmp.m4: New file.
+ * prereq.m4 (jm_PREREQ): Require gl_UTIMECMP.
+
+2004-04-07 Paul Eggert <eggert@twinsun.com>
+
+ * jm-macros.m4 (jm_MACROS): Check for fdatasync within
+ -lrt and -lposix4, so that it can be used in Solaris 2.5.1 and later.
+
+2004-03-30 Paul Eggert <eggert@twinsun.com>
+
+ * c-stack.m4, getline.m4, getndelim2.m4, mbswidth.m4, po.m4,
+ strdup.m4, xsize.m4: Sync from gnulib.
+
+ * allocsa.m4, cloexec.m4, eealloc.m4, inttostr.m4, mbstate_t.m4:
+ New files, from gnulib.
+
+ * prereq.m4 (jm_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR.
+
+2004-03-31 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
+ Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
+ * xalloc.m4: Likewise.
+
+ * realloc.m4: Remove file, since now it does no more than
+ AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
+ the `configure.ac' section of module/realloc.
+ * malloc.m4: Likewise, but for AC_FUNC_MALLOC.
+
+2004-02-29 Paul Eggert <eggert@twinsun.com>
+
+ * clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
+ * getdate.m4 (gl_GETDATE): Remove time-related stuff.
+ Require AM_STDBOOL_H and gl_TIMESPEC instead.
+ Require gl_CLOCK_TIME.
+
+2004-03-07 Paul Eggert <eggert@twinsun.com>
+
+ * Makefile.am.in (Makefile.am):
+ Don't use $<, as it doesn't work with Solaris make.
+
+2004-01-29 Jim Meyering <jim@meyering.net>
+
+ Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
+ * ls-mntd-fs.m4: Test for sys/ucred.h separately, since
+ on some systems one must include <grp.h> before it.
+ Reported by Christian Krackowizer.
+
+2004-01-16 Jim Meyering <jim@meyering.net>
+
+ * onceonly.m4: Sync with version from gettext-0.13.1.
+
+2003-10-08 Paul Eggert <eggert@twinsun.com>
+
+ Merge from gnulib.
+
+ * getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
+
+2003-08-26 Bruno Haible <bruno@clisp.org>
+
+ Merge from gnulib.
+
+ * fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
+ This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
+ followed by '#define fnmatch fnmatch_posix' gives an error.
+
+2004-01-14 Paul Eggert <eggert@twinsun.com>
+
+ * posixv.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
+
+2004-01-13 Jim Meyering <jim@meyering.net>
+
+ * gettext.m4, lib-ld.m4, lib-prefix.m4, nls.m4, po.m4:
+ Update from gettext-0.13.1.
+ * intmax.m4, isc-posix.m4, printf-posix.m4, size_max.m4, xsize.m4:
+ New files. From gettext-0.13.1.
+
+2004-01-11 Paul Eggert <eggert@twinsun.com>
+
+ * posixver.m4 (gl_DEFAULT_POSIX2_VERSION): Move
+ the documentation from 'configure' into 'config.hin',
+ so that 'configure --help' isn't burdened by it and
+ we don't have to worry about its formatting there.
+ Reword the documentation so that it's more succinct
+ and can be run together into a single paragraph.
+
+2004-01-12 Jim Meyering <jim@meyering.net>
+
+ * posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
+
+2003-12-20 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
+
+ * open-max.m4 (UTILS_SYS_OPEN_MAX): Remove file. No longer used.
+
+ * lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
+ value, $ac_cv_search_crypt, if it's "none required".
+
+2003-12-19 Jim Meyering <jim@meyering.net>
+
+ * clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
+ if no library is required.
+
+2003-12-18 Jim Meyering <jim@meyering.net>
+
+ * search-libs.m4 (AC_SEARCH_LIBS): Remove file/macro, now that
+ this replacement is no longer needed. Besides, this macro has
+ no effect with autoconf-2.58, since `undefine' in package-supplied
+ .m4 files is no longer honored. Reported by Andreas Schwab.
+
+ Remove now-unnecessary (and unused) files. They also used `undefine'.
+ * isc-posix.m4 (AC_ISC_POSIX): Remove file.
+ * getloadavg.m4 (gl_FUNC_GETLOADAVG): Remove file.
+ * prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
+ not gl_FUNC_GETLOADAVG.
+
+2003-11-08 Jim Meyering <jim@meyering.net>
+
+ * inttypes.m4: Sync from gnulib (this file was previously empty,
+ to work around some sort of problem).
+
+2003-11-08 Alexandre Duret-Lutz <adl@gnu.org>
+
+ * nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
+ value, $ac_cv_search_nanosleep, if it's "none required".
+
+2003-11-05 Paul Eggert <eggert@twinsun.com>
+
+ * jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
+
+2003-11-05 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
+ * free.m4: New file, from gnulib.
+
+ * exitfail.m4, host-os.m4, strndup.m4: Update from gnulib.
+
+ * jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
+ (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
+
+2003-10-13 Paul Eggert <eggert@twinsun.com>
+
+ * xalloc.m4: Import latest version from gnulib.
+
+2003-10-06 Jim Meyering <jim@meyering.net>
+
+ * ftw.m4: Remove now-unused file.
+
+2003-10-05 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
+
+2003-09-17 Paul Eggert <eggert@twinsun.com>
+
+ Update from gnulib.
+ * extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
+ to avoid spurious warnings like "AC_RUN_IFELSE was called before
+ gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
+
+2003-09-12 Paul Eggert <eggert@twinsun.com>
+
+ More patches to assume C89 or better.
+
+ * mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C headers.
+ * strdup.m4 (gl_PREREQ_STRDUP): Likewise.
+ * userspec.m4 (gl_USERSPEC): Likewise.
+ * xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
+ * xstrtod.m4 (gl_XSTRTOD): Likewise.
+ * xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
+ * strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
+ memcpy, memset.
+ (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
+ * strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
+ * strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h, strtol.
+ * strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
+ * userspec.m4 (gl_USERSPEC): Do not check for string.h.
+ * xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
+ strtoul.
+
+2003-09-12 Paul Eggert <eggert@twinsun.com>
+
+ * error.m4 (gl_ERROR): Don't check for vprintf.
+ Require AC_FUNC_STRERROR_R rather than invoking it.
+
+2003-09-12 Paul Eggert <eggert@twinsun.com>
+
+ * check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
+ unconditionally.
+ * closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
+ * gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
+ Include <string.h>, <stdlib.h> unconditionally.
+ * lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
+ * readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
+ * readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C headers
+ or for string.h.
+ * strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlb.h
+ or strtoul.
+ * extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
+ and AC_MINIX, too, so that their extensions are available.
+
+ * prereq.m4 (jm_PREREQ_ADDEXT): Remove. All uses removed.
+ This macro has been superseded by gl_BACKUPFILE.
+
+2003-09-12 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
+ gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
+ * readtokens.m4: New file, from gnulib
+ * md5.m4: Likewise.
+ * makepath.m4: Likewise.
+ * long-options.m4: Likewise.
+ * idcache.m4: Likewise.
+ * getugroups.m4: Likewise.
+
+2003-09-11 Paul Eggert <eggert@twinsun.com>
+
+ More patches to assume C89 or better.
+ * strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
+ * strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
+ string.h, memchr, STDC_HEADERS.
+
+2003-09-10 Bruno Haible <bruno@clisp.org>
+
+ * strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
+ * strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
+ * strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
+ * unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
+ * xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
+ * yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
+
+2003-09-09 Paul Eggert <eggert@twinsun.com>
+
+ * getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
+ * getopt.m4 (gl_GETOPT): Don't check for string.h.
+ * getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for stdlib.h.
+ * group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard C
+ headers.
+ * hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
+ string.h.
+ * hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
+ * human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
+ * sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
+ * memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
+ * memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
+ * memcoll.m4 (gl_MEMCOLL): Likewise.
+ * memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
+ * mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
+ string.h, free.
+ * mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
+ * modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
+ * mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
+ C headers, or for string.h.
+ * obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
+ (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
+ * path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
+ headers, memory.h, stdlib.h, string.h, strings.h.
+ * posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
+ * posixver.m4 (gl_POSIXVER): Don't check for getenv.
+ * putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
+ strchr.
+ * regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
+ * rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
+ free.
+ * rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C headers.
+ * save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
+ * savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
+ * xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
+
+2003-09-09 Derek Robert Price <derek@ximbiot.com>
+
+ * getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
+ C89 spec.
+
+2003-09-08 Paul Eggert <eggert@twinsun.com>
+
+ Assume C89 or better; remove K&R cruft.
+ * alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
+ * backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
+ string.h, getenv, malloc.
+ * dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
+ headers.
+ * canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
+ * error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
+ do not check for strerror.
+ * exclude.m4: Do not check for stdlib.h, string.h, strings.h.
+ * exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
+ * fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove. All uses removed.
+ * getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
+
+2003-08-27 Jim Meyering <jim@meyering.net>
+
+ * mkstemp.m4: Require that the system mkstemp be able to create
+ 70 temporary files, not just 30. Tru64 V4.0F's mkstemp function
+ would fail after 32. Reported by Danny Levinson. Details here:
+ http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
+
+2003-08-19 Jim Meyering <jim@meyering.net>
+
+ * lib-ld.m4: Revert yesterday's change, per Bruno's request here:
+ http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
+
+2003-08-18 Paul Eggert <eggert@twinsun.com>
+
+ * same.m4 (gl_SAME): Do not check for stdlib.h or string.h or free.
+ Check for pathconf.
+
+2003-08-18 Jim Meyering <jim@meyering.net>
+
+ * getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
+ * lib-ld.m4: Likewise.
+ * po.m4: Likewise.
+
+2003-08-18 Paul Eggert <eggert@twinsun.com>
+ and Jim Meyering <jim@meyering.net>
+
+ It turns out that we need AM_NLS and AM_PO_SUBDIRS after all;
+ otherwise po/POTFILES and po/Makefile aren't built by 'configure'.
+ I'm not sure why I didn't catch this earlier; most likely some
+ leftover build files. Sorry about that.
+ * gettextext.m4 (AM_NLS, AM_PO_SUBDIRS): Remove definitions.
+ * nls.m4, po.m4: New files, taken from gnulib / gettext.
+
+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
+ file name, not `x'. The former will be removed automatically.
+
+2003-08-13 Jim Meyering <jim@meyering.net>
+
+ * README: Remove file.
+ * Makefile.am.in: Simplify.
+ (Makefile.am): Remove README.
+
+2003-08-10 Jim Meyering <jim@meyering.net>
+
+ * utimes.m4 (gl_FUNC_UTIMES): New file.
+ * utimens.m4: Require gl_FUNC_UTIMES.
+ Don't check for utime or utimes.
+
+ * utimes.m4: Removed.
+ * utimes-null.m4: Renamed from utimes.m4.
+
+2003-08-06 Paul Eggert <eggert@twinsun.com>
+
+ * prereq.m4 (jm_PREREQ): Require gl_UTIMENS.
+ * utimens.m4: New file.
+
+2003-08-08 Paul Eggert <eggert@twinsun.com>
+
+ * vasnprintf.m4 (gl_PREREQ_VASNPRINTF):
+ Solaris 2.5.1 needs -lw to get the wcslen function.
+
+2003-08-08 Paul Eggert <eggert@twinsun.com>
+
+ Use new gnulib 'extensions' module.
+ * extensions.m4, unlocked-io.m4: New files, from gnulib.
+ * gnu-source.m4, jm-glibc-io.m4: Remove.
+ * timespec.m4: Merge from gnulib.
+
+2003-08-08 Paul Eggert <eggert@twinsun.com>
+
+ * jm-macros.m4 (jm_MACROS): Replace jm_INCLUDED_REGEX([lib/regex.c])
+ with gl_REGEX.
+ Replace jm_FUNC_MKTIME with gl_FUNC_MKTIME.
+ Remove redundant AC_FUNC_FNMATCH_GNU, jm_FUNC_MKTIME.
+ Remove AC_FUNC_VPRINTF.
+ Add gl_ERROR.
+
+2003-08-05 Paul Eggert <eggert@twinsun.com>
+
+ * jm-macros.m4 (jm_MACROS): Use gl_GETNDELIM2 rather than
+ checking for getdelim.
+ (jm_CHECK_ALL_TYPES): Use gt_TYPE_SSIZE_T for ssize_t rather
+ than rolling our own.
+ Merge getline from gnulib.
+ * getline.m4: Merge from gnulib.
+ * getndelim2.m4, ssize_t.m4: New files, from gnulib.
+
+2003-08-04 Paul Eggert <eggert@twinsun.com>
+
+ * regex.m4: Merge with gnulib.
+ (gl_REGEX): New macro.
+ (jm_INCLUDED_REGEX): Don't assume Latin-1 encoding of source code.
+ * restrict.m4: Merge with gnulib.
+ (gl_C_RESTRICT): Renamed from ACX_C_RESTRICT. All uses changed.
+ Rename cache vars to gl_cv_*. Incorporate latest Autoconf CVS tricks.
+
+2003-08-05 Paul Eggert <eggert@twinsun.com>
+
+ * gnu-source.m4: New file, taken from gnulib, with support
+ added for __EXTENSIONS__ a la Solaris.
+ * jm-macros.m4 (jm_CHECK_ALL_TYPES): Call gl_TIMESPEC rather
+ than jm_CHECK_TYPE_STRUCT_TIMESPEC.
+ * st_mtim.m4: Sync with gnulib (white space change only).
+ * timespec.m4: Sync with gnulib, except also require
+ AC_GNU_SOURCE.
+
+2003-08-05 Paul Eggert <eggert@twinsun.com>
+
+ * prereq.m4 (jm_PREREQ_PHYSMEM, jm_PREREQ_STAT): Ignore headers
+ that are present but cannot be compiled. This avoids spurious warnings
+ on Solaris 9 sparc with Forte Developer 7 C 5.4.
+
+2003-08-04 Paul Eggert <eggert@twinsun.com>
+
+ Merge fnmatch module from gnulib.
+ * fnmatch.m4: New file, from gnulib.
+ * jm-macros.m4 (jm_MACROS): Require gl_FUNC_FNMATCH_GNU
+ instead of AC_FUNC_ERROR_AT_LINE.
+
+2003-08-04 Paul Eggert <eggert@twinsun.com>
+
+ * error.m4: Sync from gnulib.
+
+2003-07-23 Jim Meyering <jim@meyering.net>
+
+ * lstat.m4, mkstemp.m4, regex.m4, stat.m4: Normalize naming of Sun
+ operating systems in comments, e.g., SunOS4 -> SunOS 4,
+ Solaris5.9 -> Solaris 9. From Paul Eggert.
+
+2003-07-18 Paul Eggert <eggert@twinsun.com>
+
+ * jm-macros.m4 (jm_MACROS): Invoke gl_MEMCOLL.
+ * memcoll.m4: New file, from gnulib.
+ Based on a patch from Andreas Schwab.
+
+2003-07-14 Jim Meyering <jim@meyering.net>
+
+ * Makefile.am.in: Correct comment on first line.
+
+2003-07-12 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (OPTIONAL_BIN_ZCRIPTS): Remove unused variable.
+
+2003-07-10 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (jm_MACROS): Require gl_FUNC_VASPRINTF and
+ gl_FUNC_VASNPRINTF.
+
+ * longdouble.m4, signed.m4, vasnprintf.m4, vasprintf.m4, wchar_t.m4:
+ * wint_t.m4: New files, in support of new asprintf use. From gnulib.
+
+ * stdint_h.m4: New file.
+ * inttypes_h.m4: New file.
+ * uintmax_t.m4: New file.
+ * intmax_t.m4: New file.
+ * inttypes.m4: Remove file. Use intmax_t.m4 and uintmax_t.m4
+ from gnulib, instead.
+
+2003-06-09 Jim Meyering <jim@meyering.net>
+
+ * tzset.m4 (gl_FUNC_TZSET_CLOBBER): Also define gmtime.
+ * gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Likewise.
+ Suggestion from Paul Eggert.
+
+2003-06-08 Jim Meyering <jim@meyering.net>
+
+ * tzset.m4 (gl_FUNC_TZSET_CLOBBER): New file/macro.
+ Used by strftime.m4.
+ * strftime.m4 (_jm_STRFTIME_PREREQS): Require gl_FUNC_TZSET_CLOBBER.
+
+2003-06-07 Jim Meyering <jim@meyering.net>
+
+ * strftime.m4: Update from gnulib.
+ * tm_gmtoff.m4: New file, used by strftime.m4.
+ * mktime.m4: New file. From gnulib.
+
+2003-06-06 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4: Require gl_FUNC_ALLOCA.
+ * alloca.m4: New file, from gnulib.
+
+ * stdbool.m4: Update from gnulib.
+
+2003-06-04 Paul Eggert <eggert@twinsun.com>
+
+ Merge human.c etc. from gnulib.
+ * human.m4: New file, from gnulib.
+ * prereq.m4 (jm_PREREQ): Use gl_HUMAN, not jm_PREREQ_HUMAN.
+ (jm_prereq_HUMAN): Remove.
+
+2003-06-02 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (jm_MACROS): Require AM_STDBOOL_H.
+
+2003-05-26 Jim Meyering <jim@meyering.net>
+
+ * dirfd.m4 (UTILS_FUNC_DIRFD): Merge in change from gnulib,
+ fixing an M4 quoting bug.
+
+ * lib-ld.m4 (AC_LIB_PROG_LD_GNU): Use TAB-SP, not SP-TAB
+ when setting IFS.
+ * progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
+
+2003-05-06 Jim Meyering <jim@meyering.net>
+
+ * getcwd-path-max.m4 (GL_FUNC_GETCWD_PATH_MAX): Check for the
+ declaration of getcwd *before* checking for the getcwd kernel bug.
+ Otherwise, configure-time `checking ...' messages would be intermixed.
+
+2003-05-02 Jim Meyering <jim@meyering.net>
+
+ * readdir.m4 (GL_FUNC_READDIR): Revive dead file. Change name to
+ have GL_ (not jm_) prefix. Adjust cache variables similarly.
+ Create 500 rather than just 300 files, to exercise bug on
+ Darwin6.5, too.
+ * jm-macros.m4 (jm_MACROS): Require GL_FUNC_READDIR.
+
+2003-04-25 Jim Meyering <jim@meyering.net>
+
+ * getcwd-path-max.m4 (GL_FUNC_GETCWD_PATH_MAX): If PATH_MAX
+ is not defined, don't run the test, and don't use the wrapper.
+ Otherwise, on the Hurd, it would take a long time to create
+ and remove a hierarchy about 4000 levels deep.
+ Based on a patch from Robert Millan.
+
+2003-04-22 Jim Meyering <jim@meyering.net>
+
+ Aesthetics.
+ * gettext.m4: Change an occurrence of [ \t] to [\t ].
+
+2003-04-07 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4 (jm_PREREQ_STAT): Add prerequisites and #includes
+ for Ultrix 4.4.
+
+2003-04-02 Jim Meyering <jim@meyering.net>
+
+ * perl.m4 (jm_PERL): Use $am_missing_run, not undefined $missing_dir.
+
+2003-03-19 Jim Meyering <jim@meyering.net>
+
+ * ftw.m4 (AC_FUNC_FTW): Require AC_HEADER_STAT.
+
+2003-03-17 Richard Dawe <rich@phekda.freeserve.co.uk>
+
+ * jm-macros.m4 (jm_MACROS): Include $(EXEEXT) in DF_PROG's program
+ name, since automake only adds $(EXEEXT) to programs in its *_PROGRAMS.
+ Arrange to compile the corresponding stub function if fchdir is missing.
+
+2003-03-18 Jim Meyering <jim@meyering.net>
+
+ * ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the MOUNTED_VMOUNT
+ test to precede the MOUNTED_GETMNTENT1 tests, since otherwise, AIX 5.1
+ systems would end up using the latter. MOUNTED_GETMNTENT1 support
+ is inadequate on such systems: 1) detecting whether a file system
+ is remote doesn't work 2) the MOUNTED_VMOUNT code reports the
+ HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1 code reports
+ merely /MOUNT_POINT. Reported by Mike Jetzer.
+
+2003-03-17 Jim Meyering <jim@meyering.net>
+
+ * dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
+ that is guaranteed to be `no'. Use `no_such_member' to indicate
+ that condition, rather than `-1' which is slightly misleading.
+ Change the name of the cache variable to have the gl_ prefix.
+ Prompted by a patch from Richard Dawe for DJGPP.
+
+2003-03-14 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4 (jm_PREREQ): Also forbid the gl_[A-Z] prefix.
+ Don't require jm_PREREQ_C_STACK.
+
+2003-03-13 Paul Eggert <eggert@twinsun.com>
+
+ [from gnulib]
+ * onceonly.m4 (m4_quote): New macro.
+ (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
+ Quote AC_FOREACH variable-expansions properly.
+
+2003-03-13 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (jm_MACROS): Arrange to compile the corresponding stub
+ function if any of the following is missing: fchown, lstat, readlink.
+ From Richard Dawe.
+
+2003-03-07 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
+ using the latest version from cvs. This avoids problems with #line
+ directives using a vendor (Sun) compiler.
+
+ * jm-macros.m4: Don't require AC_SYS_MMAP_STACK.
+ * mmap-stack.m4 (AC_SYS_MMAP_STACK): Remove file.
+
+2003-03-06 Jim Meyering <jim@meyering.net>
+
+ * getcwd-path-max.m4 (GL_FUNC_GETCWD_PATH_MAX): Check for
+ declaration of getcwd.
+
+2003-03-04 Jim Meyering <jim@meyering.net>
+
+ * getcwd-path-max.m4 (GL_FUNC_GETCWD_PATH_MAX): New macro.
+ * jm-macros.m4: Require GL_FUNC_GETCWD_PATH_MAX.
+
+ `df /some/mount-point' no longer hangs when an unrelated hard-mount
+ is unavailable
+ * fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point in
+ /proc/mounts until it finds one with matching device number. This is
+ unnecessary when the FILE argument *is* a mount point. No stat call
+ is necessary in that case. So, disable the statvfs-testing code on
+ systems with GNU libc. Reported by Andrei Gaponenko via Tim Waugh
+ as RedHat bug# 84846.
+
+2003-02-27 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4 (jm_PREREQ_PHYSMEM): Also check for `table' function.
+ Reported by Kaveh Ghazi.
+
+ * prereq.m4 (gl_SYS__SYSTEM_CONFIGURATION): New function.
+ (jm_PREREQ_PHYSMEM): Check for new headers and functions.
+ Use gl_SYS__SYSTEM_CONFIGURATION.
+ With suggestions from Kaveh Ghazi.
+
+2003-02-19 Jim Meyering <jim@meyering.net>
+
+ * c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
+ to 1MB, so as not to render systems with no stack size limit (e.g.,
+ linux-2.2.x) unusable. Suggestion and code from Bruno Haible.
+
+2003-02-17 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4 (jm_PREREQ_PHYSMEM): Undo last change, since
+ Kaveh Ghazi found a better way to get the required information.
+ Add check for sys/sysmp.h.
+
+2003-02-15 Jim Meyering <jim@meyering.net>
+
+ * mmap-stack.m4: New file.
+
+ * jm-macros.m4: Require AC_SYS_MMAP_STACK.
+
+ Add Irix6 support to physmem.c.
+ * prereq.m4 (jm_PREREQ_PHYSMEM): Also check for sys/sysget.h
+ and sys/sysinfo.h.
+ Also check for sysget.
+ Reported by Kaveh Ghazi.
+
+2003-02-12 Jim Meyering <jim@meyering.net>
+
+ * restrict.m4 (ACX_C_RESTRICT): Remove #ifndef -- so now this
+ macro also checks for support when using a C++ compiler.
+ Also, remove the test for SGI's __restrict.
+ Suggested by Steven G. Johnson.
+
+ * regex.m4 (jm_PREREQ_REGEX): Require ACX_C_RESTRICT.
+
+ * restrict.m4 (ACX_C_RESTRICT): Minor syntactic changes:
+ Split long lines, use AC_COMPILE_IFELSE, indent, use `case'
+ instead of nested `if's, remove unnecessary quotes.
+
+ * restrict.m4 (ACX_C_RESTRICT): New macro.
+ Copied directly from the URL in the comments.
+ By Steven G. Johnson.
+
+2003-02-09 Jim Meyering <jim@meyering.net>
+
+ * check-decl.m4 (jm_CHECK_DECLS): Add euidaccess.
+
+2003-02-03 Jim Meyering <jim@meyering.net>
+
+ * c-stack.m4: Include <unistd.h>. On some systems,
+ it is required for the definition of _SC_PAGESIZE.
+
+2003-02-02 Jim Meyering <jim@meyering.net>
+
+ * onceonly.m4: New file. From gnulib.
+
+ * regex.m4 (jm_PREREQ_REGEX): New function, from gnulib.
+ (jm_INCLUDED_REGEX): Use it.
+ * prereq.m4 (jm_PREREQ_REGEX): Remove.
+
+2003-01-31 Jim Meyering <jim@meyering.net>
+
+ * open-max.m4 (UTILS_SYS_OPEN_MAX): New file/macro.
+ * jm-macros.m4 (jm_MACROS): Require UTILS_SYS_OPEN_MAX.
+
+2003-01-29 Jim Meyering <jim@meyering.net>
+
+ * regex.m4: Detect broken re_search in e.g. glibc-2.2.93.
+
+2003-01-23 Jim Meyering <jim@meyering.net>
+
+ * dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
+ from working on systems without dirfd (at least Irix and OSF1/Tru64).
+
+ Merge in change by Bruno Haible from gnulib.
+ * dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP requirements.
+
+2003-01-16 Jim Meyering <jim@meyering.net>
+
+ * regex.m4: The `regex' struct is both input and output.
+ Initialize it before each use. Patch by Tim Waugh.
+
+2003-01-15 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4: Require AC_FUNC_FTW.
+
+2003-01-12 Jim Meyering <jim@meyering.net>
+
+ * ftw.m4: New file.
+
+2003-01-11 Jim Meyering <jim@meyering.net>
+
+ * canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): New file and macro.
+ * jm-macros.m4: Require AC_FUNC_CANONICALIZE_FILE_NAME.
+ (jm_MACROS): No longer check for resolvepath or canonicalize_file_name.
+
+2002-12-15 Jim Meyering <jim@meyering.net>
+
+ * jm-glibc-io.m4n: Remove now-unused file.
+ * Makefile.am.in (Makefile.am): Remove jm-glibc-io.m4
+ and jm-glibc-io.m4n.
+
+2002-12-11 Jim Meyering <jim@meyering.net>
+
+ * jm-glibc-io.m4: Maintain this file manually rather than generating it.
+ Generating it caused too much trouble. From gnulib.
+
+2002-11-19 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4: Require Autoconf-2.56.
+
+2002-09-30 Akim Demaille <akim@epita.fr>
+
+ * prereq.m4: Use AC_REQUIRE everywhere it is possible.
+ (jm_PREREQ_CANON_HOST): Remove duplicates.
+
+2002-11-10 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(raise).
+
+2002-10-30 Paul Eggert <eggert@twinsun.com>
+
+ * getgroups.m4 (jm_FUNC_GETGROUPS):
+ Fix typo: cv_func_getgroups_works -> ac_cv_func_getgroups_works.
+
+2002-10-07 Paul Eggert <eggert@twinsun.com>
+
+ * prereq.m4 (jm_PREREQ_HUMAN): Check for locale.h, localeconv,
+ AC_HEADER_STDBOOL. No need to check for limits.h since it's in
+ freestanding C89. No need to check for stdlib.h or string.h since
+ autoconf does this now.
+
+2002-10-12 Paul Eggert <eggert@twionsun.com>
+
+ * jm-macros.m4 (jm_CHECK_ALL_HEADERS): Remove fenv.h.
+
+2002-09-29 Jim Meyering <jim@meyering.net>
+
+ * gettext.m4 (AM_INTL_SUBDIR): Don't require gt_HEADER_INTTYPES_H.
+ It's not necessary with autoconf-2.54.
+
+2002-09-28 Jim Meyering <jim@meyering.net>
+
+ * getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
+ and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
+ * jm-macros.m4 (jm_MACROS): Don't set GETGROUPS_LIB here; now it's
+ done via getgroups.m4's wrapper function.
+
+ * strerror_r.m4: Remove file -- now it's part of autoconf-2.54.
+ Reported by Akim Demaille.
+
+2002-09-25 Jim Meyering <jim@meyering.net>
+
+ * gettext.m4: Upgrade to gettext-0.11.5.
+
+2002-09-07 Bruno Haible <bruno@clisp.org>
+
+ * host-os.m4 (UTILS_HOST_OS): Add a case for freebsd*-gnu*.
+
+2002-09-17 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (jm_MACROS): Require gt_INTTYPES_PRI.
+ * inttypes-pri.m4 (gt_INTTYPES_PRI): New file, mostly from gettext.
+
+2002-09-16 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4: Forbid symbols matching ^jm_[A-Z].
+ (jm_PREREQ_QUOTEARG): Add jm_FUNC_MEMCMP.
+ From Akim Demaille.
+
+ * error.m4 (jm_PREREQ_ERROR): Check for libintl.h.
+ Reported by Akim Demaille.
+
+2002-09-13 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (jm_MACROS): Require autoconf-2.54.
+
+2002-09-09 Jim Meyering <jim@meyering.net>
+
+ * getloadavg.m4: Remove file -- now it's part of autoconf-2.53c.
+ * jm-macros.m4: Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
+ AC_FUNC_GETLOADAVG where to find getloadavg.c.
+
+2002-09-03 Jim Meyering <jim@meyering.net>
+
+ * gnu-source.m4: Remove file -- now it's part of autoconf-2.53c.
+ * mbstate_t.m4: Likewise.
+ * fnmatch.m4: Likewise.
+
+2002-08-05 Jim Meyering <jim@meyering.net>
+
+ * jm-winsz1.m4: Also change use of $am_cv_sys_posix_termios
+ to $ac_cv_sys_posix_termios. Reported by Andreas Schwab.
+
+2002-08-03 Jim Meyering <jim@meyering.net>
+
+ * jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not AM_SYS_POSIX_TERMIOS.
+ Reported by mkc@mathdogs.com.
+
+2002-08-01 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4 (jm_PREREQ_TEMPNAME): lib/tempname.c may use uintmax_t,
+ so require jm_AC_TYPE_UINTMAX_T. Patch by Joe Orton.
+
+2002-07-28 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4: Don't require jm_FUNC_READDIR.
+ * readdir.m4 (jm_FUNC_READDIR): Remove file/macro. No longer needed.
+
+2002-07-27 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4 (jm_PREREQ_READUTMP): Don't check just
+ `struct utmpx.ut_exit' and `struct utmp.ut_exit'. Instead, check
+ all combinations of utmp/utmpx and ut_termination/e_termination
+ and ut_exit/e_exit.
+
+2002-07-23 Jim Meyering <jim@meyering.net>
+
+ * c-bs-a.m4 (AC_C_BACKSLASH_A): Remove file, now that autoconf
+ provides this macro.
+
+2002-07-20 Jim Meyering <jim@meyering.net>
+
+ * intdiv0.m4: New file. From gettex-0.11.3.
+
+ * jm-macros.m4: Require autoconf-2.53b.
+ Use new macros AC_FUNC_MALLOC and AC_FUNC_REALLOC,
+ in place of jm_-prefixed ones. Thanks, Akim!
+ * malloc.m4: Remove file, now that autoconf provides this macro.
+ * realloc.m4: Likewise.
+
+2002-07-18 gettextize <bug-gnu-gettext@gnu.org>
+
+ * gettext.m4: Upgrade to gettext-0.11.3.
+ * iconv.m4: Upgrade to gettext-0.11.3.
+ * isc-posix.m4: Upgrade to gettext-0.11.3.
+ * lcmessage.m4: Upgrade to gettext-0.11.3.
+ * lib-link.m4: Upgrade to gettext-0.11.3.
+
+2002-07-17 Jim Meyering <jim@meyering.net>
+
+ * boottime.m4: New file. Extracted from sh-utils' configure.ac
+ and extended to work also with *BSD systems.
+
+2002-07-15 Jim Meyering <jim@meyering.net>
+
+ FreeBSD support for uname and uptime.
+ * jm-macros.m4 (jm_MACROS): Check for the sysctl function.
+ (jm_CHECK_ALL_HEADERS): Check for sys/sysctl.h.
+ Suggestion from Bruno Haible.
+
+2002-06-11 Paul Eggert <eggert@twinsun.com>
+
+ * fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
+
+2002-06-22 Jim Meyering <jim@meyering.net>
+
+ * c-stack.m4: New file, from diffutils-2.8.2.
+ * prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
+
+ * jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
+ now that configure.ac uses AC_GNU_SOURCE.
+ (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
+ * prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
+
+ Update to latest tools. Suggestions from Paul Eggert.
+ * stdbool.m4: New file, from diffutils-2.8.2.
+ * gnu-source.m4: Update from diffutils-2.8.2.
+ * fnmatch.m4: Likewise.
+ * prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
+ to AC_HEADER_STDBOOL
+
+2002-06-21 Jim Meyering <jim@meyering.net>
+
+ * c-bs-a.m4: Add comment, from diffutils-2.8.2.
+ * mbrtowc.m4: Likewise.
+
+ * mbstate_t.m4: Update from diffutils-2.8.2.
+ * mbswidth.m4: Reflect name change:
+ s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
+ * prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
+
+ * lib-link.m4: Update from gettext-0.11.2.
+ * gettext.m4: Likewise.
+
+ * jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
+ From Alfred M. Szmidt.
+
+2002-05-19 Paul Eggert <eggert@twinsun.com>
+
+ * jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
+
+2002-06-07 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
+ They're needed at least for NetBSD 1.5.2.
+ ($statxfs_includes): Include those same headers.
+ ($statxfs_includes): Include sys/vfs.h if available.
+ ($statxfs_includes): Likewise for sys/statvfs.h.
+ Check for the following members in both structs statfs and statvfs:
+ f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
+
+2002-06-01 Jim Meyering <jim@meyering.net>
+
+ * d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
+ s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
+
+2002-05-28 Jim Meyering <jim@meyering.net>
+
+ * readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
+ Reported by Volker Borchert.
+
+2002-05-27 Jim Meyering <jim@meyering.net>
+
+ * gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
+ localtime.
+
+ * readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
+ use the replacement function; it wouldn't resolve at link time.
+ Reported by Volker Borchert.
+
+2002-04-30 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
+
+2002-04-29 Paul Eggert <eggert@twinsun.com>
+
+ * prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
+ Do not check for alloca.h (no longer used) or stdbool.h (was never
+ used?). Add AM_C_PROTOTYPES since hard-locale.h uses it.
+
+2002-04-28 Paul Eggert <eggert@twinsun.com>
+
+ * prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
+
+2002-04-29 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
+ * prereq.m4: Add jm_PREREQ_STRNLEN.
+ Use AC_FUNC_STRNLEN here instead.
+
+ * jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
+ With autoconf-2.53a, it's part of AC_PROG_CC.
+
+2002-04-28 Paul Eggert <eggert@twinsun.com>
+
+ * jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
+ * prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
+
+2002-04-24 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
+ (jm_PREREQ): Use it.
+
+ * getloadavg.m4: Check for these headers: locale.h unistd.h
+ mach/mach.h fcntl.h.
+ Check for this function: setlocale.
+
+2002-04-16 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
+ ut_pid, ut_id, ut_exit.
+
+2002-04-12 Jim Meyering <jim@meyering.net>
+
+ * ls-mntd-fs.m4 (checking for getmntinfo function...): Remove now-bogus
+ check for f_type in sys/mount.h. Instead, just test for the existence
+ of the getmntinfo function. Needed for Darwin 5.3.
+
+ * dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
+ This is necessary at least on Darwin 5.3.
+
+ * jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
+ AC_FUNC_STRNLEN. Otherwise, we'd end up putting two copies of strnlen.o
+ in the library, and that makes some versions of ranlib object.
+
+2002-04-09 Jim Meyering <jim@meyering.net>
+
+ * malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
+ to be more precise. Rather than saying we're checking whether the
+ function `works', say what we're testing.
+ * realloc.m4 (jm_FUNC_REALLOC): Likewise.
+ Reported by Bruno Haible.
+
+2002-02-27 Paul Eggert <eggert@twinsun.com>
+
+ * jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
+ Check for clock_settime.
+
+2002-02-25 Paul Eggert <eggert@twinsun.com>
+
+ * acl.m4: New file.
+ * jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
+ Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
+
+2002-02-16 gettextize <bug-gnu-gettext@gnu.org>
+
+ * codeset.m4: Upgrade to gettext-0.11.
+ * gettext.m4: Upgrade to gettext-0.11.
+ * glibc21.m4: Upgrade to gettext-0.11.
+ * iconv.m4: Upgrade to gettext-0.11.
+ * isc-posix.m4: Upgrade to gettext-0.11.
+ * lcmessage.m4: Upgrade to gettext-0.11.
+ * lib-ld.m4: New file, from gettext-0.11.
+ * lib-link.m4: New file, from gettext-0.11.
+ * lib-prefix.m4: New file, from gettext-0.11.
+ * progtest.m4: Upgrade to gettext-0.11.
+
+2002-02-15 Paul Eggert <eggert@twinsun.com>
+
+ * prereq.m4 (jm_PREREQ_POSIXVER): New macro.
+ (jm_PREREQ): Use it.
+
+2002-01-26 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
+ * strnlen.m4: Remove file, now that it's part of autoconf.
+
+2002-01-22 Paul Eggert <eggert@twinsun.com>
+
+ * jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
+
+2002-01-19 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
+ Remove useless quotes: DF_PROG="df".
+ * strnlen.m4: New file.
+
+2001-12-14 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (jm_MACROS): Check for iswspace.
+ Suggestion from Bruno Haible.
+
+2001-11-20 Jim Meyering <jim@meyering.net>
+
+ * mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
+ SunOS 4.1.4 and Solaris 2.5.1 lose, too.
+
+2001-11-19 Jim Meyering <jim@meyering.net>
+
+ * mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
+ directory. Use "conftestXXXXXX" as the template.
+ Suggestion from Paul Eggert.
+
+ * mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor immediately,
+ so the test doesn't mistakenly hit the max-open-files limit.
+
+2001-11-18 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
+
+2001-11-17 Jim Meyering <jim@meyering.net>
+
+ * mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
+ Prompted by a report from Bob Proulx.
+
+ * jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
+ Instead, require UTILS_FUNC_MKSTEMP.
+
+2001-11-11 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
+ Now, that's done as part of AC_FUNC_STRTOD.
+
+2001-10-22 Paul Eggert <eggert@twinsun.com>
+
+ * jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
+ WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
+
+2001-11-10 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4 (jm_PREREQ_PHYSMEM): New function.
+ (jm_PREREQ): Use it.
+
+2001-11-09 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4: Require autoconf-2.52f.
+ (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
+ Use these AC_-prefixed names, not the AM_-prefixed ones.
+
+ * afs.m4 (jm_AFS): Quote the body. Patch by Akim Demaille.
+
+2001-11-04 Jim Meyering <jim@meyering.net>
+
+ * fpending.m4: Remove unused cruft that saved, set, and restored $DEFS.
+
+2001-11-03 Jim Meyering <jim@meyering.net>
+
+ * jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
+ of AC_DEFUN.
+
+ * dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
+ know the name of the variable in the macro definition.
+
+2001-11-01 Jim Meyering <jim@meyering.net>
+
+ * dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
+ * jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
+
+2001-10-20 Paul Eggert <eggert@twinsun.com>
+
+ * error.m4 (jm_PREREQ_ERROR):
+ Do not invoke AC_CHECK_FUNCS with strerror_r, as
+ AC_FUNC_STRERROR_R does that.
+ Check for strerror declaration.
+
+ * strerror_r.m4: Add copyright notice, as nontrivial m4 files
+ are supposed to have them these days.
+ (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
+ Merge changes from latest Autoconf CVS.
+ Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
+ and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
+ POSIX decided to standardize on the int flavor of strerror_r.
+
+2001-09-30 Jim Meyering <jim@meyering.net>
+
+ * ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
+ `struct fsstat' has the `f_fstypename' member.
+ Use that to define FS_TYPE, which is now used to make
+ the getfsstat link test tighter.
+
+2001-09-29 Jim Meyering <jim@meyering.net>
+
+ * ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
+ [one-argument getmntent function]): Include stdio.h before mntent.h.
+ SunOS 4.1.x needs it for the declaration of `FILE'.
+ Patch by Volker Borchert.
+
+ * ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
+ Check for these headers: sys/param.h sys/ucred.h sys/mount.h
+ sys/fs_types.h, and make the link-test for getfsstat guard #include
+ directives with appropriate #if HAVE_*_H tests so that we can
+ detect getfsstat on Apple Darwin1.3.7 systems.
+ Reported by Nelson Beebe.
+ Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
+
+2001-09-28 Paul Eggert <eggert@twinsun.com>
+
+ Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
+ #defines strtoimax. Also treat the other strto* functions
+ like strtoimax.
+
+ * xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
+ Check for strtoul and strtoumax,
+ as those declarations are made even in the signed case.
+ * xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
+ Likewise, for strtol and strtoimax.
+
+2001-09-24 Jim Meyering <jim@meyering.net>
+
+ * gettext.m4: Use the version from gettext-0.10.40, not CVS.
+
+2001-09-23 Jim Meyering <jim@meyering.net>
+
+ * ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
+ instead of the mere test for existence of mntent.h. The latter
+ would get a false-positive on AIX 3.4 systems.
+ In the outer getmntent if-block, don't die if neither of the getmntent
+ tests succeeds. Instead, just fall through and continue with the
+ remaining tests.
+
+2001-09-22 Jim Meyering <jim@meyering.net>
+
+ * gettext.m4: New file. From gettext.
+ * lcmessage.m4: Sync with gettext -- this changes only comments.
+ * progtest.m4: Likewise
+ * isc-posix.m4: Decrement serial number to sync with gettext.
+ * glibc21.m4: Likewise.
+
+ * libintl.m4: Remove. No longer used.
+
+2001-09-20 Jim Meyering <jim@meyering.net>
+
+ * xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
+ strtoimax.
+ * xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
+ strtoumax.
+
+2001-09-17 Jim Meyering <jim@meyering.net>
+
+ * chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
+ * jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
+ * nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
+ * st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
+ * utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
+ whenever the right hand side need not be expanded by the shell.
+
+2001-09-16 Paul Eggert <eggert@twinsun.com>
+
+ * fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
+ library. It's not correct, as some older glibcs are buggy.
+ fnmatch wasn't fixed until glibc 2.2.
+
+ Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
+ special shell magic here.
+
+2001-09-16 Jim Meyering <jim@meyering.net>
+
+ * mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
+ * jm-macros.m4: Require it.
+
+2001-09-15 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4: Check for help2man.
+
+2001-09-11 Jim Meyering <jim@meyering.net>
+
+ * host-os.m4 (UTILS_HOST_OS): New file/macro.
+ The body, by Paul Eggert, was moved here from configure.in.
+ * jm-macros.m4: Require UTILS_HOST_OS.
+
+2001-09-04 Paul Eggert <eggert@twinsun.com>
+
+ * prereq.m4 (jm_PREREQ_XREADLINK): New macro.
+ (jm_PREREQ): Use it.
+
+2001-09-03 Paul Eggert <eggert@twinsun.com>
+
+ * prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
+ sys/param.h, as pathmax.h includes them.
+
+2001-09-03 Paul Eggert <eggert@twinsun.com>
+
+ * prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
+ (jm_PREREQ_XGETCWD): New macro.
+
+ * getcwd.m4: New file.
+
+2001-09-01 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
+ Used by df.
+
+2001-08-30 Paul Eggert <eggert@twinsun.com>
+
+ Simplify code, partly by assuming autoconf 2.52 semantics.
+
+ * Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
+
+ * inttypes.m4 (AC_PREREQ): Bump to 2.52.
+ (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
+ All uses removed.
+ (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
+ Move AC_REQUIRE to next-to-top level, to avoid confusion.
+ Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
+ * prereq.m4 (jm_PREREQ_HUMAN): Don't require jm_AC_HEADER_INTTYPES_H.
+ * jm-macros.m4 (jm_MACROS): Likewise.
+
+ * uintmax_t.m4: Remove, as it duplicates inttypes.m4.
+
+ * xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
+ Quote first arg of AC_DEFUN.
+ Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
+ since they are needed to parse the include file even if we need
+ only xstrtoimax. Simplify logic behind the args to AC_REPLACE.
+ * xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
+ but with opposite signedness.
+
+2001-08-30 Paul Eggert <eggert@twinsun.com>
+
+ * prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
+ (jm_PREREQ_EXCLUDE): New macro.
+
+2001-08-26 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
+
+ * xstrtoimax.m4: New file.
+ * xstrtoumax.m4: Add comments explaining why we
+ AC_REPLACE_FUNCS(strtol).
+
+2001-06-20 Paul Eggert <eggert@twinsun.com>
+
+ * inttypes.m4: Add AC_PREREQ(2.13).
+ (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
+ (jm_AC_TYPE_INTMAX_T): New macro.
+ (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
+
+ * longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
+
+ * longlong.m4: Renamed from ulonglong.m4.
+ * inttypes.m4: Renamed from inttypes_h.m4.
+ * uintmax_t.m4: Removed.
+
+2001-08-12 Jim Meyering <jim@meyering.net>
+
+ * afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
+ d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
+ fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
+ group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
+ jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
+ link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
+ mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
+ prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
+ rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
+ strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
+ utime.m4, utimes.m4, xstrtoumax.m4:
+ Quote the first argument in each use of AC_DEFUN.
+
+2001-08-05 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4: Require autoconf-2.52.
+
+2001-08-03 Paul Eggert <eggert@twinsun.com>
+
+ The following changes are from gettext 0.10.39 as maintained by
+ Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
+
+ * codeset.m4: Upgrade to serial AM1.
+ (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
+ all uses changed. Quote first arg of AC_DEFUN.
+ (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
+
+ * iconv.m4: Upgrade to serial AM2.
+ (AM_ICONV): Renamed from jm_ICONV; all uses changed.
+ Add --with-libconv-prefix.
+ Quote first arg of AC_DEFUN. Add description for ICONV_CONST.
+ (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
+ (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
+ (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
+ * jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
+
+ * c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
+ * getline.m4 (AM_FUNC_GETLINE): Likewise.
+ * glibc21.m4 (jm_GLIBC21): Likewise.
+ * inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
+ * isc-posix.m4 (AC_ISC_POSIX): Likewise.
+ * lcmessage.m4 (AM_LC_MESSAGES): Likewise.
+ * progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
+ * uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
+ * ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
+
+ * getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
+ string.h any more.
+
+ * progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
+ not the default value.
+
+ 2001-06-25 Bruno Haible <haible@clisp.cons.org>
+ * mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
+ Also check for mbsinit. Needed for SCO 3.2v5.0.2.
+ Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
+ Also check for iswcntrl, used for wcwidth fallback.
+ Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
+ to Autoconf 2.13.
+
+2001-08-03 Jim Meyering <jim@meyering.net>
+
+ * mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
+ as it was in the original. Reported by Paul Eggert.
+
+2001-07-16 Jim Meyering <jim@meyering.net>
+
+ * gettimeofday.m4: New file.
+ Prompted by a report from Bernhard Baehr.
+
+2001-07-15 Jim Meyering <jim@meyering.net>
+
+ * Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h stuff.
+ Now it's in ../Makefile.cfg.
+
+2001-07-04 Jim Meyering <jim@meyering.net>
+
+ * Makefile.am.in (glibc-io.struct): New target. Rework the code
+ that generates jm-glibc-io.m4 so that it doesn't trigger any make
+ distcheck failure.
+
+2001-07-02 Jim Meyering <jim@meyering.net>
+
+ The following changes were prompted by suggestions from Bruno Haible.
+
+ * jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
+ is now generated.
+ * Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
+ definition of EXTRA_DIST.
+ (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
+ ensure that the generated file is created/updated whenever the list
+ of $(unlocked_functions) is changed.
+ (jm-glibc-io.m4): New rule.
+ (unlocked-io.h): New rule -- currently unused.
+
+2001-06-24 Jim Meyering <jim@meyering.net>
+
+ * regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
+ unmatched right bracket, rather than kludging it with an extra,
+ falsely-matching quote in a comment. Patch by Akim Demaille.
+
+2001-05-27 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
+ Check for ut_type in struct utmp.
+
+2001-05-22 Jim Meyering <jim@meyering.net>
+
+ * strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
+ now that we use the package-supplied version unconditionally.
+ (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
+
+2001-05-21 Jim Meyering <jim@meyering.net>
+
+ * regex.m4: Change a couple backticks to single quotes to avoid shell
+ syntax errors.
+
+2001-05-19 Alexandre Duret-Lutz <duret_g@epita.fr>
+
+ * dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
+
+2001-05-11 Paul Eggert <eggert@twinsun.com>
+
+ * strftime.m4 (jm_FUNC_GNU_STRFTIME):
+ Don't bother to check library strftime, since
+ we'll be using our own my_strftime function anyway.
+ Define my_strftime instead of strftime.
+
+2001-05-15 Jim Meyering <jim@meyering.net>
+
+ * regex.m4: Use proper quoting so brackets appear in the test program.
+ Reported by, and with help from, Bruno Haible.
+
+2001-05-13 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (major_t, minor_t): Define to unsigned int if undefined.
+
+2000-11-26 Paul Eggert <eggert@twinsun.com>
+
+ * jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
+
+2001-04-21 Jim Meyering <jim@meyering.net>
+
+ * rmdir-errno.m4: Write to a new file, so that a restrictive umask
+ doesn't interfere.
+
+2001-04-21 Alexandre Duret-Lutz <duret_g@epita.fr>
+
+ * ftruncate.m4: Check for chsize.
+ Link with ftruncate.o unconditionally if ftruncate is missing.
+ This was required when cross-compiling to i586-mingw32msvc.
+
+2001-03-24 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4: Require autoconf-2.49d.
+
+2001-03-20 Bruno Haible <haible@clisp.cons.org>
+
+ * iconv.m4 (jm_ICONV): Recommend GNU libiconv.
+
+2001-03-17 Jim Meyering <jim@meyering.net>
+
+ * memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
+ now that the version in autoconf is equivalent.
+ (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
+
+ * error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
+ Suggestion from Akim Demaille.
+
+ * prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
+ (jm_PREREQ_TEMPNAME): New function.
+
+2001-02-25 Paul Eggert <eggert@twinsun.com>
+
+ * jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
+ lacks mkstemp. Compile our own tempname.c if we compile our own
+ mkstemp.c, as mkstemp relies on tempname.
+
+2001-03-01 Jim Meyering <jim@meyering.net>
+
+ * dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
+ AH_VERBATIM really does output its argument verbatim.
+
+2001-02-18 Paul Eggert <eggert@twinsun.com>
+
+ * jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
+
+2001-02-17 Jim Meyering <jim@meyering.net>
+
+ * ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
+ getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
+ further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
+ UnixWare 7.1.1.
+
+ * mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
+ rather than AC_CACHE_VAL.
+
+2001-02-17 Paul Eggert <eggert@twinsun.com>
+
+ * mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
+ * mbswidth.m4 (jm_PREREQ_MBSWIDTH):
+ Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
+ * prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
+
+2001-02-07 Jim Meyering <jim@meyering.net>
+
+ * regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
+
+2001-02-05 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4: Require autoconf-2.14d (not yet released), because
+ it includes the patch required for `large file' support with at least
+ HP-UX's 10.20 /bin/cc.
+
+2001-02-03 Jim Meyering <jim@meyering.net>
+
+ * ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
+ AS_IF, now that it works once again (mysteriously).
+ * fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
+
+2001-01-30 Jim Meyering <jim@meyering.net>
+
+ Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
+ * chown.m4: Rename conftestchown to conftest.chown.
+ * rename.m4: s/conftestdir/conftest.d1/ and s/conftestdir2/conftest.d2/.
+ * utimes.m4: s/conftestdata/conftest.data/
+ Inspired by Pavel Roskin's change in autoconf.
+
+2001-01-27 Jim Meyering <jim@meyering.net>
+
+ * ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
+ a use of AS_IF.
+ * fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
+
+2001-01-26 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
+ quotearg.c includes it.
+
+2001-01-15 Bruno Haible <haible@clisp.cons.org>
+
+ * iconv.m4 (jm_ICONV): Also check whether the iconv declaration
+ has const.
+
+2001-01-20 Jim Meyering <jim@meyering.net>
+
+ Be sure that headers are checked before used in code compiled
+ for the type checks.
+ * jm-macros.m4 (jm_MACROS): Remove all header checks.
+ In place of that, invoke jm_CHECK_ALL_TYPES.
+ (jm_CHECK_ALL_HEADERS): New functions with the above checks.
+ (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
+ Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
+ The check for ssize_t was mistakenly run before the test for unistd.h.
+
+ The configure-time check for stdbool.h was missing.
+ * prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
+ (jm_PREREQ_HASH): New function.
+
+2001-01-17 Jim Meyering <jim@meyering.net>
+
+ * fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
+ for autoconf-2.49c.
+ * ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
+
+2001-01-14 Jim Meyering <jim@meyering.net>
+
+ * rename.m4: Use temporary directories named conftestdir{,2}, not
+ foo and bar. Create conftestdir/ in the script, not in the C code.
+ Remove directories in the script, not in the C code.
+ Remove conftestdir{,2} before trying to create the directory.
+ Make the entire configure script fail if the mkdir fails.
+
+2001-01-02 Volker Borchert <bt@teknon.de>
+
+ * rename.m4: New file.
+ * jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
+
+2001-01-01 Alexandre Duret-Lutz <duret_g@epita.fr>
+
+ * libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
+ expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
+ so `make install' also works in VPATH builds.
+
+2001-01-01 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available), even
+ on systems with utmpx.h. It's necessary for the declaration of utmp's
+ ut_user member. Reported by Andreas Jaeger.
+
+ * check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if available.
+ They are required for the declarations of getgrgid and getpwuid resp.
+ (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
+ Reported by Andreas Jaeger.
+
+2000-12-25 Alexandre Duret-Lutz <duret_g@epita.fr>
+
+ * libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
+ prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
+ can be used in subdirectories.
+
+2000-12-26 Jim Meyering <jim@meyering.net>
+
+ * dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work better
+ with autoheader.
+
+2000-12-17 Jim Meyering <jim@meyering.net>
+
+ * dos.m4 (jm_AC_DOS): New file and macro.
+ * jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
+
+2000-12-06 Paul Eggert <eggert@twinsun.com>
+
+ * off_t-format.m4: Remove this file.
+ * jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
+
+2000-12-06 Jim Meyering <jim@meyering.net>
+
+ * xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the replacement
+ strtoull, we may well need the replacement strtoul, too.
+ Check for declarations of strtoul and strtoull.
+ Check for strtol. Mainly as a cue to cause automake to include
+ strtol.c -- that file is included by each of strtoul.c and strtoull.c.
+ Check for limits.h -- strtol.c needs it.
+
+2000-12-02 Jim Meyering <jim@meyering.net>
+
+ * off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
+ * jm-macros.m4 (jm_MACROS): require it.
+
+2000-11-30 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (jm_MACROS): Check for stdint.h.
+
+2000-11-30 Jim Meyering <jim@meyering.net>
+
+ * getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
+
+2000-11-03 Bruno Haible <haible@clisp.cons.org>
+
+ * jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
+
+2000-11-04 Jim Meyering <jim@meyering.net>
+
+ * regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
+
+2000-10-29 Jim Meyering <jim@meyering.net>
+
+ * fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf renaming.
+ * ls-mntd-fs.m4: Likewise
+
+2000-10-28 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
+ (jm_PREREQ_MEMCHR): New function.
+
+2000-10-21 Jim Meyering <jim@meyering.net>
+
+ * check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
+ * prereq.m4 (jm_PREREQ_DIRNAME): New macro.
+ * jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
+
+2000-09-18 Jim Meyering <jim@meyering.net>
+
+ * getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of LIBS.
+ Otherwise, everyone ends up linking with -lelf for some configurations.
+ Reported by Mike Stone.
+
+2000-08-26 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4: Use jm_FUNC_FPENDING.
+ * fpending.m4: New file.
+
+2000-08-20 Jim Meyering <jim@meyering.net>
+
+ * check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
+ `#if !HAVE_UTMPX_H'. The latter would lose on systems with neither
+ utmp.h nor utmpx.h. Reported by Eli Zaretskii.
+
+2000-08-11 J. David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ Improve fileutils installation on systems where running
+ programs (like install) can't be unlinked.
+ * unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
+ * jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
+
+2000-08-06 Paul Eggert <eggert@twinsun.com>
+
+ * mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
+ not char, for compatibility with glibc 2.1.3 strftime.c.
+
+2000-07-23 Paul Eggert <eggert@twinsun.com>
+
+ * mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
+
+2000-07-23 Jim Meyering <jim@meyering.net>
+
+ * check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these, too:
+ getgrgid, getpwuid, getuid.
+
+2000-07-16 Bruno Haible <haible@clisp.cons.org>
+
+ * mbswidth.m4: New file.
+ * prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
+
+2000-07-14 Jim Meyering <jim@meyering.net>
+
+ * xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require jm_AC_TYPE_UINTMAX_T.
+
+2000-07-10 Paul Eggert <eggert@twinsun.com>
+
+ From a suggestion by Bruno Haible.
+ * mbstate_t.m4 (AC_MBSTATE_T):
+ Renamed from AC_MBSTATE_T_OBJECT. All uses changed.
+ Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
+ and mbstate_t, to a single-part test that simply defines mbstate_t.
+ * prereq.m4 (jm_PREREQ_QUOTEARG): s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
+
+2000-07-10 Jim Meyering <jim@meyering.net>
+
+ * strerror_r.m4: Mirror the correction made in autoconf.
+
+ * gnu-source.m4: Output to confdefs.h directly.
+ Suggestion from Akim Demaille.
+
+2000-07-09 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
+ to link seq. If so, set SEQ_LIBM to -lm. From Bruno Haible.
+
+ * gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
+ * jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
+
+2000-07-05 Bruno Haible <haible@clisp.cons.org>
+
+ * strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
+ to strerror_r.
+ Include <ctype.h> for use of isalpha.
+
+2000-07-05 Paul Eggert <eggert@twinsun.com>
+ and Bruno Haible <haible@clisp.cons.org>
+
+ * mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
+ only if the test for an object-type mbstate_t fails. This
+ prevents us from mistakenly reporting that mbstate_t is a
+ system object type after we "#define mbstate_t int" to work
+ around its lack.
+
+2000-07-04 Jim Meyering <jim@meyering.net>
+
+ * fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
+ of the deprecated AC_CHECKING.
+
+2000-07-03 Jim Meyering <jim@meyering.net>
+
+ * check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
+
+2000-07-03 Paul Eggert <eggert@twinsun.com>
+
+ * mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
+ Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
+
+2000-07-02 Jim Meyering <jim@meyering.net>
+
+ * mbstate_t.m4: Also define mbstate_t, if necessary.
+
+ * chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
+ AC_LIBOBJ(function_name).
+ * chown.m4: Likewise.
+ * fnmatch.m4: Likewise.
+ * ftruncate.m4: Likewise.
+ * getgroups.m4: Likewise.
+ * getline.m4: Likewise.
+ * group-member.m4: Likewise.
+ * jm-macros.m4: Likewise.
+ * lstat.m4: Likewise.
+ * malloc.m4: Likewise.
+ * memcmp.m4: Likewise.
+ * nanosleep.m4: Likewise.
+ * putenv.m4: Likewise.
+ * realloc.m4: Likewise.
+ * regex.m4: Likewise.
+ * stat.m4: Likewise.
+ * strftime.m4: Likewise.
+
+2000-07-01 Jim Meyering <jim@meyering.net>
+
+ * ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
+ problem.
+
+2000-06-17 Bruno Haible <haible@clisp.cons.org>
+
+ * ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
+ macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
+
+2000-07-01 Jim Meyering <jim@meyering.net>
+
+ * uptime.m4: Put double quotes around use of $cross_compiling.
+
+2000-06-28 Jim Meyering <jim@meyering.net>
+
+ * mbstate_t.m4: Use stdlib.h, not stdio.h. The latter is not included
+ by quotearg.c, for which we perform this test. From Bruno Haible.
+
+2000-06-17 Bruno Haible <haible@clisp.cons.org>
+
+ * check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
+ * prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
+ <utmpx.h> exists, put readutmp.o into LIBOBJS.
+
+2000-06-25 Jim Meyering <jim@meyering.net>
+
+ * mbstate_t.m4: Include stdio.h before wchar.h to work around
+ Linux header bug when _XOPEN_SOURCE is defined to 500.
+
+2000-06-24 Jim Meyering <jim@meyering.net>
+
+ * strerror_r.m4: Revive this file -- to try out an experimental
+ version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
+ for which strerror does return char*, but which lacks a conveniently
+ accessible declaration of the function. If the compile-test says
+ strerror_r doesn't work, then resort to a `run'-test that works on
+ BeOS and segfaults on DEC Unix.
+
+2000-06-19 Paul Eggert <eggert@twinsun.com>
+
+ * mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
+ * prereq.m4 (jm_PREREQ_QUOTEARG): Use it. Add check for iswprint.
+
+2000-06-23 Jim Meyering <jim@meyering.net>
+
+ * afs.m4: Add missing AC_MSG_RESULT.
+ Reported by Bruno Haible.
+
+ * fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
+ Suggestion from Bruno Haible.
+
+2000-06-21 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
+
+2000-06-18 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
+
+ * link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
+ `checking whether...' message to be consistent with that of the
+ lstat test.
+
+2000-06-16 Bruno Haible <haible@clisp.cons.org>
+
+ * glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
+
+2000-06-12 Jim Meyering <jim@meyering.net>
+
+ * getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with AC_FUNC_GETLOADAVG
+ from autoconf, and tweak the latter to accept an optional argument.
+ * jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
+ the optional argument, `lib'.
+
+2000-06-08 Jim Meyering <jim@meyering.net>
+
+ * largefile.m4: Remove file (now that it's part of autoconf).
+
+2000-06-04 Paul Eggert <eggert@twinsun.com>
+
+ Rewrite largefile configuration so that we don't need to run
+ getconf and don't need AC_CANONICAL_HOST. [I'm leaving the use of
+ AC_CANONICAL_HOST in configure.in -- jmm]
+
+ * largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
+ AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
+ (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
+ (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
+ CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
+ All uses changed.
+ Instead of inspecting the output of getconf, try to compile the
+ test program without and with the macro definition.
+ (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
+ for getconf. Instead, check for the needed flags by compiling
+ test programs.
+
+2000-06-03 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
+ now that autoconf requires that.
+
+ * jm-glibc-io.m4: Add a kludge to make autoheader emit the required
+ #undefs. E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
+ Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
+
+2000-05-26 Bruno Haible <haible@clisp.cons.org>
+
+ * glibc21.m4: New file.
+ * jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
+
+2000-05-28 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
+ jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
+ * stat.m4: Likewise.
+ * lstat.m4: Likewise.
+ * lstat-slash.m4: Remove file (absorbed into autoconf).
+
+ * jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
+ * strerror_r.m4: Remove file (absorbed into autoconf).
+
+2000-05-26 Jim Meyering <jim@meyering.net>
+
+ * uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
+
+2000-05-24 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
+ autoconf requires that.
+ * lib-check.m4: Likewise.
+ * jm-macros.m4: Likewise.
+ * strftime.m4: Likewise.
+
+ * check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in AC_CHECK_DECLS,
+ now that autoconf requires that.
+
+2000-05-22 Jim Meyering <jim@meyering.net>
+
+ * stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
+ * lstat.m4: Likewise.
+
+2000-05-20 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4 (jm_PREREQ_HUMAN): New macro.
+ (jm_PREREQ): Use it.
+
+2000-05-09 Jim Meyering <jim@meyering.net>
+
+ * gettext.m4: Rename this...
+ * libintl.m4: ...to this.
+
+2000-05-06 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
+ (AC_REPLACE_FUNCS): Add strnlen.
+
+ * rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
+ * jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
+
+ * nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
+ AC_SEARCH_LIBS call for nanosleep.
+ (LIB_NANOSLEEP): Set and AC_SUBST.
+
+2000-05-03 Paul Eggert <eggert@twinsun.com>
+
+ * largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
+ be 500, instead of _GNU_SOURCE to be 1, to work around glibc
+ 2.1.3 bug. This avoids a clash when files like regex.c define
+ _GNU_SOURCE.
+
+2000-05-05 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (jm_MACROS): Save and restore LIBS around AC_SEARCH_LIBS
+ call for clock_gettime.
+ (LIB_CLOCK_GETTIME): Set and AC_SUBST.
+
+ * search-libs.m4: Update from autoconf.
+
+ su doesn't work on Solaris 2.6.
+ * lib-check.m4: When checking for struct spwd.sp_pwdp, also include
+ <shadow.h>. Reported by Dragos Harabor.
+
+2000-05-03 Jim Meyering <jim@meyering.net>
+
+ * check-decl.m4 (AC_CHECK_DECLS): Add strndup.
+
+2000-05-02 Paul Eggert <eggert@twinsun.com>
+
+ * largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
+ this is needed to make ftello visible (e.g. glibc 2.1.3). Use
+ compile-time test, rather than inspecting host and OS, to
+ decide whether to define _LARGEFILE_SOURCE.
+
+2000-05-01 Jim Meyering <jim@meyering.net>
+
+ * fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
+
+ * ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
+ Based on a patch from Bruno Haible.
+
+2000-04-18 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
+ (jm_PREREQ): Use it.
+
+2000-04-17 Jim Meyering <jim@meyering.net>
+
+ Get it right :-)
+ * jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
+ actual #define via AH_VERBATIM. Don't need separate AC_DEFINE.
+ Suggestion from Akim Demaille.
+
+2000-04-14 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg form
+ of AC_DEFINE. Otherwise, the #ifndef in AH_VERBATIM gets clobbered.
+
+2000-04-13 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new AH_VERBATIM
+ to insert required #ifndef into config.h.in.
+ Suggestion from Akim Demaille.
+
+2000-04-12 Jim Meyering <jim@meyering.net>
+
+ * getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
+ `AC_CHECK_HEADER' to check for locale.h. Thanks to a report from
+ Christian Krackowizer.
+
+ More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
+ * jm-macros.m4 (_GNU_SOURCE): Define.
+ (AC_SYS_LARGEFILE): Require.
+ (AM_C_PROTOTYPES): Require.
+
+2000-04-05 Paul Eggert <eggert@twinsun.com>
+
+ * largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
+ IRIX if the installer said otherwise.
+
+2000-04-05 Jim Meyering <jim@meyering.net>
+
+ Portability tweaks required for ultrix4.3.
+ * check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
+ (jm_CHECK_DECLS): Add getutent to the list of functions.
+ (_jm_DECL_HEADERS): Add utmpx.h.
+ From John David Anglin.
+
+ * strftime.m4: Back out the 2000-04-02 change.
+ Instead of that change, simply undefine putenv in the test program.
+
+2000-04-03 Jim Meyering <jim@meyering.net>
+
+ * gettext.m4: Fix typo in comment.
+
+ * codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
+ textutils/configure.in). Suggestion from Paul Eggert.
+ (AC_CHECK_FUNCS): Add nl_langinfo. (also from textutils/configure.in)
+
+2000-04-02 Paul Eggert <eggert@twinsun.com>
+
+ * strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
+ variable in the shell rather than using putenv, which isn't
+ portable. This avoids the configure-time inter-test dependency
+ on the potentially-renamed putenv function.
+
+2000-03-30 Paul Eggert <eggert@twinsun.com>
+
+ * jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
+ before checking struct stat.st_blksize, so that
+ HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
+
+2000-03-29 Paul Eggert <eggert@twinsun.com>
+
+ * strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
+ since strftime.c uses HAVE_STRFTIME to decide whether to use
+ the underlying strftime.
+
+2000-03-10 Jim Meyering <jim@meyering.net>
+
+ * lib-check.m4: Look for getspnam in -lgen, too.
+ From Marco Franzen.
+
+2000-02-02 Bruno Haible <haible@clisp.cons.org>
+
+ * codeset.m4: New file.
+ * iconv.m4: New file.
+ * jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
+
+2000-03-04 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
+ for lib/localcharset.c.
+
+2000-03-03 Jim Meyering <jim@meyering.net>
+
+ * regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
+
+2000-03-02 Jim Meyering <jim@meyering.net>
+
+ * timespec.m4: Require AC_HEADER_TIME before the cache check so
+ the messages come out on separate lines.
+
+ * jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
+ rather than jm_CHECK_DECLARATIONS.
+ * decl.m4: Remove now-unused file.
+
+ * check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and geteuid.
+
+2000-02-27 Jim Meyering <jim@meyering.net>
+
+ * check-decl.m4: Add getenv to the list.
+
+2000-02-23 Jim Meyering <jim@meyering.net>
+
+ * check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
+ in place of my hack.
+
+2000-02-10 Jim Meyering <jim@meyering.net>
+
+ * nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
+ gnu_nanosleep to rpl_nanosleep.
+
+2000-02-09 Jim Meyering <jim@meyering.net>
+
+ * lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
+ struct spwd, rather than in struct passwd. Reported by Gaël Quéri.
+
+2000-02-08 Akim Demaille <akim@epita.fr>
+
+ * largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
+ `[' and `]' and remove uses of `changequote'.
+ (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
+ (AC_SYS_LARGEFILE): Likewise.
+ * gettext.m4 (AM_GNU_GETTEXT): Likewise.
+ * strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
+ of changequote.
+ * regex.m4 (jm_INCLUDED_REGEX): Likewise.
+ * readdir.m4 (jm_FUNC_READDIR): Likewise
+ * memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
+ * getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
+
+2000-02-05 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
+ Remove explicit use of AC_HEADER_TIME. It is required by
+ jm_CHECK_TYPE_STRUCT_TIMESPEC. Using AC_HEADER_TIME and
+ `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
+ in autoconf whereby the expansion of the latter ended up preceding
+ the expansion of its prerequisite, AC_HEADER_TIME.
+ Reported by Volker Borchert.
+
+2000-02-03 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
+
+2000-02-02 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
+ definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
+ Reported by Eli Zaretskii.
+
+2000-01-31 Jim Meyering <jim@meyering.net>
+
+ * check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
+ functions. Add the time.h and sys/time.h headers along with the
+ AC_REQUIRE'ment of AC_HEADER_TIME.
+
+2000-01-30 Jim Meyering <jim@meyering.net>
+
+ * lib-check.m4: Clean up some kludgy old shadow password tests.
+
+ * prereq.m4 (utmp_includes): Define.
+ Check for ut_user and ut_name members in both struct utmpx
+ and struct utmp.
+
+2000-01-29 Jim Meyering <jim@meyering.net>
+
+ * lib-check.m4: New file containing library-related checks from
+ fileutils and sh-utils (textutils had none).
+
+2000-01-28 Jim Meyering <jim@meyering.net>
+
+ * perl.m4: Change format of warning message to look more like that
+ from the missing script. Suggestion from François Pinard.
+
+2000-01-25 Jim Meyering <jim@meyering.net>
+
+ * timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as well
+ as time.h in the compile check.
+ * nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
+ Fix typo in cross-compiling case: s/yes/no/.
+
+2000-01-23 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4: Move df-related tests here from fileutils/configure.in
+
+ * ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
+ (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
+
+ * fsusage.m4: New file. Extracted from fileutils/configure.in.
+ s/space/ac_fsusage_space/.
+ (jm_FILE_SYSTEM_USAGE): Take two parameters.
+
+ * ftruncate.m4: New file (derived from part of fileutils/configure.in).
+ * jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
+ (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
+
+ * jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
+ AC_SUBST these here, rather than just in sh-util/configure.in, so
+ that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
+ all the same.
+ (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
+ (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
+ (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
+ (AC_SUBST(POW_LIBM)): Likewise.
+ (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
+
+2000-01-22 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
+
+ * prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
+
+ * jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
+ configure.in
+ (AC_CHECK_HEADERS): Likewise for sh-utils.
+ (AC_CHECK_HEADERS): Likewise for textutils.
+ Merge the three lists of headers.
+
+ * prereq.m4 (jm_PREREQ_ADDEXT): New macro. Parts moved here
+ from fileutils' configure.in.
+
+ * decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)' code.
+ Moved tests into their own function (_jm_DECL_HEADERS) in check-decl.m4.
+
+ * check-decl.m4: Use #if rather than #ifdef.
+ Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
+ (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
+ (_jm_DECL_HEADERS): Define new function.
+ (jm_CHECK_DECLARATIONS): Require it.
+
+2000-01-19 Jim Meyering <jim@meyering.net>
+
+ * nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
+ Use AC_HEADER_TIME. Volker Borchert reported that OpenBSD-2.3/sparc
+ defines `struct timespec' in <sys/time.h>
+
+ * c-bs-a.m4: Remove uses of changequote altogether.
+ Thanks to Akim for explaining.
+
+2000-01-16 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
+ AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
+ jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
+ AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
+
+2000-01-16 Jim Meyering <jim@meyering.net>
+
+ * c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
+ because the latter didn't work.
+
+2000-01-15 Jim Meyering <jim@meyering.net>
+
+ * jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
+ (AC_REPLACE_FUNCS): Add memcpy and memset.
+ Add these, too: stime strcspn stpcpy strstr strtol strtoul.
+ Add strpbrk.
+ Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
+
+2000-01-12 Jim Meyering <jim@meyering.net>
+
+ * prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
+ (jm_PREREQ): Use it.
+ (jm_PREREQ_READUTMP): New macro.
+ (jm_PREREQ): Use it.
+
+2000-01-11 Paul Eggert <eggert@twinsun.com>
+
+ Quote multibyte characters correctly.
+ * c-bs-a.m4: New file.
+ * prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
+ (jm_PREREQ): Use it.
+
+2000-01-11 Paul Eggert <eggert@twinsun.com>
+
+ * uintmax_t.m4: Port to autoconf 2.13.
+
+2000-01-08 Jim Meyering <meyering@ascend.com>
+
+ * strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
+ * jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
+
+2000-01-04 Jim Meyering <meyering@ascend.com>
+
+ * d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
+ jm_STRUCT_DIRENT_D_TYPE.
+ * d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
+ jm_STRUCT_DIRENT_D_INO.
+ * utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
+ jm_STRUCT_UTIMBUF.
+ * jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/ renamings.
+ * utime.m4: Likewise.
+
+ * timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
+ * jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
+
+2000-01-03 Paul Eggert <eggert@twinsun.com>
+
+ * nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
+ (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
+
+2000-01-02 Jim Meyering <meyering@ascend.com>
+
+ * search-libs.m4: Escape `$' in $3 of dnl comment. I no longer
+ remember if this is necessary.
+
+1999-12-26 Jim Meyering <meyering@ascend.com>
+
+ * jm-macros.m4: Use it here.
+ * nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
+
+1999-12-23 Jim Meyering <meyering@ascend.com>
+
+ * jm-macros.m4: Check for clock_gettime (moved from
+ fileutils/configure.in)
+ Check for gettimeofday.
+
+1999-12-20 Jim Meyering <meyering@ascend.com>
+
+ * strftime.m4: Remove kludge, now that I'm using the fixed
+ autoconf-2.14a-1999-12-20.
+
+1999-12-19 Jim Meyering <meyering@ascend.com>
+
+ * lstat-slash.m4: New file.
+ * jm-macros.m4: Use the new macro:
+ jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
+
+1999-12-07 Jim Meyering <meyering@ascend.com>
+
+ * perl.m4: Require that File::Compare be available, too.
+ Too many systems seem to lack it.
+
+ * strftime.m4: Add checks for most of the cpp macros tested in
+ GNU's strftime.c. Prompted by a patch from Paul Eggert.
+
+1999-11-18 Paul Eggert <eggert@twinsun.com>
+
+ * largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
+ problem with the QNX 4.25 shell, which doesn't propagate exit
+ status of failed commands inside shell assignments.
+
+1999-11-17 Jim Meyering <meyering@ascend.com>
+
+ * gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
+
+1999-11-07 Jim Meyering <meyering@ascend.com>
+
+ * getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
+
+1999-11-06 Jim Meyering <meyering@ascend.com>
+
+ * link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
+ * jm-macros.m4 (jm_MACROS): Use it here.
+
+1999-11-05 Jim Meyering <meyering@ascend.com>
+
+ * jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from configure.in
+ of textutils, fileutils, and sh-utils into this one (shared between
+ those packages) file.
+ Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
+ AC_STRUCT_ST_BLKSIZE.
+
+1999-11-03 Jim Meyering <meyering@ascend.com>
+
+ * ssize_t.m4: Remove file. No longer needed since the new version of
+ AC_CHECK_TYPE checks includes unistd.h.
+ * jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
+ Suggestion from Akim Demaille.
+
+1999-10-30 Jim Meyering <meyering@ascend.com>
+
+ * uintmax_t.m4: Require 2.14a. Remove backslash before backtick in
+ m4-quoted string.
+ * ls-mntd-fs.m4: Likewise.
+ * jm-macros.m4: Likewise. Also, use AC_TYPE_SSIZE_T instead
+ * jm-winsz1.m4: Likewise.
+
+ * const.m4: Remove file, since the fix made it into the experimental
+ version of autoconf.
+ * mktime.m4: Likewise.
+
+ * check-type.m4: Remove file, now that the latest version of
+ AC_CHECK_TYPE takes a third arg to specify additional #includes.
+
+ * ssize_t.m4: New file, requires experimental version of autoconf.
+ * jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
+ AC_CHECK_TYPE.
+
+1999-10-04 Jim Meyering <meyering@ascend.com>
+
+ * jm-macros.m4: Don't require autoconf-2.14.1.
+
+1999-09-22 Paul Eggert <eggert@twinsun.com>
+
+ * largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
+ 2.95.1 bug with HP-UX 10.20.
+
+1999-09-17 Jim Meyering <meyering@ascend.com>
+
+ * jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
+ Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
+ due to missing strdup (against sh-utils-2.0).
+
+1999-08-29 Jim Meyering <meyering@ascend.com>
+
+ * jm-macros.m4: Require jm_BISON.
+ * bison.m4: New file.
+
+1999-08-17 Paul Eggert <eggert@twinsun.com>
+
+ * largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
+ in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
+
+1999-08-05 Jim Meyering <meyering@ascend.com>
+
+ * getline.m4: Rename test file from conftestdata to conftest.data
+ to avoid conflicts with `conftest' on 8+3 filesystems.
+ Suggestion from Eli Zaretskii.
+
+1999-08-04 Jim Meyering <meyering@ascend.com>
+
+ * jm-macros.m4: Move a 4-line block of code from the configure.in of
+ fileutils and sh-utils (textutils's getline test was inadequate).
+ (AM_FUNC_GETLINE): Run this test.
+ (AC_CHECK_FUNCS): Check for getdelim.
+ Reported by Bob Proulx.
+
+1999-08-02 Jim Meyering <meyering@ascend.com>
+
+ * jm-macros.m4: Add a comment.
+
+1999-08-01 Jim Meyering <meyering@ascend.com>
+
+ * mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from m4.
+
+1999-08-01 Paul Eggert <eggert@twinsun.com>
+
+ * lfs.m4: Remove this file.
+ * largefile.m4: New file. It contains the old contents of
+ lfs.m4, except that all names with prefix AC_LFS have been
+ changed to use the prefix AC_SYS_LARGEFILE instead, to be
+ compatible with future autoconf versions. Also, some minor m4
+ quoting problems have been fixed.
+
+1999-07-16 Paul Eggert <eggert@twinsun.com>
+
+ * ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
+ that we can shift, multiply and divide unsigned long long
+ values; Ultrix cc can't do it.
+
+1999-07-14 Paul Eggert <eggert@twinsun.com>
+
+ * xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
+ <inttypes.h> defines strtoumax as a macro (and not as a
+ function).
+
+1999-07-05 Paul Eggert <eggert@twinsun.com>
+
+ * gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
+ Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
+ (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
+ and simplify the shell code.
+
+1999-07-03 Paul Eggert <eggert@twinsun.com>
+
+ * mktime.m4: New file, which is a preview of what should appear
+ in the next public autoconf release.
+
+1999-07-20 Jim Meyering <meyering@ascend.com>
+
+ * jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
+
+1999-07-15 Jim Meyering <meyering@ascend.com>
+
+ * jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
+
+1999-05-22 Jim Meyering <meyering@ascend.com>
+
+ * jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
+
+1999-05-20 Jim Meyering <meyering@ascend.com>
+
+ * search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
+ Add a colon after each `then' in case $4 is empty.
+
+1999-05-16 Jim Meyering <meyering@ascend.com>
+
+ * search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
+
+1999-05-10 Jim Meyering <meyering@ascend.com>
+
+ * jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
+
+ * jm-macros.m4: Require 2.14.1, since we use newly-renamed
+ AC_FUNC_MKTIME.
+
+1999-05-10 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
+
+1999-05-04 Paul Eggert <eggert@twinsun.com>
+
+ * lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
+ not CPPFLAGS, so that linking works correctly in IRIX.
+
+1999-04-30 Paul Eggert <eggert@twinsun.com>
+
+ * jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
+
+1999-04-20 Jim Meyering <meyering@ascend.com>
+
+ * xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
+ AC_REPLACE xstroull if necessary. From Paul Eggert.
+ (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
+
+1999-04-20 Paul Eggert <eggert@twinsun.com>
+
+ * uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
+ long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
+ * jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
+ jm_AC_TYPE_UNSIGNED_LONG_LONG.
+ * ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
+
+ * lfs.m4: Port to AIX and HP-UX. Support cross-compilation.
+
+1999-04-18 Jim Meyering <meyering@ascend.com>
+
+ * xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
+ * jm-macros.m4: Use it.
+
+1999-04-06 Jim Meyering <meyering@ascend.com>
+
+ * strftime.m4: Remove test for %f.
+
+1999-03-29 Jim Meyering <meyering@ascend.com>
+
+ * jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
+ superset of the AC_TYPE_* checks in the textutils, fileutils,
+ and sh-utils, plus AC_TYPE_PID_T. Paul Eggert suggested adding
+ AC_TYPE_PID_T.
+
+1999-03-28 Jim Meyering <meyering@ascend.com>
+
+ * jm-macros.m4: Define GNU_PACKAGE here.
+ Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
+ replaced e.g., in the *.sh files of the sh-utils.
+
+1999-03-20 Jim Meyering <meyering@ascend.com>
+
+ * jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
+ * regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
+ Don't depend on AM_GLIBC. Suggestions from Alain Magloire.
+
+1999-03-19 Jim Meyering <meyering@ascend.com>
+
+ * jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
+
+1999-03-12 Jim Meyering <meyering@ascend.com>
+
+ * jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
+
+1999-03-07 Jim Meyering <meyering@ascend.com>
+
+ * jm-glibc-io.m4: Use only those *_unlocked macros that are declared.
+
+1999-02-17 Jim Meyering <meyering@ascend.com>
+
+ * gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of brackets
+ in macro definition. From Eli Zaretskii and Alain Magloire.
+
+1999-02-07 Jim Meyering <meyering@ascend.com>
+
+ * group-member.m4: New file -- extracted from sh-utils' configure.in.
+
+ 1999-02-05 Eli Zaretskii <eliz@is.elta.co.il>
+ * gettext.m4: Support DOS-style d:/foo/bar absolute file names.
+
+1999-02-06 Jim Meyering <meyering@ascend.com>
+
+ * chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
+ * fnmatch.m4: Likewise.
+ * getgroups.m4: Likewise.
+ * lstat.m4: Likewise.
+ * malloc.m4: Likewise.
+ * putenv.m4: Likewise.
+ * realloc.m4: Likewise.
+ * regex.m4: Likewise.
+ * stat.m4: Likewise.
+ * strftime.m4: Likewise.
+ Suggestion from Alain Magloire.
+
+ * chown.m4: Use `.$ac_objext', not `.o'.
+ * fnmatch.m4: Likewise.
+ * getgroups.m4: Likewise.
+ * getline.m4: Likewise.
+ * lstat.m4: Likewise.
+ * malloc.m4: Likewise.
+ * memcmp.m4: Likewise.
+ * putenv.m4: Likewise.
+ * realloc.m4: Likewise.
+ * regex.m4: Likewise.
+ * stat.m4: Likewise.
+ * strftime.m4: Likewise.
+ Suggestion from Alain Magloire.
+
+ * jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
+ an argument.
+
+ * regex.m4: Add a run-time Test for proper operation of
+ re_compile_pattern.
+
+1999-01-31 Jim Meyering <meyering@ascend.com>
+
+ * getloadavg.m4: Check for locale.h and the function, setlocale.
+
+1999-01-30 Jim Meyering <meyering@ascend.com>
+
+ * check-type.m4: Use 3-arg form of AC_DEFINE.
+
+ * jm-mktime.m4: Make this a wrapper around the official AM_FUNC_MKTIME
+ rather than my private copy, now that the official one is up to date.
+ * mktime.m4: Remove file.
+
+ * getloadavg.m4: Use 3-arg form of AC_DEFINE.
+ * uptime.m4: Likewise.
+ * uintmax_t.m4: Likewise.
+
+1999-01-28 Jim Meyering <meyering@ascend.com>
+
+ * jm-macros.m4: Use jm_AFS.
+ * afs.m4: New file (from fileutils' configure.in).
+
+ * assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
+ * chown.m4: Likewise.
+ * d-ino.m4: Likewise.
+ * d-type.m4: Likewise.
+ * fnmatch.m4: Likewise.
+ * getgroups.m4: Likewise.
+ * gettext.m4: Likewise.
+ * jm-mktime.m4: Likewise.
+ * jm-winsz2.m4: Likewise.
+ * lcmessage.m4: Likewise.
+ * ls-mntd-fs.m4: Likewise.
+ * malloc.m4: Likewise.
+ * memcmp.m4: Likewise.
+ * putenv.m4: Likewise.
+ * realloc.m4: Likewise.
+ * st_mtim.m4: Likewise.
+ * strftime.m4: Likewise.
+
+1999-01-16 Jim Meyering <meyering@ascend.com>
+
+ * jm-macros.m4 (ARGMATCH_DIE): Define.
+ (ARGMATCH_DIE_DECL): Define.
+
+1999-01-12 Jim Meyering <meyering@ascend.com>
+
+ * Makefile.am.in: Rewrite to avoid using fmt.
+ Reported by Lars Hecking.
+
+1999-01-10 Jim Meyering <meyering@ascend.com>
+
+ * fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
+ gross kludge.
+ * inttypes_h.m4: Likewise.
+ * lstat.m4: Likewise.
+ * malloc.m4: Likewise.
+ * readdir.m4: Likewise.
+ * realloc.m4: Likewise.
+ * st_dm_mode.m4: Likewise.
+ * stat.m4: Likewise.
+ * utimbuf.m4: Likewise.
+ * utimes.m4: Likewise.
+
+ * check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
+ AC_CHECK_FUNCS hack. Now, it's still a hack, but at least the
+ comments in config.h.in are meaningful.
+
+ * jm-macros.m4: Require autoconf-2.13 here.
+
+ * regex.m4: By default, don't use the included regex.c on systems
+ with glibc 2. Suggestion from Uli Drepper.
+
+1999-01-02 Jim Meyering <meyering@ascend.com>
+
+ * jm-macros.m4: Replace strcasecmp and strncasecmp.
+
+1998-12-18 Jim Meyering <meyering@ascend.com>
+
+ * Makefile.am.in (Makefile.am): Simplify rule.
+ Based on a suggestion from Lars Hecking.
+
+1998-11-16 Jim Meyering <meyering@ascend.com>
+
+ * lfs.m4: Double-quote the `uname...` expression.
+
+1998-11-16 Paul Eggert <eggert@twinsun.com>
+
+ * lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
+
+1998-11-14 Jim Meyering <meyering@ascend.com>
+
+ * lstat.m4: Correct comment. POSIX does not permit it to succeed.
+ * stat.m4: Likewise.
+
+1998-11-03 Jim Meyering <meyering@ascend.com>
+
+ * stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
+ * lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
+
+1998-10-18 Jim Meyering <meyering@ascend.com>
+
+ * check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
+
+1998-10-17 Jim Meyering <meyering@ascend.com>
+
+ * decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
+ include, though we still hard-code the `require'-like AC_CHECK_HEADERS
+ calls for those previously hard-coded headers. Instead, take a new
+ parameter.
+ (jm_CHECK_DECLARATIONS): Reflect interface change.
+ * check-decl.m4 (jm_CHECK_DECLS): Likewise.
+ (jm_CHECK_DECL_LOCALTIME_R): New macro.
+
+ * mktime.m4: Test for spring-forward gap before long-running test.
+
+1998-10-14 Jim Meyering <meyering@ascend.com>
+
+ * mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
+ instead of "TZ=America/Vancouver". From Paul Eggert.
+
+1998-10-11 Jim Meyering <meyering@ascend.com>
+
+ * mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
+ This adds a test for a recently added compatibility fix for mktime.c.
+ * jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
+
+1998-09-27 Jim Meyering <meyering@ascend.com>
+
+ * jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
+
+ * fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro. Extracted from
+ ../configure.in, including a change from Gordon Matzigkeit to allow
+ cross-compiling for the Hurd.
+
+ * glibc.m4: New file/macro to test for the GNU C Library
+ versions 1 and 2. From Gordon Matzigkeit.
+ Indent.
+
+1998-09-21 Jim Meyering <meyering@ascend.com>
+
+ * chown.m4: Declare locals: before, after. From Andries Brouwer.
+
+1998-08-18 Paul Eggert <eggert@twinsun.com>
+
+ Port nanosecond-resolution times to UnixWare 2.1.2 and
+ pedantic Solaris 2.6.
+
+ * st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
+ AC_STRUCT_ST_MTIM.
+ * st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
+ Generate name of ns member, instead of just 1 or undef.
+ Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
+
+1998-08-15 Jim Meyering <meyering@ascend.com>
+
+ * ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
+ * check-type.m4: New file. Replacement for AC_CHECK_TYPE.
+ * jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
+ instead of jm_TYPE_SSIZE_T.
+
+1998-08-12 Jim Meyering <meyering@ascend.com>
+
+ * st_dm_mode.m4: New file. From Johan Danielsson.
+
+1998-08-02 Jim Meyering <meyering@ascend.com>
+
+ * st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
+ in acconfig.h manually.
+
+1998-07-31 Paul Eggert <eggert@twinsun.com>
+
+ * st_mtim.m4: New file.
+
+1998-07-28 Jim Meyering <meyering@ascend.com>
+
+ * utimes.m4: Undef stat.
+
+1998-07-25 Jim Meyering <meyering@ascend.com>
+
+ * utime.m4 (jm_FUNC_UTIME): New file and macro.
+ * utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
+
+1998-07-09 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
+ uid and gid actually remain unchanged.
+
+1998-07-07 Jim Meyering <meyering@ascend.com>
+
+ * jm-glibc-io.m4: Remove fclose_unlocked.
+
+1998-07-04 Jim Meyering <meyering@ascend.com>
+
+ * regex.m4: Use syscmd, ifelse, and sysval. Mainly as an exercise
+ to prove that this macro can be used in packages without regex.c.
+
+1998-07-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
+ is to be used.
+
+1998-07-03 Jim Meyering <meyering@ascend.com>
+
+ * gettext.m4: Add -lintl if it's found to be necessary.
+
+ * gettext.m4: New file -- from gettext-0.10.35.
+ * lcmessage.m4: Likewise.
+ * progtest.m4: Likewise.
+
+ * regex.m4 (jm_WITH_REGEX): New file and macro.
+ * jm-macros.m4: Require the new macro.
+
+1998-06-29 Jim Meyering <meyering@ascend.com>
+
+ * fstypename.m4: Include sys/param.h. NetBSD 1.3.1 requires this
+ for the definition of NGROUPS (used in a system header included
+ by sys/mount.h).
+
+1998-06-28 Jim Meyering <meyering@ascend.com>
+
+ * ls-mntd-fs.m4: New file.
+ * fstypename.m4: New file.
+
+ * jm-macros.m4: Require the new macro.
+ * jm-glibc-io.m4: New file.
+
+1998-05-19 Jim Meyering <meyering@ascend.com>
+
+ * jm-macros.m4: Add jm_FUNC_LCHOWN.
+ * lchown.m4: New file.
+
+ * Makefile.am.in: New file.
+ * Makefile.am (Makefile.am): Depend on Makefile.am.in.
+
+1998-05-14 Jim Meyering <meyering@ascend.com>
+
+ * Makefile.am (EXTRA_DIST): Add them.
+ * jm-macros.m4: New file.
+ * utimbuf.m4: New file.
+
+1998-05-12 Jim Meyering <meyering@ascend.com>
+
+ * Makefile.am (EXTRA_DIST): Add isc-posix.m4.
+
+1998-05-11 Jim Meyering <meyering@ascend.com>
+
+ * isc-posix.m4: New file.
+
+1998-05-10 Jim Meyering <meyering@ascend.com>
+
+ * jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
+
+1998-05-09 Jim Meyering <meyering@ascend.com>
+
+ * Makefile.am (EXTRA_DIST): Add ssize_t.m4.
+ (EXTRA_DIST): Remove mktime.m4, now that the new version is included
+ with automake.
+
+ * ssize_t.m4: New file.
+ * mktime.m4: Remove file -- the new automake has this now.
+
+1998-04-26 Jim Meyering <meyering@ascend.com>
+
+ * assert.m4: New file.
+ * Makefile.am (EXTRA_DIST): Add assert.m4.
+
+1998-04-05 Jim Meyering <meyering@ascend.com>
+
+ * prereq.m4 (jm_PREREQ_REGEX): New macro.
+ (jm_PREREQ): Use it here.
+
+1998-03-23 Jim Meyering <meyering@eng.ascend.com>
+
+ * inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
+ in acconfig.h.
+
+1998-03-15 Jim Meyering <meyering@eng.ascend.com>
+
+ * prereq.m4: New file.
+ * error.m4: New file.
+ * Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
+
+1998-02-07 Jim Meyering <meyering@eng.ascend.com>
+
+ * getline.m4: Don't set am_cv_func_working_getline before the
+ cache-check for the same variable -- that defeated the purpose of
+ the test; the test program was never run. This was a problem only
+ on systems with losing getline functions -- HP-UX 10.20 is one.
+ Reported by Bjorn Helgaas.
+
+1998-02-06 Jim Meyering <meyering@eng.ascend.com>
+
+ * Makefile.am (EXTRA_DIST): Add perl.m4.
+
+1998-01-10 Jim Meyering <meyering@na-net.ornl.gov>
+
+ * Makefile.am (EXTRA_DIST): Add const.m4.
+
+ * const.m4: New file. Use an initializer in this declaration
+ typedef int charset[2]; const charset x;
+ Reported by Bob Glickstein.
+
+1997-12-21 Jim Meyering <meyering@na-net.ornl.gov>
+
+ * chown.m4: Fix reversed types on -1 args to chown.
+ From Kaveh Ghazi.
+
+1997-12-14 Jim Meyering <meyering@na-net.ornl.gov>
+
+ * check-decl.m4: s/DECLARATION_/DECL_/g.
+ Add lseek and memchr.
+
+ * decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
+ T.E.Dickey <dickey@clark.net> said that some older preprocessors
+ have a 20-character limit on names.
+
+1997-11-30 Jim Meyering <meyering@na-net.ornl.gov>
+
+ * inttypes_h.m4: New file.
+ * uintmax_t.m4: New file.
+ * Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
+
+
+ -----
+
+ Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without
+ modification, are permitted provided the copyright notice
+ and this notice are preserved.
diff --git a/m4/absolute-header.m4 b/m4/absolute-header.m4
new file mode 100644
index 0000000..c649df0
--- /dev/null
+++ b/m4/absolute-header.m4
@@ -0,0 +1,44 @@
+# absolute-header.m4 serial 6
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Derek Price.
+
+# gl_ABSOLUTE_HEADER(HEADER1 HEADER2 ...)
+# ---------------------------------------
+# Find the absolute name of a header file, assuming the header exists.
+# If the header were sys/inttypes.h, this macro would define
+# ABSOLUTE_SYS_INTTYPES_H to the `""' quoted absolute name of sys/inttypes.h
+# in config.h
+# (e.g. `#define ABSOLUTE_SYS_INTTYPES_H "///usr/include/sys/inttypes.h"').
+# The three "///" are to pacify Sun C 5.8, which otherwise would say
+# "warning: #include of /usr/include/... may be non-portable".
+# Use `""', not `<>', so that the /// cannot be confused with a C99 comment.
+AC_DEFUN([gl_ABSOLUTE_HEADER],
+[AC_LANG_PREPROC_REQUIRE()dnl
+AC_FOREACH([gl_HEADER_NAME], [$1],
+ [AS_VAR_PUSHDEF([gl_absolute_header],
+ [gl_cv_absolute_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl
+ AC_CACHE_CHECK([absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>],
+ m4_quote(m4_defn([gl_absolute_header])),
+ [AS_VAR_PUSHDEF([ac_header_exists],
+ [ac_cv_header_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl
+ AC_CHECK_HEADERS_ONCE(m4_quote(m4_defn([gl_HEADER_NAME])))dnl
+ if test AS_VAR_GET(ac_header_exists) = yes; then
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]])])
+dnl eval is necessary to expand ac_cpp.
+dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
+ AS_VAR_SET(gl_absolute_header,
+[`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
+sed -n '\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1#;s#^/[^/]#//&#;p;q;}'`])
+ fi
+ AS_VAR_POPDEF([ac_header_exists])dnl
+ ])dnl
+ AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_quote(m4_defn([gl_HEADER_NAME]))),
+ ["AS_VAR_GET(gl_absolute_header)"],
+ [Define this to an absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>.])
+ AS_VAR_POPDEF([gl_absolute_header])dnl
+])dnl
+])# gl_ABSOLUTE_HEADER
diff --git a/m4/acl.m4 b/m4/acl.m4
new file mode 100644
index 0000000..6e6bd08
--- /dev/null
+++ b/m4/acl.m4
@@ -0,0 +1,78 @@
+# acl.m4 - check for access control list (ACL) primitives
+
+# Copyright (C) 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert and Jim Meyering.
+
+AC_DEFUN([AC_FUNC_ACL],
+[
+ AC_LIBOBJ([acl])
+ AC_LIBOBJ([file-has-acl])
+
+ dnl Prerequisites of lib/acl.c.
+ AC_CHECK_HEADERS(sys/acl.h)
+ AC_CHECK_FUNCS(acl)
+ ac_save_LIBS="$LIBS"
+ AC_SEARCH_LIBS(acl_get_file, acl,
+ [test "$ac_cv_search_acl_get_file" = "none required" ||
+ LIB_ACL=$ac_cv_search_acl_get_file])
+ AC_SUBST(LIB_ACL)
+ AC_CHECK_HEADERS(acl/libacl.h)
+ AC_CHECK_FUNCS(acl_get_file acl_get_fd acl_set_file acl_set_fd \
+ acl_free acl_from_mode acl_from_text \
+ acl_delete_def_file acl_extended_file)
+ if test $ac_cv_header_sys_acl_h = yes; then
+ use_acl=1
+ if test $ac_cv_func_acl_get_file = yes; then
+ # If we detect the acl_get_file bug, disable ACL support altogether.
+ gl_ACL_GET_FILE( , [use_acl=0])
+ fi
+ else
+ use_acl=0
+ fi
+ if test $use_acl = 1 &&
+ test $ac_cv_func_acl_get_file = yes &&
+ test $ac_cv_func_acl_free = yes; then
+ AC_REPLACE_FUNCS([acl_entries])
+ fi
+ LIBS="$ac_save_LIBS"
+ if test $use_acl = 1; then
+ ac_save_LIBS="$LIBS"
+ AC_SEARCH_LIBS([acl_trivial], [sec],
+ [AC_DEFINE([HAVE_ACL_TRIVIAL], 1,
+ [Define to 1 if you have the `acl_trivial' function.])
+ test "$ac_cv_search_acl_trivial" = "none required" ||
+ LIB_ACL_TRIVIAL="$ac_cv_search_acl_trivial"])
+ AC_SUBST([LIB_ACL_TRIVIAL])
+ LIBS="$ac_save_LIBS"
+ fi
+ AC_DEFINE_UNQUOTED(USE_ACL, $use_acl,
+ [Define if you want access control list support.])
+])
+
+# gl_ACL_GET_FILE(IF-WORKS, IF-NOT)
+# -------------------------------------
+# If `acl_get_file' works (does not have a particular bug),
+# run IF-WORKS, otherwise, IF-NOT.
+# This tests for a Darwin 8.7.0 bug, whereby acl_get_file returns NULL,
+# but sets errno = ENOENT for an existing file or directory.
+AC_DEFUN([gl_ACL_GET_FILE],
+[
+ AC_CACHE_CHECK([for working acl_get_file], gl_cv_func_working_acl_get_file,
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/types.h>
+ #include <sys/acl.h>
+ #include <errno.h>
+ ]],
+ [[return !! (!acl_get_file (".", ACL_TYPE_ACCESS)
+ && errno == ENOENT);]])],
+ [gl_cv_func_working_acl_get_file=yes],
+ [gl_cv_func_working_acl_get_file=no],
+ [gl_cv_func_working_acl_get_file=cross-compiling])])
+
+ AS_IF([test $gl_cv_func_working_acl_get_file = yes], [$1], [$2])
+])
diff --git a/m4/alloca.m4 b/m4/alloca.m4
new file mode 100644
index 0000000..eb62e0e
--- /dev/null
+++ b/m4/alloca.m4
@@ -0,0 +1,50 @@
+# alloca.m4 serial 7
+dnl Copyright (C) 2002-2004, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_ALLOCA],
+[
+ dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
+ AC_REQUIRE([AC_PROG_CPP])
+ AC_REQUIRE([AC_PROG_EGREP])
+
+ AC_REQUIRE([AC_FUNC_ALLOCA])
+ if test $ac_cv_func_alloca_works = no; then
+ gl_PREREQ_ALLOCA
+ fi
+
+ # Define an additional variable used in the Makefile substitution.
+ if test $ac_cv_working_alloca_h = yes; then
+ AC_CACHE_CHECK([for alloca as a compiler built-in], [gl_cv_rpl_alloca], [
+ AC_EGREP_CPP([Need own alloca], [
+#if defined __GNUC__ || defined _AIX || defined _MSC_VER
+ Need own alloca
+#endif
+ ], [gl_cv_rpl_alloca=yes], [gl_cv_rpl_alloca=no])
+ ])
+ if test $gl_cv_rpl_alloca = yes; then
+ dnl OK, alloca can be implemented through a compiler built-in.
+ AC_DEFINE([HAVE_ALLOCA], 1,
+ [Define to 1 if you have 'alloca' after including <alloca.h>,
+ a header that may be supplied by this distribution.])
+ ALLOCA_H=alloca.h
+ else
+ dnl alloca exists as a library function, i.e. it is slow and probably
+ dnl a memory leak. Don't define HAVE_ALLOCA in this case.
+ ALLOCA_H=
+ fi
+ else
+ ALLOCA_H=alloca.h
+ fi
+ AC_SUBST([ALLOCA_H])
+
+ AC_DEFINE(HAVE_ALLOCA_H, 1,
+ [Define HAVE_ALLOCA_H for backward compatibility with older code
+ that includes <alloca.h> only if HAVE_ALLOCA_H is defined.])
+])
+
+# Prerequisites of lib/alloca.c.
+# STACK_DIRECTION is already handled by AC_FUNC_ALLOCA.
+AC_DEFUN([gl_PREREQ_ALLOCA], [:])
diff --git a/m4/allocsa.m4 b/m4/allocsa.m4
new file mode 100644
index 0000000..5a616dc
--- /dev/null
+++ b/m4/allocsa.m4
@@ -0,0 +1,15 @@
+# allocsa.m4 serial 6
+dnl Copyright (C) 2003-2004, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_ALLOCSA],
+[
+ dnl Use the autoconf tests for alloca(), but not the AC_SUBSTed variables
+ dnl @ALLOCA@ and @LTALLOCA@.
+ dnl gl_FUNC_ALLOCA dnl Already brought in by the module dependencies.
+ AC_REQUIRE([gl_EEMALLOC])
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ AC_REQUIRE([gt_TYPE_LONGDOUBLE])
+])
diff --git a/m4/argmatch.m4 b/m4/argmatch.m4
new file mode 100644
index 0000000..beda5a1
--- /dev/null
+++ b/m4/argmatch.m4
@@ -0,0 +1,10 @@
+#serial 3
+dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_ARGMATCH],
+[
+ AC_LIBOBJ([argmatch])
+])
diff --git a/m4/arpa_inet_h.m4 b/m4/arpa_inet_h.m4
new file mode 100644
index 0000000..d01d098
--- /dev/null
+++ b/m4/arpa_inet_h.m4
@@ -0,0 +1,18 @@
+# arpa_inet_h.m4 serial 1
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Simon Josefsson
+
+AC_DEFUN([gl_HEADER_ARPA_INET],
+[
+ AC_CHECK_HEADERS_ONCE([arpa/inet.h])
+ if test $ac_cv_header_arpa_inet_h = yes; then
+ ARPA_INET_H=''
+ else
+ ARPA_INET_H='arpa/inet.h'
+ fi
+ AC_SUBST(ARPA_INET_H)
+])
diff --git a/m4/assert.m4 b/m4/assert.m4
new file mode 100644
index 0000000..bfdc00f
--- /dev/null
+++ b/m4/assert.m4
@@ -0,0 +1,19 @@
+#serial 5
+
+# Copyright (C) 1998, 1999, 2001, 2004 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl based on code from Eleftherios Gkioulekas
+
+AC_DEFUN([gl_ASSERT],
+[
+ AC_MSG_CHECKING(whether to enable assertions)
+ AC_ARG_ENABLE(assert,
+ [ --disable-assert turn off assertions],
+ [ AC_MSG_RESULT(no)
+ AC_DEFINE(NDEBUG,1,[Define to 1 if assertions should be disabled.]) ],
+ [ AC_MSG_RESULT(yes) ]
+ )
+])
diff --git a/m4/atexit.m4 b/m4/atexit.m4
new file mode 100644
index 0000000..348912f
--- /dev/null
+++ b/m4/atexit.m4
@@ -0,0 +1,18 @@
+# atexit.m4 serial 2
+dnl Copyright (C) 2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_ATEXIT],
+[
+ AC_REPLACE_FUNCS(atexit)
+ if test $ac_cv_func_atexit = no; then
+ gl_PREREQ_ATEXIT
+ fi
+])
+
+# Prerequisites of lib/atexit.c.
+AC_DEFUN([gl_PREREQ_ATEXIT], [
+ :
+])
diff --git a/m4/autobuild.m4 b/m4/autobuild.m4
new file mode 100644
index 0000000..bb3407b
--- /dev/null
+++ b/m4/autobuild.m4
@@ -0,0 +1,34 @@
+# autobuild.m4 serial 2 (autobuild-3.3)
+# Copyright (C) 2004, 2006 Simon Josefsson
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License. As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# This file can be used in projects which are not available under
+# the GNU General Public License or the GNU Library General Public
+# License but which still want to provide support for Autobuild.
+
+# Usage: AB_INIT([MODE]).
+AC_DEFUN([AB_INIT],
+[
+ AC_REQUIRE([AC_CANONICAL_BUILD])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ AC_MSG_NOTICE([autobuild project... ${PACKAGE_NAME:-$PACKAGE}])
+ AC_MSG_NOTICE([autobuild revision... ${PACKAGE_VERSION:-$VERSION}])
+ hostname=`hostname`
+ if test "$hostname"; then
+ AC_MSG_NOTICE([autobuild hostname... $hostname])
+ fi
+ ifelse([$1],[],,[AC_MSG_NOTICE([autobuild mode... $1])])
+ date=`date +%Y%m%d-%H%M%S`
+ if test "$?" != 0; then
+ date=`date`
+ fi
+ if test "$date"; then
+ AC_MSG_NOTICE([autobuild timestamp... $date])
+ fi
+])
diff --git a/m4/backupfile.m4 b/m4/backupfile.m4
new file mode 100644
index 0000000..effbce6
--- /dev/null
+++ b/m4/backupfile.m4
@@ -0,0 +1,16 @@
+# backupfile.m4 serial 12
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_BACKUPFILE],
+[
+ AC_LIBOBJ([backupfile])
+
+ dnl Prerequisites of lib/backupfile.c.
+ AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO])
+ AC_REQUIRE([gl_AC_DOS])
+ AC_REQUIRE([AC_SYS_LONG_FILE_NAMES])
+ AC_CHECK_FUNCS_ONCE([pathconf])
+])
diff --git a/m4/base64.m4 b/m4/base64.m4
new file mode 100644
index 0000000..24801ef
--- /dev/null
+++ b/m4/base64.m4
@@ -0,0 +1,16 @@
+# base64.m4 serial 3
+dnl Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_BASE64],
+[
+ gl_PREREQ_BASE64
+])
+
+# Prerequisites of lib/base64.c.
+AC_DEFUN([gl_PREREQ_BASE64], [
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([AC_C_RESTRICT])
+])
diff --git a/m4/bison.m4 b/m4/bison.m4
new file mode 100644
index 0000000..91039b1
--- /dev/null
+++ b/m4/bison.m4
@@ -0,0 +1,24 @@
+#serial 4
+
+# Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_BISON],
+[
+ # getdate.y works with bison only.
+ : ${YACC='bison -y'}
+dnl
+dnl Declaring YACC & YFLAGS precious will not be necessary after GNULIB
+dnl requires an Autoconf greater than 2.59c, but it will probably still be
+dnl useful to override the description of YACC in the --help output, re
+dnl getdate.y assuming `bison -y'.
+ AC_ARG_VAR(YACC,
+[The `Yet Another C Compiler' implementation to use. Defaults to `bison -y'.
+Values other than `bison -y' will most likely break on most systems.])dnl
+ AC_ARG_VAR(YFLAGS,
+[YFLAGS contains the list arguments that will be passed by default to Bison.
+This script will default YFLAGS to the empty string to avoid a default value of
+`-d' given by some make applications.])dnl
+])
diff --git a/m4/boottime.m4 b/m4/boottime.m4
new file mode 100644
index 0000000..ad350f1
--- /dev/null
+++ b/m4/boottime.m4
@@ -0,0 +1,65 @@
+# boottime.m4 serial 3
+# Determine whether this system has infrastructure for obtaining the boot time.
+
+# Copyright (C) 1996, 2000, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# GNULIB_BOOT_TIME([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+* ----------------------------------------------------------
+AC_DEFUN([GNULIB_BOOT_TIME],
+[
+ AC_CHECK_FUNCS(sysctl)
+ AC_CHECK_HEADERS_ONCE(sys/param.h)
+ AC_CHECK_HEADERS(sys/sysctl.h, [], [],
+ [AC_INCLUDES_DEFAULT
+ [#if HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif]])
+ AC_CHECK_HEADERS_ONCE(utmp.h utmpx.h OS.h)
+ AC_CACHE_CHECK(
+ [whether we can get the system boot time],
+ [gnulib_cv_have_boot_time],
+ [
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+[AC_INCLUDES_DEFAULT
+#if HAVE_SYSCTL && HAVE_SYS_SYSCTL_H
+# if HAVE_SYS_PARAM_H
+# include <sys/param.h> /* needed for OpenBSD 3.0 */
+# endif
+# include <sys/sysctl.h>
+#endif
+#if HAVE_UTMPX_H
+# include <utmpx.h>
+#elif HAVE_UTMP_H
+# include <utmp.h>
+#endif
+#if HAVE_OS_H
+# include <OS.h>
+#endif
+],
+[[
+#if defined BOOT_TIME || (defined CTL_KERN && defined KERN_BOOTTIME) || HAVE_OS_H
+/* your system *does* have the infrastructure to determine boot time */
+#else
+please_tell_us_how_to_determine_boot_time_on_your_system
+#endif
+]])],
+ gnulib_cv_have_boot_time=yes,
+ gnulib_cv_have_boot_time=no)
+ ])
+ AS_IF([test $gnulib_cv_have_boot_time = yes], [$1], [$2])
+])
diff --git a/m4/c-strtod.m4 b/m4/c-strtod.m4
new file mode 100644
index 0000000..7f206c7
--- /dev/null
+++ b/m4/c-strtod.m4
@@ -0,0 +1,53 @@
+# c-strtod.m4 serial 9
+
+# Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert.
+
+AC_DEFUN([gl_C99_STRTOLD],
+[
+ AC_CACHE_CHECK([whether strtold conforms to C99],
+ [gl_cv_func_c99_strtold],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[/* On HP-UX before 11.23, strtold returns a struct instead of
+ long double. Reject implementations like that, by requiring
+ compatibility with the C99 prototype. */
+ #include <stdlib.h>
+ static long double (*p) (char const *, char **) = strtold;
+ static long double
+ test (char const *nptr, char **endptr)
+ {
+ long double r;
+ r = strtold (nptr, endptr);
+ return r;
+ }]],
+ [[return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;]])],
+ [gl_cv_func_c99_strtold=yes],
+ [gl_cv_func_c99_strtold=no])])
+ if test $gl_cv_func_c99_strtold = yes; then
+ AC_DEFINE([HAVE_C99_STRTOLD], 1, [Define to 1 if strtold conforms to C99.])
+ fi
+])
+
+AC_DEFUN([gl_C_STRTOD],
+[
+ AC_LIBOBJ([c-strtod])
+
+ dnl Prerequisites of lib/c-strtod.c.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ :
+])
+
+AC_DEFUN([gl_C_STRTOLD],
+[
+ AC_LIBOBJ([c-strtold])
+
+ dnl Prerequisites of lib/c-strtold.c.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([gl_C99_STRTOLD])
+ :
+])
diff --git a/m4/calloc.m4 b/m4/calloc.m4
new file mode 100644
index 0000000..c109171
--- /dev/null
+++ b/m4/calloc.m4
@@ -0,0 +1,43 @@
+# calloc.m4 serial 6
+
+# Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Jim Meyering.
+
+# Determine whether calloc (N, S) returns non-NULL when N*S is zero,
+# and returns NULL when N*S overflows.
+# If so, define HAVE_CALLOC. Otherwise, define calloc to rpl_calloc
+# and arrange to use a calloc wrapper function that does work in that case.
+
+# _AC_FUNC_CALLOC_IF(IF-WORKS, IF-NOT)
+# -------------------------------------
+# If `calloc (0, 0)' is properly handled, run IF-WORKS, otherwise, IF-NOT.
+AC_DEFUN([_AC_FUNC_CALLOC_IF],
+[AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+AC_CACHE_CHECK([for GNU libc compatible calloc], ac_cv_func_calloc_0_nonnull,
+[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
+ [exit (!calloc (0, 0) || calloc ((size_t) -1 / 8 + 1, 8));])],
+ [ac_cv_func_calloc_0_nonnull=yes],
+ [ac_cv_func_calloc_0_nonnull=no],
+ [ac_cv_func_calloc_0_nonnull=no])])
+AS_IF([test $ac_cv_func_calloc_0_nonnull = yes], [$1], [$2])
+])# AC_FUNC_CALLOC
+
+
+# AC_FUNC_CALLOC
+# ---------------
+# Report whether `calloc (0, 0)' is properly handled, and replace calloc if
+# needed.
+AC_DEFUN([AC_FUNC_CALLOC],
+[_AC_FUNC_CALLOC_IF(
+ [AC_DEFINE([HAVE_CALLOC], 1,
+ [Define to 1 if your system has a GNU libc compatible `calloc'
+ function, and to 0 otherwise.])],
+ [AC_DEFINE([HAVE_CALLOC], 0)
+ AC_LIBOBJ([calloc])
+ AC_DEFINE([calloc], [rpl_calloc],
+ [Define to rpl_calloc if the replacement function should be used.])])
+])# AC_FUNC_CALLOC
diff --git a/m4/canon-host.m4 b/m4/canon-host.m4
new file mode 100644
index 0000000..906e871
--- /dev/null
+++ b/m4/canon-host.m4
@@ -0,0 +1,15 @@
+# canon-host.m4 serial 9
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_CANON_HOST],
+[
+ AC_LIBOBJ([canon-host])
+ gl_PREREQ_CANON_HOST
+])
+
+AC_DEFUN([gl_PREREQ_CANON_HOST], [
+ :
+])
diff --git a/m4/canonicalize.m4 b/m4/canonicalize.m4
new file mode 100644
index 0000000..817edd5
--- /dev/null
+++ b/m4/canonicalize.m4
@@ -0,0 +1,17 @@
+#serial 12
+
+# Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Jim Meyering.
+
+AC_DEFUN([AC_FUNC_CANONICALIZE_FILE_NAME],
+ [
+ AC_LIBOBJ([canonicalize])
+
+ AC_CHECK_HEADERS_ONCE([sys/param.h])
+ AC_CHECK_DECLS_ONCE([canonicalize_file_name])
+ AC_CHECK_FUNCS_ONCE([canonicalize_file_name resolvepath])
+ ])
diff --git a/m4/chdir-long.m4 b/m4/chdir-long.m4
new file mode 100644
index 0000000..7f34f60
--- /dev/null
+++ b/m4/chdir-long.m4
@@ -0,0 +1,38 @@
+#serial 10
+
+# Use Gnulib's robust chdir function.
+# It can handle arbitrarily long directory names, which means
+# that when it is given the name of an existing directory, it
+# never fails with ENAMETOOLONG.
+# Arrange to compile chdir-long.c only on systems that define PATH_MAX.
+
+dnl Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Written by Jim Meyering.
+
+AC_DEFUN([gl_FUNC_CHDIR_LONG],
+[
+ AC_CACHE_CHECK([whether this system has an arbitrary file name length limit],
+ gl_cv_have_arbitrary_file_name_length_limit,
+ [AC_EGREP_CPP([have_arbitrary_file_name_length_limit],
+ [#include <unistd.h>
+#include <limits.h>
+#if defined PATH_MAX || defined MAXPATHLEN
+have_arbitrary_file_name_length_limit
+#endif],
+ gl_cv_have_arbitrary_file_name_length_limit=yes,
+ gl_cv_have_arbitrary_file_name_length_limit=no)])
+
+ if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
+ AC_LIBOBJ([chdir-long])
+ gl_PREREQ_CHDIR_LONG
+ fi
+])
+
+AC_DEFUN([gl_PREREQ_CHDIR_LONG],
+[
+ :
+])
diff --git a/m4/check-decl.m4 b/m4/check-decl.m4
new file mode 100644
index 0000000..d520352
--- /dev/null
+++ b/m4/check-decl.m4
@@ -0,0 +1,49 @@
+#serial 23
+# Check declarations for this package.
+
+dnl Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
+dnl Free Software Foundation, Inc.
+
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+
+dnl This is just a wrapper function to encapsulate this kludge.
+dnl Putting it in a separate file like this helps share it between
+dnl different packages.
+AC_DEFUN([gl_CHECK_DECLS],
+[
+ AC_REQUIRE([AC_HEADER_TIME])
+
+ AC_CHECK_HEADERS_ONCE(grp.h pwd.h)
+ headers='
+#include <sys/types.h>
+
+#include <unistd.h>
+
+#if HAVE_GRP_H
+# include <grp.h>
+#endif
+
+#if HAVE_PWD_H
+# include <pwd.h>
+#endif
+'
+ AC_CHECK_DECLS([
+ getgrgid,
+ getpwuid,
+ ttyname], , , $headers)
+
+ AC_CHECK_DECLS([isblank], [], [], [#include <ctype.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/chown.m4 b/m4/chown.m4
new file mode 100644
index 0000000..89761f5
--- /dev/null
+++ b/m4/chown.m4
@@ -0,0 +1,83 @@
+#serial 17
+# Determine whether we need the chown wrapper.
+
+dnl Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2007 Free
+dnl Software Foundation, Inc.
+
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# chown should accept arguments of -1 for uid and gid, and it should
+# dereference symlinks. If it doesn't, arrange to use the replacement
+# function.
+
+# From Jim Meyering.
+
+AC_DEFUN([gl_FUNC_CHOWN],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_TYPE_UID_T])
+ AC_REQUIRE([AC_FUNC_CHOWN])
+ AC_REQUIRE([gl_FUNC_CHOWN_FOLLOWS_SYMLINK])
+
+ if test $ac_cv_func_chown_works = no; then
+ AC_DEFINE(CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE, 1,
+ [Define if chown is not POSIX compliant regarding IDs of -1.])
+ fi
+
+ # If chown has either of the above problems, then we need the wrapper.
+ if test $ac_cv_func_chown_works$gl_cv_func_chown_follows_symlink = yesyes; then
+ : # no wrapper needed
+ else
+ REPLACE_CHOWN=1
+ AC_LIBOBJ(chown)
+ gl_PREREQ_CHOWN
+ fi
+])
+
+# Determine whether chown follows symlinks (it should).
+AC_DEFUN([gl_FUNC_CHOWN_FOLLOWS_SYMLINK],
+[
+ AC_CACHE_CHECK(
+ [whether chown(2) dereferences symlinks],
+ gl_cv_func_chown_follows_symlink,
+ [
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+
+ int
+ main ()
+ {
+ char const *dangling_symlink = "conftest.dangle";
+
+ unlink (dangling_symlink);
+ if (symlink ("conftest.no-such", dangling_symlink))
+ abort ();
+
+ /* Exit successfully on a conforming system,
+ i.e., where chown must fail with ENOENT. */
+ exit ( ! (chown (dangling_symlink, getuid (), getgid ()) != 0
+ && errno == ENOENT));
+ }
+ ]])],
+ [gl_cv_func_chown_follows_symlink=yes],
+ [gl_cv_func_chown_follows_symlink=no],
+ [gl_cv_func_chown_follows_symlink=yes]
+ )
+ ]
+ )
+
+ if test $gl_cv_func_chown_follows_symlink = no; then
+ AC_DEFINE(CHOWN_MODIFIES_SYMLINK, 1,
+ [Define if chown modifies symlinks.])
+ fi
+])
+
+# Prerequisites of lib/chown.c.
+AC_DEFUN([gl_PREREQ_CHOWN],
+[
+ AC_CHECK_FUNC([fchown], , [AC_LIBOBJ(fchown-stub)])
+])
diff --git a/m4/clock_time.m4 b/m4/clock_time.m4
new file mode 100644
index 0000000..227a597
--- /dev/null
+++ b/m4/clock_time.m4
@@ -0,0 +1,30 @@
+# clock_time.m4 serial 8
+dnl Copyright (C) 2002-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Check for clock_gettime and clock_settime, and set LIB_CLOCK_GETTIME.
+# For a program named, say foo, you should add a line like the following
+# in the corresponding Makefile.am file:
+# foo_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME)
+
+AC_DEFUN([gl_CLOCK_TIME],
+[
+ dnl Persuade glibc and Solaris <time.h> to declare these functions.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+ # 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.
+ gl_saved_libs=$LIBS
+ AC_SEARCH_LIBS(clock_gettime, [rt posix4],
+ [test "$ac_cv_search_clock_gettime" = "none required" ||
+ LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
+ AC_SUBST([LIB_CLOCK_GETTIME])
+ AC_CHECK_FUNCS(clock_gettime clock_settime)
+ LIBS=$gl_saved_libs
+])
diff --git a/m4/cloexec.m4 b/m4/cloexec.m4
new file mode 100644
index 0000000..4c4e26a
--- /dev/null
+++ b/m4/cloexec.m4
@@ -0,0 +1,10 @@
+#serial 6
+dnl Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_CLOEXEC],
+[
+ AC_LIBOBJ([cloexec])
+])
diff --git a/m4/close-stream.m4 b/m4/close-stream.m4
new file mode 100644
index 0000000..b1f9d54
--- /dev/null
+++ b/m4/close-stream.m4
@@ -0,0 +1,13 @@
+#serial 3
+dnl Copyright (C) 2006-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_CLOSE_STREAM],
+[
+ AC_LIBOBJ([close-stream])
+
+ dnl Prerequisites of lib/close-stream.c.
+ :
+])
diff --git a/m4/closeout.m4 b/m4/closeout.m4
new file mode 100644
index 0000000..55a65f0
--- /dev/null
+++ b/m4/closeout.m4
@@ -0,0 +1,13 @@
+# closeout.m4 serial 5
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_CLOSEOUT],
+[
+ AC_LIBOBJ([closeout])
+
+ dnl Prerequisites of lib/closeout.c.
+ :
+])
diff --git a/m4/codeset.m4 b/m4/codeset.m4
new file mode 100644
index 0000000..223955b
--- /dev/null
+++ b/m4/codeset.m4
@@ -0,0 +1,21 @@
+# codeset.m4 serial 2 (gettext-0.16)
+dnl Copyright (C) 2000-2002, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_LANGINFO_CODESET],
+[
+ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
+ [AC_TRY_LINK([#include <langinfo.h>],
+ [char* cs = nl_langinfo(CODESET); return !cs;],
+ am_cv_langinfo_codeset=yes,
+ am_cv_langinfo_codeset=no)
+ ])
+ if test $am_cv_langinfo_codeset = yes; then
+ AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+ fi
+])
diff --git a/m4/config-h.m4 b/m4/config-h.m4
new file mode 100644
index 0000000..807d515
--- /dev/null
+++ b/m4/config-h.m4
@@ -0,0 +1,13 @@
+# Say that -DHAVE_CONFIG_H is not needed.
+
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+# This package's source files all include config.h unconditionally,
+# so there's no need to pass -DHAVE_CONFIG_H to the compiler.
+AC_DEFUN([gl_CONFIG_H],
+ [AC_CONFIG_COMMANDS_PRE([test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=])])
diff --git a/m4/cycle-check.m4 b/m4/cycle-check.m4
new file mode 100644
index 0000000..608f781
--- /dev/null
+++ b/m4/cycle-check.m4
@@ -0,0 +1,11 @@
+#serial 5
+dnl Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_CYCLE_CHECK],
+[
+ AC_REQUIRE([AC_C_INLINE])
+ AC_LIBOBJ([cycle-check])
+])
diff --git a/m4/d-ino.m4 b/m4/d-ino.m4
new file mode 100644
index 0000000..d87b4db
--- /dev/null
+++ b/m4/d-ino.m4
@@ -0,0 +1,35 @@
+#serial 8
+
+dnl From Jim Meyering.
+dnl
+dnl Check whether struct dirent has a member named d_ino.
+dnl
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2006 Free Software
+# Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO],
+ [AC_CACHE_CHECK([for d_ino member in directory struct],
+ jm_cv_struct_dirent_d_ino,
+ [AC_TRY_LINK(dnl
+ [
+#include <sys/types.h>
+#include <dirent.h>
+ ],
+ [struct dirent dp; dp.d_ino = 0;],
+
+ jm_cv_struct_dirent_d_ino=yes,
+ jm_cv_struct_dirent_d_ino=no)
+ ]
+ )
+ 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.])
+ fi
+ ]
+)
diff --git a/m4/d-type.m4 b/m4/d-type.m4
new file mode 100644
index 0000000..7675dd2
--- /dev/null
+++ b/m4/d-type.m4
@@ -0,0 +1,35 @@
+#serial 9
+
+dnl From Jim Meyering.
+dnl
+dnl Check whether struct dirent has a member named d_type.
+dnl
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software
+# Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE],
+ [AC_CACHE_CHECK([for d_type member in directory struct],
+ jm_cv_struct_dirent_d_type,
+ [AC_TRY_LINK(dnl
+ [
+#include <sys/types.h>
+#include <dirent.h>
+ ],
+ [struct dirent dp; dp.d_type = 0;],
+
+ jm_cv_struct_dirent_d_type=yes,
+ jm_cv_struct_dirent_d_type=no)
+ ]
+ )
+ 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.])
+ fi
+ ]
+)
diff --git a/m4/dirfd.m4 b/m4/dirfd.m4
new file mode 100644
index 0000000..125966b
--- /dev/null
+++ b/m4/dirfd.m4
@@ -0,0 +1,74 @@
+#serial 14 -*- Autoconf -*-
+
+dnl Find out how to get the file descriptor associated with an open DIR*.
+
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering
+
+AC_DEFUN([gl_FUNC_DIRFD],
+[
+ dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
+ AC_REQUIRE([AC_PROG_CPP])
+ AC_REQUIRE([AC_PROG_EGREP])
+ AC_CHECK_FUNCS(dirfd)
+ AC_CHECK_DECLS([dirfd], , ,
+ [#include <sys/types.h>
+ #include <dirent.h>])
+
+ AC_CACHE_CHECK([whether dirfd is a macro],
+ gl_cv_func_dirfd_macro,
+ [AC_EGREP_CPP([dirent_header_defines_dirfd], [
+#include <sys/types.h>
+#include <dirent.h>
+#ifdef dirfd
+ dirent_header_defines_dirfd
+#endif],
+ gl_cv_func_dirfd_macro=yes,
+ gl_cv_func_dirfd_macro=no)])
+
+ # Use the replacement only if we have no function, macro,
+ # or declaration with that name.
+ if test $ac_cv_func_dirfd,$ac_cv_have_decl_dirfd,$gl_cv_func_dirfd_macro \
+ = no,no,no; then
+ AC_REPLACE_FUNCS([dirfd])
+ AC_CACHE_CHECK(
+ [how to get the file descriptor associated with an open DIR*],
+ gl_cv_sys_dir_fd_member_name,
+ [
+ dirfd_save_CFLAGS=$CFLAGS
+ for ac_expr in d_fd dd_fd; do
+
+ CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
+ AC_TRY_COMPILE(
+ [#include <sys/types.h>
+ #include <dirent.h>],
+ [DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;],
+ dir_fd_found=yes
+ )
+ CFLAGS=$dirfd_save_CFLAGS
+ test "$dir_fd_found" = yes && break
+ done
+ test "$dir_fd_found" = yes || ac_expr=no_such_member
+
+ gl_cv_sys_dir_fd_member_name=$ac_expr
+ ]
+ )
+ if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
+ AC_DEFINE_UNQUOTED(DIR_FD_MEMBER_NAME,
+ $gl_cv_sys_dir_fd_member_name,
+ [the name of the file descriptor member of DIR])
+ fi
+ AH_VERBATIM(DIR_TO_FD,
+ [#ifdef DIR_FD_MEMBER_NAME
+# define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME)
+#else
+# define DIR_TO_FD(Dir_p) -1
+#endif
+])
+ fi
+])
diff --git a/m4/dirname.m4 b/m4/dirname.m4
new file mode 100644
index 0000000..e35da96
--- /dev/null
+++ b/m4/dirname.m4
@@ -0,0 +1,18 @@
+#serial 7 -*- autoconf -*-
+dnl Copyright (C) 2002-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_DIRNAME],
+[
+ AC_LIBOBJ([basename])
+ AC_LIBOBJ([dirname])
+ AC_LIBOBJ([stripslash])
+
+ dnl Prerequisites of lib/dirname.h.
+ AC_REQUIRE([gl_AC_DOS])
+ AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
+
+ dnl No prerequisites of lib/basename.c, lib/dirname.c, lib/stripslash.c.
+])
diff --git a/m4/dos.m4 b/m4/dos.m4
new file mode 100644
index 0000000..dd59571
--- /dev/null
+++ b/m4/dos.m4
@@ -0,0 +1,71 @@
+#serial 10 -*- autoconf -*-
+
+# Define some macros required for proper operation of code in lib/*.c
+# on MSDOS/Windows systems.
+
+# Copyright (C) 2000, 2001, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# From Jim Meyering.
+
+AC_DEFUN([gl_AC_DOS],
+ [
+ AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
+ [
+ AC_TRY_COMPILE([],
+ [#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__
+neither MSDOS nor Windows
+#endif],
+ [ac_cv_win_or_dos=yes],
+ [ac_cv_win_or_dos=no])
+ ])
+
+ if test x"$ac_cv_win_or_dos" = xyes; then
+ ac_fs_accepts_drive_letter_prefix=1
+ ac_fs_backslash_is_file_name_separator=1
+ AC_CACHE_CHECK([whether drive letter can start relative path],
+ [ac_cv_drive_letter_can_be_relative],
+ [
+ AC_TRY_COMPILE([],
+ [#if defined __CYGWIN__
+drive letters are always absolute
+#endif],
+ [ac_cv_drive_letter_can_be_relative=yes],
+ [ac_cv_drive_letter_can_be_relative=no])
+ ])
+ if test x"$ac_cv_drive_letter_can_be_relative" = xyes; then
+ ac_fs_drive_letter_can_be_relative=1
+ else
+ ac_fs_drive_letter_can_be_relative=0
+ fi
+ else
+ ac_fs_accepts_drive_letter_prefix=0
+ ac_fs_backslash_is_file_name_separator=0
+ ac_fs_drive_letter_can_be_relative=0
+ fi
+
+ AC_DEFINE_UNQUOTED([FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX],
+ $ac_fs_accepts_drive_letter_prefix,
+ [Define on systems for which file names may have a so-called
+ `drive letter' prefix, define this to compute the length of that
+ prefix, including the colon.])
+
+ AH_VERBATIM(ISSLASH,
+ [#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+#else
+# define ISSLASH(C) ((C) == '/')
+#endif])
+
+ AC_DEFINE_UNQUOTED([FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR],
+ $ac_fs_backslash_is_file_name_separator,
+ [Define if the backslash character may also serve as a file name
+ component separator.])
+
+ AC_DEFINE_UNQUOTED([FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE],
+ $ac_fs_drive_letter_can_be_relative,
+ [Define if a drive letter prefix denotes a relative path if it is
+ not followed by a file name component separator.])
+ ])
diff --git a/m4/double-slash-root.m4 b/m4/double-slash-root.m4
new file mode 100644
index 0000000..69d60d0
--- /dev/null
+++ b/m4/double-slash-root.m4
@@ -0,0 +1,38 @@
+# double-slash-root.m4 serial 2 -*- Autoconf -*-
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_DOUBLE_SLASH_ROOT],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CACHE_CHECK([whether // is distinct from /], [gl_cv_double_slash_root],
+ [ if test x"$cross_compiling" = xyes ; then
+ # When cross-compiling, there is no way to tell whether // is special
+ # short of a list of hosts. However, the only known hosts to date
+ # that have a distinct // are Apollo DomainOS (too old to port to),
+ # Cygwin, and z/OS. If anyone knows of another system for which // has
+ # special semantics and is distinct from /, please report it to
+ # <bug-gnulib@gnu.org>.
+ case $host in
+ *-cygwin | i370-ibm-openedition)
+ gl_cv_double_slash_root=yes ;;
+ *)
+ # Be optimistic and assume that / and // are the same when we
+ # don't know.
+ gl_cv_double_slash_root='unknown, assuming no' ;;
+ esac
+ else
+ set x `ls -di / //`
+ if test $[2] = $[4] && wc //dev/null >/dev/null 2>&1; then
+ gl_cv_double_slash_root=no
+ else
+ gl_cv_double_slash_root=yes
+ fi
+ fi])
+ if test "$gl_cv_double_slash_root" = yes; then
+ AC_DEFINE([DOUBLE_SLASH_IS_DISTINCT_ROOT], 1,
+ [Define to 1 if // is a file system root distinct from /.])
+ fi
+])
diff --git a/m4/dup2.m4 b/m4/dup2.m4
new file mode 100644
index 0000000..0549823
--- /dev/null
+++ b/m4/dup2.m4
@@ -0,0 +1,15 @@
+#serial 5
+dnl Copyright (C) 2002, 2005, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_DUP2],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([dup2])
+ if test $ac_cv_func_dup2 = no; then
+ HAVE_DUP2=0
+ AC_LIBOBJ([dup2])
+ fi
+])
diff --git a/m4/eealloc.m4 b/m4/eealloc.m4
new file mode 100644
index 0000000..adcfd06
--- /dev/null
+++ b/m4/eealloc.m4
@@ -0,0 +1,32 @@
+# eealloc.m4 serial 1
+dnl Copyright (C) 2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_EEALLOC],
+[
+ AC_REQUIRE([gl_EEMALLOC])
+ AC_REQUIRE([gl_EEREALLOC])
+ AC_REQUIRE([AC_C_INLINE])
+])
+
+AC_DEFUN([gl_EEMALLOC],
+[
+ _AC_FUNC_MALLOC_IF(
+ [gl_cv_func_malloc_0_nonnull=1],
+ [gl_cv_func_malloc_0_nonnull=0])
+ AC_DEFINE_UNQUOTED([MALLOC_0_IS_NONNULL], $gl_cv_func_malloc_0_nonnull,
+ [If malloc(0) is != NULL, define this to 1. Otherwise define this
+ to 0.])
+])
+
+AC_DEFUN([gl_EEREALLOC],
+[
+ _AC_FUNC_REALLOC_IF(
+ [gl_cv_func_realloc_0_nonnull=1],
+ [gl_cv_func_realloc_0_nonnull=0])
+ AC_DEFINE_UNQUOTED([REALLOC_0_IS_NONNULL], $gl_cv_func_realloc_0_nonnull,
+ [If realloc(NULL,0) is != NULL, define this to 1. Otherwise define this
+ to 0.])
+])
diff --git a/m4/eoverflow.m4 b/m4/eoverflow.m4
new file mode 100644
index 0000000..3bffd10
--- /dev/null
+++ b/m4/eoverflow.m4
@@ -0,0 +1,70 @@
+# eoverflow.m4 serial 2
+dnl Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+# The EOVERFLOW errno value ought to be defined in <errno.h>, according to
+# POSIX. But some systems (like AIX 3) don't define it, and some systems
+# (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined.
+
+# Define EOVERFLOW as a C macro and as a substituted macro in such a way that
+# 1. on all systems, after inclusion of <errno.h>, EOVERFLOW is usable,
+# 2. on systems where EOVERFLOW is defined elsewhere, we use the same numeric
+# value.
+
+AC_DEFUN([gl_EOVERFLOW],
+[
+ AC_REQUIRE([AC_PROG_CC])dnl
+
+ AC_CACHE_CHECK([for EOVERFLOW], ac_cv_decl_EOVERFLOW, [
+ AC_EGREP_CPP(yes,[
+#include <errno.h>
+#ifdef EOVERFLOW
+yes
+#endif
+ ], have_eoverflow=1)
+ if test -n "$have_eoverflow"; then
+ dnl EOVERFLOW exists in <errno.h>. Don't need to define EOVERFLOW ourselves.
+ ac_cv_decl_EOVERFLOW=yes
+ else
+ AC_EGREP_CPP(yes,[
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef EOVERFLOW
+yes
+#endif
+ ], have_eoverflow=1)
+ if test -n "$have_eoverflow"; then
+ dnl EOVERFLOW exists but is hidden.
+ dnl Define it to the same value.
+ AC_COMPUTE_INT([ac_cv_decl_EOVERFLOW], [EOVERFLOW], [
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+])
+ else
+ dnl EOVERFLOW isn't defined by the system. Define EOVERFLOW ourselves, but
+ dnl don't define it as EINVAL, because snprintf() callers want to
+ dnl distinguish EINVAL and EOVERFLOW.
+ ac_cv_decl_EOVERFLOW=E2BIG
+ fi
+ fi
+ ])
+ if test "$ac_cv_decl_EOVERFLOW" != yes; then
+ AC_DEFINE_UNQUOTED([EOVERFLOW], [$ac_cv_decl_EOVERFLOW],
+ [Define as good substitute value for EOVERFLOW.])
+ EOVERFLOW="$ac_cv_decl_EOVERFLOW"
+ AC_SUBST(EOVERFLOW)
+ fi
+])
+
+dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
+dnl Remove this when we can assume autoconf >= 2.61.
+m4_ifdef([AC_COMPUTE_INT], [], [
+ AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
+])
diff --git a/m4/error.m4 b/m4/error.m4
new file mode 100644
index 0000000..7c7746e
--- /dev/null
+++ b/m4/error.m4
@@ -0,0 +1,22 @@
+#serial 11
+
+# Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2004 Free Software
+# Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_ERROR],
+[
+ AC_FUNC_ERROR_AT_LINE
+ dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
+ gl_PREREQ_ERROR
+])
+
+# Prerequisites of lib/error.c.
+AC_DEFUN([gl_PREREQ_ERROR],
+[
+ AC_REQUIRE([AC_FUNC_STRERROR_R])
+ :
+])
diff --git a/m4/euidaccess-stat.m4 b/m4/euidaccess-stat.m4
new file mode 100644
index 0000000..d1c6aed
--- /dev/null
+++ b/m4/euidaccess-stat.m4
@@ -0,0 +1,11 @@
+# serial 1
+dnl Copyright (C) 2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_EUIDACCESS_STAT],
+[
+ AC_LIBSOURCES([euidaccess-stat.c, euidaccess-stat.h])
+ AC_LIBOBJ([euidaccess-stat])
+])
diff --git a/m4/euidaccess.m4 b/m4/euidaccess.m4
new file mode 100644
index 0000000..9edb4b3
--- /dev/null
+++ b/m4/euidaccess.m4
@@ -0,0 +1,47 @@
+# euidaccess.m4 serial 7
+dnl Copyright (C) 2002-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_NONREENTRANT_EUIDACCESS],
+[
+ AC_REQUIRE([gl_FUNC_EUIDACCESS])
+ AC_DEFINE([PREFER_NONREENTRANT_EUIDACCESS], 1,
+ [Define this if you prefer euidaccess to return the correct result
+ even if this would make it nonreentrant. Define this only if your
+ entire application is safe even if the uid or gid might temporarily
+ change. If your application uses signal handlers or threads it
+ is probably not safe.])
+])
+
+AC_DEFUN([gl_FUNC_EUIDACCESS],
+[
+ dnl Persuade glibc <unistd.h> to declare euidaccess().
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ AC_CHECK_DECLS_ONCE([euidaccess])
+ AC_REPLACE_FUNCS(euidaccess)
+ if test $ac_cv_func_euidaccess = no; then
+ gl_PREREQ_EUIDACCESS
+ fi
+])
+
+# Prerequisites of lib/euidaccess.c.
+AC_DEFUN([gl_PREREQ_EUIDACCESS], [
+ AC_CHECK_HEADERS_ONCE(libgen.h)
+ AC_CHECK_DECLS_ONCE(setregid)
+ AC_REQUIRE([AC_FUNC_GETGROUPS])
+
+ # Solaris 9 needs -lgen to get the eaccess function.
+ # Save and restore LIBS so -lgen 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.
+ gl_saved_libs=$LIBS
+ AC_SEARCH_LIBS(eaccess, [gen],
+ [test "$ac_cv_search_eaccess" = "none required" ||
+ LIB_EACCESS=$ac_cv_search_eaccess])
+ AC_SUBST([LIB_EACCESS])
+ AC_CHECK_FUNCS(eaccess)
+ LIBS=$gl_saved_libs
+])
diff --git a/m4/exclude.m4 b/m4/exclude.m4
new file mode 100644
index 0000000..23727e6
--- /dev/null
+++ b/m4/exclude.m4
@@ -0,0 +1,10 @@
+# exclude.m4 serial 7
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_EXCLUDE],
+[
+ AC_LIBOBJ([exclude])
+])
diff --git a/m4/exitfail.m4 b/m4/exitfail.m4
new file mode 100644
index 0000000..b7a691e
--- /dev/null
+++ b/m4/exitfail.m4
@@ -0,0 +1,13 @@
+# exitfail.m4 serial 6
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_EXITFAIL],
+[
+ AC_LIBOBJ([exitfail])
+
+ dnl No prerequisites of lib/exitfail.c.
+ :
+])
diff --git a/m4/extensions.m4 b/m4/extensions.m4
new file mode 100644
index 0000000..143a9e5
--- /dev/null
+++ b/m4/extensions.m4
@@ -0,0 +1,58 @@
+# serial 4 -*- Autoconf -*-
+# Enable extensions on systems that normally disable them.
+
+# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
+# Autoconf. Perhaps we can remove this once we can assume Autoconf
+# 2.61 or later everywhere, but since CVS Autoconf mutates rapidly
+# enough in this area it's likely we'll need to redefine
+# AC_USE_SYSTEM_EXTENSIONS for quite some time.
+
+# AC_USE_SYSTEM_EXTENSIONS
+# ------------------------
+# Enable extensions on systems that normally disable them,
+# typically due to standards-conformance issues.
+AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
+[
+ AC_BEFORE([$0], [AC_COMPILE_IFELSE])
+ AC_BEFORE([$0], [AC_RUN_IFELSE])
+
+ AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([AC_AIX])
+ AC_REQUIRE([AC_MINIX])
+
+ AH_VERBATIM([__EXTENSIONS__],
+[/* Enable extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif])
+ AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
+ [ac_cv_safe_to_define___extensions__],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([
+# define __EXTENSIONS__ 1
+ AC_INCLUDES_DEFAULT])],
+ [ac_cv_safe_to_define___extensions__=yes],
+ [ac_cv_safe_to_define___extensions__=no])])
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ AC_DEFINE([__EXTENSIONS__])
+ AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+ AC_DEFINE([_TANDEM_SOURCE])
+])
+
+# gl_USE_SYSTEM_EXTENSIONS
+# ------------------------
+# Enable extensions on systems that normally disable them,
+# typically due to standards-conformance issues.
+AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS],
+ [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])])
diff --git a/m4/fchdir.m4 b/m4/fchdir.m4
new file mode 100644
index 0000000..58c933c
--- /dev/null
+++ b/m4/fchdir.m4
@@ -0,0 +1,28 @@
+# fchdir.m4 serial 3
+dnl Copyright (C) 2006-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FCHDIR],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([fchdir])
+ if test $ac_cv_func_fchdir = no; then
+ REPLACE_FCHDIR=1
+ AC_LIBOBJ([fchdir])
+ gl_PREREQ_FCHDIR
+ AC_DEFINE([FCHDIR_REPLACEMENT], 1,
+ [Define if gnulib's fchdir() replacement is used.])
+ gl_ABSOLUTE_HEADER([dirent.h])
+ ABSOLUTE_DIRENT_H=\"$gl_cv_absolute_dirent_h\"
+ DIRENT_H='dirent.h'
+ else
+ DIRENT_H=
+ fi
+ AC_SUBST([ABSOLUTE_DIRENT_H])
+ AC_SUBST([DIRENT_H])
+])
+
+# Prerequisites of lib/fchdir.c.
+AC_DEFUN([gl_PREREQ_FCHDIR], [:])
diff --git a/m4/fcntl-safer.m4 b/m4/fcntl-safer.m4
new file mode 100644
index 0000000..3475b0a
--- /dev/null
+++ b/m4/fcntl-safer.m4
@@ -0,0 +1,11 @@
+#serial 5
+dnl Copyright (C) 2005-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FCNTL_SAFER],
+[
+ AC_LIBOBJ([open-safer])
+ AC_LIBOBJ([creat-safer])
+])
diff --git a/m4/fcntl_h.m4 b/m4/fcntl_h.m4
new file mode 100644
index 0000000..9846b2f
--- /dev/null
+++ b/m4/fcntl_h.m4
@@ -0,0 +1,81 @@
+# Configure fcntl.h.
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+AC_DEFUN([gl_FCNTL_H],
+[
+ AC_CACHE_CHECK([for working fcntl.h], gl_cv_header_working_fcntl_h,
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+ #ifndef O_NOATIME
+ #define O_NOATIME 0
+ #endif
+ #ifndef O_NOFOLLOW
+ #define O_NOFOLLOW 0
+ #endif
+ static int const constants[] =
+ {
+ O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
+ O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
+ };
+ ]],
+ [[
+ int status = !constants;
+ {
+ static char const sym[] = "conftest.sym";
+ if (symlink (".", sym) != 0
+ || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0)
+ status |= 32;
+ }
+ {
+ static char const file[] = "confdefs.h";
+ int fd = open (file, O_RDONLY | O_NOATIME);
+ char c;
+ struct stat st0, st1;
+ if (fd < 0
+ || fstat (fd, &st0) != 0
+ || sleep (1) != 0
+ || read (fd, &c, 1) != 1
+ || close (fd) != 0
+ || stat (file, &st1) != 0
+ || st0.st_atime != st1.st_atime)
+ status |= 64;
+ }
+ return status;]])],
+ [gl_cv_header_working_fcntl_h=yes],
+ [case $? in #(
+ 32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
+ 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
+ 96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
+ *) gl_cv_header_working_fcntl_h='no';;
+ esac],
+ [gl_cv_header_working_fcntl_h=cross-compiling])])
+
+ case $gl_cv_header_working_fcntl_h in #(
+ *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
+ *) ac_val=1;;
+ esac
+ AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val],
+ [Define to 1 if O_NOATIME works.])
+
+ case $gl_cv_header_working_fcntl_h in #(
+ *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
+ *) ac_val=1;;
+ esac
+ AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val],
+ [Define to 1 if O_NOFOLLOW works.])
+
+ gl_ABSOLUTE_HEADER([fcntl.h])
+ ABSOLUTE_FCNTL_H=\"$gl_cv_absolute_fcntl_h\"
+ AC_SUBST([ABSOLUTE_FCNTL_H])
+ FCNTL_H='fcntl.h'
+ AC_SUBST([FCNTL_H])
+])
diff --git a/m4/fd-reopen.m4 b/m4/fd-reopen.m4
new file mode 100644
index 0000000..2d299bd
--- /dev/null
+++ b/m4/fd-reopen.m4
@@ -0,0 +1,15 @@
+# Invoke open, but return either a desired file descriptor or -1.
+
+dnl Copyright (C) 2005 Free Software Foundation, Inc.
+
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+AC_DEFUN([gl_FD_REOPEN],
+[
+ AC_LIBSOURCES([fd-reopen.c, fd-reopen.h])
+ AC_LIBOBJ([fd-reopen])
+])
diff --git a/m4/file-type.m4 b/m4/file-type.m4
new file mode 100644
index 0000000..2d0a1d8
--- /dev/null
+++ b/m4/file-type.m4
@@ -0,0 +1,10 @@
+# file-type.m4 serial 6
+dnl Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FILE_TYPE],
+[
+ AC_LIBOBJ([file-type])
+])
diff --git a/m4/fileblocks.m4 b/m4/fileblocks.m4
new file mode 100644
index 0000000..5fb6311
--- /dev/null
+++ b/m4/fileblocks.m4
@@ -0,0 +1,20 @@
+# fileblocks.m4 serial 4
+dnl Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FILEBLOCKS],
+[
+ AC_STRUCT_ST_BLOCKS
+ dnl Note: AC_STRUCT_ST_BLOCKS does AC_LIBOBJ(fileblocks).
+ if test $ac_cv_member_struct_stat_st_blocks = no; then
+ gl_PREREQ_FILEBLOCKS
+ fi
+])
+
+# Prerequisites of lib/fileblocks.c.
+AC_DEFUN([gl_PREREQ_FILEBLOCKS], [
+ AC_CHECK_HEADERS_ONCE(sys/param.h)
+ :
+])
diff --git a/m4/filemode.m4 b/m4/filemode.m4
new file mode 100644
index 0000000..64f5cb9
--- /dev/null
+++ b/m4/filemode.m4
@@ -0,0 +1,12 @@
+# filemode.m4 serial 7
+dnl Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FILEMODE],
+[
+ AC_REQUIRE([AC_STRUCT_ST_DM_MODE])
+ AC_LIBOBJ([filemode])
+ AC_CHECK_DECLS_ONCE([strmode])
+])
diff --git a/m4/filenamecat.m4 b/m4/filenamecat.m4
new file mode 100644
index 0000000..bb46dba
--- /dev/null
+++ b/m4/filenamecat.m4
@@ -0,0 +1,13 @@
+# filenamecat.m4 serial 8
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FILE_NAME_CONCAT],
+[
+ AC_LIBOBJ([filenamecat])
+
+ dnl Prerequisites of lib/filenamecat.c.
+ AC_CHECK_FUNCS_ONCE(mempcpy)
+])
diff --git a/m4/flexmember.m4 b/m4/flexmember.m4
new file mode 100644
index 0000000..eb5f2b1
--- /dev/null
+++ b/m4/flexmember.m4
@@ -0,0 +1,41 @@
+# serial 1
+# Check for flexible array member support.
+
+# Copyright (C) 2006 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert.
+
+AC_DEFUN([AC_C_FLEXIBLE_ARRAY_MEMBER],
+[
+ AC_CACHE_CHECK([for flexible array member],
+ ac_cv_c_flexmember,
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdlib.h>
+ #include <stdio.h>
+ #include <stddef.h>
+ struct s { int n; double d[]; };]],
+ [[int m = getchar ();
+ struct s *p = malloc (offsetof (struct s, d)
+ + m * sizeof (double));
+ p->d[0] = 0.0;
+ return p->d != (double *) NULL;]])],
+ [ac_cv_c_flexmember=yes],
+ [ac_cv_c_flexmember=no])])
+ if test $ac_cv_c_flexmember = yes; then
+ AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [],
+ [Define to nothing if C supports flexible array members, and to
+ 1 if it does not. That way, with a declaration like `struct s
+ { int n; double d@<:@FLEXIBLE_ARRAY_MEMBER@:>@; };', the struct hack
+ can be used with pre-C99 compilers.
+ When computing the size of such an object, don't use 'sizeof (struct s)'
+ as it overestimates the size. Use 'offsetof (struct s, d)' instead.
+ Don't use 'offsetof (struct s, d@<:@0@:>@)', as this doesn't work with
+ MSVC and with C++ compilers.])
+ else
+ AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], 1)
+ fi
+])
diff --git a/m4/fnmatch.m4 b/m4/fnmatch.m4
new file mode 100644
index 0000000..3778742
--- /dev/null
+++ b/m4/fnmatch.m4
@@ -0,0 +1,127 @@
+# Check for fnmatch.
+
+# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
+# Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Autoconf defines AC_FUNC_FNMATCH, but that is obsolescent.
+# New applications should use the macros below instead.
+
+# _AC_FUNC_FNMATCH_IF(STANDARD = GNU | POSIX, CACHE_VAR, IF-TRUE, IF-FALSE)
+# -------------------------------------------------------------------------
+# If a STANDARD compliant fnmatch is found, run IF-TRUE, otherwise
+# IF-FALSE. Use CACHE_VAR.
+AC_DEFUN([_AC_FUNC_FNMATCH_IF],
+[AC_CACHE_CHECK(
+ [for working $1 fnmatch],
+ [$2],
+ [dnl Some versions of Solaris, SCO, and the GNU C Library
+ dnl have a broken or incompatible fnmatch.
+ dnl So we run a test program. If we are cross-compiling, take no chance.
+ dnl Thanks to John Oleynick, François Pinard, and Paul Eggert for this test.
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <fnmatch.h>
+ static int
+ y (char const *pattern, char const *string, int flags)
+ {
+ return fnmatch (pattern, string, flags) == 0;
+ }
+ static int
+ n (char const *pattern, char const *string, int flags)
+ {
+ return fnmatch (pattern, string, flags) == FNM_NOMATCH;
+ }
+ ]],
+ [[char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
+ char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
+ static char const A_1[] = { 'A' - 1, 0 };
+ static char const A01[] = { 'A' + 1, 0 };
+ static char const a_1[] = { 'a' - 1, 0 };
+ static char const a01[] = { 'a' + 1, 0 };
+ static char const bs_1[] = { '\\\\' - 1, 0 };
+ static char const bs01[] = { '\\\\' + 1, 0 };
+ return
+ !(n ("a*", "", 0)
+ && y ("a*", "abc", 0)
+ && n ("d*/*1", "d/s/1", FNM_PATHNAME)
+ && y ("a\\\\bc", "abc", 0)
+ && n ("a\\\\bc", "abc", FNM_NOESCAPE)
+ && y ("*x", ".x", 0)
+ && n ("*x", ".x", FNM_PERIOD)
+ && y (Apat, "\\\\", 0) && y (Apat, "A", 0)
+ && y (apat, "\\\\", 0) && y (apat, "a", 0)
+ && n (Apat, A_1, 0) == ('A' < '\\\\')
+ && n (apat, a_1, 0) == ('a' < '\\\\')
+ && y (Apat, A01, 0) == ('A' < '\\\\')
+ && y (apat, a01, 0) == ('a' < '\\\\')
+ && y (Apat, bs_1, 0) == ('A' < '\\\\')
+ && y (apat, bs_1, 0) == ('a' < '\\\\')
+ && n (Apat, bs01, 0) == ('A' < '\\\\')
+ && n (apat, bs01, 0) == ('a' < '\\\\')
+ && ]m4_if([$1], [GNU],
+ [y ("xxXX", "xXxX", FNM_CASEFOLD)
+ && y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)
+ && n ("d*/*1", "d/s/1", FNM_FILE_NAME)
+ && y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)
+ && y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)
+ && y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)],
+ 1))[;]])],
+ [$2=yes],
+ [$2=no],
+ [$2=cross])])
+AS_IF([test $$2 = yes], [$3], [$4])
+])# _AC_FUNC_FNMATCH_IF
+
+
+# _AC_LIBOBJ_FNMATCH
+# ------------------
+# Prepare the replacement of fnmatch.
+AC_DEFUN([_AC_LIBOBJ_FNMATCH],
+[AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+AC_REQUIRE([AC_TYPE_MBSTATE_T])dnl
+AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
+AC_CHECK_FUNCS_ONCE([btowc iswctype mbsrtowcs mempcpy wmemchr wmemcpy wmempcpy])
+AC_CHECK_HEADERS_ONCE([wctype.h])
+AC_LIBOBJ([fnmatch])
+FNMATCH_H=fnmatch.h
+])# _AC_LIBOBJ_FNMATCH
+
+
+AC_DEFUN([gl_FUNC_FNMATCH_POSIX],
+[
+ FNMATCH_H=
+ _AC_FUNC_FNMATCH_IF([POSIX], [ac_cv_func_fnmatch_posix],
+ [rm -f lib/fnmatch.h],
+ [_AC_LIBOBJ_FNMATCH])
+ if test $ac_cv_func_fnmatch_posix != yes; then
+ dnl We must choose a different name for our function, since on ELF systems
+ dnl a broken fnmatch() in libc.so would override our fnmatch() if it is
+ dnl compiled into a shared library.
+ AC_DEFINE([fnmatch], [posix_fnmatch],
+ [Define to a replacement function name for fnmatch().])
+ fi
+ AC_SUBST([FNMATCH_H])
+])
+
+
+AC_DEFUN([gl_FUNC_FNMATCH_GNU],
+[
+ dnl Persuade glibc <fnmatch.h> to declare FNM_CASEFOLD etc.
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ FNMATCH_H=
+ _AC_FUNC_FNMATCH_IF([GNU], [ac_cv_func_fnmatch_gnu],
+ [rm -f lib/fnmatch.h],
+ [_AC_LIBOBJ_FNMATCH])
+ if test $ac_cv_func_fnmatch_gnu != yes; then
+ dnl We must choose a different name for our function, since on ELF systems
+ dnl a broken fnmatch() in libc.so would override our fnmatch() if it is
+ dnl compiled into a shared library.
+ AC_DEFINE([fnmatch], [gnu_fnmatch],
+ [Define to a replacement function name for fnmatch().])
+ fi
+ AC_SUBST([FNMATCH_H])
+])
diff --git a/m4/fpending.m4 b/m4/fpending.m4
new file mode 100644
index 0000000..a073483
--- /dev/null
+++ b/m4/fpending.m4
@@ -0,0 +1,78 @@
+#serial 10
+
+# Copyright (C) 2000, 2001, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering
+dnl Using code from emacs, based on suggestions from Paul Eggert
+dnl and Ulrich Drepper.
+
+dnl Find out how to determine the number of pending output bytes on a stream.
+dnl glibc (2.1.93 and newer) and Solaris provide __fpending. On other systems,
+dnl we have to grub around in the FILE struct.
+
+AC_DEFUN([gl_FUNC_FPENDING],
+[
+ AC_CHECK_HEADERS_ONCE(stdio_ext.h)
+ AC_REPLACE_FUNCS([__fpending])
+ fp_headers='
+# include <stdio.h>
+# if HAVE_STDIO_EXT_H
+# include <stdio_ext.h>
+# endif
+'
+ AC_CHECK_DECLS([__fpending], , , $fp_headers)
+ if test $ac_cv_func___fpending = no; then
+ AC_CACHE_CHECK(
+ [how to determine the number of pending output bytes on a stream],
+ ac_cv_sys_pending_output_n_bytes,
+ [
+ for ac_expr in \
+ \
+ '# glibc2' \
+ 'fp->_IO_write_ptr - fp->_IO_write_base' \
+ \
+ '# traditional Unix' \
+ 'fp->_ptr - fp->_base' \
+ \
+ '# BSD' \
+ 'fp->_p - fp->_bf._base' \
+ \
+ '# SCO, Unixware' \
+ '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
+ \
+ '# old glibc?' \
+ 'fp->__bufp - fp->__buffer' \
+ \
+ '# old glibc iostream?' \
+ 'fp->_pptr - fp->_pbase' \
+ \
+ '# VMS' \
+ '(*fp)->_ptr - (*fp)->_base' \
+ \
+ '# e.g., DGUX R4.11; the info is not available' \
+ 1 \
+ ; do
+
+ # Skip each embedded comment.
+ case "$ac_expr" in '#'*) continue;; esac
+
+ AC_TRY_COMPILE(
+ [#include <stdio.h>
+ ],
+ [FILE *fp = stdin; (void) ($ac_expr);],
+ fp_done=yes
+ )
+ test "$fp_done" = yes && break
+ done
+
+ ac_cv_sys_pending_output_n_bytes=$ac_expr
+ ]
+ )
+ AC_DEFINE_UNQUOTED(PENDING_OUTPUT_N_BYTES,
+ $ac_cv_sys_pending_output_n_bytes,
+ [the number of pending output bytes on stream `fp'])
+ fi
+])
diff --git a/m4/fprintftime.m4 b/m4/fprintftime.m4
new file mode 100644
index 0000000..8b088e8
--- /dev/null
+++ b/m4/fprintftime.m4
@@ -0,0 +1,10 @@
+#serial 2
+dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FPRINTFTIME],
+[
+ AC_LIBOBJ([fprintftime])
+])
diff --git a/m4/free.m4 b/m4/free.m4
new file mode 100644
index 0000000..566734b
--- /dev/null
+++ b/m4/free.m4
@@ -0,0 +1,40 @@
+# Check whether free (NULL) is supposed to work.
+
+# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert.
+
+# We can't test for free (NULL) even at runtime, since it might
+# happen to "work" for our test program, but not in general. So, be
+# conservative and use feature tests for relatively modern hosts,
+# where free (NULL) is known to work. This costs a bit of
+# performance on some older hosts, but we can fix that later if
+# needed.
+
+AC_DEFUN([gl_FUNC_FREE],
+[
+ AC_CACHE_CHECK([whether free (NULL) is known to work],
+ [gl_cv_func_free],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[@%:@include <unistd.h>]],
+ [[@%:@if _POSIX_VERSION < 199009L && \
+ (defined unix || defined _unix || defined _unix_ \
+ || defined __unix || defined __unix__)
+ @%:@error "'free (NULL)' is not known to work"
+ @%:@endif]])],
+ [gl_cv_func_free=yes],
+ [gl_cv_func_free=no])])
+
+ if test $gl_cv_func_free = no; then
+ AC_LIBOBJ(free)
+ AC_DEFINE(free, rpl_free,
+ [Define to rpl_free if the replacement function should be used.])
+ fi
+])
+
+# Prerequisites of lib/free.c.
+AC_DEFUN([gl_PREREQ_FREE], [:])
diff --git a/m4/fstypename.m4 b/m4/fstypename.m4
new file mode 100644
index 0000000..aa676f3
--- /dev/null
+++ b/m4/fstypename.m4
@@ -0,0 +1,22 @@
+#serial 6
+
+dnl From Jim Meyering.
+dnl
+dnl See if struct statfs has the f_fstypename member.
+dnl If so, define HAVE_STRUCT_STATFS_F_FSTYPENAME.
+dnl
+
+# Copyright (C) 1998, 1999, 2001, 2004, 2006 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FSTYPENAME],
+[
+ AC_CHECK_MEMBERS([struct statfs.f_fstypename],,,
+ [
+ #include <sys/types.h>
+ #include <sys/param.h>
+ #include <sys/mount.h>
+ ])
+])
diff --git a/m4/fsusage.m4 b/m4/fsusage.m4
new file mode 100644
index 0000000..08bf06c
--- /dev/null
+++ b/m4/fsusage.m4
@@ -0,0 +1,265 @@
+#serial 22
+# Obtaining file system usage information.
+
+# Copyright (C) 1997, 1998, 2000, 2001, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Jim Meyering.
+
+AC_DEFUN([gl_FSUSAGE],
+[
+ AC_CHECK_HEADERS_ONCE(sys/param.h)
+ AC_CHECK_HEADERS_ONCE(sys/vfs.h sys/fs_types.h)
+ AC_CHECK_HEADERS(sys/mount.h, [], [],
+ [AC_INCLUDES_DEFAULT
+ [#if HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif]])
+ gl_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 file system usage information.
+# If successful, define the appropriate symbol (see fsusage.c) and
+# execute ACTION-IF-FOUND. Otherwise, execute ACTION-IF-NOT-FOUND.
+#
+# gl_FILE_SYSTEM_USAGE([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+
+AC_DEFUN([gl_FILE_SYSTEM_USAGE],
+[
+
+AC_MSG_NOTICE([checking how to get file system space usage])
+ac_fsusage_space=no
+
+# Perform only the link test since it seems there are no variants of the
+# statvfs function. This check is more than just AC_CHECK_FUNCS(statvfs)
+# because that got a false positive on SCO OSR5. Adding the declaration
+# of a `struct statvfs' causes this test to fail (as it should) on such
+# systems. That system is reported to work fine with STAT_STATFS4 which
+# is what it gets when this test fails.
+if test $ac_fsusage_space = no; then
+ # SVR4
+ AC_CACHE_CHECK([for statvfs function (SVR4)], fu_cv_sys_stat_statvfs,
+ [AC_TRY_LINK([#include <sys/types.h>
+#if defined __GLIBC__ && !defined __BEOS__
+Do not use statvfs on systems with GNU libc, because that function stats
+all preceding entries in /proc/mounts, and that makes df hang if even
+one of the corresponding file systems is hard-mounted, but not available.
+statvfs in GNU libc on BeOS operates differently: it only makes a system
+call.
+#endif
+#include <sys/statvfs.h>],
+ [struct statvfs fsd; statvfs (0, &fsd);],
+ fu_cv_sys_stat_statvfs=yes,
+ fu_cv_sys_stat_statvfs=no)])
+ if test $fu_cv_sys_stat_statvfs = yes; then
+ ac_fsusage_space=yes
+ AC_DEFINE(STAT_STATVFS, 1,
+ [ Define if there is a function named statvfs. (SVR4)])
+ fi
+fi
+
+if test $ac_fsusage_space = no; then
+ # DEC Alpha running OSF/1
+ AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)])
+ AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1,
+ [AC_TRY_RUN([
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/mount.h>
+ int
+ main ()
+ {
+ struct statfs fsd;
+ fsd.f_fsize = 0;
+ return statfs (".", &fsd, sizeof (struct statfs)) != 0;
+ }],
+ fu_cv_sys_stat_statfs3_osf1=yes,
+ fu_cv_sys_stat_statfs3_osf1=no,
+ fu_cv_sys_stat_statfs3_osf1=no)])
+ AC_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1)
+ if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
+ ac_fsusage_space=yes
+ AC_DEFINE(STAT_STATFS3_OSF1, 1,
+ [ Define if statfs takes 3 args. (DEC Alpha running OSF/1)])
+ fi
+fi
+
+if test $ac_fsusage_space = no; then
+# AIX
+ AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl
+member (AIX, 4.3BSD)])
+ AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize,
+ [AC_TRY_RUN([
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+#ifdef HAVE_SYS_VFS_H
+#include <sys/vfs.h>
+#endif
+ int
+ main ()
+ {
+ struct statfs fsd;
+ fsd.f_bsize = 0;
+ return statfs (".", &fsd) != 0;
+ }],
+ fu_cv_sys_stat_statfs2_bsize=yes,
+ fu_cv_sys_stat_statfs2_bsize=no,
+ fu_cv_sys_stat_statfs2_bsize=no)])
+ AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize)
+ if test $fu_cv_sys_stat_statfs2_bsize = yes; then
+ ac_fsusage_space=yes
+ AC_DEFINE(STAT_STATFS2_BSIZE, 1,
+[ Define if statfs takes 2 args and struct statfs has a field named f_bsize.
+ (4.3BSD, SunOS 4, HP-UX, AIX PS/2)])
+ fi
+fi
+
+if test $ac_fsusage_space = no; then
+# SVR3
+ AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)])
+ AC_CACHE_VAL(fu_cv_sys_stat_statfs4,
+ [AC_TRY_RUN([#include <sys/types.h>
+#include <sys/statfs.h>
+ int
+ main ()
+ {
+ struct statfs fsd;
+ return statfs (".", &fsd, sizeof fsd, 0) != 0;
+ }],
+ fu_cv_sys_stat_statfs4=yes,
+ fu_cv_sys_stat_statfs4=no,
+ fu_cv_sys_stat_statfs4=no)])
+ AC_MSG_RESULT($fu_cv_sys_stat_statfs4)
+ if test $fu_cv_sys_stat_statfs4 = yes; then
+ ac_fsusage_space=yes
+ AC_DEFINE(STAT_STATFS4, 1,
+ [ Define if statfs takes 4 args. (SVR3, Dynix, Irix, Dolphin)])
+ fi
+fi
+
+if test $ac_fsusage_space = no; then
+# 4.4BSD and NetBSD
+ AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl
+member (4.4BSD and NetBSD)])
+ AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize,
+ [AC_TRY_RUN([#include <sys/types.h>
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+ int
+ main ()
+ {
+ struct statfs fsd;
+ fsd.f_fsize = 0;
+ return statfs (".", &fsd) != 0;
+ }],
+ fu_cv_sys_stat_statfs2_fsize=yes,
+ fu_cv_sys_stat_statfs2_fsize=no,
+ fu_cv_sys_stat_statfs2_fsize=no)])
+ AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize)
+ if test $fu_cv_sys_stat_statfs2_fsize = yes; then
+ ac_fsusage_space=yes
+ AC_DEFINE(STAT_STATFS2_FSIZE, 1,
+[ Define if statfs takes 2 args and struct statfs has a field named f_fsize.
+ (4.4BSD, NetBSD)])
+ fi
+fi
+
+if test $ac_fsusage_space = no; then
+ # Ultrix
+ AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)])
+ AC_CACHE_VAL(fu_cv_sys_stat_fs_data,
+ [AC_TRY_RUN([#include <sys/types.h>
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+#ifdef HAVE_SYS_FS_TYPES_H
+#include <sys/fs_types.h>
+#endif
+ int
+ main ()
+ {
+ struct fs_data fsd;
+ /* Ultrix's statfs returns 1 for success,
+ 0 for not mounted, -1 for failure. */
+ return statfs (".", &fsd) != 1;
+ }],
+ fu_cv_sys_stat_fs_data=yes,
+ fu_cv_sys_stat_fs_data=no,
+ fu_cv_sys_stat_fs_data=no)])
+ AC_MSG_RESULT($fu_cv_sys_stat_fs_data)
+ if test $fu_cv_sys_stat_fs_data = yes; then
+ ac_fsusage_space=yes
+ AC_DEFINE(STAT_STATFS2_FS_DATA, 1,
+[ Define if statfs takes 2 args and the second argument has
+ type struct fs_data. (Ultrix)])
+ fi
+fi
+
+if test $ac_fsusage_space = no; then
+ # SVR2
+ AC_TRY_CPP([#include <sys/filsys.h>
+ ],
+ AC_DEFINE(STAT_READ_FILSYS, 1,
+ [Define if there is no specific function for reading file systems usage
+ information and you have the <sys/filsys.h> header file. (SVR2)])
+ ac_fsusage_space=yes)
+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([gl_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);
+ if (c) return 0;]])],
+ [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 gl_FILE_SYSTEM_USAGE.
+AC_DEFUN([gl_PREREQ_FSUSAGE_EXTRA],
+[
+ AC_CHECK_HEADERS(dustat.h sys/fs/s5param.h sys/filsys.h sys/statfs.h)
+ gl_STATFS_TRUNCATES
+])
diff --git a/m4/ftruncate.m4 b/m4/ftruncate.m4
new file mode 100644
index 0000000..b7f346a
--- /dev/null
+++ b/m4/ftruncate.m4
@@ -0,0 +1,46 @@
+#serial 13
+
+# See if we need to emulate a missing ftruncate function using fcntl or chsize.
+
+# Copyright (C) 2000, 2001, 2003-2007 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# FIXME: remove this macro, along with all uses of HAVE_FTRUNCATE in 2010,
+# if the check below provokes no more reports. So far, the only report
+# arose from a test build of this gnulib module, cross-compiling to mingw:
+# <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/9203>
+
+AC_DEFUN([gl_FUNC_FTRUNCATE],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CHECK_FUNCS_ONCE([ftruncate])
+ if test $ac_cv_func_ftruncate = no; then
+ HAVE_FTRUNCATE=0
+ AC_LIBOBJ([ftruncate])
+ gl_PREREQ_FTRUNCATE
+ case "$host_os" in
+ mingw*)
+ # Yes, we know mingw lacks ftruncate.
+ ;;
+ *)
+ # If someone lacks ftruncate, make configure fail, and request
+ # a bug report to inform us about it.
+ if test x"$SKIP_FTRUNCATE_CHECK" != xyes; then
+ AC_MSG_FAILURE([Your system lacks the ftruncate function.
+ Please report this, along with the output of "uname -a", to the
+ bug-coreutils@gnu.org mailing list. To continue past this point,
+ rerun configure with SKIP_FTRUNCATE_CHECK=yes.
+ E.g., ./configure SKIP_FTRUNCATE_CHECK=yes])
+ fi
+ esac
+ fi
+])
+
+# Prerequisites of lib/ftruncate.c.
+AC_DEFUN([gl_PREREQ_FTRUNCATE],
+[
+ AC_CHECK_FUNCS(chsize)
+])
diff --git a/m4/fts.m4 b/m4/fts.m4
new file mode 100644
index 0000000..cceb48f
--- /dev/null
+++ b/m4/fts.m4
@@ -0,0 +1,28 @@
+#serial 13
+dnl Copyright (C) 2005-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FTS],
+[
+ gl_FUNC_FTS_CORE
+])
+
+AC_DEFUN([gl_FUNC_FTS_LGPL],
+[
+ gl_FUNC_FTS_CORE
+])
+
+AC_DEFUN([gl_FUNC_FTS_CORE],
+[
+ dnl Use this version of fts unconditionally, since the GNU libc and
+ dnl NetBSD versions have bugs and/or unnecessary limitations.
+ AC_LIBOBJ([fts])
+
+ dnl Prerequisites of lib/fts.c.
+ gl_FUNC_OPENAT
+
+ # Checks for header files.
+ AC_CHECK_HEADERS_ONCE([sys/param.h])dnl
+])
diff --git a/m4/getaddrinfo.m4 b/m4/getaddrinfo.m4
new file mode 100644
index 0000000..db285d9
--- /dev/null
+++ b/m4/getaddrinfo.m4
@@ -0,0 +1,88 @@
+# getaddrinfo.m4 serial 11
+dnl Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_GETADDRINFO],
+[
+ AC_MSG_NOTICE([checking how to do getaddrinfo, freeaddrinfo and getnameinfo])
+
+ AC_SEARCH_LIBS(getaddrinfo, [nsl socket])
+ AC_CHECK_FUNCS(getaddrinfo,, [
+ AC_CACHE_CHECK(for getaddrinfo in ws2tcpip.h and -lws2_32,
+ gl_cv_w32_getaddrinfo, [
+ gl_cv_w32_getaddrinfo=no
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS -lws2_32"
+ AC_TRY_LINK([
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+], [getaddrinfo(0, 0, 0, 0);], gl_cv_w32_getaddrinfo=yes)
+ LIBS="$am_save_LIBS"])
+ if test "$gl_cv_w32_getaddrinfo" = "yes"; then
+ LIBS="$LIBS -lws2_32"
+ else
+ AC_LIBOBJ(getaddrinfo)
+ fi
+ ])
+
+ AC_REPLACE_FUNCS(gai_strerror)
+ gl_PREREQ_GETADDRINFO
+])
+
+# Prerequisites of lib/getaddrinfo.h and lib/getaddrinfo.c.
+AC_DEFUN([gl_PREREQ_GETADDRINFO], [
+ AC_SEARCH_LIBS(gethostbyname, [inet nsl])
+ AC_SEARCH_LIBS(getservbyname, [inet nsl socket xnet])
+ AC_CHECK_FUNCS(gethostbyname,, [
+ AC_CACHE_CHECK(for gethostbyname in winsock2.h and -lws2_32,
+ gl_cv_w32_gethostbyname, [
+ gl_cv_w32_gethostbyname=no
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS -lws2_32"
+ AC_TRY_LINK([
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+], [gethostbyname(0);], gl_cv_w32_gethostbyname=yes)
+ LIBS="$am_save_LIBS"])
+ if test "$gl_cv_w32_gethostbyname" = "yes"; then
+ LIBS="$LIBS -lws2_32"
+ fi
+ ])
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([gl_SOCKET_FAMILIES])
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([AC_GNU_SOURCE])
+ AC_CHECK_HEADERS_ONCE(netinet/in.h netdb.h)
+ AC_CHECK_DECLS([getaddrinfo, freeaddrinfo, gai_strerror, getnameinfo],,,[
+ /* sys/types.h is not needed according to POSIX, but the
+ sys/socket.h in i386-unknown-freebsd4.10 and
+ powerpc-apple-darwin5.5 required it. */
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+])
+ AC_CHECK_TYPES([struct addrinfo],,,[
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+])
+])
diff --git a/m4/getcwd-abort-bug.m4 b/m4/getcwd-abort-bug.m4
new file mode 100644
index 0000000..a431a7c
--- /dev/null
+++ b/m4/getcwd-abort-bug.m4
@@ -0,0 +1,106 @@
+#serial 1
+# Determine whether getcwd aborts when the length of the working directory
+# name is unusually large. Any length between 4k and 16k trigger the bug
+# when using glibc-2.4.90-9 or older.
+
+# Copyright (C) 2006 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# From Jim Meyering
+
+# gl_FUNC_GETCWD_ABORT_BUG([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+AC_DEFUN([gl_FUNC_GETCWD_ABORT_BUG],
+[
+ AC_CHECK_DECLS_ONCE(getcwd)
+ AC_CHECK_FUNCS(getpagesize)
+ AC_CACHE_CHECK([whether getcwd aborts when 4k < cwd_length < 16k],
+ gl_cv_func_getcwd_abort_bug,
+ [# Remove any remnants of a previous test.
+ rm -rf confdir-14B---
+ # Arrange for deletion of the temporary directory this test creates.
+ ac_clean_files="$ac_clean_files confdir-14B---"
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE(
+ [[
+#include <stdlib.h>
+#include <unistd.h>
+#include <limits.h>
+#include <string.h>
+#include <sys/stat.h>
+
+/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
+#undef mkdir
+
+#ifndef S_IRWXU
+# define S_IRWXU 0700
+#endif
+
+/* FIXME: skip the run-test altogether on systems without getpagesize. */
+#if ! HAVE_GETPAGESIZE
+# define getpagesize() 0
+#endif
+
+/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
+ the 16kB pagesize on ia64 linux. Those conditions make the code below
+ trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
+#define TARGET_LEN (5 * 1024)
+
+int
+main ()
+{
+ char const *dir_name = "confdir-14B---";
+ char *cwd;
+ size_t initial_cwd_len;
+ int fail = 0;
+ size_t desired_depth;
+ size_t d;
+
+ /* The bug is triggered when PATH_MAX < getpagesize (), so skip
+ this relative expensive and invasive test if that's not true. */
+ if (getpagesize () <= PATH_MAX)
+ return 0;
+
+ cwd = getcwd (NULL, 0);
+ if (cwd == NULL)
+ return 0;
+
+ initial_cwd_len = strlen (cwd);
+ free (cwd);
+ desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
+ / (1 + strlen (dir_name)));
+ for (d = 0; d < desired_depth; d++)
+ {
+ if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
+ {
+ fail = 3; /* Unable to construct deep hierarchy. */
+ break;
+ }
+ }
+
+ /* If libc has the bug in question, this invocation of getcwd
+ results in a failed assertion. */
+ cwd = getcwd (NULL, 0);
+ if (cwd == NULL)
+ fail = 4; /* getcwd failed. This is ok, and expected. */
+ free (cwd);
+
+ /* Call rmdir first, in case the above chdir failed. */
+ rmdir (dir_name);
+ while (0 < d--)
+ {
+ if (chdir ("..") < 0)
+ break;
+ rmdir (dir_name);
+ }
+
+ return 0;
+}
+ ]])],
+ [gl_cv_func_getcwd_abort_bug=no],
+ [gl_cv_func_getcwd_abort_bug=yes],
+ [gl_cv_func_getcwd_abort_bug=yes])
+ ])
+ AS_IF([test $gl_cv_func_getcwd_abort_bug = yes], [$1], [$2])
+])
diff --git a/m4/getcwd-path-max.m4 b/m4/getcwd-path-max.m4
new file mode 100644
index 0000000..3d0af87
--- /dev/null
+++ b/m4/getcwd-path-max.m4
@@ -0,0 +1,189 @@
+#serial 12
+# Check for several getcwd bugs with long file names.
+# If so, arrange to compile the wrapper function.
+
+# This is necessary for at least GNU libc on linux-2.4.19 and 2.4.20.
+# I've heard that this is due to a Linux kernel bug, and that it has
+# been fixed between 2.4.21-pre3 and 2.4.21-pre4. */
+
+# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# From Jim Meyering
+
+AC_DEFUN([gl_FUNC_GETCWD_PATH_MAX],
+[
+ AC_CHECK_DECLS_ONCE(getcwd)
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_CACHE_CHECK([whether getcwd handles long file names properly],
+ gl_cv_func_getcwd_path_max,
+ [# Arrange for deletion of the temporary directory this test creates.
+ ac_clean_files="$ac_clean_files confdir3"
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE(
+ [[
+#include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <limits.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <fcntl.h>
+
+#ifndef AT_FDCWD
+# define AT_FDCWD 0
+#endif
+#ifdef ENAMETOOLONG
+# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
+#else
+# define is_ENAMETOOLONG(x) 0
+#endif
+
+/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
+#undef mkdir
+
+#ifndef S_IRWXU
+# define S_IRWXU 0700
+#endif
+
+/* The length of this name must be 8. */
+#define DIR_NAME "confdir3"
+#define DIR_NAME_LEN 8
+#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
+
+/* The length of "../". */
+#define DOTDOTSLASH_LEN 3
+
+/* Leftover bytes in the buffer, to work around library or OS bugs. */
+#define BUF_SLOP 20
+
+int
+main ()
+{
+#ifndef PATH_MAX
+ /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
+ at least not on a local file system. And if we were to start worrying
+ about remote file systems, we'd have to enable the wrapper function
+ all of the time, just to be safe. That's not worth the cost. */
+ exit (0);
+#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
+ - DIR_NAME_SIZE - BUF_SLOP) \
+ <= PATH_MAX)
+ /* FIXME: Assuming there's a system for which this is true,
+ this should be done in a compile test. */
+ exit (0);
+#else
+ char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
+ + DIR_NAME_SIZE + BUF_SLOP];
+ char *cwd = getcwd (buf, PATH_MAX);
+ size_t initial_cwd_len;
+ size_t cwd_len;
+ int fail = 0;
+ size_t n_chdirs = 0;
+
+ if (cwd == NULL)
+ exit (1);
+
+ cwd_len = initial_cwd_len = strlen (cwd);
+
+ while (1)
+ {
+ size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
+ char *c = NULL;
+
+ cwd_len += DIR_NAME_SIZE;
+ /* If mkdir or chdir fails, it could be that this system cannot create
+ any file with an absolute name longer than PATH_MAX, such as cygwin.
+ If so, leave fail as 0, because the current working directory can't
+ be too long for getcwd if it can't even be created. For other
+ errors, be pessimistic and consider that as a failure, too. */
+ if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
+ {
+ if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
+ fail = 2;
+ break;
+ }
+
+ if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
+ {
+ c = getcwd (buf, PATH_MAX);
+ if (!c && errno == ENOENT)
+ {
+ fail = 1;
+ break;
+ }
+ if (c || ! (errno == ERANGE || is_ENAMETOOLONG (errno)))
+ {
+ fail = 2;
+ break;
+ }
+ }
+
+ if (dotdot_max <= cwd_len - initial_cwd_len)
+ {
+ if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
+ break;
+ c = getcwd (buf, cwd_len + 1);
+ if (!c)
+ {
+ if (! (errno == ERANGE || errno == ENOENT
+ || is_ENAMETOOLONG (errno)))
+ {
+ fail = 2;
+ break;
+ }
+ if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
+ {
+ fail = 1;
+ break;
+ }
+ }
+ }
+
+ if (c && strlen (c) != cwd_len)
+ {
+ fail = 2;
+ break;
+ }
+ ++n_chdirs;
+ }
+
+ /* Leaving behind such a deep directory is not polite.
+ So clean up here, right away, even though the driving
+ shell script would also clean up. */
+ {
+ size_t i;
+
+ /* Try rmdir first, in case the chdir failed. */
+ rmdir (DIR_NAME);
+ for (i = 0; i <= n_chdirs; i++)
+ {
+ if (chdir ("..") < 0)
+ break;
+ rmdir (DIR_NAME);
+ }
+ }
+
+ exit (fail);
+#endif
+}
+ ]])],
+ [gl_cv_func_getcwd_path_max=yes],
+ [case $? in
+ 1) gl_cv_func_getcwd_path_max='no, but it is partly working';;
+ *) gl_cv_func_getcwd_path_max=no;;
+ esac],
+ [gl_cv_func_getcwd_path_max=no])
+ ])
+ case $gl_cv_func_getcwd_path_max in
+ no,*)
+ AC_DEFINE([HAVE_PARTLY_WORKING_GETCWD], 1,
+ [Define to 1 if getcwd works, except it sometimes fails when it shouldn't,
+ setting errno to ERANGE, ENAMETOOLONG, or ENOENT. If __GETCWD_PREFIX
+ is not defined, it doesn't matter whether HAVE_PARTLY_WORKING_GETCWD
+ is defined.]);;
+ esac
+])
diff --git a/m4/getcwd.m4 b/m4/getcwd.m4
new file mode 100644
index 0000000..6ebe2fc
--- /dev/null
+++ b/m4/getcwd.m4
@@ -0,0 +1,64 @@
+# getcwd.m4 - check for working getcwd that is compatible with glibc
+
+# Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert.
+
+AC_DEFUN([gl_FUNC_GETCWD_NULL],
+ [
+ AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result],
+ [gl_cv_func_getcwd_null],
+ [AC_TRY_RUN(
+ [
+# include <stdlib.h>
+# include <unistd.h>
+# ifndef getcwd
+ char *getcwd ();
+# endif
+ int
+ main ()
+ {
+ if (chdir ("/") != 0)
+ exit (1);
+ else
+ {
+ char *f = getcwd (NULL, 0);
+ exit (! (f && f[0] == '/' && !f[1]));
+ }
+ }],
+ [gl_cv_func_getcwd_null=yes],
+ [gl_cv_func_getcwd_null=no],
+ [gl_cv_func_getcwd_null=no])])
+])
+
+AC_DEFUN([gl_FUNC_GETCWD],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([gl_FUNC_GETCWD_NULL])
+
+ gl_abort_bug=no
+ case $gl_cv_func_getcwd_null in
+ yes)
+ gl_FUNC_GETCWD_PATH_MAX
+ gl_FUNC_GETCWD_ABORT_BUG([gl_abort_bug=yes]);;
+ esac
+
+ case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_path_max,$gl_abort_bug in
+ yes,yes,no) ;;
+ *)
+ REPLACE_GETCWD=1
+ AC_LIBOBJ([getcwd])
+ gl_PREREQ_GETCWD;;
+ esac
+])
+
+# Prerequisites of lib/getcwd.c.
+AC_DEFUN([gl_PREREQ_GETCWD],
+[
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO])
+ :
+])
diff --git a/m4/getdate.m4 b/m4/getdate.m4
new file mode 100644
index 0000000..d160329
--- /dev/null
+++ b/m4/getdate.m4
@@ -0,0 +1,33 @@
+# getdate.m4 serial 12
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_C_COMPOUND_LITERALS],
+[
+ AC_CACHE_CHECK([for compound literals], gl_cv_compound_literals,
+ [AC_TRY_COMPILE([struct s { int i, j; }; struct s s = (struct s) { 1, 2 };],
+ [struct s t = (struct s) { 3, 4 };
+ if (t.i != 0) return 0;],
+ gl_cv_compound_literals=yes,
+ gl_cv_compound_literals=no)])
+ if test $gl_cv_compound_literals = yes; then
+ AC_DEFINE(HAVE_COMPOUND_LITERALS, 1,
+ [Define if you have compound literals.])
+ fi
+])
+
+AC_DEFUN([gl_GETDATE],
+[
+ dnl Prerequisites of lib/getdate.h.
+ AC_REQUIRE([AM_STDBOOL_H])
+ AC_REQUIRE([gl_TIMESPEC])
+
+ dnl Prerequisites of lib/getdate.y.
+ AC_REQUIRE([gl_BISON])
+ AC_REQUIRE([gl_C_COMPOUND_LITERALS])
+ AC_STRUCT_TIMEZONE
+ AC_REQUIRE([gl_CLOCK_TIME])
+ AC_REQUIRE([gl_TM_GMTOFF])
+])
diff --git a/m4/getdelim.m4 b/m4/getdelim.m4
new file mode 100644
index 0000000..2a738f6
--- /dev/null
+++ b/m4/getdelim.m4
@@ -0,0 +1,29 @@
+# getdelim.m4 serial 2
+
+dnl Copyright (C) 2005, 2006 Free Software dnl Foundation, Inc.
+dnl
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_PREREQ(2.52)
+
+AC_DEFUN([gl_FUNC_GETDELIM],
+[
+
+ dnl Persuade glibc <stdio.h> to declare getdelim().
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ AC_REPLACE_FUNCS(getdelim)
+ AC_CHECK_DECLS_ONCE(getdelim)
+
+ if test $ac_cv_func_getdelim = no; then
+ gl_PREREQ_GETDELIM
+ fi
+])
+
+# Prerequisites of lib/getdelim.c.
+AC_DEFUN([gl_PREREQ_GETDELIM],
+[
+ AC_CHECK_FUNCS([flockfile funlockfile])
+])
diff --git a/m4/getgroups.m4 b/m4/getgroups.m4
new file mode 100644
index 0000000..edc2bde
--- /dev/null
+++ b/m4/getgroups.m4
@@ -0,0 +1,29 @@
+#serial 10
+
+dnl From Jim Meyering.
+dnl A wrapper around AC_FUNC_GETGROUPS.
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004 Free
+# Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_GETGROUPS],
+[
+ 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/gethostname.m4 b/m4/gethostname.m4
new file mode 100644
index 0000000..1e9749d
--- /dev/null
+++ b/m4/gethostname.m4
@@ -0,0 +1,18 @@
+# gethostname.m4 serial 2
+dnl Copyright (C) 2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_GETHOSTNAME],
+[
+ AC_REPLACE_FUNCS(gethostname)
+ if test $ac_cv_func_gethostname = no; then
+ gl_PREREQ_GETHOSTNAME
+ fi
+])
+
+# Prerequisites of lib/gethostname.c.
+AC_DEFUN([gl_PREREQ_GETHOSTNAME], [
+ AC_CHECK_FUNCS(uname)
+])
diff --git a/m4/gethrxtime.m4 b/m4/gethrxtime.m4
new file mode 100644
index 0000000..b596fec
--- /dev/null
+++ b/m4/gethrxtime.m4
@@ -0,0 +1,74 @@
+# gethrxtime.m4 serial 6
+dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+AC_DEFUN([gl_GETHRXTIME],
+[
+ AC_REQUIRE([gl_ARITHMETIC_HRTIME_T])
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([gl_XTIME])
+ AC_CHECK_DECLS([gethrtime], [], [], [#include <time.h>])
+ case $ac_cv_have_decl_gethrtime,$gl_cv_arithmetic_hrtime_t in
+ yes,yes) ;;
+ *)
+ AC_LIBOBJ([gethrxtime])
+ gl_PREREQ_GETHRXTIME;;
+ esac
+])
+
+# Test whether hrtime_t is an arithmetic type.
+# It is not arithmetic in older Solaris c89 (which insists on
+# not having a long long int type).
+AC_DEFUN([gl_ARITHMETIC_HRTIME_T],
+[
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_CACHE_CHECK([for arithmetic hrtime_t], gl_cv_arithmetic_hrtime_t,
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([#include <time.h>],
+ [hrtime_t x = 0; return x/x;])],
+ [gl_cv_arithmetic_hrtime_t=yes],
+ [gl_cv_arithmetic_hrtime_t=no])])
+ if test $gl_cv_arithmetic_hrtime_t = yes; then
+ AC_DEFINE([HAVE_ARITHMETIC_HRTIME_T], 1,
+ [Define if you have an arithmetic hrtime_t type.])
+ fi
+])
+
+# Prerequisites of lib/xtime.h.
+AC_DEFUN([gl_XTIME],
+[
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ :
+])
+
+# Prerequisites of lib/gethrxtime.c.
+AC_DEFUN([gl_PREREQ_GETHRXTIME],
+[
+ AC_REQUIRE([gl_CLOCK_TIME])
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_FUNCS_ONCE(microuptime nanouptime)
+
+ if test $ac_cv_func_nanouptime != yes; then
+ LIB_GETHRXTIME=
+ AC_CACHE_CHECK([whether CLOCK_MONOTONIC or CLOCK_REALTIME is defined],
+ gl_cv_have_clock_gettime_macro,
+ [AC_EGREP_CPP([have_clock_gettime_macro],
+ [
+# include <time.h>
+# if defined CLOCK_MONOTONIC || defined CLOCK_REALTIME
+ have_clock_gettime_macro
+# endif
+ ],
+ gl_cv_have_clock_gettime_macro=yes,
+ gl_cv_have_clock_gettime_macro=no)])
+ if test $gl_cv_have_clock_gettime_macro = yes; then
+ LIB_GETHRXTIME=$LIB_CLOCK_GETTIME
+ fi
+ AC_SUBST([LIB_GETHRXTIME])
+ fi
+])
diff --git a/m4/getline.m4 b/m4/getline.m4
new file mode 100644
index 0000000..5b55c30
--- /dev/null
+++ b/m4/getline.m4
@@ -0,0 +1,79 @@
+# getline.m4 serial 15
+
+dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006 Free Software
+dnl Foundation, Inc.
+dnl
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_PREREQ(2.52)
+
+dnl See if there's a working, system-supplied version of the getline function.
+dnl We can't just do AC_REPLACE_FUNCS(getline) because some systems
+dnl have a function by that name in -linet that doesn't have anything
+dnl to do with the function we need.
+AC_DEFUN([gl_FUNC_GETLINE],
+[
+ dnl Persuade glibc <stdio.h> to declare getline().
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ AC_CHECK_DECLS([getline])
+
+ gl_getline_needs_run_time_check=no
+ AC_CHECK_FUNC(getline,
+ dnl Found it in some library. Verify that it works.
+ gl_getline_needs_run_time_check=yes,
+ am_cv_func_working_getline=no)
+ if test $gl_getline_needs_run_time_check = yes; then
+ AC_CACHE_CHECK([for working getline function], am_cv_func_working_getline,
+ [echo fooN |tr -d '\012'|tr N '\012' > conftest.data
+ AC_TRY_RUN([
+# include <stdio.h>
+# include <stdlib.h>
+# include <string.h>
+ int main ()
+ { /* Based on a test program from Karl Heuer. */
+ char *line = NULL;
+ size_t siz = 0;
+ int len;
+ FILE *in = fopen ("./conftest.data", "r");
+ if (!in)
+ return 1;
+ len = getline (&line, &siz, in);
+ exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1);
+ }
+ ], am_cv_func_working_getline=yes dnl The library version works.
+ , am_cv_func_working_getline=no dnl The library version does NOT work.
+ , dnl We're cross compiling. Assume it works on glibc2 systems.
+ [AC_EGREP_CPP([Lucky GNU user],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ >= 2)
+ Lucky GNU user
+ #endif
+#endif
+ ],
+ [am_cv_func_working_getline=yes],
+ [am_cv_func_working_getline=no])]
+ )])
+ fi
+
+ if test $am_cv_func_working_getline = no; then
+ dnl We must choose a different name for our function, since on ELF systems
+ dnl a broken getline() in libc.so would override our getline() in
+ dnl libgettextlib.so.
+ AC_DEFINE([getline], [gnu_getline],
+ [Define to a replacement function name for getline().])
+ AC_LIBOBJ(getline)
+
+ gl_PREREQ_GETLINE
+ fi
+])
+
+# Prerequisites of lib/getline.c.
+AC_DEFUN([gl_PREREQ_GETLINE],
+[
+ gl_FUNC_GETDELIM
+])
diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4
new file mode 100644
index 0000000..8243729
--- /dev/null
+++ b/m4/getloadavg.m4
@@ -0,0 +1,155 @@
+# Check for getloadavg.
+
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2002, 2003,
+# 2006 Free Software Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Autoconf defines AC_FUNC_GETLOADAVG, but that is obsolescent.
+# New applications should use gl_GETLOADAVG instead.
+
+# gl_GETLOADAVG(LIBOBJDIR)
+# ------------------------
+AC_DEFUN([gl_GETLOADAVG],
+[gl_have_func=no # yes means we've found a way to get the load average.
+
+# Make sure getloadavg.c is where it belongs, at configure-time.
+test -f "$srcdir/$1/getloadavg.c" ||
+ AC_MSG_ERROR([$srcdir/$1/getloadavg.c is missing])
+
+gl_save_LIBS=$LIBS
+
+# Check for getloadavg, but be sure not to touch the cache variable.
+(AC_CHECK_FUNC(getloadavg, exit 0, exit 1)) && gl_have_func=yes
+
+# On HPUX9, an unprivileged user can get load averages through this function.
+AC_CHECK_FUNCS(pstat_getdynamic)
+
+# Solaris has libkstat which does not require root.
+AC_CHECK_LIB(kstat, kstat_open)
+test $ac_cv_lib_kstat_kstat_open = yes && gl_have_func=yes
+
+# Some systems with -lutil have (and need) -lkvm as well, some do not.
+# On Solaris, -lkvm requires nlist from -lelf, so check that first
+# to get the right answer into the cache.
+# For kstat on solaris, we need libelf to force the definition of SVR4 below.
+if test $gl_have_func = no; then
+ AC_CHECK_LIB(elf, elf_begin, LIBS="-lelf $LIBS")
+fi
+if test $gl_have_func = no; then
+ AC_CHECK_LIB(kvm, kvm_open, LIBS="-lkvm $LIBS")
+ # Check for the 4.4BSD definition of getloadavg.
+ AC_CHECK_LIB(util, getloadavg,
+ [LIBS="-lutil $LIBS" gl_have_func=yes gl_cv_func_getloadavg_setgid=yes])
+fi
+
+if test $gl_have_func = no; then
+ # There is a commonly available library for RS/6000 AIX.
+ # Since it is not a standard part of AIX, it might be installed locally.
+ gl_getloadavg_LIBS=$LIBS
+ LIBS="-L/usr/local/lib $LIBS"
+ AC_CHECK_LIB(getloadavg, getloadavg,
+ [LIBS="-lgetloadavg $LIBS"], [LIBS=$gl_getloadavg_LIBS])
+fi
+
+# Make sure it is really in the library, if we think we found it,
+# otherwise set up the replacement function.
+AC_CHECK_FUNCS(getloadavg, [],
+ [gl_PREREQ_GETLOADAVG])
+
+# Some definitions of getloadavg require that the program be installed setgid.
+AC_CACHE_CHECK(whether getloadavg requires setgid,
+ gl_cv_func_getloadavg_setgid,
+[AC_EGREP_CPP([Yowza Am I SETGID yet],
+[#define CONFIGURING_GETLOADAVG
+#include "$srcdir/$1/getloadavg.c"
+#ifdef LDAV_PRIVILEGED
+Yowza Am I SETGID yet
+#endif
+],
+ gl_cv_func_getloadavg_setgid=yes,
+ gl_cv_func_getloadavg_setgid=no)])
+if test $gl_cv_func_getloadavg_setgid = yes; then
+ NEED_SETGID=true
+ AC_DEFINE(GETLOADAVG_PRIVILEGED, 1,
+ [Define to 1 if the `getloadavg' function needs to be run setuid
+ or setgid.])
+else
+ NEED_SETGID=false
+fi
+AC_SUBST(NEED_SETGID)dnl
+
+if test $gl_cv_func_getloadavg_setgid = yes; then
+ AC_CACHE_CHECK(group of /dev/kmem, gl_cv_group_kmem,
+[ # On Solaris, /dev/kmem is a symlink. Get info on the real file.
+ ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
+ # If we got an error (system does not support symlinks), try without -L.
+ test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
+ gl_cv_group_kmem=`echo $ac_ls_output \
+ | sed -ne ['s/[ ][ ]*/ /g
+ s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/
+ / /s/.* //;p']`
+])
+ AC_SUBST(KMEM_GROUP, $gl_cv_group_kmem)dnl
+fi
+if test "x$gl_save_LIBS" = x; then
+ GETLOADAVG_LIBS=$LIBS
+else
+ GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
+fi
+LIBS=$gl_save_LIBS
+
+AC_SUBST(GETLOADAVG_LIBS)dnl
+])# gl_GETLOADAVG
+
+
+# gl_PREREQ_GETLOADAVG
+# --------------------
+# Set up the AC_LIBOBJ replacement of `getloadavg'.
+AC_DEFUN([gl_PREREQ_GETLOADAVG],
+[AC_LIBOBJ(getloadavg)
+AC_DEFINE(C_GETLOADAVG, 1, [Define to 1 if using `getloadavg.c'.])
+# Figure out what our getloadavg.c needs.
+gl_have_func=no
+AC_CHECK_HEADER(sys/dg_sys_info.h,
+[gl_have_func=yes
+ AC_DEFINE(DGUX, 1, [Define to 1 for DGUX with <sys/dg_sys_info.h>.])
+ AC_CHECK_LIB(dgc, dg_sys_info)])
+
+# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
+# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
+# Irix 4.0.5F has the header but not the library.
+if test $gl_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
+ gl_have_func=yes
+ AC_DEFINE(SVR4, 1, [Define to 1 on System V Release 4.])
+fi
+
+if test $gl_have_func = no; then
+ AC_CHECK_HEADER(inq_stats/cpustats.h,
+ [gl_have_func=yes
+ AC_DEFINE(UMAX, 1, [Define to 1 for Encore UMAX.])
+ AC_DEFINE(UMAX4_3, 1,
+ [Define to 1 for Encore UMAX 4.3 that has <inq_status/cpustats.h>
+ instead of <sys/cpustats.h>.])])
+fi
+
+if test $gl_have_func = no; then
+ AC_CHECK_HEADER(sys/cpustats.h,
+ [gl_have_func=yes; AC_DEFINE(UMAX)])
+fi
+
+if test $gl_have_func = no; then
+ AC_CHECK_HEADERS(mach/mach.h)
+fi
+
+AC_CHECK_HEADERS(nlist.h,
+[AC_CHECK_MEMBERS([struct nlist.n_un.n_name],
+ [AC_DEFINE(NLIST_NAME_UNION, 1,
+ [Define to 1 if your `struct nlist' has an
+ `n_un' member. Obsolete, depend on
+ `HAVE_STRUCT_NLIST_N_UN_N_NAME])], [],
+ [@%:@include <nlist.h>])
+])dnl
+])# gl_PREREQ_GETLOADAVG
diff --git a/m4/getndelim2.m4 b/m4/getndelim2.m4
new file mode 100644
index 0000000..f0e7ae2
--- /dev/null
+++ b/m4/getndelim2.m4
@@ -0,0 +1,19 @@
+# getndelim2.m4 serial 5
+dnl Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_GETNDELIM2],
+[
+ AC_LIBOBJ(getndelim2)
+ gl_PREREQ_GETNDELIM2
+])
+
+# Prerequisites of lib/getndelim2.h and lib/getndelim2.c.
+AC_DEFUN([gl_PREREQ_GETNDELIM2],
+[
+ dnl Prerequisites of lib/getndelim2.h.
+ AC_REQUIRE([gt_TYPE_SSIZE_T])
+ dnl No prerequisites of lib/getndelim2.c.
+])
diff --git a/m4/getopt.m4 b/m4/getopt.m4
new file mode 100644
index 0000000..c0a73b2
--- /dev/null
+++ b/m4/getopt.m4
@@ -0,0 +1,83 @@
+# getopt.m4 serial 13
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# The getopt module assume you want GNU getopt, with getopt_long etc,
+# rather than vanilla POSIX getopt. This means your code should
+# always include <getopt.h> for the getopt prototypes.
+
+AC_DEFUN([gl_GETOPT_SUBSTITUTE],
+[
+ AC_LIBOBJ([getopt])
+ AC_LIBOBJ([getopt1])
+ gl_GETOPT_SUBSTITUTE_HEADER
+ gl_PREREQ_GETOPT
+])
+
+AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
+[
+ GETOPT_H=getopt.h
+ AC_DEFINE([__GETOPT_PREFIX], [[rpl_]],
+ [Define to rpl_ if the getopt replacement functions and variables
+ should be used.])
+ AC_SUBST([GETOPT_H])
+])
+
+AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
+[
+ if test -z "$GETOPT_H"; then
+ AC_CHECK_HEADERS([getopt.h], [], [GETOPT_H=getopt.h])
+ fi
+
+ if test -z "$GETOPT_H"; then
+ AC_CHECK_FUNCS([getopt_long_only], [], [GETOPT_H=getopt.h])
+ fi
+
+ dnl BSD getopt_long uses an incompatible method to reset option processing,
+ dnl and (as of 2004-10-15) mishandles optional option-arguments.
+ if test -z "$GETOPT_H"; then
+ AC_CHECK_DECL([optreset], [GETOPT_H=getopt.h], [], [#include <getopt.h>])
+ fi
+
+ dnl Solaris 10 getopt doesn't handle `+' as a leading character in an
+ dnl option string (as of 2005-05-05).
+ if test -z "$GETOPT_H"; then
+ AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_gnu_getopt],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM([#include <getopt.h>],
+ [[
+ char *myargv[3];
+ myargv[0] = "conftest";
+ myargv[1] = "-+";
+ myargv[2] = 0;
+ return getopt (2, myargv, "+a") != '?';
+ ]])],
+ [gl_cv_func_gnu_getopt=yes],
+ [gl_cv_func_gnu_getopt=no],
+ [dnl cross compiling - pessimistically guess based on decls
+ dnl Solaris 10 getopt doesn't handle `+' as a leading character in an
+ dnl option string (as of 2005-05-05).
+ AC_CHECK_DECL([getopt_clip],
+ [gl_cv_func_gnu_getopt=no], [gl_cv_func_gnu_getopt=yes],
+ [#include <getopt.h>])])])
+ if test "$gl_cv_func_gnu_getopt" = "no"; then
+ GETOPT_H=getopt.h
+ fi
+ fi
+])
+
+AC_DEFUN([gl_GETOPT_IFELSE],
+[
+ AC_REQUIRE([gl_GETOPT_CHECK_HEADERS])
+ AS_IF([test -n "$GETOPT_H"], [$1], [$2])
+])
+
+AC_DEFUN([gl_GETOPT], [gl_GETOPT_IFELSE([gl_GETOPT_SUBSTITUTE])])
+
+# Prerequisites of lib/getopt*.
+AC_DEFUN([gl_PREREQ_GETOPT],
+[
+ AC_CHECK_DECLS_ONCE([getenv])
+])
diff --git a/m4/getpagesize.m4 b/m4/getpagesize.m4
new file mode 100644
index 0000000..e8697bd
--- /dev/null
+++ b/m4/getpagesize.m4
@@ -0,0 +1,13 @@
+# getpagesize.m4 serial 6
+dnl Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_GETPAGESIZE],
+[
+ dnl Prerequisites of lib/getpagesize.h.
+ AC_CHECK_HEADERS_ONCE(sys/param.h)
+ AC_CHECK_HEADERS(OS.h)
+ AC_CHECK_FUNCS(getpagesize)
+])
diff --git a/m4/getpass.m4 b/m4/getpass.m4
new file mode 100644
index 0000000..54348ce
--- /dev/null
+++ b/m4/getpass.m4
@@ -0,0 +1,47 @@
+# getpass.m4 serial 10
+dnl Copyright (C) 2002-2003, 2005-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Provide a getpass() function if the system doesn't have it.
+AC_DEFUN([gl_FUNC_GETPASS],
+[
+ AC_REPLACE_FUNCS(getpass)
+ AC_CHECK_DECLS_ONCE(getpass)
+ if test $ac_cv_func_getpass = no; then
+ gl_PREREQ_GETPASS
+ fi
+])
+
+# Provide the GNU getpass() implementation. It supports passwords of
+# arbitrary length (not just 8 bytes as on HP-UX).
+AC_DEFUN([gl_FUNC_GETPASS_GNU],
+[
+ AC_CHECK_DECLS_ONCE(getpass)
+ dnl TODO: Detect when GNU getpass() is already found in glibc.
+ AC_LIBOBJ(getpass)
+ gl_PREREQ_GETPASS
+ dnl We must choose a different name for our function, since on ELF systems
+ dnl an unusable getpass() in libc.so would override our getpass() if it is
+ dnl compiled into a shared library.
+ AC_DEFINE([getpass], [gnu_getpass],
+ [Define to a replacement function name for getpass().])
+])
+
+# Prerequisites of lib/getpass.c.
+AC_DEFUN([gl_PREREQ_GETPASS], [
+ AC_CHECK_HEADERS_ONCE(stdio_ext.h termios.h)
+ AC_CHECK_FUNCS_ONCE(__fsetlocking tcgetattr tcsetattr)
+ AC_CHECK_DECLS([__fsetlocking],,,
+ [#include <stdio.h>
+ #if HAVE_STDIO_EXT_H
+ #include <stdio_ext.h>
+ #endif])
+ AC_CHECK_DECLS_ONCE([fflush_unlocked])
+ AC_CHECK_DECLS_ONCE([flockfile])
+ AC_CHECK_DECLS_ONCE([fputs_unlocked])
+ AC_CHECK_DECLS_ONCE([funlockfile])
+ AC_CHECK_DECLS_ONCE([putc_unlocked])
+ :
+])
diff --git a/m4/gettext.m4 b/m4/gettext.m4
new file mode 100644
index 0000000..4ffe433
--- /dev/null
+++ b/m4/gettext.m4
@@ -0,0 +1,420 @@
+# gettext.m4 serial 59 (gettext-0.16.1)
+dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+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-2006.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
+dnl default (if it is not specified or empty) is 'no-libtool'.
+dnl INTLSYMBOL should be 'external' for packages with no intl directory,
+dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
+dnl If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl depending on --{enable,disable}-{shared,static} and on the presence of
+dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
+dnl $(top_builddir)/intl/libintl.a will be created.
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl implementations (in libc or libintl) without the ngettext() function
+dnl will be ignored. If NEEDSYMBOL is specified and is
+dnl 'need-formatstring-macros', then GNU gettext implementations that don't
+dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
+dnl INTLDIR is used to find the intl libraries. If empty,
+dnl the value `$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl and used.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl Catalog format: none
+dnl Catalog extension: none
+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+[
+ dnl Argument checking.
+ ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
+ [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])])
+ ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
+ [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+])])])])
+ define([gt_included_intl],
+ ifelse([$1], [external],
+ ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
+ [yes]))
+ define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
+ gt_NEEDS_INIT
+ AM_GNU_GETTEXT_NEED([$2])
+
+ AC_REQUIRE([AM_PO_SUBDIRS])dnl
+ ifelse(gt_included_intl, yes, [
+ AC_REQUIRE([AM_INTL_SUBDIR])dnl
+ ])
+
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ dnl Ideally we would do this search only after the
+ dnl if test "$USE_NLS" = "yes"; then
+ dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+ dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+ dnl the configure script would need to contain the same shell code
+ dnl again, outside any 'if'. There are two solutions:
+ dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+ dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+ dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
+ dnl documented, we avoid it.
+ ifelse(gt_included_intl, yes, , [
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+ ])
+
+ dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
+ gt_INTL_MACOSX
+
+ dnl Set USE_NLS.
+ AC_REQUIRE([AM_NLS])
+
+ ifelse(gt_included_intl, yes, [
+ BUILD_INCLUDED_LIBINTL=no
+ USE_INCLUDED_LIBINTL=no
+ ])
+ LIBINTL=
+ LTLIBINTL=
+ POSUB=
+
+ dnl Add a version number to the cache macros.
+ case " $gt_needs " in
+ *" need-formatstring-macros "*) gt_api_version=3 ;;
+ *" need-ngettext "*) gt_api_version=2 ;;
+ *) gt_api_version=1 ;;
+ esac
+ gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+ gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+ dnl If we use NLS figure out what method
+ if test "$USE_NLS" = "yes"; then
+ gt_use_preinstalled_gnugettext=no
+ ifelse(gt_included_intl, yes, [
+ AC_MSG_CHECKING([whether included gettext is requested])
+ AC_ARG_WITH(included-gettext,
+ [ --with-included-gettext use the GNU gettext library included here],
+ nls_cv_force_use_gnu_gettext=$withval,
+ nls_cv_force_use_gnu_gettext=no)
+ AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ ])
+ dnl User does not insist on using GNU NLS library. Figure out what
+ dnl to use. If GNU gettext is available we use this. Else we have
+ dnl to fall back to GNU NLS library.
+
+ if test $gt_api_version -ge 3; then
+ gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+'
+ else
+ gt_revision_test_code=
+ fi
+ if test $gt_api_version -ge 2; then
+ gt_expression_test_code=' + * ngettext ("", "", 0)'
+ else
+ gt_expression_test_code=
+ fi
+
+ AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
+ [AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;],
+ [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
+ [eval "$gt_func_gnugettext_libc=yes"],
+ [eval "$gt_func_gnugettext_libc=no"])])
+
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ ifelse(gt_included_intl, yes, , [
+ AM_ICONV_LINK
+ ])
+ dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
+ dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
+ dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
+ dnl even if libiconv doesn't exist.
+ AC_LIB_LINKFLAGS_BODY([intl])
+ AC_CACHE_CHECK([for GNU gettext in libintl],
+ [$gt_func_gnugettext_libintl],
+ [gt_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCINTL"
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBINTL"
+ dnl Now see whether libintl exists and does not depend on libiconv.
+ AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+ [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+ [eval "$gt_func_gnugettext_libintl=yes"],
+ [eval "$gt_func_gnugettext_libintl=no"])
+ dnl Now see whether libintl exists and depends on libiconv.
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+ [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+ [LIBINTL="$LIBINTL $LIBICONV"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ eval "$gt_func_gnugettext_libintl=yes"
+ ])
+ fi
+ CPPFLAGS="$gt_save_CPPFLAGS"
+ LIBS="$gt_save_LIBS"])
+ fi
+
+ dnl If an already present or preinstalled GNU gettext() is found,
+ dnl use it. But if this macro is used in GNU gettext, and GNU
+ dnl gettext is already preinstalled in libintl, we update this
+ dnl libintl. (Cf. the install rule in intl/Makefile.in.)
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+ && test "$PACKAGE" != gettext-runtime \
+ && test "$PACKAGE" != gettext-tools; }; then
+ gt_use_preinstalled_gnugettext=yes
+ else
+ dnl Reset the values set by searching for libintl.
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+ dnl GNU gettext is not found in the C library.
+ dnl Fall back on included GNU gettext library.
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions used to generate GNU NLS library.
+ BUILD_INCLUDED_LIBINTL=yes
+ USE_INCLUDED_LIBINTL=yes
+ LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
+ LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+ fi
+
+ CATOBJEXT=
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions to use GNU gettext tools.
+ CATOBJEXT=.gmo
+ fi
+ ])
+
+ if test -n "$INTL_MACOSX_LIBS"; then
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Some extra flags are needed during linking.
+ LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+ LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+ fi
+ fi
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ AC_DEFINE(ENABLE_NLS, 1,
+ [Define to 1 if translation of program messages to the user's native language
+ is requested.])
+ else
+ USE_NLS=no
+ 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 { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "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
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ AC_MSG_CHECKING([how to link with libintl])
+ AC_MSG_RESULT([$LIBINTL])
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+ fi
+
+ dnl For backward compatibility. Some packages may be using this.
+ AC_DEFINE(HAVE_GETTEXT, 1,
+ [Define if the GNU gettext() function is already present or preinstalled.])
+ AC_DEFINE(HAVE_DCGETTEXT, 1,
+ [Define if the GNU dcgettext() function is already present or preinstalled.])
+ fi
+
+ dnl We need to process the po/ directory.
+ POSUB=po
+ fi
+
+ 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-runtime || test "$PACKAGE" = gettext-tools; then
+ BUILD_INCLUDED_LIBINTL=yes
+ fi
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST(BUILD_INCLUDED_LIBINTL)
+ AC_SUBST(USE_INCLUDED_LIBINTL)
+ AC_SUBST(CATOBJEXT)
+
+ dnl For backward compatibility. Some configure.ins may be using this.
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ DATADIRNAME=share
+ AC_SUBST(DATADIRNAME)
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INSTOBJEXT=.mo
+ AC_SUBST(INSTOBJEXT)
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ GENCAT=gencat
+ AC_SUBST(GENCAT)
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INTLOBJS=
+ 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)
+ ])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INTLLIBS="$LIBINTL"
+ AC_SUBST(INTLLIBS)
+
+ dnl Make all documented variables known to autoconf.
+ AC_SUBST(LIBINTL)
+ AC_SUBST(LTLIBINTL)
+ AC_SUBST(POSUB)
+])
+
+
+dnl Checks for special options needed on MacOS X.
+dnl Defines INTL_MACOSX_LIBS.
+AC_DEFUN([gt_INTL_MACOSX],
+[
+ dnl Check for API introduced in MacOS X 10.2.
+ AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
+ gt_cv_func_CFPreferencesCopyAppValue,
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
+ [CFPreferencesCopyAppValue(NULL, NULL)],
+ [gt_cv_func_CFPreferencesCopyAppValue=yes],
+ [gt_cv_func_CFPreferencesCopyAppValue=no])
+ LIBS="$gt_save_LIBS"])
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+ AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
+ [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
+ fi
+ dnl Check for API introduced in MacOS X 10.3.
+ AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
+ [gt_cv_func_CFLocaleCopyCurrent=yes],
+ [gt_cv_func_CFLocaleCopyCurrent=no])
+ LIBS="$gt_save_LIBS"])
+ if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
+ [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
+ fi
+ INTL_MACOSX_LIBS=
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+ fi
+ AC_SUBST([INTL_MACOSX_LIBS])
+])
+
+
+dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
+m4_define([gt_NEEDS_INIT],
+[
+ m4_divert_text([DEFAULTS], [gt_needs=])
+ m4_define([gt_NEEDS_INIT], [])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
+AC_DEFUN([AM_GNU_GETTEXT_NEED],
+[
+ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
+ AC_DEFUN([gl_LOCK_EARLY], [])
diff --git a/m4/gettime.m4 b/m4/gettime.m4
new file mode 100644
index 0000000..601a5e6
--- /dev/null
+++ b/m4/gettime.m4
@@ -0,0 +1,15 @@
+# gettime.m4 serial 6
+dnl Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_GETTIME],
+[
+ AC_LIBOBJ([gettime])
+
+ dnl Prerequisites of lib/gettime.c.
+ AC_REQUIRE([gl_CLOCK_TIME])
+ AC_REQUIRE([gl_TIMESPEC])
+ AC_CHECK_FUNCS_ONCE(gettimeofday nanotime)
+])
diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4
new file mode 100644
index 0000000..b9bbb10
--- /dev/null
+++ b/m4/gettimeofday.m4
@@ -0,0 +1,101 @@
+#serial 11
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering.
+
+AC_DEFUN([gl_FUNC_GETTIMEOFDAY],
+[
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([gl_HEADER_SYS_TIME_H])
+ AC_CHECK_FUNCS_ONCE([gettimeofday])
+
+ AC_CACHE_CHECK([for gettimeofday with POSIX signature],
+ [gl_cv_func_gettimeofday_posix_signature],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/time.h>
+ struct timeval c;
+ ]],
+ [[
+ int (*f) (struct timeval *restrict, void *restrict) = gettimeofday;
+ int x = f (&c, 0);
+ return !(x | c.tv_sec | c.tv_usec);
+ ]])],
+ [gl_cv_func_gettimeofday_posix_signature=yes],
+ [gl_cv_func_gettimeofday_posix_signature=no])])
+
+ gl_FUNC_GETTIMEOFDAY_CLOBBER
+
+ if test $gl_cv_func_gettimeofday_posix_signature != yes; then
+ REPLACE_GETTIMEOFDAY=1
+ SYS_TIME_H=sys/time.h
+ if test $gl_cv_func_gettimeofday_clobber != yes; then
+ AC_LIBOBJ(gettimeofday)
+ gl_PREREQ_GETTIMEOFDAY
+ fi
+ fi
+])
+
+
+dnl See if gettimeofday clobbers the static buffer that localtime uses
+dnl for its return value. The gettimeofday function from Mac OS X 10.0.4
+dnl (i.e., Darwin 1.3.7) has this problem.
+dnl
+dnl If it does, then arrange to use gettimeofday and localtime only via
+dnl the wrapper functions that work around the problem.
+
+AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
+[
+ AC_REQUIRE([gl_HEADER_SYS_TIME_H])
+
+ AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer],
+ [gl_cv_func_gettimeofday_clobber],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <string.h>
+ #include <sys/time.h>
+ #include <time.h>
+ #include <stdlib.h>
+ ]],
+ [[
+ time_t t = 0;
+ struct tm *lt;
+ struct tm saved_lt;
+ struct timeval tv;
+ lt = localtime (&t);
+ saved_lt = *lt;
+ gettimeofday (&tv, NULL);
+ return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
+ ]])],
+ [gl_cv_func_gettimeofday_clobber=no],
+ [gl_cv_func_gettimeofday_clobber=yes],
+ dnl When crosscompiling, assume it is broken.
+ [gl_cv_func_gettimeofday_clobber=yes])])
+
+ if test $gl_cv_func_gettimeofday_clobber = yes; then
+ REPLACE_GETTIMEOFDAY=1
+ SYS_TIME_H=sys/time.h
+ gl_GETTIMEOFDAY_REPLACE_LOCALTIME
+ AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], 1,
+ [Define if gettimeofday clobbers the localtime buffer.])
+ fi
+])
+
+AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [
+ AC_LIBOBJ(gettimeofday)
+ gl_PREREQ_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_CHECK_HEADERS([sys/timeb.h])
+ AC_CHECK_FUNCS([_ftime])
+])
diff --git a/m4/getugroups.m4 b/m4/getugroups.m4
new file mode 100644
index 0000000..3c5e15e
--- /dev/null
+++ b/m4/getugroups.m4
@@ -0,0 +1,13 @@
+# getugroups.m4 serial 6
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_GETUGROUPS],
+[
+ AC_LIBOBJ([getugroups])
+
+ dnl Prerequisites of lib/getugroups.c.
+ AC_TYPE_GETGROUPS
+])
diff --git a/m4/getusershell.m4 b/m4/getusershell.m4
new file mode 100644
index 0000000..de602d3
--- /dev/null
+++ b/m4/getusershell.m4
@@ -0,0 +1,10 @@
+# getusershell.m4 serial 4
+dnl Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_GETUSERSHELL],
+[
+ AC_REPLACE_FUNCS(getusershell)
+])
diff --git a/m4/glibc21.m4 b/m4/glibc21.m4
new file mode 100644
index 0000000..d95fd98
--- /dev/null
+++ b/m4/glibc21.m4
@@ -0,0 +1,30 @@
+# glibc21.m4 serial 3
+dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Test for the GNU C Library, version 2.1 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([gl_GLIBC21],
+ [
+ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
+ ac_cv_gnu_library_2_1,
+ [AC_EGREP_CPP([Lucky GNU user],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+ Lucky GNU user
+ #endif
+#endif
+ ],
+ ac_cv_gnu_library_2_1=yes,
+ ac_cv_gnu_library_2_1=no)
+ ]
+ )
+ AC_SUBST(GLIBC21)
+ GLIBC21="$ac_cv_gnu_library_2_1"
+ ]
+)
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
new file mode 100644
index 0000000..5398010
--- /dev/null
+++ b/m4/gnulib-common.m4
@@ -0,0 +1,22 @@
+# gnulib-common.m4 serial 2
+dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# gl_MODULE_INDICATOR([modulename])
+# defines a C macro indicating the presence of the given module.
+AC_DEFUN([gl_MODULE_INDICATOR],
+[
+ AC_DEFINE([GNULIB_]translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1],
+ [Define to 1 when using the gnulib module ]$1[.])
+])
+
+# AC_PROG_MKDIR_P
+# is a backport of autoconf-2.60's AC_PROG_MKDIR_P.
+# Remove this macro when we can assume autoconf >= 2.60.
+m4_ifdef([AC_PROG_MKDIR_P], [], [
+ AC_DEFUN([AC_PROG_MKDIR_P],
+ [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+ MKDIR_P='$(mkdir_p)'
+ AC_SUBST([MKDIR_P])])])
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
new file mode 100644
index 0000000..b1cec44
--- /dev/null
+++ b/m4/gnulib-comp.m4
@@ -0,0 +1,945 @@
+# -*- buffer-read-only: t -*- vi: set ro:
+# DO NOT EDIT! GENERATED AUTOMATICALLY!
+# DO NOT EDIT! GENERATED AUTOMATICALLY!
+# Copyright (C) 2004-2007 Free Software Foundation, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License. As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+#
+# This file represents the compiled summary of the specification in
+# gnulib-cache.m4. It lists the computed macro invocations that need
+# to be invoked from configure.ac.
+# In projects using CVS, this file can be treated like other built files.
+
+
+# This macro should be invoked from ./configure.ac, in the section
+# "Checks for programs", right after AC_PROG_CC, and certainly before
+# any checks for libraries, header files, types and library functions.
+AC_DEFUN([gl_EARLY],
+[
+ m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace
+ m4_pattern_allow([^gl_ES$])dnl a valid locale name
+ m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
+ m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
+ AC_REQUIRE([AC_PROG_RANLIB])
+ AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
+ dnl for the builtin va_copy to work. With Autoconf 2.60 or later,
+ dnl AC_PROG_CC_STDC arranges for this. With older Autoconf AC_PROG_CC_STDC
+ dnl shouldn't hurt, though installers are on their own to set c99 mode.
+ AC_REQUIRE([AC_PROG_CC_STDC])
+])
+
+# This macro should be invoked from ./configure.ac, in the section
+# "Check for header files, types and library functions".
+AC_DEFUN([gl_INIT],
+[
+ m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
+ m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
+ m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
+ AM_CONDITIONAL([GL_COND_LIBTOOL], [false])
+ gl_cond_libtool=false
+ gl_libdeps=
+ gl_ltlibdeps=
+ gl_source_base='lib'
+ AC_FUNC_ACL
+ gl_FUNC_ALLOCA
+ gl_ALLOCSA
+ gl_ARGMATCH
+ gl_HEADER_ARPA_INET
+ AC_PROG_MKDIR_P
+ gl_ASSERT
+ gl_FUNC_ATEXIT
+ gl_BACKUPFILE
+ gl_FUNC_BASE64
+ gl_C_STRTOD
+ gl_C_STRTOLD
+ AC_FUNC_CALLOC
+ gl_CANON_HOST
+ AC_FUNC_CANONICALIZE_FILE_NAME
+ gl_MODULE_INDICATOR([canonicalize])
+ gl_FUNC_CHDIR_LONG
+ gl_FUNC_CHOWN
+ gl_UNISTD_MODULE_INDICATOR([chown])
+ gl_CLOCK_TIME
+ gl_CLOEXEC
+ gl_CLOSE_STREAM
+ gl_MODULE_INDICATOR([close-stream])
+ gl_CLOSEOUT
+ gl_CONFIG_H
+ gl_CYCLE_CHECK
+ gl_CHECK_TYPE_STRUCT_DIRENT_D_INO
+ gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE
+ gl_FUNC_DIRFD
+ gl_DIRNAME
+ gl_DOUBLE_SLASH_ROOT
+ gl_FUNC_DUP2
+ gl_UNISTD_MODULE_INDICATOR([dup2])
+ gl_ERROR
+ gl_FUNC_EUIDACCESS
+ gl_EXCLUDE
+ gl_EXITFAIL
+ gl_FUNC_FCHDIR
+ gl_UNISTD_MODULE_INDICATOR([fchdir])
+ gl_FCNTL_H
+ gl_FCNTL_SAFER
+ gl_MODULE_INDICATOR([fcntl-safer])
+ gl_FILE_TYPE
+ gl_FILEBLOCKS
+ gl_FILEMODE
+ gl_FILE_NAME_CONCAT
+ AC_C_FLEXIBLE_ARRAY_MEMBER
+ # No macro. You should also use one of fnmatch-posix or fnmatch-gnu.
+ gl_FUNC_FNMATCH_GNU
+ gl_FOPEN_SAFER
+ gl_MODULE_INDICATOR([fopen-safer])
+ gl_FUNC_FPENDING
+ gl_FPRINTFTIME
+ gl_FUNC_FREE
+ gl_FSUSAGE
+ gl_FUNC_FTRUNCATE
+ gl_UNISTD_MODULE_INDICATOR([ftruncate])
+ gl_FUNC_FTS
+ gl_MODULE_INDICATOR([fts])
+ gl_GETADDRINFO
+ gl_FUNC_GETCWD
+ gl_UNISTD_MODULE_INDICATOR([getcwd])
+ gl_GETDATE
+ gl_FUNC_GETDELIM
+ gl_FUNC_GETGROUPS
+ gl_FUNC_GETHOSTNAME
+ gl_GETHRXTIME
+ gl_FUNC_GETLINE
+ gl_GETLOADAVG([lib])
+ gl_GETNDELIM2
+ gl_GETOPT
+ gl_GETPAGESIZE
+ gl_FUNC_GETPASS_GNU
+ dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
+ AM_GNU_GETTEXT_VERSION([0.16.1])
+ gl_GETTIME
+ gl_FUNC_GETTIMEOFDAY
+ gl_GETUGROUPS
+ gl_FUNC_GETUSERSHELL
+ gl_FUNC_GROUP_MEMBER
+ gl_HARD_LOCALE
+ gl_HASH
+ gl_HOST_OS
+ gl_HUMAN
+ gl_I_RING
+ AM_ICONV
+ gl_IDCACHE
+ gl_INET_NTOP
+ gl_INLINE
+ gl_INTTOSTR
+ gl_INTTYPES_H
+ gl_ISAPIPE
+ gl_FUNC_LCHMOD
+ gl_FUNC_LCHOWN
+ gl_IGNORE_UNUSED_LIBRARIES
+ gl_AC_FUNC_LINK_FOLLOWS_SYMLINK
+ gl_LOCALCHARSET
+ gl_LONG_OPTIONS
+ gl_FUNC_LSTAT
+ AC_FUNC_MALLOC
+ gl_MBCHAR
+ gl_FUNC_MBSCASECMP
+ gl_STRING_MODULE_INDICATOR([mbscasecmp])
+ gl_MBSWIDTH
+ gl_MBITER
+ gl_MD5
+ gl_MEMCASECMP
+ gl_FUNC_MEMCHR
+ gl_FUNC_MEMCMP
+ gl_MEMCOLL
+ gl_FUNC_MEMCPY
+ gl_FUNC_MEMMOVE
+ gl_FUNC_MEMPCPY
+ gl_STRING_MODULE_INDICATOR([mempcpy])
+ gl_FUNC_MEMRCHR
+ gl_STRING_MODULE_INDICATOR([memrchr])
+ gl_FUNC_MEMSET
+ gl_MKANCESDIRS
+ gl_FUNC_MKDIR_TRAILING_SLASH
+ gl_MKDIR_PARENTS
+ gl_FUNC_MKSTEMP
+ gl_STDLIB_MODULE_INDICATOR([mkstemp])
+ gl_FUNC_MKTIME
+ gl_MODECHANGE
+ gl_MOUNTLIST
+ gl_MPSORT
+ gl_FUNC_NANOSLEEP
+ gl_HEADER_NETINET_IN
+ AC_PROG_MKDIR_P
+ AC_FUNC_OBSTACK
+ dnl Note: AC_FUNC_OBSTACK does AC_LIBSOURCES([obstack.h, obstack.c]).
+ gl_FUNC_OPENAT
+ gl_PATHMAX
+ gl_PERL
+ gl_PHYSMEM
+ gl_POSIXTM
+ gl_POSIXVER
+ gl_FUNC_PUTENV
+ gl_QUOTE
+ gl_QUOTEARG
+ AC_REPLACE_FUNCS(raise)
+ gl_FUNC_READLINK
+ gl_UNISTD_MODULE_INDICATOR([readlink])
+ gl_READTOKENS
+ gl_READUTMP
+ AC_FUNC_REALLOC
+ gl_REGEX
+ gl_FUNC_RENAME
+ gl_FUNC_RENAME_TRAILING_DEST_SLASH
+ gl_FUNC_RMDIR
+ gl_FUNC_RMDIR_NOTEMPTY
+ gl_ROOT_DEV_INO
+ gl_FUNC_RPMATCH
+ gl_SAFE_READ
+ gl_SAFE_WRITE
+ gl_SAME
+ gl_SAVE_CWD
+ gl_SAVEDIR
+ gl_SAVEWD
+ gl_FUNC_SETENV
+ gl_FUNC_UNSETENV
+ gl_SETTIME
+ gl_SHA1
+ gl_FUNC_SIG2STR
+ gl_FUNC_SNPRINTF
+ gl_STDIO_MODULE_INDICATOR([snprintf])
+ gl_TYPE_SOCKLEN_T
+ gt_TYPE_SSIZE_T
+ gl_STAT_TIME
+ gl_STDARG_H
+ AM_STDBOOL_H
+ gl_STDINT_H
+ gl_STDIO_H
+ gl_STDLIB_H
+ gl_STDLIB_SAFER
+ gl_FUNC_STPCPY
+ gl_STRING_MODULE_INDICATOR([stpcpy])
+ gl_FUNC_STRCSPN
+ gl_FUNC_STRDUP
+ gl_STRING_MODULE_INDICATOR([strdup])
+ gl_FUNC_GNU_STRFTIME
+ gl_HEADER_STRING_H
+ gl_FUNC_STRNDUP
+ gl_STRING_MODULE_INDICATOR([strndup])
+ gl_FUNC_STRNLEN
+ gl_STRING_MODULE_INDICATOR([strnlen])
+ gl_FUNC_STRPBRK
+ gl_STRING_MODULE_INDICATOR([strpbrk])
+ gl_FUNC_STRTOD
+ gl_FUNC_STRTOIMAX
+ gl_INTTYPES_MODULE_INDICATOR([strtoimax])
+ gl_FUNC_STRTOL
+ gl_FUNC_STRTOLL
+ gl_FUNC_STRTOUL
+ gl_FUNC_STRTOULL
+ gl_FUNC_STRTOUMAX
+ gl_INTTYPES_MODULE_INDICATOR([strtoumax])
+ gl_FUNC_STRVERSCMP
+ gl_HEADER_SYS_SOCKET
+ AC_PROG_MKDIR_P
+ gl_HEADER_SYS_STAT_H
+ AC_PROG_MKDIR_P
+ gl_HEADER_SYS_TIME_H
+ AC_PROG_MKDIR_P
+ gl_FUNC_GEN_TEMPNAME
+ gl_HEADER_TIME_H
+ gl_TIME_R
+ gl_TIMESPEC
+ gl_FUNC_TZSET_CLOBBER
+ gl_UNICODEIO
+ gl_UNISTD_H
+ gl_UNISTD_SAFER
+ gl_FUNC_UNLINK_BUSY_TEXT
+ gl_UNLINKDIR
+ gl_FUNC_GLIBC_UNLOCKED_IO
+ gl_SYS_PROC_UPTIME
+ gl_USERSPEC
+ gl_FUNC_UTIME
+ gl_UTIMECMP
+ gl_UTIMENS
+ gl_FUNC_VASNPRINTF
+ gl_FUNC_VASPRINTF
+ gl_WCHAR_H
+ gl_WCTYPE_H
+ gl_FUNC_WCWIDTH
+ gl_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL
+ gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H
+ gl_WINSIZE_IN_PTEM
+ gl_XALLOC
+ gl_XGETCWD
+ gl_XNANOSLEEP
+ gl_XSTRNDUP
+ gl_XSTRTOD
+ gl_XSTRTOL
+ gl_XSTRTOLD
+ gl_YESNO
+ LIBCOREUTILS_LIBDEPS="$gl_libdeps"
+ AC_SUBST([LIBCOREUTILS_LIBDEPS])
+ LIBCOREUTILS_LTLIBDEPS="$gl_ltlibdeps"
+ AC_SUBST([LIBCOREUTILS_LTLIBDEPS])
+ m4_popdef([AC_LIBSOURCES])
+ m4_popdef([AC_REPLACE_FUNCS])
+ m4_popdef([AC_LIBOBJ])
+ AC_CONFIG_COMMANDS_PRE([
+ gl_libobjs=
+ gl_ltlibobjs=
+ if test -n "$gl_LIBOBJS"; then
+ # Remove the extension.
+ sed_drop_objext='s/\.o$//;s/\.obj$//'
+ for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
+ gl_libobjs="$gl_libobjs $i.$ac_objext"
+ gl_ltlibobjs="$gl_ltlibobjs $i.lo"
+ done
+ fi
+ AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
+ AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
+ ])
+])
+
+# Like AC_LIBOBJ, except that the module name goes
+# into gl_LIBOBJS instead of into LIBOBJS.
+AC_DEFUN([gl_LIBOBJ],
+ [gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"])
+
+# Like AC_REPLACE_FUNCS, except that the module name goes
+# into gl_LIBOBJS instead of into LIBOBJS.
+AC_DEFUN([gl_REPLACE_FUNCS],
+ [AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])])
+
+# Like AC_LIBSOURCES, except that it does nothing.
+# We rely on EXTRA_lib..._SOURCES instead.
+AC_DEFUN([gl_LIBSOURCES],
+ [])
+
+# This macro records the list of files which have been installed by
+# gnulib-tool and may be removed by future gnulib-tool invocations.
+AC_DEFUN([gl_FILE_LIST], [
+ build-aux/announce-gen
+ build-aux/config.rpath
+ build-aux/gnupload
+ build-aux/link-warning.h
+ doc/fdl.texi
+ doc/getdate.texi
+ lib/__fpending.c
+ lib/__fpending.h
+ lib/acl-internal.h
+ lib/acl.c
+ lib/acl.h
+ lib/acl_entries.c
+ lib/alloca.c
+ lib/alloca_.h
+ lib/allocsa.c
+ lib/allocsa.h
+ lib/allocsa.valgrind
+ lib/argmatch.c
+ lib/argmatch.h
+ lib/asnprintf.c
+ lib/asprintf.c
+ lib/at-func.c
+ lib/atexit.c
+ lib/backupfile.c
+ lib/backupfile.h
+ lib/base64.c
+ lib/base64.h
+ lib/basename.c
+ lib/c-ctype.c
+ lib/c-ctype.h
+ lib/c-strcase.h
+ lib/c-strcasecmp.c
+ lib/c-strncasecmp.c
+ lib/c-strtod.c
+ lib/c-strtod.h
+ lib/c-strtold.c
+ lib/calloc.c
+ lib/canon-host.c
+ lib/canon-host.h
+ lib/canonicalize.c
+ lib/canonicalize.h
+ lib/chdir-long.c
+ lib/chdir-long.h
+ lib/chown.c
+ lib/cloexec.c
+ lib/cloexec.h
+ lib/close-stream.c
+ lib/close-stream.h
+ lib/closeout.c
+ lib/closeout.h
+ lib/config.charset
+ lib/creat-safer.c
+ lib/cycle-check.c
+ lib/cycle-check.h
+ lib/dev-ino.h
+ lib/diacrit.c
+ lib/diacrit.h
+ lib/dirchownmod.c
+ lib/dirchownmod.h
+ lib/dirent_.h
+ lib/dirfd.c
+ lib/dirfd.h
+ lib/dirname.c
+ lib/dirname.h
+ lib/dup-safer.c
+ lib/dup2.c
+ lib/error.c
+ lib/error.h
+ lib/euidaccess.c
+ lib/euidaccess.h
+ lib/exclude.c
+ lib/exclude.h
+ lib/exitfail.c
+ lib/exitfail.h
+ lib/fchdir.c
+ lib/fchmodat.c
+ lib/fchown-stub.c
+ lib/fchownat.c
+ lib/fcntl--.h
+ lib/fcntl-safer.h
+ lib/fcntl_.h
+ lib/fd-safer.c
+ lib/file-has-acl.c
+ lib/file-type.c
+ lib/file-type.h
+ lib/fileblocks.c
+ lib/filemode.c
+ lib/filemode.h
+ lib/filenamecat.c
+ lib/filenamecat.h
+ lib/fnmatch.c
+ lib/fnmatch_.h
+ lib/fnmatch_loop.c
+ lib/fopen-safer.c
+ lib/fprintftime.c
+ lib/fprintftime.h
+ lib/free.c
+ lib/fstatat.c
+ lib/fsusage.c
+ lib/fsusage.h
+ lib/ftruncate.c
+ lib/fts-cycle.c
+ lib/fts.c
+ lib/fts_.h
+ lib/full-read.c
+ lib/full-read.h
+ lib/full-write.c
+ lib/full-write.h
+ lib/gai_strerror.c
+ lib/getaddrinfo.c
+ lib/getaddrinfo.h
+ lib/getcwd.c
+ lib/getdate.h
+ lib/getdate.y
+ lib/getdelim.c
+ lib/getdelim.h
+ lib/getgroups.c
+ lib/gethostname.c
+ lib/gethrxtime.c
+ lib/gethrxtime.h
+ lib/getline.c
+ lib/getline.h
+ lib/getloadavg.c
+ lib/getndelim2.c
+ lib/getndelim2.h
+ lib/getopt.c
+ lib/getopt1.c
+ lib/getopt_.h
+ lib/getopt_int.h
+ lib/getpagesize.h
+ lib/getpass.c
+ lib/getpass.h
+ lib/gettext.h
+ lib/gettime.c
+ lib/gettimeofday.c
+ lib/getugroups.c
+ lib/getusershell.c
+ lib/group-member.c
+ lib/group-member.h
+ lib/hard-locale.c
+ lib/hard-locale.h
+ lib/hash-pjw.c
+ lib/hash-pjw.h
+ lib/hash.c
+ lib/hash.h
+ lib/human.c
+ lib/human.h
+ lib/i-ring.c
+ lib/i-ring.h
+ lib/idcache.c
+ lib/imaxtostr.c
+ lib/inet_ntop.c
+ lib/inet_ntop.h
+ lib/intprops.h
+ lib/inttostr.c
+ lib/inttostr.h
+ lib/inttypes_.h
+ lib/isapipe.c
+ lib/isapipe.h
+ lib/lchmod.h
+ lib/lchown.c
+ lib/lchown.h
+ lib/linebuffer.c
+ lib/linebuffer.h
+ lib/localcharset.c
+ lib/localcharset.h
+ lib/long-options.c
+ lib/long-options.h
+ lib/lstat.c
+ lib/lstat.h
+ lib/malloc.c
+ lib/mbchar.c
+ lib/mbchar.h
+ lib/mbscasecmp.c
+ lib/mbswidth.c
+ lib/mbswidth.h
+ lib/mbuiter.h
+ lib/md5.c
+ lib/md5.h
+ lib/memcasecmp.c
+ lib/memcasecmp.h
+ lib/memchr.c
+ lib/memcmp.c
+ lib/memcoll.c
+ lib/memcoll.h
+ lib/memcpy.c
+ lib/memmove.c
+ lib/mempcpy.c
+ lib/memrchr.c
+ lib/memset.c
+ lib/mkancesdirs.c
+ lib/mkancesdirs.h
+ lib/mkdir-p.c
+ lib/mkdir-p.h
+ lib/mkdir.c
+ lib/mkdirat.c
+ lib/mkstemp-safer.c
+ lib/mkstemp.c
+ lib/mktime.c
+ lib/modechange.c
+ lib/modechange.h
+ lib/mountlist.c
+ lib/mountlist.h
+ lib/mpsort.c
+ lib/mpsort.h
+ lib/nanosleep.c
+ lib/netinet_in_.h
+ lib/obstack.c
+ lib/obstack.h
+ lib/offtostr.c
+ lib/open-safer.c
+ lib/openat-die.c
+ lib/openat-priv.h
+ lib/openat-proc.c
+ lib/openat.c
+ lib/openat.h
+ lib/pathmax.h
+ lib/physmem.c
+ lib/physmem.h
+ lib/pipe-safer.c
+ lib/posixtm.c
+ lib/posixtm.h
+ lib/posixver.c
+ lib/posixver.h
+ lib/printf-args.c
+ lib/printf-args.h
+ lib/printf-parse.c
+ lib/printf-parse.h
+ lib/putenv.c
+ lib/quote.c
+ lib/quote.h
+ lib/quotearg.c
+ lib/quotearg.h
+ lib/raise.c
+ lib/readlink.c
+ lib/readtokens.c
+ lib/readtokens.h
+ lib/readtokens0.c
+ lib/readtokens0.h
+ lib/readutmp.c
+ lib/readutmp.h
+ lib/realloc.c
+ lib/ref-add.sin
+ lib/ref-del.sin
+ lib/regcomp.c
+ lib/regex.c
+ lib/regex.h
+ lib/regex_internal.c
+ lib/regex_internal.h
+ lib/regexec.c
+ lib/rename-dest-slash.c
+ lib/rename.c
+ lib/rmdir.c
+ lib/root-dev-ino.c
+ lib/root-dev-ino.h
+ lib/rpmatch.c
+ lib/safe-read.c
+ lib/safe-read.h
+ lib/safe-write.c
+ lib/safe-write.h
+ lib/same-inode.h
+ lib/same.c
+ lib/same.h
+ lib/save-cwd.c
+ lib/save-cwd.h
+ lib/savedir.c
+ lib/savedir.h
+ lib/savewd.c
+ lib/savewd.h
+ lib/setenv.c
+ lib/setenv.h
+ lib/settime.c
+ lib/sha1.c
+ lib/sha1.h
+ lib/sig2str.c
+ lib/sig2str.h
+ lib/snprintf.c
+ lib/socket_.h
+ lib/stat-macros.h
+ lib/stat-time.h
+ lib/stat_.h
+ lib/stdbool_.h
+ lib/stdint_.h
+ lib/stdio--.h
+ lib/stdio-safer.h
+ lib/stdio_.h
+ lib/stdlib--.h
+ lib/stdlib-safer.h
+ lib/stdlib_.h
+ lib/stpcpy.c
+ lib/strcspn.c
+ lib/strdup.c
+ lib/strftime.c
+ lib/strftime.h
+ lib/string_.h
+ lib/stripslash.c
+ lib/strndup.c
+ lib/strnlen.c
+ lib/strnlen1.c
+ lib/strnlen1.h
+ lib/strpbrk.c
+ lib/strtod.c
+ lib/strtoimax.c
+ lib/strtol.c
+ lib/strtoll.c
+ lib/strtoul.c
+ lib/strtoull.c
+ lib/strtoumax.c
+ lib/strverscmp.c
+ lib/strverscmp.h
+ lib/sys_time_.h
+ lib/tempname.c
+ lib/tempname.h
+ lib/time_.h
+ lib/time_r.c
+ lib/timespec.h
+ lib/uinttostr.c
+ lib/umaxtostr.c
+ lib/unicodeio.c
+ lib/unicodeio.h
+ lib/unistd--.h
+ lib/unistd-safer.h
+ lib/unistd_.h
+ lib/unlinkdir.c
+ lib/unlinkdir.h
+ lib/unlocked-io.h
+ lib/unsetenv.c
+ lib/userspec.c
+ lib/userspec.h
+ lib/utime.c
+ lib/utimecmp.c
+ lib/utimecmp.h
+ lib/utimens.c
+ lib/utimens.h
+ lib/vasnprintf.c
+ lib/vasnprintf.h
+ lib/vasprintf.c
+ lib/vasprintf.h
+ lib/verify.h
+ lib/version-etc-fsf.c
+ lib/version-etc.c
+ lib/version-etc.h
+ lib/wchar_.h
+ lib/wctype_.h
+ lib/wcwidth.h
+ lib/xalloc-die.c
+ lib/xalloc.h
+ lib/xgetcwd.c
+ lib/xgetcwd.h
+ lib/xgethostname.c
+ lib/xgethostname.h
+ lib/xmalloc.c
+ lib/xmemcoll.c
+ lib/xmemcoll.h
+ lib/xnanosleep.c
+ lib/xnanosleep.h
+ lib/xreadlink-with-size.c
+ lib/xreadlink.c
+ lib/xreadlink.h
+ lib/xstrndup.c
+ lib/xstrndup.h
+ lib/xstrtod.c
+ lib/xstrtod.h
+ lib/xstrtoimax.c
+ lib/xstrtol.c
+ lib/xstrtol.h
+ lib/xstrtold.c
+ lib/xstrtoul.c
+ lib/xstrtoumax.c
+ lib/xtime.h
+ lib/yesno.c
+ lib/yesno.h
+ m4/absolute-header.m4
+ m4/acl.m4
+ m4/alloca.m4
+ m4/allocsa.m4
+ m4/argmatch.m4
+ m4/arpa_inet_h.m4
+ m4/assert.m4
+ m4/atexit.m4
+ m4/backupfile.m4
+ m4/base64.m4
+ m4/bison.m4
+ m4/c-strtod.m4
+ m4/calloc.m4
+ m4/canon-host.m4
+ m4/canonicalize.m4
+ m4/chdir-long.m4
+ m4/chown.m4
+ m4/clock_time.m4
+ m4/cloexec.m4
+ m4/close-stream.m4
+ m4/closeout.m4
+ m4/codeset.m4
+ m4/config-h.m4
+ m4/cycle-check.m4
+ m4/d-ino.m4
+ m4/d-type.m4
+ m4/dirfd.m4
+ m4/dirname.m4
+ m4/dos.m4
+ m4/double-slash-root.m4
+ m4/dup2.m4
+ m4/eealloc.m4
+ m4/eoverflow.m4
+ m4/error.m4
+ m4/euidaccess.m4
+ m4/exclude.m4
+ m4/exitfail.m4
+ m4/extensions.m4
+ m4/fchdir.m4
+ m4/fcntl-safer.m4
+ m4/fcntl_h.m4
+ m4/file-type.m4
+ m4/fileblocks.m4
+ m4/filemode.m4
+ m4/filenamecat.m4
+ m4/flexmember.m4
+ m4/fnmatch.m4
+ m4/fpending.m4
+ m4/fprintftime.m4
+ m4/free.m4
+ m4/fstypename.m4
+ m4/fsusage.m4
+ m4/ftruncate.m4
+ m4/fts.m4
+ m4/getaddrinfo.m4
+ m4/getcwd-abort-bug.m4
+ m4/getcwd-path-max.m4
+ m4/getcwd.m4
+ m4/getdate.m4
+ m4/getdelim.m4
+ m4/getgroups.m4
+ m4/gethostname.m4
+ m4/gethrxtime.m4
+ m4/getline.m4
+ m4/getloadavg.m4
+ m4/getndelim2.m4
+ m4/getopt.m4
+ m4/getpagesize.m4
+ m4/getpass.m4
+ m4/gettext.m4
+ m4/gettime.m4
+ m4/gettimeofday.m4
+ m4/getugroups.m4
+ m4/getusershell.m4
+ m4/glibc2.m4
+ m4/glibc21.m4
+ m4/gnulib-common.m4
+ m4/group-member.m4
+ m4/hard-locale.m4
+ m4/hash.m4
+ m4/host-os.m4
+ m4/human.m4
+ m4/i-ring.m4
+ m4/iconv.m4
+ m4/idcache.m4
+ m4/inet_ntop.m4
+ m4/inline.m4
+ m4/intdiv0.m4
+ m4/intl.m4
+ m4/intldir.m4
+ m4/intmax.m4
+ m4/intmax_t.m4
+ m4/inttostr.m4
+ m4/inttypes-pri.m4
+ m4/inttypes.m4
+ m4/inttypes_h.m4
+ m4/isapipe.m4
+ m4/jm-winsz1.m4
+ m4/jm-winsz2.m4
+ m4/lchmod.m4
+ m4/lchown.m4
+ m4/lcmessage.m4
+ m4/lib-ignore.m4
+ m4/lib-ld.m4
+ m4/lib-link.m4
+ m4/lib-prefix.m4
+ m4/link-follow.m4
+ m4/localcharset.m4
+ m4/lock.m4
+ m4/long-options.m4
+ m4/longdouble.m4
+ m4/longlong.m4
+ m4/ls-mntd-fs.m4
+ m4/lstat.m4
+ m4/mbchar.m4
+ m4/mbiter.m4
+ m4/mbrtowc.m4
+ m4/mbscasecmp.m4
+ m4/mbstate_t.m4
+ m4/mbswidth.m4
+ m4/md5.m4
+ m4/memcasecmp.m4
+ m4/memchr.m4
+ m4/memcmp.m4
+ m4/memcoll.m4
+ m4/memcpy.m4
+ m4/memmove.m4
+ m4/mempcpy.m4
+ m4/memrchr.m4
+ m4/memset.m4
+ m4/mkancesdirs.m4
+ m4/mkdir-p.m4
+ m4/mkdir-slash.m4
+ m4/mkstemp.m4
+ m4/mktime.m4
+ m4/modechange.m4
+ m4/mountlist.m4
+ m4/mpsort.m4
+ m4/nanosleep.m4
+ m4/netinet_in_h.m4
+ m4/nls.m4
+ m4/openat.m4
+ m4/pathmax.m4
+ m4/perl.m4
+ m4/physmem.m4
+ m4/po.m4
+ m4/posixtm.m4
+ m4/posixver.m4
+ m4/printf-posix.m4
+ m4/progtest.m4
+ m4/putenv.m4
+ m4/quote.m4
+ m4/quotearg.m4
+ m4/readlink.m4
+ m4/readtokens.m4
+ m4/readutmp.m4
+ m4/regex.m4
+ m4/rename-dest-slash.m4
+ m4/rename.m4
+ m4/rmdir-errno.m4
+ m4/rmdir.m4
+ m4/root-dev-ino.m4
+ m4/rpmatch.m4
+ m4/safe-read.m4
+ m4/safe-write.m4
+ m4/same.m4
+ m4/save-cwd.m4
+ m4/savedir.m4
+ m4/savewd.m4
+ m4/setenv.m4
+ m4/settime.m4
+ m4/sha1.m4
+ m4/sig2str.m4
+ m4/size_max.m4
+ m4/snprintf.m4
+ m4/socklen.m4
+ m4/sockpfaf.m4
+ m4/ssize_t.m4
+ m4/st_dm_mode.m4
+ m4/stat-time.m4
+ m4/stdarg.m4
+ m4/stdbool.m4
+ m4/stdint.m4
+ m4/stdint_h.m4
+ m4/stdio-safer.m4
+ m4/stdio_h.m4
+ m4/stdlib-safer.m4
+ m4/stdlib_h.m4
+ m4/stpcpy.m4
+ m4/strcspn.m4
+ m4/strdup.m4
+ m4/strftime.m4
+ m4/string_h.m4
+ m4/strndup.m4
+ m4/strnlen.m4
+ m4/strpbrk.m4
+ m4/strtod.m4
+ m4/strtoimax.m4
+ m4/strtol.m4
+ m4/strtoll.m4
+ m4/strtoul.m4
+ m4/strtoull.m4
+ m4/strtoumax.m4
+ m4/strverscmp.m4
+ m4/sys_socket_h.m4
+ m4/sys_stat_h.m4
+ m4/sys_time_h.m4
+ m4/tempname.m4
+ m4/time_h.m4
+ m4/time_r.m4
+ m4/timespec.m4
+ m4/tm_gmtoff.m4
+ m4/tzset.m4
+ m4/uintmax_t.m4
+ m4/ulonglong.m4
+ m4/unicodeio.m4
+ m4/unistd-safer.m4
+ m4/unistd_h.m4
+ m4/unlink-busy.m4
+ m4/unlinkdir.m4
+ m4/unlocked-io.m4
+ m4/uptime.m4
+ m4/userspec.m4
+ m4/utimbuf.m4
+ m4/utime.m4
+ m4/utimecmp.m4
+ m4/utimens.m4
+ m4/utimes-null.m4
+ m4/utimes.m4
+ m4/vasnprintf.m4
+ m4/vasprintf.m4
+ m4/visibility.m4
+ m4/wchar.m4
+ m4/wchar_t.m4
+ m4/wctype.m4
+ m4/wcwidth.m4
+ m4/wint_t.m4
+ m4/xalloc.m4
+ m4/xgetcwd.m4
+ m4/xnanosleep.m4
+ m4/xsize.m4
+ m4/xstrndup.m4
+ m4/xstrtod.m4
+ m4/xstrtol.m4
+ m4/yesno.m4
+])
diff --git a/m4/group-member.m4 b/m4/group-member.m4
new file mode 100644
index 0000000..6f2f57e
--- /dev/null
+++ b/m4/group-member.m4
@@ -0,0 +1,29 @@
+#serial 10
+
+# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl Written by Jim Meyering
+
+AC_DEFUN([gl_FUNC_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_FUNC_GETGROUPS])
+])
diff --git a/m4/hard-locale.m4 b/m4/hard-locale.m4
new file mode 100644
index 0000000..8b577ef
--- /dev/null
+++ b/m4/hard-locale.m4
@@ -0,0 +1,11 @@
+# hard-locale.m4 serial 7
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl No prerequisites of lib/hard-locale.c.
+AC_DEFUN([gl_HARD_LOCALE],
+[
+ AC_LIBOBJ([hard-locale])
+])
diff --git a/m4/hash.m4 b/m4/hash.m4
new file mode 100644
index 0000000..1b1873c
--- /dev/null
+++ b/m4/hash.m4
@@ -0,0 +1,13 @@
+# hash.m4 serial 6
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_HASH],
+[
+ AC_LIBOBJ([hash])
+
+ dnl Prerequisites of lib/hash.c.
+ AC_REQUIRE([AM_STDBOOL_H])
+])
diff --git a/m4/host-os.m4 b/m4/host-os.m4
new file mode 100644
index 0000000..0b7efb6
--- /dev/null
+++ b/m4/host-os.m4
@@ -0,0 +1,82 @@
+#serial 6
+
+# Copyright (C) 2001, 2003, 2004, 2006 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert.
+
+dnl From Paul Eggert.
+
+# Define HOST_OPERATING_SYSTEM to a name for the host operating system.
+AC_DEFUN([gl_HOST_OS],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ AC_CACHE_CHECK([host operating system],
+ gl_cv_host_operating_system,
+
+ [[case $host_os in
+
+ # These operating system names do not use the default heuristic below.
+ # They are in reverse order, so that more-specific prefixes come first.
+ winnt*) os='Windows NT';;
+ vos*) os='VOS';;
+ sysv*) os='Unix System V';;
+ superux*) os='SUPER-UX';;
+ sunos*) os='SunOS';;
+ stop*) os='STOP';;
+ sco*) os='SCO Unix';;
+ riscos*) os='RISC OS';;
+ riscix*) os='RISCiX';;
+ qnx*) os='QNX';;
+ pw32*) os='PW32';;
+ ptx*) os='ptx';;
+ plan9*) os='Plan 9';;
+ osf*) os='Tru64';;
+ os2*) os='OS/2';;
+ openbsd*) os='OpenBSD';;
+ nsk*) os='NonStop Kernel';;
+ nonstopux*) os='NonStop-UX';;
+ netbsd*-gnu*) os='GNU/NetBSD';; # NetBSD kernel+libc, GNU userland
+ netbsd*) os='NetBSD';;
+ knetbsd*-gnu) os='GNU/kNetBSD';; # NetBSD kernel, GNU libc+userland
+ kfreebsd*-gnu) os='GNU/kFreeBSD';; # FreeBSD kernel, GNU libc+userland
+ msdosdjgpp*) os='DJGPP';;
+ mpeix*) os='MPE/iX';;
+ mint*) os='MiNT';;
+ mingw*) os='MinGW';;
+ lynxos*) os='LynxOS';;
+ linux*) os='GNU/Linux';;
+ hpux*) os='HP-UX';;
+ hiux*) os='HI-UX';;
+ gnu*) os='GNU';;
+ freebsd*) os='FreeBSD';;
+ dgux*) os='DG/UX';;
+ bsdi*) os='BSD/OS';;
+ bsd*) os='BSD';;
+ beos*) os='BeOS';;
+ aux*) os='A/UX';;
+ atheos*) os='AtheOS';;
+ amigaos*) os='Amiga OS';;
+ aix*) os='AIX';;
+
+ # The default heuristic takes the initial alphabetic string
+ # from $host_os, but capitalizes its first letter.
+ [A-Za-z]*)
+ os=`
+ expr "X$host_os" : 'X\([A-Za-z]\)' | tr '[a-z]' '[A-Z]'
+ ``
+ expr "X$host_os" : 'X.\([A-Za-z]*\)'
+ `
+ ;;
+
+ # If $host_os does not start with an alphabetic string, use it unchanged.
+ *)
+ os=$host_os;;
+ esac
+ gl_cv_host_operating_system=$os]])
+ AC_DEFINE_UNQUOTED(HOST_OPERATING_SYSTEM,
+ "$gl_cv_host_operating_system",
+ [The host operating system.])
+])
diff --git a/m4/human.m4 b/m4/human.m4
new file mode 100644
index 0000000..72f2176
--- /dev/null
+++ b/m4/human.m4
@@ -0,0 +1,13 @@
+#serial 10
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_HUMAN],
+[
+ AC_LIBOBJ([human])
+
+ dnl Prerequisites of lib/human.c.
+ :
+])
diff --git a/m4/i-ring.m4 b/m4/i-ring.m4
new file mode 100644
index 0000000..2c51225
--- /dev/null
+++ b/m4/i-ring.m4
@@ -0,0 +1,10 @@
+# serial 1
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_I_RING],
+[
+ AC_LIBOBJ([i-ring])
+])
diff --git a/m4/iconv.m4 b/m4/iconv.m4
new file mode 100644
index 0000000..654c415
--- /dev/null
+++ b/m4/iconv.m4
@@ -0,0 +1,101 @@
+# iconv.m4 serial AM4 (gettext-0.11.3)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable GNU libiconv installed).
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed libiconv and not disabled its use
+ dnl via --without-libiconv-prefix, he wants to use it. The first
+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+ am_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+ AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_func_iconv=yes)
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes)
+ LIBS="$am_save_LIBS"
+ fi
+ ])
+ if test "$am_cv_func_iconv" = yes; then
+ AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ AC_MSG_CHECKING([how to link with libiconv])
+ AC_MSG_RESULT([$LIBICONV])
+ else
+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+ dnl either.
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+ AC_SUBST(LIBICONV)
+ AC_SUBST(LTLIBICONV)
+])
+
+AC_DEFUN([AM_ICONV],
+[
+ AM_ICONV_LINK
+ if test "$am_cv_func_iconv" = yes; then
+ AC_MSG_CHECKING([for iconv declaration])
+ AC_CACHE_VAL(am_cv_proto_iconv, [
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ AC_MSG_RESULT([$]{ac_t:-
+ }[$]am_cv_proto_iconv)
+ AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+ [Define as const if the declaration of iconv() needs const.])
+ fi
+])
diff --git a/m4/idcache.m4 b/m4/idcache.m4
new file mode 100644
index 0000000..8bb2fc9
--- /dev/null
+++ b/m4/idcache.m4
@@ -0,0 +1,10 @@
+# idcache.m4 serial 6
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_IDCACHE],
+[
+ AC_LIBOBJ([idcache])
+])
diff --git a/m4/inet_ntop.m4 b/m4/inet_ntop.m4
new file mode 100644
index 0000000..bb02d22
--- /dev/null
+++ b/m4/inet_ntop.m4
@@ -0,0 +1,19 @@
+# inet_ntop.m4 serial 3
+dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_INET_NTOP],
+[
+ AC_REPLACE_FUNCS(inet_ntop)
+ gl_PREREQ_INET_NTOP
+])
+
+# Prerequisites of lib/inet_ntop.h and lib/inet_ntop.c.
+AC_DEFUN([gl_PREREQ_INET_NTOP], [
+ AC_CHECK_HEADERS_ONCE([netinet/in.h arpa/inet.h])
+ AC_CHECK_DECLS([inet_ntop],,,[#include <arpa/inet.h>])
+ AC_REQUIRE([gl_SOCKET_FAMILIES])
+ AC_REQUIRE([AC_C_RESTRICT])
+])
diff --git a/m4/inline.m4 b/m4/inline.m4
new file mode 100644
index 0000000..a07076c
--- /dev/null
+++ b/m4/inline.m4
@@ -0,0 +1,40 @@
+# inline.m4 serial 3
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Test for the 'inline' keyword or equivalent.
+dnl Define 'inline' to a supported equivalent, or to nothing if not supported,
+dnl like AC_C_INLINE does. Also, define HAVE_INLINE if 'inline' or an
+dnl equivalent is effectively supported, i.e. if the compiler is likely to
+dnl drop unused 'static inline' functions.
+AC_DEFUN([gl_INLINE],
+[
+ AC_REQUIRE([AC_C_INLINE])
+ AC_CACHE_CHECK([whether the compiler generally respects inline],
+ [gl_cv_c_inline_effective],
+ [if test $ac_cv_c_inline = no; then
+ gl_cv_c_inline_effective=no
+ else
+ dnl GCC defines __NO_INLINE__ if not optimizing or if -fno-inline is
+ dnl specified.
+ dnl Use AC_COMPILE_IFELSE here, not AC_EGREP_CPP, because the result
+ dnl depends on optimization flags, which can be in CFLAGS.
+ dnl (AC_EGREP_CPP looks only at the CPPFLAGS.)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[]],
+ [[#ifdef __NO_INLINE__
+ #error "inline is not effective"
+ #endif]])],
+ [gl_cv_c_inline_effective=yes],
+ [gl_cv_c_inline_effective=no])
+ fi
+ ])
+ if test $gl_cv_c_inline_effective = yes; then
+ AC_DEFINE([HAVE_INLINE], 1,
+ [Define to 1 if the compiler supports one of the keywords
+ 'inline', '__inline__', '__inline' and effectively inlines
+ functions marked as such.])
+ fi
+])
diff --git a/m4/intmax_t.m4 b/m4/intmax_t.m4
new file mode 100644
index 0000000..17c7b0a
--- /dev/null
+++ b/m4/intmax_t.m4
@@ -0,0 +1,61 @@
+# intmax_t.m4 serial 5
+dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+AC_PREREQ(2.13)
+
+# Define intmax_t to 'long' or 'long long'
+# if it is not already defined in <stdint.h> or <inttypes.h>.
+
+AC_DEFUN([gl_AC_TYPE_INTMAX_T],
+[
+ dnl For simplicity, we assume that a header file defines 'intmax_t' if and
+ dnl only if it defines 'uintmax_t'.
+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+ if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
+ AC_REQUIRE([gl_AC_TYPE_LONG_LONG])
+ test $ac_cv_type_long_long = yes \
+ && ac_type='long long' \
+ || ac_type='long'
+ AC_DEFINE_UNQUOTED(intmax_t, $ac_type,
+ [Define to long or long long if <inttypes.h> and <stdint.h> don't define.])
+ else
+ AC_DEFINE(HAVE_INTMAX_T, 1,
+ [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
+ fi
+])
+
+dnl An alternative would be to explicitly test for 'intmax_t'.
+
+AC_DEFUN([gt_AC_TYPE_INTMAX_T],
+[
+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+ AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
+ [AC_TRY_COMPILE([
+#include <stddef.h>
+#include <stdlib.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+#include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+#include <inttypes.h>
+#endif
+], [intmax_t x = -1; return !x;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
+ if test $gt_cv_c_intmax_t = yes; then
+ AC_DEFINE(HAVE_INTMAX_T, 1,
+ [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
+ else
+ AC_REQUIRE([gl_AC_TYPE_LONG_LONG])
+ test $ac_cv_type_long_long = yes \
+ && ac_type='long long' \
+ || ac_type='long'
+ AC_DEFINE_UNQUOTED(intmax_t, $ac_type,
+ [Define to long or long long if <stdint.h> and <inttypes.h> don't define.])
+ fi
+])
diff --git a/m4/inttostr.m4 b/m4/inttostr.m4
new file mode 100644
index 0000000..0a41fad
--- /dev/null
+++ b/m4/inttostr.m4
@@ -0,0 +1,37 @@
+#serial 7
+dnl Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_INTTOSTR],
+[
+ AC_LIBOBJ([imaxtostr])
+ AC_LIBOBJ([offtostr])
+ AC_LIBOBJ([umaxtostr])
+ AC_LIBOBJ([uinttostr])
+
+ gl_PREREQ_INTTOSTR
+ gl_PREREQ_IMAXTOSTR
+ gl_PREREQ_OFFTOSTR
+ gl_PREREQ_UMAXTOSTR
+ gl_PREREQ_UINTTOSTR
+])
+
+# Prerequisites of lib/inttostr.h.
+AC_DEFUN([gl_PREREQ_INTTOSTR], [
+ AC_REQUIRE([AC_TYPE_OFF_T])
+ :
+])
+
+# Prerequisites of lib/imaxtostr.c.
+AC_DEFUN([gl_PREREQ_IMAXTOSTR], [:])
+
+# Prerequisites of lib/offtostr.c.
+AC_DEFUN([gl_PREREQ_OFFTOSTR], [:])
+
+# Prerequisites of lib/umaxtostr.c.
+AC_DEFUN([gl_PREREQ_UMAXTOSTR], [:])
+
+# Prerequisites of lib/uinttostr.c.
+AC_DEFUN([gl_PREREQ_UINTTOSTR], [:])
diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4
new file mode 100644
index 0000000..7c7f894
--- /dev/null
+++ b/m4/inttypes-pri.m4
@@ -0,0 +1,36 @@
+# inttypes-pri.m4 serial 4 (gettext-0.16)
+dnl Copyright (C) 1997-2002, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ(2.52)
+
+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
+# macros to non-string values. This is the case on AIX 4.3.3.
+
+AC_DEFUN([gt_INTTYPES_PRI],
+[
+ AC_CHECK_HEADERS([inttypes.h])
+ if test $ac_cv_header_inttypes_h = yes; then
+ AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
+ gt_cv_inttypes_pri_broken,
+ [
+ AC_TRY_COMPILE([#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
+ ])
+ fi
+ if test "$gt_cv_inttypes_pri_broken" = yes; then
+ AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
+ [Define if <inttypes.h> exists and defines unusable PRI* macros.])
+ PRI_MACROS_BROKEN=1
+ else
+ PRI_MACROS_BROKEN=0
+ fi
+ AC_SUBST([PRI_MACROS_BROKEN])
+])
diff --git a/m4/inttypes.m4 b/m4/inttypes.m4
new file mode 100644
index 0000000..095ace9
--- /dev/null
+++ b/m4/inttypes.m4
@@ -0,0 +1,223 @@
+# inttypes.m4 serial 8
+dnl Copyright (C) 2006-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Derek Price, Bruno Haible.
+dnl Test whether <inttypes.h> is supported or must be substituted.
+
+AC_DEFUN([gl_INTTYPES_H],
+[
+ AC_REQUIRE([gl_STDINT_H])
+ AC_REQUIRE([gt_INTTYPES_PRI])
+ AC_CHECK_DECLS_ONCE([imaxabs])
+ AC_CHECK_DECLS_ONCE([imaxdiv])
+ AC_CHECK_DECLS_ONCE([strtoimax])
+ AC_CHECK_DECLS_ONCE([strtoumax])
+
+ dnl Now see if we need a substitute <inttypes.h>.
+ dnl A complete <inttypes.h> requires
+ dnl - a complete <stdint.h>,
+ dnl - the existence of an <inttypes.h>,
+ dnl - that imaxabs, imaxdiv, strtoimax, strtoumax are declared,
+ dnl - some additional tests.
+ AC_CACHE_CHECK([whether inttypes.h conforms to C99],
+ [gl_cv_header_working_inttypes_h],
+ [gl_cv_header_working_inttypes_h=no
+ if test "$gl_cv_header_working_stdint_h" = yes \
+ && test $ac_cv_header_inttypes_h = yes \
+ && test "$ac_cv_have_decl_imaxabs" = yes \
+ && test "$ac_cv_have_decl_imaxdiv" = yes \
+ && test "$ac_cv_have_decl_strtoimax" = yes \
+ && test "$ac_cv_have_decl_strtoumax" = yes; then
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([
+#include <stddef.h>
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */
+#include ABSOLUTE_INTTYPES_H
+
+/* No need to duplicate the tests of stdint.m4; they are subsumed by
+ $gl_cv_header_working_stdint_h = yes. */
+
+/* Tests for macros supposed to be defined in inttypes.h. */
+
+const char *k = /* implicit string concatenation */
+#ifdef INT8_MAX
+ PRId8 PRIi8
+#endif
+#ifdef UINT8_MAX
+ PRIo8 PRIu8 PRIx8 PRIX8
+#endif
+#ifdef INT16_MAX
+ PRId16 PRIi16
+#endif
+#ifdef UINT16_MAX
+ PRIo16 PRIu16 PRIx16 PRIX16
+#endif
+#ifdef INT32_MAX
+ PRId32 PRIi32
+#endif
+#ifdef UINT32_MAX
+ PRIo32 PRIu32 PRIx32 PRIX32
+#endif
+#ifdef INT64_MAX
+ PRId64 PRIi64
+#endif
+#ifdef UINT64_MAX
+ PRIo64 PRIu64 PRIx64 PRIX64
+#endif
+ PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8
+ PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16
+ PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32
+ PRIdLEAST64 PRIiLEAST64
+ PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64
+ PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8
+ PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16
+ PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32
+ PRIdFAST64 PRIiFAST64
+ PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64
+ PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX
+#ifdef INTPTR_MAX
+ PRIdPTR PRIiPTR
+#endif
+#ifdef UINTPTR_MAX
+ PRIoPTR PRIuPTR PRIxPTR PRIXPTR
+#endif
+ ;
+const char *l = /* implicit string concatenation */
+#ifdef INT8_MAX
+ SCNd8 SCNi8
+#endif
+#ifdef UINT8_MAX
+ SCNo8 SCNu8 SCNx8
+#endif
+#ifdef INT16_MAX
+ SCNd16 SCNi16
+#endif
+#ifdef UINT16_MAX
+ SCNo16 SCNu16 SCNx16
+#endif
+#ifdef INT32_MAX
+ SCNd32 SCNi32
+#endif
+#ifdef UINT32_MAX
+ SCNo32 SCNu32 SCNx32
+#endif
+#ifdef INT64_MAX
+ SCNd64 SCNi64
+#endif
+#ifdef UINT64_MAX
+ SCNo64 SCNu64 SCNx64
+#endif
+ SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8
+ SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16
+ SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32
+ SCNdLEAST64 SCNiLEAST64
+ SCNoLEAST64 SCNuLEAST64 SCNxLEAST64
+ SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8
+ SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16
+ SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32
+ SCNdFAST64 SCNiFAST64
+ SCNoFAST64 SCNuFAST64 SCNxFAST64
+ SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX
+#ifdef INTPTR_MAX
+ SCNdPTR SCNiPTR
+#endif
+#ifdef UINTPTR_MAX
+ SCNoPTR SCNuPTR SCNxPTR
+#endif
+ ;
+ ])],
+ [gl_cv_header_working_inttypes_h=yes])
+ fi])
+
+ dnl Override <inttypes.h> always, so that the portability warnings work.
+ if false && test $gl_cv_header_working_inttypes_h = yes; then
+ dnl Use the existing <inttypes.h>.
+ INTTYPES_H=''
+ else
+
+ AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
+ dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h.
+ if test $ac_cv_header_inttypes_h = yes; then
+ gl_ABSOLUTE_HEADER([inttypes.h])
+ ABSOLUTE_INTTYPES_H=\"$gl_cv_absolute_inttypes_h\"
+ else
+ ABSOLUTE_INTTYPES_H=\"no/such/file/inttypes.h\"
+ fi
+ AC_SUBST([ABSOLUTE_INTTYPES_H])
+
+ PRIPTR_PREFIX=
+ if test -n "$STDINT_H"; then
+ dnl Using the gnulib <stdint.h>. It always defines intptr_t to 'long'.
+ PRIPTR_PREFIX='"l"'
+ else
+ dnl Using the system's <stdint.h>.
+ for glpfx in '' l ll I64; do
+ case $glpfx in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ I64) gltype1='__int64';;
+ esac
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([#include <stdint.h>
+ extern intptr_t foo;
+ extern $gltype1 foo;])],
+ [PRIPTR_PREFIX='"'$glpfx'"'])
+ test -n "$PRIPTR_PREFIX" && break
+ done
+ fi
+ AC_SUBST([PRIPTR_PREFIX])
+
+ if test "$ac_cv_have_decl_imaxabs" = yes; then
+ HAVE_DECL_IMAXABS=1
+ else
+ HAVE_DECL_IMAXABS=0
+ fi
+
+ if test "$ac_cv_have_decl_imaxdiv" = yes; then
+ HAVE_DECL_IMAXDIV=1
+ else
+ HAVE_DECL_IMAXDIV=0
+ fi
+
+ if test "$ac_cv_have_decl_strtoimax" = yes; then
+ HAVE_DECL_STRTOIMAX=1
+ else
+ HAVE_DECL_STRTOIMAX=0
+ fi
+
+ if test "$ac_cv_have_decl_strtoumax" = yes; then
+ HAVE_DECL_STRTOUMAX=1
+ else
+ HAVE_DECL_STRTOUMAX=0
+ fi
+
+ INTTYPES_H='inttypes.h'
+ fi
+ AC_SUBST(INTTYPES_H)
+])
+
+AC_DEFUN([gl_INTTYPES_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
+[
+ GNULIB_IMAXABS=0; AC_SUBST([GNULIB_IMAXABS])
+ GNULIB_IMAXDIV=0; AC_SUBST([GNULIB_IMAXDIV])
+ GNULIB_STRTOIMAX=0; AC_SUBST([GNULIB_STRTOIMAX])
+ GNULIB_STRTOUMAX=0; AC_SUBST([GNULIB_STRTOUMAX])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_DECL_IMAXABS=1; AC_SUBST([HAVE_DECL_IMAXABS])
+ HAVE_DECL_IMAXDIV=1; AC_SUBST([HAVE_DECL_IMAXDIV])
+ HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX])
+ HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX])
+])
diff --git a/m4/inttypes_h.m4 b/m4/inttypes_h.m4
new file mode 100644
index 0000000..edc8ecb
--- /dev/null
+++ b/m4/inttypes_h.m4
@@ -0,0 +1,26 @@
+# inttypes_h.m4 serial 7
+dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
+[
+ AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h,
+ [AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <inttypes.h>],
+ [uintmax_t i = (uintmax_t) -1; return !i;],
+ gl_cv_header_inttypes_h=yes,
+ gl_cv_header_inttypes_h=no)])
+ if test $gl_cv_header_inttypes_h = yes; then
+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
+ [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. ])
+ fi
+])
diff --git a/m4/isapipe.m4 b/m4/isapipe.m4
new file mode 100644
index 0000000..04e6934
--- /dev/null
+++ b/m4/isapipe.m4
@@ -0,0 +1,89 @@
+# Test whether a file descriptor is a pipe.
+
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+AC_DEFUN([gl_ISAPIPE],
+[
+ # OpenVMS has isapipe already, so check for it.
+ AC_REPLACE_FUNCS(isapipe)
+ if test $ac_cv_func_isapipe = no; then
+ gl_PREREQ_ISAPIPE
+ fi
+])
+
+# Prerequisites of lib/isapipe.c.
+AC_DEFUN([gl_PREREQ_ISAPIPE],
+[
+ AC_CACHE_CHECK([whether pipes are FIFOs (and for their link count)],
+ [gl_cv_pipes_are_fifos],
+ [AC_RUN_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #ifndef S_ISFIFO
+ #define S_ISFIFO(m) 0
+ #endif
+ #ifndef S_ISSOCK
+ #define S_ISSOCK(m) 0
+ #endif
+ int
+ main (int argc, char **argv)
+ {
+ int fd[2];
+ struct stat st;
+ if (pipe (fd) != 0 || fstat (fd[0], &st) != 0)
+ return 1;
+ if (2 <= argc && argv[1][0] == '-')
+ {
+ char const *yesno = (S_ISFIFO (st.st_mode) ? "yes" : "no");
+ if (st.st_nlink <= 1)
+ {
+ long int i = st.st_nlink;
+ if (i != st.st_nlink)
+ return 1;
+ printf ("%s (%ld)\n", yesno, i);
+ }
+ else
+ {
+ unsigned long int i = st.st_nlink;
+ if (i != st.st_nlink)
+ return 1;
+ printf ("%s (%lu)\n", yesno, i);
+ }
+ }
+ else
+ {
+ if (! S_ISFIFO (st.st_mode) && ! S_ISSOCK (st.st_mode))
+ return 1;
+ }
+ return 0;
+ }]])],
+ [gl_cv_pipes_are_fifos=`./conftest$ac_exeext -`
+ test -z "$gl_cv_pipes_are_fifos" && gl_cv_pipes_are_fifos=no],
+ [gl_cv_pipes_are_fifos=unknown],
+ [gl_cv_pipes_are_fifos=cross-compiling])])
+
+ case $gl_cv_pipes_are_fifos in #(
+ 'yes ('*')')
+ AC_DEFINE([HAVE_FIFO_PIPES], 1,
+ [Define to 1 if pipes are FIFOs, 0 if sockets. Leave undefined
+ if not known.]);; #(
+ 'no ('*')')
+ AC_DEFINE([HAVE_FIFO_PIPES], 0);;
+ esac
+
+ case $gl_cv_pipes_are_fifos in #(
+ *'('*')')
+ AC_DEFINE_UNQUOTED([PIPE_LINK_COUNT_MAX],
+ [`expr "$gl_cv_pipes_are_fifos" : '.*\((.*)\)'`],
+ [Define to the maximum link count that a true pipe can have.]);;
+ esac
+])
diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4
new file mode 100644
index 0000000..2595542
--- /dev/null
+++ b/m4/jm-macros.m4
@@ -0,0 +1,180 @@
+#serial 105 -*- autoconf -*-
+
+dnl Misc type-related macros for coreutils.
+
+# Copyright (C) 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Written by Jim Meyering.
+
+AC_DEFUN([coreutils_MACROS],
+[
+ GNU_PACKAGE="GNU $PACKAGE"
+ AC_DEFINE_UNQUOTED(GNU_PACKAGE, "$GNU_PACKAGE",
+ [The concatenation of the strings `GNU ', and PACKAGE.])
+ AC_SUBST(GNU_PACKAGE)
+
+ AM_MISSING_PROG(HELP2MAN, help2man)
+ AC_SUBST(OPTIONAL_BIN_PROGS)
+ AC_SUBST(MAN)
+ AC_SUBST(DF_PROG)
+
+ dnl This macro actually runs replacement code. See isc-posix.m4.
+ AC_REQUIRE([AC_ISC_POSIX])dnl
+
+ gl_CHECK_ALL_TYPES
+
+ AC_REQUIRE([gl_CHECK_DECLS])
+
+ AC_REQUIRE([gl_PREREQ])
+
+ AC_REQUIRE([AC_FUNC_FSEEKO])
+
+ # By default, argmatch should fail calling usage (1).
+ AC_DEFINE(ARGMATCH_DIE, [usage (1)],
+ [Define to the function xargmatch calls on failures.])
+ AC_DEFINE(ARGMATCH_DIE_DECL, [extern void usage ()],
+ [Define to the declaration of the xargmatch failure function.])
+
+ # used by ls
+ AC_REQUIRE([gl_CLOCK_TIME])
+ # used by shred
+ AC_CHECK_FUNCS_ONCE(directio)
+
+ AC_CHECK_FUNCS_ONCE( \
+ endgrent \
+ endpwent \
+ fchown \
+ fchmod \
+ ftruncate \
+ iswspace \
+ mkfifo \
+ mbrlen \
+ setgroups \
+ sethostname \
+ siginterrupt \
+ sync \
+ sysctl \
+ sysinfo \
+ tcgetpgrp \
+ )
+
+ dnl This can't use AC_REQUIRE; I'm not quite sure why.
+ cu_PREREQ_STAT_PROG
+
+ # for dd.c and shred.c
+ coreutils_saved_libs=$LIBS
+ AC_SEARCH_LIBS([fdatasync], [rt posix4],
+ [test "$ac_cv_search_fdatasync" = "none required" ||
+ LIB_FDATASYNC=$ac_cv_search_fdatasync])
+ AC_SUBST([LIB_FDATASYNC])
+ AC_CHECK_FUNCS(fdatasync)
+ LIBS=$coreutils_saved_libs
+
+ # See if linking `seq' requires -lm.
+ # It does on nearly every system. The single exception (so far) is
+ # BeOS which has all the math functions in the normal runtime library
+ # and doesn't have a separate math library.
+
+ AC_SUBST(SEQ_LIBM)
+ ac_seq_body='
+ static double x, y;
+ x = floor (x);
+ x = rint (x);
+ x = modf (x, &y);'
+ AC_TRY_LINK([#include <math.h>], $ac_seq_body, ,
+ [ac_seq_save_LIBS="$LIBS"
+ LIBS="$LIBS -lm"
+ AC_TRY_LINK([#include <math.h>], $ac_seq_body, SEQ_LIBM=-lm)
+ LIBS="$ac_seq_save_LIBS"
+ ])
+
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+
+ # 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_DEFUN([gl_CHECK_ALL_HEADERS],
+[
+ AC_CHECK_HEADERS_ONCE( \
+ hurd.h \
+ paths.h \
+ priv.h \
+ stropts.h \
+ sys/ioctl.h \
+ sys/param.h \
+ sys/resource.h \
+ sys/systeminfo.h \
+ sys/time.h \
+ sys/wait.h \
+ syslog.h \
+ termios.h \
+ )
+ AC_CHECK_HEADERS(sys/sysctl.h, [], [],
+ [AC_INCLUDES_DEFAULT
+ [#if HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif]])
+])
+
+# This macro must be invoked before any tests that run the compiler.
+AC_DEFUN([gl_CHECK_ALL_TYPES],
+[
+ dnl This test must come as early as possible after the compiler configuration
+ dnl tests, because the choice of the file model can (in principle) affect
+ dnl whether functions and headers are available, whether they work, etc.
+ AC_REQUIRE([AC_SYS_LARGEFILE])
+
+ dnl This test must precede tests of compiler characteristics like
+ dnl that for the inline keyword, since it may change the degree to
+ dnl which the compiler supports such features.
+ AC_REQUIRE([AM_C_PROTOTYPES])
+
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_REQUIRE([AC_C_BIGENDIAN])
+ 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],,,
+ [$ac_includes_default
+#include <sys/stat.h>
+ ])
+ AC_REQUIRE([AC_STRUCT_ST_BLOCKS])
+
+ AC_REQUIRE([AC_TYPE_GETGROUPS])
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ AC_REQUIRE([AC_TYPE_MODE_T])
+ AC_REQUIRE([AC_TYPE_OFF_T])
+ AC_REQUIRE([AC_TYPE_PID_T])
+ AC_REQUIRE([AC_TYPE_SIZE_T])
+ AC_REQUIRE([AC_TYPE_UID_T])
+ AC_CHECK_TYPE(ino_t, unsigned long int)
+
+ 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([AC_HEADER_MAJOR])
+])
diff --git a/m4/jm-winsz1.m4 b/m4/jm-winsz1.m4
new file mode 100644
index 0000000..52653b7
--- /dev/null
+++ b/m4/jm-winsz1.m4
@@ -0,0 +1,47 @@
+#serial 9
+
+# Copyright (C) 1996, 1999, 2001, 2002, 2004, 2006 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering and Paul Eggert.
+AC_DEFUN([gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H],
+[AC_REQUIRE([AC_SYS_POSIX_TERMIOS])
+ AC_CACHE_CHECK([whether use of TIOCGWINSZ requires termios.h],
+ jm_cv_sys_tiocgwinsz_needs_termios_h,
+ [jm_cv_sys_tiocgwinsz_needs_termios_h=no
+
+ if test $ac_cv_sys_posix_termios = yes; then
+ AC_EGREP_CPP([yes],
+ [#include <sys/types.h>
+# include <termios.h>
+# ifdef TIOCGWINSZ
+ yes
+# endif
+ ], jm_cv_sys_tiocgwinsz_needs_termios_h=yes)
+ fi
+ ])
+])
+
+AC_DEFUN([gl_WINSIZE_IN_PTEM],
+ [AC_REQUIRE([AC_SYS_POSIX_TERMIOS])
+ AC_CACHE_CHECK([whether use of struct winsize requires sys/ptem.h],
+ jm_cv_sys_struct_winsize_needs_sys_ptem_h,
+ [jm_cv_sys_struct_winsize_needs_sys_ptem_h=yes
+ if test $ac_cv_sys_posix_termios = yes; then
+ AC_TRY_COMPILE([#include <termios.h>],
+ [struct winsize x;
+ if (sizeof x > 0) return 0;],
+ [jm_cv_sys_struct_winsize_needs_sys_ptem_h=no])
+ fi
+ if test $jm_cv_sys_struct_winsize_needs_sys_ptem_h = yes; then
+ AC_TRY_COMPILE([#include <sys/ptem.h>],
+ [struct winsize x;
+ if (sizeof x > 0) return 0;],
+ [], [jm_cv_sys_struct_winsize_needs_sys_ptem_h=no])
+ fi])
+ if test $jm_cv_sys_struct_winsize_needs_sys_ptem_h = yes; then
+ AC_DEFINE([WINSIZE_IN_PTEM], 1,
+ [Define if sys/ptem.h is required for struct winsize.])
+ fi])
diff --git a/m4/jm-winsz2.m4 b/m4/jm-winsz2.m4
new file mode 100644
index 0000000..66c5040
--- /dev/null
+++ b/m4/jm-winsz2.m4
@@ -0,0 +1,28 @@
+#serial 6
+
+# Copyright (C) 1996, 1999, 2001, 2004 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL],
+[AC_REQUIRE([gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H])
+ AC_CACHE_CHECK([whether use of TIOCGWINSZ requires sys/ioctl.h],
+ jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h,
+ [jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
+
+ if test $jm_cv_sys_tiocgwinsz_needs_termios_h = no; then
+ AC_EGREP_CPP([yes],
+ [#include <sys/types.h>
+# include <sys/ioctl.h>
+# ifdef TIOCGWINSZ
+ yes
+# endif
+ ], jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes)
+ fi
+ ])
+ if test $jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
+ AC_DEFINE(GWINSZ_IN_SYS_IOCTL, 1,
+ [Define if your system defines TIOCGWINSZ in sys/ioctl.h.])
+ fi
+])
diff --git a/m4/lchmod.m4 b/m4/lchmod.m4
new file mode 100644
index 0000000..06467a0
--- /dev/null
+++ b/m4/lchmod.m4
@@ -0,0 +1,14 @@
+#serial 2
+
+dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+dnl Provide a replacement for lchmod on hosts that lack it.
+
+AC_DEFUN([gl_FUNC_LCHMOD],
+[
+ AC_CHECK_FUNCS_ONCE([lchmod])
+])
diff --git a/m4/lchown.m4 b/m4/lchown.m4
new file mode 100644
index 0000000..a7b3572
--- /dev/null
+++ b/m4/lchown.m4
@@ -0,0 +1,19 @@
+#serial 11
+
+dnl Copyright (C) 1998, 2001, 2003, 2004, 2005, 2006 Free Software
+dnl Foundation, Inc.
+
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering.
+dnl Provide lchown on systems that lack it.
+
+AC_DEFUN([gl_FUNC_LCHOWN],
+[
+ AC_REQUIRE([AC_TYPE_UID_T])
+ AC_REQUIRE([gl_FUNC_CHOWN])
+ AC_CHECK_DECLS_ONCE([lchown])
+ AC_REPLACE_FUNCS(lchown)
+])
diff --git a/m4/lib-check.m4 b/m4/lib-check.m4
new file mode 100644
index 0000000..2123767
--- /dev/null
+++ b/m4/lib-check.m4
@@ -0,0 +1,61 @@
+#serial 10
+
+dnl Misc lib-related macros for coreutils.
+
+# Copyright (C) 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2003, 2004,
+# 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Written by Jim Meyering.
+
+AC_DEFUN([cu_LIB_CHECK],
+[
+
+ # Check for libypsec.a on Dolphin M88K machines.
+ AC_CHECK_LIB(ypsec, main)
+
+ # m88k running dgux 5.4 needs this
+ AC_CHECK_LIB(ldgc, main)
+
+ # The -lsun library is required for YP support on Irix-4.0.5 systems.
+ # m88k/svr3 DolphinOS systems using YP need -lypsec for id.
+ AC_SEARCH_LIBS(yp_match, [sun ypsec])
+
+ # SysV needs -lsec, older versions of Linux need -lshadow for
+ # shadow passwords. UnixWare 7 needs -lgen.
+ AC_SEARCH_LIBS(getspnam, [shadow sec gen])
+
+ AC_CHECK_HEADERS(shadow.h)
+
+ # Requirements for su.c.
+ shadow_includes="\
+$ac_includes_default
+#if HAVE_SHADOW_H
+# include <shadow.h>
+#endif
+"
+ AC_CHECK_MEMBERS([struct spwd.sp_pwdp],,,[$shadow_includes])
+ AC_CHECK_FUNCS(getspnam)
+
+ # SCO-ODT-3.0 is reported to need -lufc for crypt.
+ # NetBSD needs -lcrypt for crypt.
+ cu_saved_libs="$LIBS"
+ AC_SEARCH_LIBS(crypt, [ufc crypt],
+ [test "$ac_cv_search_crypt" = "none required" ||
+ LIB_CRYPT="$ac_cv_search_crypt"])
+ LIBS="$cu_saved_libs"
+ AC_SUBST(LIB_CRYPT)
+])
diff --git a/m4/lib-ignore.m4 b/m4/lib-ignore.m4
new file mode 100644
index 0000000..e518f81
--- /dev/null
+++ b/m4/lib-ignore.m4
@@ -0,0 +1,43 @@
+# If possible, ignore libraries that are not depended on.
+
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+AC_DEFUN([gl_IGNORE_UNUSED_LIBRARIES],
+[
+ AC_CACHE_CHECK([for flag to ignore unused libraries],
+ [gl_cv_ignore_unused_libraries],
+ [gl_cv_ignore_unused_libraries=none
+ gl_saved_ldflags=$LDFLAGS
+ gl_saved_libs=$LIBS
+ # Link with -lm to detect binutils 2.16 bug with --as-needed; see
+ # <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00131.html>.
+ LIBS="$LIBS -lm"
+ # Use long option sequences like '-z ignore' to test for the feature,
+ # to forestall problems with linkers that have -z, -i, -g, -n, etc. flags.
+ # GCC + binutils likes '-Wl,--as-needed'.
+ # GCC + Solaris ld likes '-Wl,-z,ignore'.
+ # Sun C likes '-z ignore'.
+ # Don't try bare '--as-needed'; nothing likes it and the HP-UX 11.11
+ # native cc issues annoying warnings and then ignores it,
+ # which would cause us to incorrectly conclude that it worked.
+ for gl_flags in \
+ '-Wl,--as-needed' \
+ '-Wl,-z,ignore' \
+ '-z ignore'
+ do
+ LDFLAGS="$gl_flags $LDFLAGS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM()],
+ [gl_cv_ignore_unused_libraries=$gl_flags])
+ LDFLAGS=$gl_saved_ldflags
+ test "$gl_cv_ignore_unused_libraries" != none && break
+ done
+ LIBS=$gl_saved_libs])
+
+ test "$gl_cv_ignore_unused_libraries" != none &&
+ LDFLAGS="$LDFLAGS $gl_cv_ignore_unused_libraries"
+])
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4
new file mode 100644
index 0000000..96c4e2c
--- /dev/null
+++ b/m4/lib-ld.m4
@@ -0,0 +1,110 @@
+# lib-ld.m4 serial 3 (gettext-0.13)
+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes ;;
+*)
+ acl_cv_prog_gnu_ld=no ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH(gnu-ld,
+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
+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.
+ AC_MSG_CHECKING([for ld used by GCC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]* | [A-Za-z]:[\\/]*)]
+ [re_direlt='/[^/][^/]*/\.\./']
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(acl_cv_path_LD,
+[if test -z "$LD"; then
+ 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
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break ;;
+ *)
+ test "$with_gnu_ld" != yes && break ;;
+ esac
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4
new file mode 100644
index 0000000..f157d98
--- /dev/null
+++ b/m4/lib-link.m4
@@ -0,0 +1,709 @@
+# lib-link.m4 serial 13 (gettext-0.16.2)
+dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ(2.54)
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+ ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
+ ])
+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+ LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ AC_SUBST([LIB]NAME[_PREFIX])
+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+ dnl results of this search when this library appears as a dependency.
+ HAVE_LIB[]NAME=yes
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. If found, it
+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed lib[]Name and not disabled its use
+ dnl via --without-lib[]Name-prefix, he wants to use it.
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIB[]NAME"
+ AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+ LIBS="$ac_save_LIBS"
+ ])
+ if test "$ac_cv_lib[]Name" = yes; then
+ HAVE_LIB[]NAME=yes
+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
+ AC_MSG_CHECKING([how to link with lib[]$1])
+ AC_MSG_RESULT([$LIB[]NAME])
+ else
+ HAVE_LIB[]NAME=no
+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+ dnl $INC[]NAME either.
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIB[]NAME=
+ LTLIB[]NAME=
+ LIB[]NAME[]_PREFIX=
+ fi
+ AC_SUBST([HAVE_LIB]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ AC_SUBST([LIB]NAME[_PREFIX])
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl acl_libext,
+dnl acl_shlibext,
+dnl acl_hardcode_libdir_flag_spec,
+dnl acl_hardcode_libdir_separator,
+dnl acl_hardcode_direct,
+dnl acl_hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+ dnl Tell automake >= 1.10 to complain if config.rpath is missing.
+ m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+ AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+ ])
+ wl="$acl_cv_wl"
+ acl_libext="$acl_cv_libext"
+ acl_shlibext="$acl_cv_shlibext"
+ acl_libname_spec="$acl_cv_libname_spec"
+ acl_library_names_spec="$acl_cv_library_names_spec"
+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ acl_hardcode_direct="$acl_cv_hardcode_direct"
+ acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ dnl Determine whether the user wants rpath handling at all.
+ AC_ARG_ENABLE(rpath,
+ [ --disable-rpath do not hardcode runtime library paths],
+ :, enable_rpath=yes)
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ dnl Autoconf >= 2.61 supports dots in --with options.
+ define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
+[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
+ --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ fi
+ fi
+])
+ dnl Search the library and its dependencies in $additional_libdir and
+ dnl $LDFLAGS. Using breadth-first-seach.
+ LIB[]NAME=
+ LTLIB[]NAME=
+ INC[]NAME=
+ LIB[]NAME[]_PREFIX=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='$1 $2'
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+ dnl or AC_LIB_HAVE_LINKFLAGS call.
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+ else
+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+ dnl that this library doesn't exist. So just drop it.
+ :
+ fi
+ else
+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
+ if test -n "$acl_shlibext"; then
+ shrext=".$acl_shlibext" # typically: shrext=.so
+ else
+ shrext=
+ fi
+ if test $use_additional = yes; then
+ dir="$additional_libdir"
+ dnl The same code as in the loop below:
+ dnl First look for a shared library.
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ dnl Then look for a static library.
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ dnl First look for a shared library.
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ dnl Then look for a static library.
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ dnl Found the library.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ dnl Linking with a shared library. We attempt to hardcode its
+ dnl directory into the executable's runpath, unless it's the
+ dnl standard /usr/lib.
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
+ dnl No hardcoding is needed.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ dnl The hardcoding into $LIBNAME is system dependent.
+ if test "$acl_hardcode_direct" = yes; then
+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+ dnl resulting binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ dnl Rely on "-L$found_dir".
+ dnl But don't add it if it's already contained in the LDFLAGS
+ dnl or the already constructed $LIBNAME
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+ fi
+ if test "$acl_hardcode_minus_L" != no; then
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
+ dnl here, because this doesn't fit in flags passed to the
+ dnl compiler. So give up. No hardcoding. This affects only
+ dnl very old systems.
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ dnl Linking with a static library.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+ else
+ dnl We shouldn't come here, but anyway it's good to have a
+ dnl fallback.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+ fi
+ fi
+ dnl Assume the include files are nearby.
+ additional_includedir=
+ case "$found_dir" in
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ LIB[]NAME[]_PREFIX="$basedir"
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ dnl Potentially add $additional_includedir to $INCNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 3. if it's already present in $CPPFLAGS or the already
+ dnl constructed $INCNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INC[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $INCNAME.
+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ dnl Look for dependencies.
+ if test -n "$found_la"; then
+ dnl Read the .la file. It defines the variables
+ dnl dlname, library_names, old_library, dependency_libs, current,
+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ dnl We use only dependency_libs.
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 3. if it's already present in $LDFLAGS or the already
+ dnl constructed $LIBNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LIBNAME.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LTLIBNAME.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ dnl Handle this in the next round.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ dnl Handle this in the next round. Throw away the .la's
+ dnl directory; it is already contained in a preceding -L
+ dnl option.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ dnl Most likely an immediate library name.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ dnl Didn't find the library; assume it is in the system directories
+ dnl known to the linker and runtime loader. (All the system
+ dnl directories known to the linker should also be known to the
+ dnl runtime loader, otherwise the system is severely misconfigured.)
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user must
+ dnl pass all path elements in one option. We can arrange that for a
+ dnl single library, but not when more than one $LIBNAMEs are used.
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+ done
+ dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ dnl When using libtool, the option that works for both libraries and
+ dnl executables is -R. The -R options are cumulative.
+ for found_dir in $ltrpathdirs; do
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+ done
+ fi
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+ for element in [$2]; do
+ haveit=
+ for x in $[$1]; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ [$1]="${[$1]}${[$1]:+ }$element"
+ fi
+ done
+])
+
+dnl For those cases where a variable contains several -L and -l options
+dnl referring to unknown libraries and directories, this macro determines the
+dnl necessary additional linker options for the runtime path.
+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
+dnl otherwise linking without libtool is assumed.
+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
+[
+ AC_REQUIRE([AC_LIB_RPATH])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ $1=
+ if test "$enable_rpath" != no; then
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode directories into the resulting
+ dnl binary.
+ rpathdirs=
+ next=
+ for opt in $2; do
+ if test -n "$next"; then
+ dir="$next"
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next=
+ else
+ case $opt in
+ -L) next=yes ;;
+ -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next= ;;
+ *) next= ;;
+ esac
+ fi
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n ""$3""; then
+ dnl libtool is used for linking. Use -R options.
+ for dir in $rpathdirs; do
+ $1="${$1}${$1:+ }-R$dir"
+ done
+ else
+ dnl The linker is used for linking directly.
+ if test -n "$acl_hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user
+ dnl must pass all path elements in one option.
+ alldirs=
+ for dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="${$1}${$1:+ }$flag"
+ done
+ fi
+ fi
+ fi
+ fi
+ fi
+ AC_SUBST([$1])
+])
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4
new file mode 100644
index 0000000..a8684e1
--- /dev/null
+++ b/m4/lib-prefix.m4
@@ -0,0 +1,185 @@
+# lib-prefix.m4 serial 5 (gettext-0.15)
+dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl 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
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ 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],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ fi
+ fi
+])
+ if test $use_additional = yes; then
+ dnl Potentially add $additional_includedir to $CPPFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's already present in $CPPFLAGS,
+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ for x in $CPPFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $CPPFLAGS.
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ dnl Potentially add $additional_libdir to $LDFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's already present in $LDFLAGS,
+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+ haveit=
+ for x in $LDFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LDFLAGS.
+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+ dnl Unfortunately, prefix and exec_prefix get only finally determined
+ dnl at the end of configure.
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ $1
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
+dnl the basename of the libdir, either "lib" or "lib64".
+AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
+[
+ dnl There is no formal standard regarding lib and lib64. The current
+ dnl practice is that on a system supporting 32-bit and 64-bit instruction
+ dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
+ dnl libraries go under $prefix/lib. We determine the compiler's default
+ dnl mode by looking at the compiler's library search path. If at least
+ dnl of its elements ends in /lib64 or points to a directory whose absolute
+ dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
+ dnl default, namely "lib".
+ acl_libdirstem=lib
+ searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib64 ) acl_libdirstem=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ fi
+])
diff --git a/m4/link-follow.m4 b/m4/link-follow.m4
new file mode 100644
index 0000000..69a7018
--- /dev/null
+++ b/m4/link-follow.m4
@@ -0,0 +1,64 @@
+#serial 9
+dnl Run a program to determine whether link(2) follows symlinks.
+dnl Set LINK_FOLLOWS_SYMLINKS accordingly.
+
+# Copyright (C) 1999, 2000, 2001, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_AC_FUNC_LINK_FOLLOWS_SYMLINK],
+[dnl
+ AC_CACHE_CHECK(
+ [whether link(2) dereferences a symlink specified with a trailing slash],
+ jm_ac_cv_func_link_follows_symlink,
+ [
+ # Create a regular file.
+ echo > conftest.file
+ AC_TRY_RUN(
+ [
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <unistd.h>
+# include <stdlib.h>
+
+# define SAME_INODE(Stat_buf_1, Stat_buf_2) \
+ ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
+ && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)
+
+ int
+ main ()
+ {
+ const char *file = "conftest.file";
+ const char *sym = "conftest.sym";
+ const char *hard = "conftest.hard";
+ struct stat sb_file, sb_hard;
+
+ /* Create a symlink to the regular file. */
+ if (symlink (file, sym))
+ abort ();
+
+ /* Create a hard link to that symlink. */
+ if (link (sym, hard))
+ abort ();
+
+ if (lstat (hard, &sb_hard))
+ abort ();
+ if (lstat (file, &sb_file))
+ abort ();
+
+ /* If the dev/inode of hard and file are the same, then
+ the link call followed the symlink. */
+ return SAME_INODE (sb_hard, sb_file) ? 0 : 1;
+ }
+ ],
+ jm_ac_cv_func_link_follows_symlink=yes,
+ jm_ac_cv_func_link_follows_symlink=no,
+ jm_ac_cv_func_link_follows_symlink=yes dnl We're cross compiling.
+ )
+ ])
+ if test $jm_ac_cv_func_link_follows_symlink = yes; then
+ AC_DEFINE(LINK_FOLLOWS_SYMLINKS, 1,
+ [Define if `link(2)' dereferences symbolic links.])
+ fi
+])
diff --git a/m4/localcharset.m4 b/m4/localcharset.m4
new file mode 100644
index 0000000..b2b7733
--- /dev/null
+++ b/m4/localcharset.m4
@@ -0,0 +1,16 @@
+# localcharset.m4 serial 5
+dnl Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_LOCALCHARSET],
+[
+ dnl Prerequisites of lib/localcharset.c.
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ AC_CHECK_DECLS_ONCE(getc_unlocked)
+
+ dnl Prerequisites of the lib/Makefile.am snippet.
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_GLIBC21])
+])
diff --git a/m4/long-options.m4 b/m4/long-options.m4
new file mode 100644
index 0000000..2712bad
--- /dev/null
+++ b/m4/long-options.m4
@@ -0,0 +1,12 @@
+# long-options.m4 serial 5
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_LONG_OPTIONS],
+[
+ AC_LIBOBJ([long-options])
+
+ dnl Prerequisites of lib/long-options.c.
+])
diff --git a/m4/longdouble.m4 b/m4/longdouble.m4
new file mode 100644
index 0000000..25590f4
--- /dev/null
+++ b/m4/longdouble.m4
@@ -0,0 +1,31 @@
+# longdouble.m4 serial 2 (gettext-0.15)
+dnl Copyright (C) 2002-2003, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether the compiler supports the 'long double' type.
+dnl Prerequisite: AC_PROG_CC
+
+dnl This file is only needed in autoconf <= 2.59. Newer versions of autoconf
+dnl have a macro AC_TYPE_LONG_DOUBLE with identical semantics.
+
+AC_DEFUN([gt_TYPE_LONGDOUBLE],
+[
+ AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
+ [if test "$GCC" = yes; then
+ gt_cv_c_long_double=yes
+ else
+ AC_TRY_COMPILE([
+ /* The Stardent Vistra knows sizeof(long double), but does not support it. */
+ long double foo = 0.0;
+ /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
+ int array [2*(sizeof(long double) >= sizeof(double)) - 1];
+ ], ,
+ gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
+ fi])
+ if test $gt_cv_c_long_double = yes; then
+ AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
+ fi
+])
diff --git a/m4/longlong.m4 b/m4/longlong.m4
new file mode 100644
index 0000000..1f9e862
--- /dev/null
+++ b/m4/longlong.m4
@@ -0,0 +1,72 @@
+# longlong.m4 serial 10
+dnl Copyright (C) 1999-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_LONG_LONG_INT if 'long long int' works.
+# This fixes a bug in Autoconf 2.60, but can be removed once we
+# assume 2.61 everywhere.
+
+# Note: If the type 'long long int' exists but is only 32 bits large
+# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
+# defined. In this case you can treat 'long long int' like 'long int'.
+
+AC_DEFUN([AC_TYPE_LONG_LONG_INT],
+[
+ AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[long long int ll = 9223372036854775807ll;
+ long long int nll = -9223372036854775807LL;
+ typedef int a[((-9223372036854775807LL < 0
+ && 0 < 9223372036854775807ll)
+ ? 1 : -1)];
+ int i = 63;]],
+ [[long long int llmax = 9223372036854775807ll;
+ return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+ | (llmax / ll) | (llmax % ll));]])],
+ [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
+ dnl If cross compiling, assume the bug isn't important, since
+ dnl nobody cross compiles for this platform as far as we know.
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[@%:@include <limits.h>
+ @%:@ifndef LLONG_MAX
+ @%:@ define HALF \
+ (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+ @%:@ define LLONG_MAX (HALF - 1 + HALF)
+ @%:@endif]],
+ [[long long int n = 1;
+ int i;
+ for (i = 0; ; i++)
+ {
+ long long int m = n << i;
+ if (m >> i != n)
+ return 1;
+ if (LLONG_MAX / 2 < m)
+ break;
+ }
+ return 0;]])],
+ [ac_cv_type_long_long_int=yes],
+ [ac_cv_type_long_long_int=no],
+ [ac_cv_type_long_long_int=yes])],
+ [ac_cv_type_long_long_int=no])])
+ if test $ac_cv_type_long_long_int = yes; then
+ AC_DEFINE([HAVE_LONG_LONG_INT], 1,
+ [Define to 1 if the system has the type `long long int'.])
+ fi
+])
+
+# This macro is obsolescent and should go away soon.
+AC_DEFUN([gl_AC_TYPE_LONG_LONG],
+[
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ ac_cv_type_long_long=$ac_cv_type_long_long_int
+ if test $ac_cv_type_long_long = yes; then
+ AC_DEFINE(HAVE_LONG_LONG, 1,
+ [Define if you have the 'long long' type.])
+ fi
+])
diff --git a/m4/ls-mntd-fs.m4 b/m4/ls-mntd-fs.m4
new file mode 100644
index 0000000..21ac4e7
--- /dev/null
+++ b/m4/ls-mntd-fs.m4
@@ -0,0 +1,337 @@
+#serial 26
+# How to list mounted file systems.
+
+# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software
+# Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering.
+dnl
+dnl This is not pretty. I've just taken the autoconf code and wrapped
+dnl it in an AC_DEFUN and made some other fixes.
+dnl
+
+# Replace Autoconf's AC_FUNC_GETMNTENT to work around a bug in Autoconf
+# through Autoconf 2.59. We can remove this once we assume Autoconf 2.60
+# or later.
+AC_DEFUN([AC_FUNC_GETMNTENT],
+[# getmntent is in the standard C library on UNICOS, in -lsun on Irix 4,
+# -lseq on Dynix/PTX, -lgen on Unixware.
+AC_SEARCH_LIBS(getmntent, [sun seq gen])
+AC_CHECK_FUNCS(getmntent)
+])
+
+# gl_LIST_MOUNTED_FILE_SYSTEMS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+AC_DEFUN([gl_LIST_MOUNTED_FILE_SYSTEMS],
+ [
+AC_CHECK_FUNCS(listmntent getmntinfo)
+AC_CHECK_HEADERS_ONCE(sys/param.h sys/statvfs.h)
+
+# We must include grp.h before ucred.h on OSF V4.0, since ucred.h uses
+# NGROUPS (as the array dimension for a struct member) without a definition.
+AC_CHECK_HEADERS(sys/ucred.h, [], [], [#include <grp.h>])
+
+AC_CHECK_HEADERS(sys/mount.h, [], [],
+ [AC_INCLUDES_DEFAULT
+ [#if HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif]])
+
+AC_CHECK_HEADERS(mntent.h sys/fs_types.h)
+ getfsstat_includes="\
+$ac_includes_default
+#if HAVE_SYS_PARAM_H
+# include <sys/param.h> /* needed by powerpc-apple-darwin1.3.7 */
+#endif
+#if HAVE_SYS_UCRED_H
+# include <grp.h> /* needed for definition of NGROUPS */
+# include <sys/ucred.h> /* needed by powerpc-apple-darwin1.3.7 */
+#endif
+#if HAVE_SYS_MOUNT_H
+# include <sys/mount.h>
+#endif
+#if HAVE_SYS_FS_TYPES_H
+# include <sys/fs_types.h> /* needed by powerpc-apple-darwin1.3.7 */
+#endif
+"
+AC_CHECK_MEMBERS([struct fsstat.f_fstypename],,,[$getfsstat_includes])
+
+# Determine how to get the list of mounted file systems.
+ac_list_mounted_fs=
+
+# If the getmntent function is available but not in the standard library,
+# make sure LIBS contains the appropriate -l option.
+AC_FUNC_GETMNTENT
+
+# This test must precede the ones for getmntent because Unicos-9 is
+# reported to have the getmntent function, but its support is incompatible
+# with other getmntent implementations.
+
+# NOTE: Normally, I wouldn't use a check for system type as I've done for
+# `CRAY' below since that goes against the whole autoconf philosophy. But
+# I think there is too great a chance that some non-Cray system has a
+# function named listmntent to risk the false positive.
+
+if test -z "$ac_list_mounted_fs"; then
+ # Cray UNICOS 9
+ AC_MSG_CHECKING([for listmntent of Cray/Unicos-9])
+ AC_CACHE_VAL(fu_cv_sys_mounted_cray_listmntent,
+ [fu_cv_sys_mounted_cray_listmntent=no
+ AC_EGREP_CPP(yes,
+ [#ifdef _CRAY
+yes
+#endif
+ ], [test $ac_cv_func_listmntent = yes \
+ && fu_cv_sys_mounted_cray_listmntent=yes]
+ )
+ ]
+ )
+ AC_MSG_RESULT($fu_cv_sys_mounted_cray_listmntent)
+ if test $fu_cv_sys_mounted_cray_listmntent = yes; then
+ 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 file systems. (UNICOS)])
+ fi
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+ # AIX.
+ AC_MSG_CHECKING([for mntctl function and struct vmount])
+ AC_CACHE_VAL(fu_cv_sys_mounted_vmount,
+ [AC_TRY_CPP([#include <fshelp.h>],
+ fu_cv_sys_mounted_vmount=yes,
+ fu_cv_sys_mounted_vmount=no)])
+ AC_MSG_RESULT($fu_cv_sys_mounted_vmount)
+ if test $fu_cv_sys_mounted_vmount = yes; 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 file systems, and there is a system header file
+ that declares `struct vmount.' (AIX)])
+ fi
+fi
+
+if test $ac_cv_func_getmntent = yes; then
+
+ # This system has the getmntent function.
+ # Determine whether it's the one-argument variant or the two-argument one.
+
+ if test -z "$ac_list_mounted_fs"; then
+ # 4.3BSD, SunOS, HP-UX, Dynix, Irix
+ AC_MSG_CHECKING([for one-argument getmntent function])
+ AC_CACHE_VAL(fu_cv_sys_mounted_getmntent1,
+ [AC_TRY_COMPILE([
+/* SunOS 4.1.x /usr/include/mntent.h needs this for FILE */
+#include <stdio.h>
+
+#include <mntent.h>
+#if !defined MOUNTED
+# if defined _PATH_MOUNTED /* GNU libc */
+# define MOUNTED _PATH_MOUNTED
+# endif
+# if defined MNT_MNTTAB /* HP-UX. */
+# define MOUNTED MNT_MNTTAB
+# endif
+# if defined MNTTABNAME /* Dynix. */
+# define MOUNTED MNTTABNAME
+# endif
+#endif
+],
+ [ struct mntent *mnt = 0; char *table = MOUNTED;
+ if (sizeof mnt && sizeof table) return 0;],
+ fu_cv_sys_mounted_getmntent1=yes,
+ fu_cv_sys_mounted_getmntent1=no)])
+ AC_MSG_RESULT($fu_cv_sys_mounted_getmntent1)
+ 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 file systems, and that function takes a single argument.
+ (4.3BSD, SunOS, HP-UX, Dynix, Irix)])
+ fi
+ fi
+
+ if test -z "$ac_list_mounted_fs"; then
+ # SVR4
+ AC_MSG_CHECKING([for two-argument getmntent function])
+ AC_CACHE_VAL(fu_cv_sys_mounted_getmntent2,
+ [AC_EGREP_HEADER(getmntent, sys/mnttab.h,
+ fu_cv_sys_mounted_getmntent2=yes,
+ fu_cv_sys_mounted_getmntent2=no)])
+ AC_MSG_RESULT($fu_cv_sys_mounted_getmntent2)
+ 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 file systems, and that function takes two arguments. (SVR4)])
+ AC_CHECK_FUNCS(hasmntopt)
+ fi
+ fi
+
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+ # DEC Alpha running OSF/1, and Apple Darwin 1.3.
+ # powerpc-apple-darwin1.3.7 needs sys/param.h sys/ucred.h sys/fs_types.h
+
+ AC_MSG_CHECKING([for getfsstat function])
+ AC_CACHE_VAL(fu_cv_sys_mounted_getfsstat,
+ [AC_TRY_LINK([
+#include <sys/types.h>
+#if HAVE_STRUCT_FSSTAT_F_FSTYPENAME
+# define FS_TYPE(Ent) ((Ent).f_fstypename)
+#else
+# define FS_TYPE(Ent) mnt_names[(Ent).f_type]
+#endif
+]$getfsstat_includes
+,
+ [struct statfs *stats;
+ int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT);
+ char *t = FS_TYPE (*stats); ],
+ fu_cv_sys_mounted_getfsstat=yes,
+ fu_cv_sys_mounted_getfsstat=no)])
+ AC_MSG_RESULT($fu_cv_sys_mounted_getfsstat)
+ if test $fu_cv_sys_mounted_getfsstat = yes; 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 file systems. (DEC Alpha running OSF/1)])
+ fi
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+ # SVR3
+ AC_MSG_CHECKING([for FIXME existence of three headers])
+ AC_CACHE_VAL(fu_cv_sys_mounted_fread_fstyp,
+ [AC_TRY_CPP([
+#include <sys/statfs.h>
+#include <sys/fstyp.h>
+#include <mnttab.h>],
+ fu_cv_sys_mounted_fread_fstyp=yes,
+ fu_cv_sys_mounted_fread_fstyp=no)])
+ AC_MSG_RESULT($fu_cv_sys_mounted_fread_fstyp)
+ 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 file systems, and your system has these header files:
+ <sys/fstyp.h> and <sys/statfs.h>. (SVR3)])
+ fi
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+ # 4.4BSD and DEC OSF/1.
+ AC_MSG_CHECKING([for getmntinfo function])
+ AC_CACHE_VAL(fu_cv_sys_mounted_getmntinfo,
+ [
+ test "$ac_cv_func_getmntinfo" = yes \
+ && fu_cv_sys_mounted_getmntinfo=yes \
+ || fu_cv_sys_mounted_getmntinfo=no
+ ])
+ AC_MSG_RESULT($fu_cv_sys_mounted_getmntinfo)
+ if test $fu_cv_sys_mounted_getmntinfo = yes; then
+ AC_MSG_CHECKING([whether getmntinfo returns statvfs structures])
+ AC_CACHE_VAL(fu_cv_sys_mounted_getmntinfo2,
+ [
+ AC_TRY_COMPILE([
+#if HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+#include <sys/types.h>
+#if HAVE_SYS_MOUNT_H
+# include <sys/mount.h>
+#endif
+#if HAVE_SYS_STATVFS_H
+# include <sys/statvfs.h>
+#endif
+extern int getmntinfo (struct statfs **, int);
+ ], [],
+ [fu_cv_sys_mounted_getmntinfo2=no],
+ [fu_cv_sys_mounted_getmntinfo2=yes])
+ ])
+ AC_MSG_RESULT([$fu_cv_sys_mounted_getmntinfo2])
+ if test $fu_cv_sys_mounted_getmntinfo2 = no; 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 file systems and it returns an array of
+ 'struct statfs'. (4.4BSD, Darwin)])
+ else
+ ac_list_mounted_fs=found
+ AC_DEFINE(MOUNTED_GETMNTINFO2, 1,
+ [Define if there is a function named getmntinfo for reading the
+ list of mounted file systems and it returns an array of
+ 'struct statvfs'. (NetBSD 3.0)])
+ fi
+ fi
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+ # Ultrix
+ AC_MSG_CHECKING([for getmnt function])
+ AC_CACHE_VAL(fu_cv_sys_mounted_getmnt,
+ [AC_TRY_CPP([
+#include <sys/fs_types.h>
+#include <sys/mount.h>],
+ fu_cv_sys_mounted_getmnt=yes,
+ fu_cv_sys_mounted_getmnt=no)])
+ AC_MSG_RESULT($fu_cv_sys_mounted_getmnt)
+ if test $fu_cv_sys_mounted_getmnt = yes; 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 file systems. (Ultrix)])
+ fi
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+ # BeOS
+ AC_CHECK_FUNCS(next_dev fs_stat_dev)
+ AC_CHECK_HEADERS(fs_info.h)
+ AC_MSG_CHECKING([for BEOS mounted file system support functions])
+ if test $ac_cv_header_fs_info_h = yes \
+ && test $ac_cv_func_next_dev = yes \
+ && test $ac_cv_func_fs_stat_dev = yes; then
+ fu_result=yes
+ else
+ fu_result=no
+ fi
+ AC_MSG_RESULT($fu_result)
+ if test $fu_result = yes; 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 file systems. (BeOS)])
+ fi
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+ # SVR2
+ AC_MSG_CHECKING([whether it is possible to resort to fread on /etc/mnttab])
+ AC_CACHE_VAL(fu_cv_sys_mounted_fread,
+ [AC_TRY_CPP([#include <mnttab.h>],
+ fu_cv_sys_mounted_fread=yes,
+ fu_cv_sys_mounted_fread=no)])
+ AC_MSG_RESULT($fu_cv_sys_mounted_fread)
+ if test $fu_cv_sys_mounted_fread = yes; then
+ ac_list_mounted_fs=found
+ AC_DEFINE(MOUNTED_FREAD, 1,
+ [Define if there is no specific function for reading the list of
+ mounted file systems. fread will be used to read /etc/mnttab.
+ (SVR2) ])
+ fi
+fi
+
+if test -z "$ac_list_mounted_fs"; then
+ AC_MSG_ERROR([could not determine how to read list of mounted file systems])
+ # FIXME -- no need to abort building the whole package
+ # Can't build mountlist.c or anything that needs its functions
+fi
+
+AS_IF([test $ac_list_mounted_fs = found], [$1], [$2])
+
+ ])
diff --git a/m4/lstat.m4 b/m4/lstat.m4
new file mode 100644
index 0000000..b9777a6
--- /dev/null
+++ b/m4/lstat.m4
@@ -0,0 +1,17 @@
+#serial 16
+
+# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering.
+
+AC_DEFUN([gl_FUNC_LSTAT],
+[
+ AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
+ dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ(lstat).
+ :
+])
diff --git a/m4/mbchar.m4 b/m4/mbchar.m4
new file mode 100644
index 0000000..02f9eff
--- /dev/null
+++ b/m4/mbchar.m4
@@ -0,0 +1,13 @@
+# mbchar.m4 serial 6
+dnl Copyright (C) 2005-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl autoconf tests required for use of mbchar.m4
+dnl From Bruno Haible.
+
+AC_DEFUN([gl_MBCHAR],
+[
+ AC_REQUIRE([AC_GNU_SOURCE])
+])
diff --git a/m4/mbiter.m4 b/m4/mbiter.m4
new file mode 100644
index 0000000..7d51af1
--- /dev/null
+++ b/m4/mbiter.m4
@@ -0,0 +1,17 @@
+# mbiter.m4 serial 2
+dnl Copyright (C) 2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl autoconf tests required for use of mbiter.h
+dnl From Bruno Haible.
+
+AC_DEFUN([gl_MBITER],
+[
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ dnl The following line is that so the user can test HAVE_MBRTOWC before
+ dnl #include "mbiter.h" or "mbuiter.h".
+ AC_REQUIRE([gl_FUNC_MBRTOWC])
+ :
+])
diff --git a/m4/mbrtowc.m4 b/m4/mbrtowc.m4
new file mode 100644
index 0000000..a3bd911
--- /dev/null
+++ b/m4/mbrtowc.m4
@@ -0,0 +1,31 @@
+# mbrtowc.m4 serial 8
+dnl Copyright (C) 2001-2002, 2004-2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert
+
+dnl This file can be removed, and gl_FUNC_MBRTOWC replaced with
+dnl AC_FUNC_MBRTOWC, when autoconf 2.60 can be assumed everywhere.
+
+AC_DEFUN([gl_FUNC_MBRTOWC],
+[
+ dnl Same as AC_FUNC_MBRTOWC in autoconf-2.60.
+ AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
+ gl_cv_func_mbrtowc,
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <wchar.h>]],
+ [[wchar_t wc;
+ char const s[] = "";
+ size_t n = 1;
+ mbstate_t state;
+ return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])],
+ gl_cv_func_mbrtowc=yes,
+ gl_cv_func_mbrtowc=no)])
+ if test $gl_cv_func_mbrtowc = yes; then
+ AC_DEFINE([HAVE_MBRTOWC], 1,
+ [Define to 1 if mbrtowc and mbstate_t are properly declared.])
+ fi
+])
diff --git a/m4/mbscasecmp.m4 b/m4/mbscasecmp.m4
new file mode 100644
index 0000000..7357769
--- /dev/null
+++ b/m4/mbscasecmp.m4
@@ -0,0 +1,16 @@
+# mbscasecmp.m4 serial 1
+dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MBSCASECMP],
+[
+ gl_PREREQ_MBSCASECMP
+])
+
+# Prerequisites of lib/mbscasecmp.c.
+AC_DEFUN([gl_PREREQ_MBSCASECMP], [
+ AC_REQUIRE([gl_FUNC_MBRTOWC])
+ :
+])
diff --git a/m4/mbstate_t.m4 b/m4/mbstate_t.m4
new file mode 100644
index 0000000..df2a275
--- /dev/null
+++ b/m4/mbstate_t.m4
@@ -0,0 +1,30 @@
+# mbstate_t.m4 serial 9
+dnl Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# From Paul Eggert.
+
+# BeOS 5 has <wchar.h> but does not define mbstate_t,
+# so you can't declare an object of that type.
+# Check for this incompatibility with Standard C.
+
+# AC_TYPE_MBSTATE_T
+# -----------------
+AC_DEFUN([AC_TYPE_MBSTATE_T],
+ [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [AC_INCLUDES_DEFAULT
+# include <wchar.h>],
+ [mbstate_t x; return sizeof x;])],
+ [ac_cv_type_mbstate_t=yes],
+ [ac_cv_type_mbstate_t=no])])
+ if test $ac_cv_type_mbstate_t = yes; then
+ AC_DEFINE([HAVE_MBSTATE_T], 1,
+ [Define to 1 if <wchar.h> declares mbstate_t.])
+ else
+ AC_DEFINE([mbstate_t], int,
+ [Define to a type if <wchar.h> does not define.])
+ fi])
diff --git a/m4/mbswidth.m4 b/m4/mbswidth.m4
new file mode 100644
index 0000000..241865f
--- /dev/null
+++ b/m4/mbswidth.m4
@@ -0,0 +1,42 @@
+# mbswidth.m4 serial 14
+dnl Copyright (C) 2000-2002, 2004, 2006, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl autoconf tests required for use of mbswidth.c
+dnl From Bruno Haible.
+
+AC_DEFUN([gl_MBSWIDTH],
+[
+ AC_CHECK_HEADERS_ONCE([wchar.h])
+ AC_CHECK_FUNCS_ONCE([isascii mbsinit])
+ gl_FUNC_MBRTOWC
+
+ dnl UnixWare 7.1.1 <wchar.h> has a declaration of a function mbswidth()
+ dnl that clashes with ours.
+ AC_CACHE_CHECK([whether mbswidth is declared in <wchar.h>],
+ ac_cv_have_decl_mbswidth,
+ [AC_TRY_COMPILE([
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+], [
+ char *p = (char *) mbswidth;
+ return !p;
+], ac_cv_have_decl_mbswidth=yes, ac_cv_have_decl_mbswidth=no)])
+ if test $ac_cv_have_decl_mbswidth = yes; then
+ ac_val=1
+ else
+ ac_val=0
+ fi
+ AC_DEFINE_UNQUOTED(HAVE_DECL_MBSWIDTH_IN_WCHAR_H, $ac_val,
+ [Define to 1 if you have a declaration of mbswidth() in <wchar.h>, and to 0 otherwise.])
+
+ AC_TYPE_MBSTATE_T
+])
diff --git a/m4/md5.m4 b/m4/md5.m4
new file mode 100644
index 0000000..5a1f875
--- /dev/null
+++ b/m4/md5.m4
@@ -0,0 +1,14 @@
+# md5.m4 serial 9
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_MD5],
+[
+ AC_LIBOBJ([md5])
+
+ dnl Prerequisites of lib/md5.c.
+ AC_REQUIRE([AC_C_BIGENDIAN])
+ :
+])
diff --git a/m4/memcasecmp.m4 b/m4/memcasecmp.m4
new file mode 100644
index 0000000..7ea362c
--- /dev/null
+++ b/m4/memcasecmp.m4
@@ -0,0 +1,10 @@
+#serial 5
+dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_MEMCASECMP],
+[
+ AC_LIBOBJ([memcasecmp])
+])
diff --git a/m4/memchr.m4 b/m4/memchr.m4
new file mode 100644
index 0000000..91b8636
--- /dev/null
+++ b/m4/memchr.m4
@@ -0,0 +1,18 @@
+# memchr.m4 serial 4
+dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MEMCHR],
+[
+ AC_REPLACE_FUNCS(memchr)
+ if test $ac_cv_func_memchr = no; then
+ gl_PREREQ_MEMCHR
+ fi
+])
+
+# Prerequisites of lib/memchr.c.
+AC_DEFUN([gl_PREREQ_MEMCHR], [
+ AC_CHECK_HEADERS(bp-sym.h)
+])
diff --git a/m4/memcmp.m4 b/m4/memcmp.m4
new file mode 100644
index 0000000..099b141
--- /dev/null
+++ b/m4/memcmp.m4
@@ -0,0 +1,19 @@
+# memcmp.m4 serial 12
+dnl Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MEMCMP],
+[
+ AC_FUNC_MEMCMP
+ dnl Note: AC_FUNC_MEMCMP does AC_LIBOBJ(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], [:])
diff --git a/m4/memcoll.m4 b/m4/memcoll.m4
new file mode 100644
index 0000000..4362f1b
--- /dev/null
+++ b/m4/memcoll.m4
@@ -0,0 +1,13 @@
+# memcoll.m4 serial 7
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_MEMCOLL],
+[
+ AC_LIBOBJ([memcoll])
+
+ dnl Prerequisites of lib/memcoll.c.
+ AC_FUNC_STRCOLL
+])
diff --git a/m4/memcpy.m4 b/m4/memcpy.m4
new file mode 100644
index 0000000..3edc62e
--- /dev/null
+++ b/m4/memcpy.m4
@@ -0,0 +1,18 @@
+# memcpy.m4 serial 2
+dnl Copyright (C) 2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MEMCPY],
+[
+ AC_REPLACE_FUNCS(memcpy)
+ if test $ac_cv_func_memcpy = no; then
+ gl_PREREQ_MEMCPY
+ fi
+])
+
+# Prerequisites of lib/memcpy.c.
+AC_DEFUN([gl_PREREQ_MEMCPY], [
+ :
+])
diff --git a/m4/memmove.m4 b/m4/memmove.m4
new file mode 100644
index 0000000..66054e4
--- /dev/null
+++ b/m4/memmove.m4
@@ -0,0 +1,18 @@
+# memmove.m4 serial 2
+dnl Copyright (C) 2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MEMMOVE],
+[
+ AC_REPLACE_FUNCS(memmove)
+ if test $ac_cv_func_memmove = no; then
+ gl_PREREQ_MEMMOVE
+ fi
+])
+
+# Prerequisites of lib/memmove.c.
+AC_DEFUN([gl_PREREQ_MEMMOVE], [
+ :
+])
diff --git a/m4/mempcpy.m4 b/m4/mempcpy.m4
new file mode 100644
index 0000000..9e854e8
--- /dev/null
+++ b/m4/mempcpy.m4
@@ -0,0 +1,26 @@
+# mempcpy.m4 serial 7
+dnl Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MEMPCPY],
+[
+ dnl Persuade glibc <string.h> to declare mempcpy().
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ dnl The mempcpy() declaration in lib/string_.h uses 'restrict'.
+ AC_REQUIRE([AC_C_RESTRICT])
+
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REPLACE_FUNCS(mempcpy)
+ if test $ac_cv_func_mempcpy = no; then
+ HAVE_MEMPCPY=0
+ gl_PREREQ_MEMPCPY
+ fi
+])
+
+# Prerequisites of lib/mempcpy.c.
+AC_DEFUN([gl_PREREQ_MEMPCPY], [
+ :
+])
diff --git a/m4/memrchr.m4 b/m4/memrchr.m4
new file mode 100644
index 0000000..69674ff
--- /dev/null
+++ b/m4/memrchr.m4
@@ -0,0 +1,25 @@
+# memrchr.m4 serial 7
+dnl Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MEMRCHR],
+[
+ dnl Persuade glibc <string.h> to declare memrchr().
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_CHECK_DECLS_ONCE([memrchr])
+ if test $ac_cv_have_decl_memrchr = no; then
+ HAVE_DECL_MEMRCHR=0
+ fi
+
+ AC_REPLACE_FUNCS(memrchr)
+ if test $ac_cv_func_memrchr = no; then
+ gl_PREREQ_MEMRCHR
+ fi
+])
+
+# Prerequisites of lib/memrchr.c.
+AC_DEFUN([gl_PREREQ_MEMRCHR], [:])
diff --git a/m4/memset.m4 b/m4/memset.m4
new file mode 100644
index 0000000..14ac267
--- /dev/null
+++ b/m4/memset.m4
@@ -0,0 +1,18 @@
+# memset.m4 serial 2
+dnl Copyright (C) 2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MEMSET],
+[
+ AC_REPLACE_FUNCS(memset)
+ if test $ac_cv_func_memset = no; then
+ gl_PREREQ_MEMSET
+ fi
+])
+
+# Prerequisites of lib/memset.c.
+AC_DEFUN([gl_PREREQ_MEMSET], [
+ :
+])
diff --git a/m4/memxfrm.m4 b/m4/memxfrm.m4
new file mode 100644
index 0000000..ca1c6a9
--- /dev/null
+++ b/m4/memxfrm.m4
@@ -0,0 +1,15 @@
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_MEMXFRM],
+[
+ AC_LIBSOURCES([memxfrm.c, memxfrm.h])
+ AC_LIBOBJ([memxfrm])
+
+ AC_REQUIRE([AC_C_RESTRICT])
+
+ dnl Prerequisites of lib/memcoll.c.
+ AC_CHECK_FUNCS_ONCE([strxfrm])
+])
diff --git a/m4/mkancesdirs.m4 b/m4/mkancesdirs.m4
new file mode 100644
index 0000000..6833dee
--- /dev/null
+++ b/m4/mkancesdirs.m4
@@ -0,0 +1,10 @@
+# Make a file's ancestor directories.
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_MKANCESDIRS],
+[
+ AC_LIBOBJ([mkancesdirs])
+])
diff --git a/m4/mkdir-p.m4 b/m4/mkdir-p.m4
new file mode 100644
index 0000000..8f1e48d
--- /dev/null
+++ b/m4/mkdir-p.m4
@@ -0,0 +1,16 @@
+# mkdir-p.m4 serial 13
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_MKDIR_PARENTS],
+[
+ AC_LIBOBJ([dirchownmod])
+ AC_LIBOBJ([mkdir-p])
+
+ dnl Prerequisites of lib/dirchownmod.c.
+ AC_REQUIRE([gl_FUNC_LCHMOD])
+ AC_REQUIRE([gl_FUNC_LCHOWN])
+ AC_CHECK_FUNCS_ONCE([fchmod])
+])
diff --git a/m4/mkdir-slash.m4 b/m4/mkdir-slash.m4
new file mode 100644
index 0000000..3c25d2a
--- /dev/null
+++ b/m4/mkdir-slash.m4
@@ -0,0 +1,48 @@
+#serial 5
+
+# Copyright (C) 2001, 2003, 2004, 2006 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# On some systems, mkdir ("foo/", 0700) fails because of the trailing slash.
+# On such systems, arrange to use a wrapper function that removes any
+# trailing slashes.
+AC_DEFUN([gl_FUNC_MKDIR_TRAILING_SLASH],
+[dnl
+ AC_CHECK_HEADERS_ONCE(unistd.h)
+ AC_CACHE_CHECK([whether mkdir fails due to a trailing slash],
+ gl_cv_func_mkdir_trailing_slash_bug,
+ [
+ # Arrange for deletion of the temporary directory this test might create.
+ ac_clean_files="$ac_clean_files confdir-slash"
+ AC_TRY_RUN([
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <stdlib.h>
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
+ int main ()
+ {
+ rmdir ("confdir-slash");
+ exit (mkdir ("confdir-slash/", 0700));
+ }
+ ],
+ gl_cv_func_mkdir_trailing_slash_bug=no,
+ gl_cv_func_mkdir_trailing_slash_bug=yes,
+ gl_cv_func_mkdir_trailing_slash_bug=yes
+ )
+ ]
+ )
+
+ if test $gl_cv_func_mkdir_trailing_slash_bug = yes; then
+ 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], [:])
diff --git a/m4/mkstemp.m4 b/m4/mkstemp.m4
new file mode 100644
index 0000000..20d8a1b
--- /dev/null
+++ b/m4/mkstemp.m4
@@ -0,0 +1,56 @@
+#serial 17
+
+# Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# 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.
+# Other systems lack mkstemp altogether.
+# On OSF1/Tru64 V4.0F, the system-provided mkstemp function can create
+# only 32 files per process.
+# On systems like the above, arrange to use the replacement function.
+AC_DEFUN([gl_FUNC_MKSTEMP],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_REQUIRE([AC_SYS_LARGEFILE])
+
+ AC_CACHE_CHECK([for working mkstemp],
+ [gl_cv_func_working_mkstemp],
+ [
+ mkdir conftest.mkstemp
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [AC_INCLUDES_DEFAULT],
+ [[int i;
+ off_t large = (off_t) 4294967295u;
+ if (large < 0)
+ large = 2147483647;
+ for (i = 0; i < 70; i++)
+ {
+ char templ[] = "conftest.mkstemp/coXXXXXX";
+ int (*mkstemp_function) (char *) = mkstemp;
+ int fd = mkstemp_function (templ);
+ if (fd < 0 || lseek (fd, large, SEEK_SET) != large)
+ return 1;
+ close (fd);
+ }
+ return 0;]])],
+ [gl_cv_func_working_mkstemp=yes],
+ [gl_cv_func_working_mkstemp=no],
+ [gl_cv_func_working_mkstemp=no])
+ rm -rf conftest.mkstemp
+ ])
+
+ if test $gl_cv_func_working_mkstemp != yes; then
+ REPLACE_MKSTEMP=1
+ AC_LIBOBJ([mkstemp])
+ gl_PREREQ_MKSTEMP
+ fi
+])
+
+# Prerequisites of lib/mkstemp.c.
+AC_DEFUN([gl_PREREQ_MKSTEMP],
+[
+])
diff --git a/m4/mktime.m4 b/m4/mktime.m4
new file mode 100644
index 0000000..5faf393
--- /dev/null
+++ b/m4/mktime.m4
@@ -0,0 +1,227 @@
+#serial 13
+dnl Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering.
+
+# Redefine AC_FUNC_MKTIME, to fix a bug in Autoconf 2.61a and earlier.
+# This redefinition can be removed once a new version of Autoconf is assumed.
+# The redefinition is taken from
+# <http://cvs.sv.gnu.org/viewcvs/*checkout*/autoconf/autoconf/lib/autoconf/functions.m4?rev=1.119>.
+# AC_FUNC_MKTIME
+# --------------
+AC_DEFUN([AC_FUNC_MKTIME],
+[AC_CHECK_HEADERS_ONCE(unistd.h)
+AC_CHECK_FUNCS_ONCE(alarm)
+AC_CACHE_CHECK([for working mktime], ac_cv_func_working_mktime,
+[AC_RUN_IFELSE([AC_LANG_SOURCE(
+[[/* Test program from Paul Eggert and Tony Leneis. */
+#include <limits.h>
+#include <stdlib.h>
+#include <time.h>
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#ifndef HAVE_ALARM
+# define alarm(X) /* empty */
+#endif
+
+/* Work around redefinition to rpl_putenv by other config tests. */
+#undef putenv
+
+static time_t time_t_max;
+static time_t time_t_min;
+
+/* Values we'll use to set the TZ environment variable. */
+static char *tz_strings[] = {
+ (char *) 0, "TZ=GMT0", "TZ=JST-9",
+ "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
+};
+#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
+
+/* Return 0 if mktime fails to convert a date in the spring-forward gap.
+ Based on a problem report from Andreas Jaeger. */
+static int
+spring_forward_gap ()
+{
+ /* glibc (up to about 1998-10-07) failed this test. */
+ struct tm tm;
+
+ /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
+ instead of "TZ=America/Vancouver" in order to detect the bug even
+ on systems that don't support the Olson extension, or don't have the
+ full zoneinfo tables installed. */
+ putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
+
+ tm.tm_year = 98;
+ tm.tm_mon = 3;
+ tm.tm_mday = 5;
+ tm.tm_hour = 2;
+ tm.tm_min = 0;
+ tm.tm_sec = 0;
+ tm.tm_isdst = -1;
+ return mktime (&tm) != (time_t) -1;
+}
+
+static int
+mktime_test1 (now)
+ time_t now;
+{
+ struct tm *lt;
+ return ! (lt = localtime (&now)) || mktime (lt) == now;
+}
+
+static int
+mktime_test (now)
+ time_t now;
+{
+ return (mktime_test1 (now)
+ && mktime_test1 ((time_t) (time_t_max - now))
+ && mktime_test1 ((time_t) (time_t_min + now)));
+}
+
+static int
+irix_6_4_bug ()
+{
+ /* Based on code from Ariel Faigon. */
+ struct tm tm;
+ tm.tm_year = 96;
+ tm.tm_mon = 3;
+ tm.tm_mday = 0;
+ tm.tm_hour = 0;
+ tm.tm_min = 0;
+ tm.tm_sec = 0;
+ tm.tm_isdst = -1;
+ mktime (&tm);
+ return tm.tm_mon == 2 && tm.tm_mday == 31;
+}
+
+static int
+bigtime_test (j)
+ int j;
+{
+ struct tm tm;
+ time_t now;
+ tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
+ now = mktime (&tm);
+ if (now != (time_t) -1)
+ {
+ struct tm *lt = localtime (&now);
+ if (! (lt
+ && lt->tm_year == tm.tm_year
+ && lt->tm_mon == tm.tm_mon
+ && lt->tm_mday == tm.tm_mday
+ && lt->tm_hour == tm.tm_hour
+ && lt->tm_min == tm.tm_min
+ && lt->tm_sec == tm.tm_sec
+ && lt->tm_yday == tm.tm_yday
+ && lt->tm_wday == tm.tm_wday
+ && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
+ == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
+ return 0;
+ }
+ return 1;
+}
+
+static int
+year_2050_test ()
+{
+ /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
+ ignoring leap seconds. */
+ unsigned long int answer = 2527315200UL;
+
+ struct tm tm;
+ time_t t;
+ tm.tm_year = 2050 - 1900;
+ tm.tm_mon = 2 - 1;
+ tm.tm_mday = 1;
+ tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
+ tm.tm_isdst = -1;
+
+ /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
+ instead of "TZ=America/Vancouver" in order to detect the bug even
+ on systems that don't support the Olson extension, or don't have the
+ full zoneinfo tables installed. */
+ putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
+
+ t = mktime (&tm);
+
+ /* Check that the result is either a failure, or close enough
+ to the correct answer that we can assume the discrepancy is
+ due to leap seconds. */
+ return (t == (time_t) -1
+ || (0 < t && answer - 120 <= t && t <= answer + 120));
+}
+
+int
+main ()
+{
+ time_t t, delta;
+ int i, j;
+
+ /* This test makes some buggy mktime implementations loop.
+ Give up after 60 seconds; a mktime slower than that
+ isn't worth using anyway. */
+ alarm (60);
+
+ for (;;)
+ {
+ t = (time_t_max << 1) + 1;
+ if (t <= time_t_max)
+ break;
+ time_t_max = t;
+ }
+ time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
+
+ delta = time_t_max / 997; /* a suitable prime number */
+ for (i = 0; i < N_STRINGS; i++)
+ {
+ if (tz_strings[i])
+ putenv (tz_strings[i]);
+
+ for (t = 0; t <= time_t_max - delta; t += delta)
+ if (! mktime_test (t))
+ return 1;
+ if (! (mktime_test ((time_t) 1)
+ && mktime_test ((time_t) (60 * 60))
+ && mktime_test ((time_t) (60 * 60 * 24))))
+ return 1;
+
+ for (j = 1; ; j <<= 1)
+ if (! bigtime_test (j))
+ return 1;
+ else if (INT_MAX / 2 < j)
+ break;
+ if (! bigtime_test (INT_MAX))
+ return 1;
+ }
+ return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
+}]])],
+ [ac_cv_func_working_mktime=yes],
+ [ac_cv_func_working_mktime=no],
+ [ac_cv_func_working_mktime=no])])
+if test $ac_cv_func_working_mktime = no; then
+ AC_LIBOBJ([mktime])
+fi
+])# AC_FUNC_MKTIME
+
+AC_DEFUN([gl_FUNC_MKTIME],
+[
+ AC_FUNC_MKTIME
+ dnl Note: AC_FUNC_MKTIME does AC_LIBOBJ(mktime).
+ if test $ac_cv_func_working_mktime = no; then
+ AC_DEFINE(mktime, rpl_mktime,
+ [Define to rpl_mktime if the replacement function should be used.])
+ gl_PREREQ_MKTIME
+ fi
+])
+
+# Prerequisites of lib/mktime.c.
+AC_DEFUN([gl_PREREQ_MKTIME],
+[
+ AC_REQUIRE([AC_C_INLINE])
+])
diff --git a/m4/modechange.m4 b/m4/modechange.m4
new file mode 100644
index 0000000..3b23955
--- /dev/null
+++ b/m4/modechange.m4
@@ -0,0 +1,10 @@
+# modechange.m4 serial 6
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_MODECHANGE],
+[
+ AC_LIBOBJ([modechange])
+])
diff --git a/m4/mountlist.m4 b/m4/mountlist.m4
new file mode 100644
index 0000000..c25f44e
--- /dev/null
+++ b/m4/mountlist.m4
@@ -0,0 +1,23 @@
+#serial 9
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_MOUNTLIST],
+[
+ gl_LIST_MOUNTED_FILE_SYSTEMS([gl_cv_list_mounted_fs=yes],
+ [gl_cv_list_mounted_fs=no])
+ if test $gl_cv_list_mounted_fs = yes; then
+ AC_LIBOBJ(mountlist)
+ gl_PREREQ_MOUNTLIST_EXTRA
+ fi
+])
+
+# Prerequisites of lib/mountlist.c not done by gl_LIST_MOUNTED_FILE_SYSTEMS.
+AC_DEFUN([gl_PREREQ_MOUNTLIST_EXTRA],
+[
+ dnl Note gl_LIST_MOUNTED_FILE_SYSTEMS checks for mntent.h, not sys/mntent.h.
+ AC_CHECK_HEADERS(sys/mntent.h)
+ gl_FSTYPENAME
+])
diff --git a/m4/mpsort.m4 b/m4/mpsort.m4
new file mode 100644
index 0000000..d21ba69
--- /dev/null
+++ b/m4/mpsort.m4
@@ -0,0 +1,13 @@
+# Sort a vector of pointers to data.
+
+# Copyright (C) 2007 Free Software Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_MPSORT],
+[
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_LIBOBJ([mpsort])
+])
diff --git a/m4/nanosleep.m4 b/m4/nanosleep.m4
new file mode 100644
index 0000000..a3a6814
--- /dev/null
+++ b/m4/nanosleep.m4
@@ -0,0 +1,116 @@
+#serial 22
+
+dnl From Jim Meyering.
+dnl Check for the nanosleep function.
+dnl If not found, use the supplied replacement.
+dnl
+
+# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 Free
+# Software Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_NANOSLEEP],
+[
+ dnl Persuade glibc and Solaris <time.h> to declare nanosleep.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+ AC_REQUIRE([gl_CLOCK_TIME])
+ AC_CHECK_HEADERS_ONCE(sys/time.h)
+
+ nanosleep_save_libs=$LIBS
+
+ # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
+ # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
+ AC_SEARCH_LIBS([nanosleep], [rt posix4],
+ [test "$ac_cv_search_nanosleep" = "none required" ||
+ LIB_NANOSLEEP=$ac_cv_search_nanosleep])
+
+ AC_CACHE_CHECK([for working nanosleep],
+ [gl_cv_func_nanosleep],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+ #include <errno.h>
+ #include <limits.h>
+ #include <signal.h>
+ #if HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #include <time.h>
+ #include <unistd.h>
+ #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+ #define TYPE_MAXIMUM(t) \
+ ((t) (! TYPE_SIGNED (t) \
+ ? (t) -1 \
+ : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
+
+ static void
+ check_for_SIGALRM (int sig)
+ {
+ if (sig != SIGALRM)
+ _exit (1);
+ }
+
+ int
+ main ()
+ {
+ static struct timespec ts_sleep;
+ static struct timespec ts_remaining;
+ static struct sigaction act;
+ if (! nanosleep)
+ return 1;
+ act.sa_handler = check_for_SIGALRM;
+ sigemptyset (&act.sa_mask);
+ sigaction (SIGALRM, &act, NULL);
+ ts_sleep.tv_sec = 0;
+ ts_sleep.tv_nsec = 1;
+ alarm (1);
+ if (nanosleep (&ts_sleep, NULL) != 0)
+ return 1;
+ ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
+ ts_sleep.tv_nsec = 999999999;
+ alarm (1);
+ if (nanosleep (&ts_sleep, &ts_remaining) == -1 && errno == EINTR
+ && TYPE_MAXIMUM (time_t) - 10 < ts_remaining.tv_sec)
+ return 0;
+ return 119;
+ }]])],
+ [gl_cv_func_nanosleep=yes],
+ [case $? in dnl (
+ 119) gl_cv_func_nanosleep='no (mishandles large arguments)';; dnl (
+ *) gl_cv_func_nanosleep=no;;
+ esac],
+ [gl_cv_func_nanosleep=cross-compiling])
+ ])
+ if test "$gl_cv_func_nanosleep" = yes; then
+ REPLACE_NANOSLEEP=0
+ else
+ REPLACE_NANOSLEEP=1
+ if test "$gl_cv_func_nanosleep" = 'no (mishandles large arguments)'; then
+ AC_DEFINE([HAVE_BUG_BIG_NANOSLEEP], 1,
+ [Define to 1 if nanosleep mishandle large arguments.])
+ for ac_lib in $LIB_CLOCK_GETTIME; do
+ case " $LIB_NANOSLEEP " in
+ *" $ac_lib "*) ;;
+ *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";;
+ esac
+ done
+ fi
+ AC_LIBOBJ(nanosleep)
+ gl_PREREQ_NANOSLEEP
+ fi
+
+ AC_SUBST([LIB_NANOSLEEP])
+ LIBS=$nanosleep_save_libs
+])
+
+# Prerequisites of lib/nanosleep.c.
+AC_DEFUN([gl_PREREQ_NANOSLEEP],
+[
+ AC_CHECK_FUNCS_ONCE(siginterrupt)
+ AC_CHECK_HEADERS_ONCE(sys/select.h)
+])
diff --git a/m4/netinet_in_h.m4 b/m4/netinet_in_h.m4
new file mode 100644
index 0000000..966bfe6
--- /dev/null
+++ b/m4/netinet_in_h.m4
@@ -0,0 +1,32 @@
+# netinet_in_h.m4 serial 2
+dnl Copyright (C) 2006-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_HEADER_NETINET_IN],
+[
+ AC_CACHE_CHECK([whether <netinet/in.h> is self-contained],
+ [gl_cv_header_netinet_in_h_selfcontained],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <netinet/in.h>], [])],
+ [gl_cv_header_netinet_in_h_selfcontained=yes],
+ [gl_cv_header_netinet_in_h_selfcontained=no])
+ ])
+ if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
+ NETINET_IN_H=''
+ else
+ NETINET_IN_H='netinet/in.h'
+ AC_CHECK_HEADERS([netinet/in.h])
+ gl_ABSOLUTE_HEADER([netinet/in.h])
+ ABSOLUTE_NETINET_IN_H=\"$gl_cv_absolute_netinet_in_h\"
+ AC_SUBST([ABSOLUTE_NETINET_IN_H])
+ if test $ac_cv_header_netinet_in_h = yes; then
+ HAVE_NETINET_IN_H=1
+ else
+ HAVE_NETINET_IN_H=0
+ fi
+ AC_SUBST([HAVE_NETINET_IN_H])
+ fi
+ AC_SUBST([NETINET_IN_H])
+])
diff --git a/m4/nls.m4 b/m4/nls.m4
new file mode 100644
index 0000000..7967cc2
--- /dev/null
+++ b/m4/nls.m4
@@ -0,0 +1,31 @@
+# nls.m4 serial 3 (gettext-0.15)
+dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+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-2003.
+
+AC_PREREQ(2.50)
+
+AC_DEFUN([AM_NLS],
+[
+ 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)
+])
diff --git a/m4/openat.m4 b/m4/openat.m4
new file mode 100644
index 0000000..313dc6f
--- /dev/null
+++ b/m4/openat.m4
@@ -0,0 +1,93 @@
+#serial 15
+# See if we need to use our replacement for Solaris' openat et al functions.
+
+dnl Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Written by Jim Meyering.
+
+AC_DEFUN([gl_FUNC_OPENAT],
+[
+ AC_LIBOBJ([openat-die])
+ AC_LIBOBJ([openat-proc])
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_FUNCS_ONCE([lchmod])
+ AC_CHECK_FUNCS_ONCE([fdopendir])
+ AC_REPLACE_FUNCS([fchmodat mkdirat openat])
+ case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in
+ yes+yes) ;;
+ yes+*) AC_LIBOBJ([fstatat]);;
+ *)
+ AC_DEFINE([__OPENAT_PREFIX], [[rpl_]],
+ [Define to rpl_ if the openat replacement function should be used.])
+ gl_PREREQ_OPENAT;;
+ esac
+ gl_FUNC_FCHOWNAT
+])
+
+# gl_FUNC_FCHOWNAT_DEREF_BUG([ACTION-IF-BUGGY[, ACTION-IF-NOT_BUGGY]])
+AC_DEFUN([gl_FUNC_FCHOWNAT_DEREF_BUG],
+[
+ AC_CACHE_CHECK([whether fchownat works with AT_SYMLINK_NOFOLLOW],
+ gl_cv_func_fchownat_nofollow_works,
+ [
+ gl_dangle=conftest.dangle
+ # Remove any remnants of a previous test.
+ rm -f $gl_dangle
+ # Arrange for deletion of the temporary file this test creates.
+ ac_clean_files="$ac_clean_files $gl_dangle"
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE(
+ [[
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <sys/types.h>
+int
+main ()
+{
+ return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
+ AT_SYMLINK_NOFOLLOW) != 0
+ && errno == ENOENT);
+}
+ ]])],
+ [gl_cv_func_fchownat_nofollow_works=yes],
+ [gl_cv_func_fchownat_nofollow_works=no],
+ [gl_cv_func_fchownat_nofollow_works=no],
+ )
+ ])
+ AS_IF([test $gl_cv_func_fchownat_nofollow_works = no], [$1], [$2])
+])
+
+# If we have the fchownat function, and it has the bug (in glibc-2.4)
+# that it dereferences symlinks even with AT_SYMLINK_NOFOLLOW, then
+# use the replacement function.
+# Also use the replacement function if fchownat is simply not available.
+AC_DEFUN([gl_FUNC_FCHOWNAT],
+[
+ # Assume we'll use the replacement function.
+ # The only case in which we won't is when we have fchownat, and it works.
+ use_replacement_fchownat=yes
+
+ AC_CHECK_FUNC([fchownat], [have_fchownat=yes], [have_fchownat=no])
+ if test $have_fchownat = yes; then
+ gl_FUNC_FCHOWNAT_DEREF_BUG([have_fchownat_bug=yes])
+ if test $have_fchownat_bug = no; then
+ use_replacement_fchownat=no
+ fi
+ fi
+
+ if test $use_replacement_fchownat = yes; then
+ AC_LIBOBJ(fchownat)
+ AC_DEFINE(fchownat, rpl_fchownat,
+ [Define to rpl_fchownat if the replacement function should be used.])
+ fi
+])
+
+AC_DEFUN([gl_PREREQ_OPENAT],
+[
+ :
+])
diff --git a/m4/pathmax.m4 b/m4/pathmax.m4
new file mode 100644
index 0000000..64bf26f
--- /dev/null
+++ b/m4/pathmax.m4
@@ -0,0 +1,11 @@
+# pathmax.m4 serial 6
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_PATHMAX],
+[
+ dnl Prerequisites of lib/pathmax.h.
+ AC_CHECK_HEADERS_ONCE(sys/param.h)
+])
diff --git a/m4/perl.m4 b/m4/perl.m4
new file mode 100644
index 0000000..90c224a
--- /dev/null
+++ b/m4/perl.m4
@@ -0,0 +1,45 @@
+#serial 8
+
+dnl From Jim Meyering.
+dnl Find a new-enough version of Perl.
+
+# Copyright (C) 1998-2001, 2003, 2004, 2007 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_PERL],
+[
+ dnl FIXME: don't hard-code 5.005
+ AC_MSG_CHECKING([for perl5.005 or newer])
+ if test "${PERL+set}" = set; then
+ # `PERL' is set in the user's environment.
+ candidate_perl_names="$PERL"
+ perl_specified=yes
+ else
+ candidate_perl_names='perl perl5'
+ perl_specified=no
+ fi
+
+ found=no
+ AC_SUBST(PERL)
+ PERL="$am_missing_run perl"
+ for perl in $candidate_perl_names; do
+ # Run test in a subshell; some versions of sh will print an error if
+ # an executable is not found, even if stderr is redirected.
+ if ( $perl -e 'require 5.005; use File::Compare' ) > /dev/null 2>&1; then
+ PERL=$perl
+ found=yes
+ break
+ fi
+ done
+
+ AC_MSG_RESULT($found)
+ test $found = no && AC_MSG_WARN([
+WARNING: You don't seem to have perl5.005 or newer installed, or you lack
+ a usable version of the Perl File::Compare module. As a result,
+ you may be unable to run a few tests or to regenerate certain
+ files if you modify the sources from which they are derived.
+] )
+])
diff --git a/m4/physmem.m4 b/m4/physmem.m4
new file mode 100644
index 0000000..456bb37
--- /dev/null
+++ b/m4/physmem.m4
@@ -0,0 +1,39 @@
+# physmem.m4 serial 7
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# 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;
+ if (x > 0.0) return 0;])],
+ [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([gl_PHYSMEM],
+[
+ AC_LIBOBJ([physmem])
+
+ # Prerequisites of lib/physmem.c.
+ AC_CHECK_HEADERS([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])
+])
diff --git a/m4/po.m4 b/m4/po.m4
new file mode 100644
index 0000000..00133ef
--- /dev/null
+++ b/m4/po.m4
@@ -0,0 +1,428 @@
+# po.m4 serial 13 (gettext-0.15)
+dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+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-2003.
+
+AC_PREREQ(2.50)
+
+dnl Checks for all prerequisites of the po subdirectory.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+ AC_REQUIRE([AM_NLS])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 >&]AS_MESSAGE_LOG_FD[ 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 Test whether it is GNU msgfmt >= 0.15.
+changequote(,)dnl
+ case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+ *) MSGFMT_015=$MSGFMT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([MSGFMT_015])
+changequote(,)dnl
+ case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+ *) GMSGFMT_015=$GMSGFMT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([GMSGFMT_015])
+
+ dnl Search for GNU xgettext 0.12 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= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /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 Test whether it is GNU xgettext >= 0.15.
+changequote(,)dnl
+ case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+ *) XGETTEXT_015=$XGETTEXT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([XGETTEXT_015])
+
+ 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 >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
+
+ dnl Installation directories.
+ dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
+ dnl have to define it here, so that it can be used in po/Makefile.
+ test -n "$localedir" || localedir='${datadir}/locale'
+ AC_SUBST([localedir])
+
+ AC_CONFIG_COMMANDS([po-directories], [[
+ 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
+ # Treat a directory as a PO directory if and only if it has a
+ # POTFILES.in file. This allows packages to have multiple PO
+ # directories under different names or in different locations.
+ 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"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES 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 "$OBSOLETE_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" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+ fi
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ 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|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|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, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+ # from automake < 1.5.
+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+ ])
+])
+
+dnl Postprocesses a Makefile in a directory containing PO files.
+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
+[
+ # When this code is run, in config.status, two variables have already been
+ # set:
+ # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
+ # - LINGUAS is the value of the environment variable LINGUAS at configure
+ # time.
+
+changequote(,)dnl
+ # 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
+
+ # Find a way to echo strings without interpreting backslash.
+ if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
+ gt_echo='echo'
+ else
+ if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
+ gt_echo='printf %s\n'
+ else
+ echo_func () {
+ cat <<EOT
+$*
+EOT
+ }
+ gt_echo='echo_func'
+ fi
+ fi
+
+ # A sed script that extracts the value of VARIABLE from a Makefile.
+ sed_x_variable='
+# Test if the hold space is empty.
+x
+s/P/P/
+x
+ta
+# Yes it was empty. Look if we have the expected variable definition.
+/^[ ]*VARIABLE[ ]*=/{
+ # Seen the first line of the variable definition.
+ s/^[ ]*VARIABLE[ ]*=//
+ ba
+}
+bd
+:a
+# Here we are processing a line from the variable definition.
+# Remove comment, more precisely replace it with a space.
+s/#.*$/ /
+# See if the line ends in a backslash.
+tb
+:b
+s/\\$//
+# Print the line, without the trailing backslash.
+p
+tc
+# There was no trailing backslash. The end of the variable definition is
+# reached. Clear the hold space.
+s/^.*$//
+x
+bd
+:c
+# A trailing backslash means that the variable definition continues in the
+# next line. Put a nonempty string into the hold space to indicate this.
+s/^.*$/P/
+x
+:d
+'
+changequote([,])dnl
+
+ # Set POTFILES to the value of the Makefile variable POTFILES.
+ sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
+ POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
+ # Compute POTFILES_DEPS as
+ # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
+ POTFILES_DEPS=
+ for file in $POTFILES; do
+ POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
+ done
+ POMAKEFILEDEPS=""
+
+ if test -n "$OBSOLETE_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
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
+ sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
+ ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
+ fi
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ # Compute PROPERTIESFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
+ # Compute CLASSFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
+ # Compute QMFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
+ # Compute MSGFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+ # Compute RESOURCESDLLFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ PROPERTIESFILES=
+ CLASSFILES=
+ QMFILES=
+ MSGFILES=
+ RESOURCESDLLFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
+ CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
+ QMFILES="$QMFILES $srcdirpre$lang.qm"
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
+ 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=
+ JAVACATALOGS=
+ QTCATALOGS=
+ TCLCATALOGS=
+ CSHARPCATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
+ QTCATALOGS="$QTCATALOGS $lang.qm"
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
+ done
+ fi
+
+ sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
+ if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
+ # Add dependencies that cannot be formulated as a simple suffix rule.
+ for lang in $ALL_LINGUAS; do
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ cat >> "$ac_file.tmp" <<EOF
+$frobbedlang.msg: $lang.po
+ @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+ \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+ done
+ fi
+ if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
+ # Add dependencies that cannot be formulated as a simple suffix rule.
+ for lang in $ALL_LINGUAS; do
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ cat >> "$ac_file.tmp" <<EOF
+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+ @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+ \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+ done
+ fi
+ if test -n "$POMAKEFILEDEPS"; then
+ cat >> "$ac_file.tmp" <<EOF
+Makefile: $POMAKEFILEDEPS
+EOF
+ fi
+ mv "$ac_file.tmp" "$ac_file"
+])
diff --git a/m4/posixtm.m4 b/m4/posixtm.m4
new file mode 100644
index 0000000..7ace2a9
--- /dev/null
+++ b/m4/posixtm.m4
@@ -0,0 +1,12 @@
+# posixtm.m4 serial 6
+dnl Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_POSIXTM],
+[
+ AC_LIBOBJ(posixtm)
+
+ dnl No prerequisites of lib/posixtm.c.
+])
diff --git a/m4/posixver.m4 b/m4/posixver.m4
new file mode 100644
index 0000000..f60a094
--- /dev/null
+++ b/m4/posixver.m4
@@ -0,0 +1,45 @@
+# posixver.m4 serial 9
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_POSIXVER],
+[
+ AC_LIBOBJ([posixver])
+
+ AC_REQUIRE([gl_DEFAULT_POSIX2_VERSION])
+])
+
+# Set the default level of POSIX conformance at configure-time.
+# Build with `./configure DEFAULT_POSIX2_VERSION=199209 ...' to
+# support the older version, thus preserving portability with
+# scripts that use sort +1, tail +32, etc.
+# Note however, that this breaks tools that might run commands
+# like `sort +some-file' that conform with the newer standard.
+AC_DEFUN([gl_DEFAULT_POSIX2_VERSION],
+[
+ AC_MSG_CHECKING([for desired default level of POSIX conformance])
+ gl_default_posix2_version=none-specified
+ if test -n "$ac_cv_env_DEFAULT_POSIX2_VERSION_set"; then
+ gl_default_posix2_version=$ac_cv_env_DEFAULT_POSIX2_VERSION_value
+ AC_DEFINE_UNQUOTED(DEFAULT_POSIX2_VERSION,
+ $gl_default_posix2_version,
+ [Define the default level of POSIX conformance. The value is of
+ the form YYYYMM, specifying the year and month the standard was
+ adopted. If not defined here, it defaults to the value of
+ _POSIX2_VERSION in <unistd.h>. Define to 199209 to default to
+ POSIX 1003.2-1992, which makes standard programs like `head',
+ `tail', and `sort' accept obsolete options like `+10' and
+ `-10'. Define to 200112 to default to POSIX 1003.1-2001, which
+ makes these standard programs treat leading-`+' operands as
+ file names and require modern usages like `-n 10' instead of
+ `-10'. Whether defined here or not, the default can be
+ overridden at run time via the _POSIX2_VERSION environment
+ variable.])
+ fi
+ AC_MSG_RESULT($gl_default_posix2_version)
+ AC_ARG_VAR(
+ [DEFAULT_POSIX2_VERSION],
+ [POSIX version to default to; see 'config.hin'.])
+])
diff --git a/m4/prereq.m4 b/m4/prereq.m4
new file mode 100644
index 0000000..d3ecc90
--- /dev/null
+++ b/m4/prereq.m4
@@ -0,0 +1,53 @@
+#serial 73
+
+dnl We use gl_ for non Autoconf macros.
+m4_pattern_forbid([^gl_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl
+
+# These are the prerequisite macros for files in the lib/
+# directory of the coreutils package.
+
+
+# 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
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Written by Jim Meyering.
+
+
+AC_DEFUN([gl_PREREQ],
+[
+ # gnulib settings.
+ AC_REQUIRE([gl_FUNC_NONREENTRANT_EUIDACCESS])
+
+ # We don't use c-stack.c.
+ # AC_REQUIRE([gl_C_STACK])
+
+ # 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_FUNC_XFTS])
+ AC_REQUIRE([gl_MEMXFRM])
+ AC_REQUIRE([gl_RANDINT])
+ AC_REQUIRE([gl_RANDPERM])
+ AC_REQUIRE([gl_RANDREAD])
+ AC_REQUIRE([gl_ROOT_DEV_INO])
+ AC_REQUIRE([gl_SHA256])
+ AC_REQUIRE([gl_SHA512])
+ AC_REQUIRE([gl_STRINTCMP])
+ AC_REQUIRE([gl_STRNUMCMP])
+])
diff --git a/m4/progtest.m4 b/m4/progtest.m4
new file mode 100644
index 0000000..a56365c
--- /dev/null
+++ b/m4/progtest.m4
@@ -0,0 +1,92 @@
+# progtest.m4 serial 4 (gettext-0.14.2)
+dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+AC_PREREQ(2.50)
+
+# Search path for a program which passes the given test.
+
+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],
+[
+# 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_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
+ echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
+ 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
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
diff --git a/m4/putenv.m4 b/m4/putenv.m4
new file mode 100644
index 0000000..43a5dc5
--- /dev/null
+++ b/m4/putenv.m4
@@ -0,0 +1,39 @@
+# putenv.m4 serial 12
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering.
+dnl
+dnl Check whether putenv ("FOO") removes FOO from the environment.
+dnl The putenv in libc on at least SunOS 4.1.4 does *not* do that.
+
+AC_DEFUN([gl_FUNC_PUTENV],
+[AC_CACHE_CHECK([for SVID conformant putenv], jm_cv_func_svid_putenv,
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],[
+ /* Put it in env. */
+ if (putenv ("CONFTEST_putenv=val"))
+ return 1;
+
+ /* Try to remove it. */
+ if (putenv ("CONFTEST_putenv"))
+ return 1;
+
+ /* Make sure it was deleted. */
+ if (getenv ("CONFTEST_putenv") != 0)
+ return 1;
+
+ return 0;
+ ])],
+ jm_cv_func_svid_putenv=yes,
+ jm_cv_func_svid_putenv=no,
+ dnl When crosscompiling, assume putenv is broken.
+ jm_cv_func_svid_putenv=no)
+ ])
+ if test $jm_cv_func_svid_putenv = no; then
+ AC_LIBOBJ(putenv)
+ AC_DEFINE(putenv, rpl_putenv,
+ [Define to rpl_putenv if the replacement function should be used.])
+ fi
+])
diff --git a/m4/quote.m4 b/m4/quote.m4
new file mode 100644
index 0000000..0f08791
--- /dev/null
+++ b/m4/quote.m4
@@ -0,0 +1,13 @@
+# quote.m4 serial 5
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_QUOTE],
+[
+ AC_LIBOBJ([quote])
+
+ dnl Prerequisites of lib/quote.c.
+ dnl (none)
+])
diff --git a/m4/quotearg.m4 b/m4/quotearg.m4
new file mode 100644
index 0000000..db635d0
--- /dev/null
+++ b/m4/quotearg.m4
@@ -0,0 +1,15 @@
+# quotearg.m4 serial 6
+dnl Copyright (C) 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_QUOTEARG],
+[
+ AC_LIBOBJ([quotearg])
+
+ dnl Prerequisites of lib/quotearg.c.
+ AC_CHECK_FUNCS_ONCE([mbsinit])
+ AC_TYPE_MBSTATE_T
+ gl_FUNC_MBRTOWC
+])
diff --git a/m4/randint.m4 b/m4/randint.m4
new file mode 100644
index 0000000..50209ed
--- /dev/null
+++ b/m4/randint.m4
@@ -0,0 +1,12 @@
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_RANDINT],
+[
+ AC_LIBSOURCES([randint.c, randint.h])
+ AC_LIBOBJ([randint])
+
+ AC_REQUIRE([AC_C_INLINE])
+])
diff --git a/m4/randperm.m4 b/m4/randperm.m4
new file mode 100644
index 0000000..de2d691
--- /dev/null
+++ b/m4/randperm.m4
@@ -0,0 +1,10 @@
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_RANDPERM],
+[
+ AC_LIBSOURCES([randperm.c, randperm.h])
+ AC_LIBOBJ([randperm])
+])
diff --git a/m4/randread.m4 b/m4/randread.m4
new file mode 100644
index 0000000..c30ddd3
--- /dev/null
+++ b/m4/randread.m4
@@ -0,0 +1,11 @@
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_RANDREAD],
+[
+ AC_LIBSOURCES([randread.c, randread.h, rand-isaac.c, rand-isaac.h])
+ AC_LIBOBJ([randread])
+ AC_LIBOBJ([rand-isaac])
+])
diff --git a/m4/readlink.m4 b/m4/readlink.m4
new file mode 100644
index 0000000..1c347a0
--- /dev/null
+++ b/m4/readlink.m4
@@ -0,0 +1,29 @@
+# readlink.m4 serial 4
+dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_READLINK],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([readlink])
+ if test $ac_cv_func_readlink = no; then
+ HAVE_READLINK=0
+ AC_LIBOBJ(readlink)
+ gl_PREREQ_READLINK
+ fi
+])
+
+# Like gl_FUNC_READLINK, except prepare for separate compilation (no AC_LIBOBJ).
+AC_DEFUN([gl_FUNC_READLINK_SEPARATE],
+[
+ AC_CHECK_FUNCS_ONCE([readlink])
+ gl_PREREQ_READLINK
+])
+
+# Prerequisites of lib/readlink.c.
+AC_DEFUN([gl_PREREQ_READLINK],
+[
+ :
+])
diff --git a/m4/readtokens.m4 b/m4/readtokens.m4
new file mode 100644
index 0000000..596a97b
--- /dev/null
+++ b/m4/readtokens.m4
@@ -0,0 +1,13 @@
+# readtokens.m4 serial 5
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_READTOKENS],
+[
+ AC_LIBOBJ([readtokens])
+
+ dnl Prerequisites of lib/readtokens.c.
+ :
+])
diff --git a/m4/readutmp.m4 b/m4/readutmp.m4
new file mode 100644
index 0000000..2e520cd
--- /dev/null
+++ b/m4/readutmp.m4
@@ -0,0 +1,62 @@
+# readutmp.m4 serial 13
+dnl Copyright (C) 2002-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_READUTMP],
+[
+ dnl Persuade utmpx.h to declare utmpxname
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ AC_CHECK_HEADERS_ONCE(utmp.h utmpx.h)
+ if test $ac_cv_header_utmp_h = yes || test $ac_cv_header_utmpx_h = yes; then
+ AC_LIBOBJ([readutmp])
+
+ dnl Prerequisites of lib/readutmp.h and lib/readutmp.c.
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([gl_FUNC_FREE])
+ AC_CHECK_FUNCS_ONCE(utmpname utmpxname)
+ AC_CHECK_DECLS(getutent,,,[
+#ifdef HAVE_UTMP_H
+# include <utmp.h>
+#endif
+])
+ utmp_includes="\
+$ac_includes_default
+#ifdef HAVE_UTMPX_H
+# include <utmpx.h>
+#endif
+#ifdef HAVE_UTMP_H
+# if defined _THREAD_SAFE && defined UTMP_DATA_INIT
+ /* When including both utmp.h and utmpx.h on AIX 4.3, with _THREAD_SAFE
+ defined, work around the duplicate struct utmp_data declaration. */
+# define utmp_data gl_aix_4_3_workaround_utmp_data
+# endif
+# 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],,,[$utmp_includes])
+ AC_CHECK_MEMBERS([struct utmp.ut_exit],,,[$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])
+ fi
+])
diff --git a/m4/regex.m4 b/m4/regex.m4
new file mode 100644
index 0000000..b8d5b1e
--- /dev/null
+++ b/m4/regex.m4
@@ -0,0 +1,211 @@
+#serial 46
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl Initially derived from code in GNU grep.
+dnl Mostly written by Jim Meyering.
+
+AC_PREREQ([2.50])
+
+AC_DEFUN([gl_REGEX],
+[
+ AC_CHECK_HEADERS_ONCE([locale.h])
+
+ AC_ARG_WITH([included-regex],
+ [AC_HELP_STRING([--without-included-regex],
+ [don't compile regex; this is the default on 32-bit
+ systems with recent-enough versions of the GNU C
+ Library (use with caution on other systems).
+ On systems with 64-bit ptrdiff_t and 32-bit int,
+ --with-included-regex is the default, in case
+ regex functions operate on very long strings (>2GB)])])
+
+ case $with_included_regex in #(
+ yes|no) ac_use_included_regex=$with_included_regex
+ ;;
+ '')
+ # If the system regex support is good enough that it passes the
+ # following run test, then default to *not* using the included regex.c.
+ # If cross compiling, assume the test would fail and use the included
+ # regex.c.
+ AC_CACHE_CHECK([for working re_compile_pattern],
+ [gl_cv_func_re_compile_pattern_working],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [AC_INCLUDES_DEFAULT
+ #if HAVE_LOCALE_H
+ #include <locale.h>
+ #endif
+ #include <limits.h>
+ #include <regex.h>
+ ],
+ [[static struct re_pattern_buffer regex;
+ unsigned char folded_chars[UCHAR_MAX + 1];
+ int i;
+ const char *s;
+ struct re_registers regs;
+
+ #if HAVE_LOCALE_H
+ /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
+ This test needs valgrind to catch the bug on Debian
+ GNU/Linux 3.1 x86, but it might catch the bug better
+ on other platforms and it shouldn't hurt to try the
+ test here. */
+ if (setlocale (LC_ALL, "en_US.UTF-8"))
+ {
+ static char const pat[] = "insert into";
+ static char const data[] =
+ "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
+ re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
+ | RE_ICASE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+ if (s)
+ return 1;
+ if (re_search (&regex, data, sizeof data - 1,
+ 0, sizeof data - 1, &regs)
+ != -1)
+ return 1;
+ if (! setlocale (LC_ALL, "C"))
+ return 1;
+ }
+ #endif
+
+ /* This test is from glibc bug 3957, reported by Andrew Mackey. */
+ re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("a[^x]b", 6, &regex);
+ if (s)
+ return 1;
+
+ /* This should fail, but succeeds for glibc-2.5. */
+ if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
+ return 1;
+
+ /* This regular expression is from Spencer ere test number 75
+ in grep-2.3. */
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+ memset (&regex, 0, sizeof regex);
+ for (i = 0; i <= UCHAR_MAX; i++)
+ folded_chars[i] = i;
+ regex.translate = folded_chars;
+ s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, &regex);
+ /* This should fail with _Invalid character class name_ error. */
+ if (!s)
+ return 1;
+
+ /* This should succeed, but does not for glibc-2.1.3. */
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("{1", 2, &regex);
+
+ if (s)
+ return 1;
+
+ /* The following example is derived from a problem report
+ against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("[an\371]*n", 7, &regex);
+ if (s)
+ return 1;
+
+ /* This should match, but does not for glibc-2.2.1. */
+ if (re_match (&regex, "an", 2, 0, &regs) != 2)
+ return 1;
+
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("x", 1, &regex);
+ if (s)
+ return 1;
+
+ /* glibc-2.2.93 does not work with a negative RANGE argument. */
+ if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
+ return 1;
+
+ /* The version of regex.c in older versions of gnulib
+ ignored RE_ICASE. Detect that problem too. */
+ re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("x", 1, &regex);
+ if (s)
+ return 1;
+
+ if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
+ return 1;
+
+ /* REG_STARTEND was added to glibc on 2004-01-15.
+ Reject older versions. */
+ if (! REG_STARTEND)
+ return 1;
+
+ /* Reject hosts whose regoff_t values are too narrow.
+ These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t
+ and 32-bit int. */
+ if (sizeof (regoff_t) < sizeof (ptrdiff_t)
+ || sizeof (regoff_t) < sizeof (ssize_t))
+ return 1;
+
+ return 0;]])],
+ [gl_cv_func_re_compile_pattern_working=yes],
+ [gl_cv_func_re_compile_pattern_working=no],
+ dnl When crosscompiling, assume it is not working.
+ [gl_cv_func_re_compile_pattern_working=no])])
+ case $gl_cv_func_re_compile_pattern_working in #(
+ yes) ac_use_included_regex=no;; #(
+ no) ac_use_included_regex=yes;;
+ esac
+ ;;
+ *) AC_MSG_ERROR([Invalid value for --with-included-regex: $with_included_regex])
+ ;;
+ esac
+
+ if test $ac_use_included_regex = yes; then
+ AC_DEFINE([_REGEX_LARGE_OFFSETS], 1,
+ [Define if you want regoff_t to be at least as wide POSIX requires.])
+ AC_DEFINE([re_syntax_options], [rpl_re_syntax_options],
+ [Define to rpl_re_syntax_options if the replacement should be used.])
+ AC_DEFINE([re_set_syntax], [rpl_re_set_syntax],
+ [Define to rpl_re_set_syntax if the replacement should be used.])
+ AC_DEFINE([re_compile_pattern], [rpl_re_compile_pattern],
+ [Define to rpl_re_compile_pattern if the replacement should be used.])
+ AC_DEFINE([re_compile_fastmap], [rpl_re_compile_fastmap],
+ [Define to rpl_re_compile_fastmap if the replacement should be used.])
+ AC_DEFINE([re_search], [rpl_re_search],
+ [Define to rpl_re_search if the replacement should be used.])
+ AC_DEFINE([re_search_2], [rpl_re_search_2],
+ [Define to rpl_re_search_2 if the replacement should be used.])
+ AC_DEFINE([re_match], [rpl_re_match],
+ [Define to rpl_re_match if the replacement should be used.])
+ AC_DEFINE([re_match_2], [rpl_re_match_2],
+ [Define to rpl_re_match_2 if the replacement should be used.])
+ AC_DEFINE([re_set_registers], [rpl_re_set_registers],
+ [Define to rpl_re_set_registers if the replacement should be used.])
+ AC_DEFINE([re_comp], [rpl_re_comp],
+ [Define to rpl_re_comp if the replacement should be used.])
+ AC_DEFINE([re_exec], [rpl_re_exec],
+ [Define to rpl_re_exec if the replacement should be used.])
+ AC_DEFINE([regcomp], [rpl_regcomp],
+ [Define to rpl_regcomp if the replacement should be used.])
+ AC_DEFINE([regexec], [rpl_regexec],
+ [Define to rpl_regexec if the replacement should be used.])
+ AC_DEFINE([regerror], [rpl_regerror],
+ [Define to rpl_regerror if the replacement should be used.])
+ AC_DEFINE([regfree], [rpl_regfree],
+ [Define to rpl_regfree if the replacement should be used.])
+ AC_LIBOBJ([regex])
+ gl_PREREQ_REGEX
+ fi
+])
+
+# Prerequisites of lib/regex.c and lib/regex_internal.c.
+AC_DEFUN([gl_PREREQ_REGEX],
+[
+ AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_CHECK_FUNCS_ONCE([iswctype mbrtowc wcrtomb wcscoll])
+ AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
+])
diff --git a/m4/rename-dest-slash.m4 b/m4/rename-dest-slash.m4
new file mode 100644
index 0000000..227f237
--- /dev/null
+++ b/m4/rename-dest-slash.m4
@@ -0,0 +1,41 @@
+#serial 2
+
+# Copyright (C) 2006 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Derived from rename.m4.
+
+# A rename wrapper to make tools like mv -- that would normally
+# rely on the underlying rename syscall -- work more consistently.
+
+AC_DEFUN([gl_FUNC_RENAME_TRAILING_DEST_SLASH],
+[
+ AC_CACHE_CHECK([whether rename is broken with respect to destination slashes],
+ gl_cv_func_rename_trailing_dest_slash_bug,
+ [
+ rm -rf conftest.d1 conftest.d2
+ mkdir conftest.d1 ||
+ AC_MSG_ERROR([cannot create temporary directory])
+ AC_TRY_RUN([
+# include <stdio.h>
+ int
+ main ()
+ {
+ return (rename ("conftest.d1", "conftest.d2/") ? 1 : 0);
+ }
+ ],
+ gl_cv_func_rename_trailing_dest_slash_bug=no,
+ gl_cv_func_rename_trailing_dest_slash_bug=yes,
+ dnl When crosscompiling, assume rename is broken.
+ gl_cv_func_rename_trailing_dest_slash_bug=yes)
+
+ rm -rf conftest.d1 conftest.d2
+ ])
+ if test $gl_cv_func_rename_trailing_dest_slash_bug = yes; then
+ AC_LIBOBJ(rename-dest-slash)
+ AC_DEFINE(rename, rpl_rename_dest_slash,
+ [Define to rpl_rename_dest_slash if the replacement function should be used.])
+ fi
+])
diff --git a/m4/rename.m4 b/m4/rename.m4
new file mode 100644
index 0000000..39ad5e7
--- /dev/null
+++ b/m4/rename.m4
@@ -0,0 +1,52 @@
+#serial 10
+
+# Copyright (C) 2001, 2003, 2005, 2006 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Volker Borchert.
+dnl Determine whether rename works for source file names with a trailing slash.
+dnl The rename from SunOS 4.1.1_U1 doesn't.
+dnl
+dnl If it doesn't, then define RENAME_TRAILING_SLASH_BUG and arrange
+dnl to compile the wrapper function.
+dnl
+
+AC_DEFUN([gl_FUNC_RENAME],
+[
+ AC_CACHE_CHECK([whether rename is broken],
+ gl_cv_func_rename_trailing_slash_bug,
+ [
+ rm -rf conftest.d1 conftest.d2
+ mkdir conftest.d1 ||
+ AC_MSG_ERROR([cannot create temporary directory])
+ AC_TRY_RUN([
+# include <stdio.h>
+# include <stdlib.h>
+ int
+ main ()
+ {
+ exit (rename ("conftest.d1/", "conftest.d2") ? 1 : 0);
+ }
+ ],
+ gl_cv_func_rename_trailing_slash_bug=no,
+ gl_cv_func_rename_trailing_slash_bug=yes,
+ dnl When crosscompiling, assume rename is broken.
+ gl_cv_func_rename_trailing_slash_bug=yes)
+
+ rm -rf conftest.d1 conftest.d2
+ ])
+ if test $gl_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 file names 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], [:])
diff --git a/m4/rmdir-errno.m4 b/m4/rmdir-errno.m4
new file mode 100644
index 0000000..7693bc7
--- /dev/null
+++ b/m4/rmdir-errno.m4
@@ -0,0 +1,49 @@
+#serial 8
+
+# Copyright (C) 2000, 2001, 2005, 2006 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# When rmdir fails because the specified directory is not empty, it sets
+# errno to some value, usually ENOTEMPTY. However, on some AIX systems,
+# ENOTEMPTY is mistakenly defined to be EEXIST. To work around this, and
+# in general, to avoid depending on the use of any particular symbol, this
+# test runs a test to determine the actual numeric value.
+AC_DEFUN([gl_FUNC_RMDIR_NOTEMPTY],
+[dnl
+ AC_CHECK_HEADERS_ONCE(unistd.h)
+ AC_CACHE_CHECK([for rmdir-not-empty errno value],
+ gl_cv_func_rmdir_errno_not_empty,
+ [
+ # Arrange for deletion of the temporary directory this test creates.
+ ac_clean_files="$ac_clean_files confdir2"
+ mkdir confdir2; : > confdir2/file
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <errno.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+ int main ()
+ {
+ FILE *s;
+ int val;
+ rmdir ("confdir2");
+ val = errno;
+ s = fopen ("confdir2/errno", "w");
+ fprintf (s, "%d\n", val);
+ return 0;
+ }
+ ],
+ gl_cv_func_rmdir_errno_not_empty=`cat confdir2/errno`,
+ gl_cv_func_rmdir_errno_not_empty='configure error in rmdir-errno.m4',
+ gl_cv_func_rmdir_errno_not_empty=ENOTEMPTY
+ )
+ ]
+ )
+
+ AC_DEFINE_UNQUOTED([RMDIR_ERRNO_NOT_EMPTY],
+ $gl_cv_func_rmdir_errno_not_empty,
+ [the value to which errno is set when rmdir fails on a nonempty directory])
+])
diff --git a/m4/rmdir.m4 b/m4/rmdir.m4
new file mode 100644
index 0000000..7235203
--- /dev/null
+++ b/m4/rmdir.m4
@@ -0,0 +1,10 @@
+# rmdir.m4 serial 3
+dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_RMDIR],
+[
+ AC_REPLACE_FUNCS(rmdir)
+])
diff --git a/m4/root-dev-ino.m4 b/m4/root-dev-ino.m4
new file mode 100644
index 0000000..bf7a7c9
--- /dev/null
+++ b/m4/root-dev-ino.m4
@@ -0,0 +1,16 @@
+# -*- buffer-read-only: t -*- vi: set ro:
+# DO NOT EDIT! GENERATED AUTOMATICALLY!
+#serial 3
+dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_ROOT_DEV_INO],
+[
+ AC_LIBOBJ([root-dev-ino])
+
+ dnl Prerequisites
+ AC_REQUIRE([AC_FUNC_LSTAT])
+ :
+])
diff --git a/m4/rpmatch.m4 b/m4/rpmatch.m4
new file mode 100644
index 0000000..4a471ac
--- /dev/null
+++ b/m4/rpmatch.m4
@@ -0,0 +1,16 @@
+# rpmatch.m4 serial 5
+dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_RPMATCH],
+[
+ AC_REPLACE_FUNCS(rpmatch)
+ if test $ac_cv_func_rpmatch = no; then
+ gl_PREREQ_RPMATCH
+ fi
+])
+
+# Prerequisites of lib/rpmatch.c.
+AC_DEFUN([gl_PREREQ_RPMATCH], [:])
diff --git a/m4/safe-read.m4 b/m4/safe-read.m4
new file mode 100644
index 0000000..7a89d0a
--- /dev/null
+++ b/m4/safe-read.m4
@@ -0,0 +1,18 @@
+# safe-read.m4 serial 5
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SAFE_READ],
+[
+ AC_LIBOBJ([safe-read])
+
+ gl_PREREQ_SAFE_READ
+])
+
+# Prerequisites of lib/safe-read.c.
+AC_DEFUN([gl_PREREQ_SAFE_READ],
+[
+ AC_REQUIRE([gt_TYPE_SSIZE_T])
+])
diff --git a/m4/safe-write.m4 b/m4/safe-write.m4
new file mode 100644
index 0000000..db119ff
--- /dev/null
+++ b/m4/safe-write.m4
@@ -0,0 +1,18 @@
+# safe-write.m4 serial 3
+dnl Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SAFE_WRITE],
+[
+ AC_LIBOBJ([safe-write])
+
+ gl_PREREQ_SAFE_WRITE
+])
+
+# Prerequisites of lib/safe-write.c.
+AC_DEFUN([gl_PREREQ_SAFE_WRITE],
+[
+ gl_PREREQ_SAFE_READ
+])
diff --git a/m4/same.m4 b/m4/same.m4
new file mode 100644
index 0000000..709c8f1
--- /dev/null
+++ b/m4/same.m4
@@ -0,0 +1,14 @@
+#serial 8
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SAME],
+[
+ AC_LIBOBJ([same])
+
+ dnl Prerequisites of lib/same.c.
+ AC_REQUIRE([AC_SYS_LONG_FILE_NAMES])
+ AC_CHECK_FUNCS_ONCE([pathconf])
+])
diff --git a/m4/save-cwd.m4 b/m4/save-cwd.m4
new file mode 100644
index 0000000..7a2286b
--- /dev/null
+++ b/m4/save-cwd.m4
@@ -0,0 +1,12 @@
+#serial 8
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SAVE_CWD],
+[
+ AC_LIBOBJ([save-cwd])
+ dnl Prerequisites for lib/save-cwd.c.
+ AC_CHECK_FUNCS_ONCE(fchdir)
+])
diff --git a/m4/savedir.m4 b/m4/savedir.m4
new file mode 100644
index 0000000..1fc6c81
--- /dev/null
+++ b/m4/savedir.m4
@@ -0,0 +1,10 @@
+# savedir.m4 serial 9
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SAVEDIR],
+[
+ AC_LIBOBJ([savedir])
+])
diff --git a/m4/savewd.m4 b/m4/savewd.m4
new file mode 100644
index 0000000..147214d
--- /dev/null
+++ b/m4/savewd.m4
@@ -0,0 +1,9 @@
+# Save and restore the working directory, possibly using a child process.
+
+dnl Copyright (C) 2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SAVEWD],
+ [AC_REQUIRE([AC_C_INLINE])])
diff --git a/m4/setenv.m4 b/m4/setenv.m4
new file mode 100644
index 0000000..d6901de
--- /dev/null
+++ b/m4/setenv.m4
@@ -0,0 +1,82 @@
+# setenv.m4 serial 8
+dnl Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_SETENV],
+[
+ AC_CHECK_FUNCS_ONCE([setenv])
+ if test $ac_cv_func_setenv = no; then
+ AC_LIBOBJ([setenv])
+ gl_PREREQ_SETENV
+ fi
+])
+
+# Like gl_FUNC_SETENV, except prepare for separate compilation (no AC_LIBOBJ).
+AC_DEFUN([gl_FUNC_SETENV_SEPARATE],
+[
+ AC_CHECK_FUNCS_ONCE([setenv])
+ gl_PREREQ_SETENV
+])
+
+AC_DEFUN([gl_FUNC_UNSETENV],
+[
+ AC_CHECK_FUNCS([unsetenv])
+ if test $ac_cv_func_unsetenv = no; then
+ AC_LIBOBJ([unsetenv])
+ gl_PREREQ_UNSETENV
+ else
+ AC_CACHE_CHECK([for unsetenv() return type], gt_cv_func_unsetenv_ret,
+ [AC_TRY_COMPILE([#include <stdlib.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+int unsetenv (const char *name);
+#else
+int unsetenv();
+#endif
+], , gt_cv_func_unsetenv_ret='int', gt_cv_func_unsetenv_ret='void')])
+ if test $gt_cv_func_unsetenv_ret = 'void'; then
+ AC_DEFINE(VOID_UNSETENV, 1, [Define if unsetenv() returns void, not int.])
+ fi
+ fi
+])
+
+# Check if a variable is properly declared.
+# gt_CHECK_VAR_DECL(includes,variable)
+AC_DEFUN([gt_CHECK_VAR_DECL],
+[
+ define([gt_cv_var], [gt_cv_var_]$2[_declaration])
+ AC_MSG_CHECKING([if $2 is properly declared])
+ AC_CACHE_VAL(gt_cv_var, [
+ AC_TRY_COMPILE([$1
+ extern struct { int foo; } $2;],
+ [$2.foo = 1;],
+ gt_cv_var=no,
+ gt_cv_var=yes)])
+ AC_MSG_RESULT($gt_cv_var)
+ if test $gt_cv_var = yes; then
+ AC_DEFINE([HAVE_]translit($2, [a-z], [A-Z])[_DECL], 1,
+ [Define if you have the declaration of $2.])
+ fi
+])
+
+# Prerequisites of lib/setenv.c.
+AC_DEFUN([gl_PREREQ_SETENV],
+[
+ AC_REQUIRE([AC_FUNC_ALLOCA])
+ AC_CHECK_HEADERS_ONCE(unistd.h)
+ AC_CHECK_HEADERS(search.h)
+ AC_CHECK_FUNCS(tsearch)
+ gt_CHECK_VAR_DECL([#include <unistd.h>], environ)
+])
+
+# Prerequisites of lib/unsetenv.c.
+AC_DEFUN([gl_PREREQ_UNSETENV],
+[
+ AC_CHECK_HEADERS_ONCE(unistd.h)
+ gt_CHECK_VAR_DECL([#include <unistd.h>], environ)
+])
diff --git a/m4/settime.m4 b/m4/settime.m4
new file mode 100644
index 0000000..693e84e
--- /dev/null
+++ b/m4/settime.m4
@@ -0,0 +1,15 @@
+# settime.m4 serial 5
+dnl Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SETTIME],
+[
+ AC_LIBOBJ([settime])
+
+ dnl Prerequisites of lib/settime.c.
+ AC_REQUIRE([gl_CLOCK_TIME])
+ AC_REQUIRE([gl_TIMESPEC])
+ AC_CHECK_FUNCS_ONCE(settimeofday stime)
+])
diff --git a/m4/sha1.m4 b/m4/sha1.m4
new file mode 100644
index 0000000..c6e6184
--- /dev/null
+++ b/m4/sha1.m4
@@ -0,0 +1,14 @@
+# sha1.m4 serial 7
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SHA1],
+[
+ AC_LIBOBJ([sha1])
+
+ dnl Prerequisites of lib/sha1.c.
+ AC_REQUIRE([AC_C_BIGENDIAN])
+ :
+])
diff --git a/m4/sha256.m4 b/m4/sha256.m4
new file mode 100644
index 0000000..4284e3f
--- /dev/null
+++ b/m4/sha256.m4
@@ -0,0 +1,15 @@
+# sha256.m4 serial 1
+dnl Copyright (C) 2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SHA256],
+[
+ AC_LIBSOURCES([sha256.c, sha256.h])
+ AC_LIBOBJ([sha256])
+
+ dnl Prerequisites of lib/sha256.c.
+ AC_REQUIRE([AC_C_BIGENDIAN])
+ :
+])
diff --git a/m4/sha512.m4 b/m4/sha512.m4
new file mode 100644
index 0000000..2de0b2e
--- /dev/null
+++ b/m4/sha512.m4
@@ -0,0 +1,15 @@
+# sha512.m4 serial 2
+dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SHA512],
+[
+ AC_LIBSOURCES([sha512.c, sha512.h, u64.h])
+ AC_LIBOBJ([sha512])
+
+ dnl Prerequisites of lib/sha512.c.
+ AC_REQUIRE([AC_C_BIGENDIAN])
+ :
+])
diff --git a/m4/sig2str.m4 b/m4/sig2str.m4
new file mode 100644
index 0000000..8b85c43
--- /dev/null
+++ b/m4/sig2str.m4
@@ -0,0 +1,19 @@
+#serial 5
+dnl Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_SIG2STR],
+[
+
+ AC_REPLACE_FUNCS(sig2str)
+ if test $ac_cv_func_sig2str = no; then
+ gl_PREREQ_SIG2STR
+ fi
+])
+
+# Prerequisites of lib/sig2str.c.
+AC_DEFUN([gl_PREREQ_SIG2STR], [
+ :
+])
diff --git a/m4/snprintf.m4 b/m4/snprintf.m4
new file mode 100644
index 0000000..f21200d
--- /dev/null
+++ b/m4/snprintf.m4
@@ -0,0 +1,31 @@
+# snprintf.m4 serial 4
+dnl Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_SNPRINTF],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_CHECK_FUNCS([snprintf])
+ if test $ac_cv_func_snprintf = no; then
+ gl_REPLACE_SNPRINTF
+ fi
+ AC_CHECK_DECLS_ONCE([snprintf])
+ if test $ac_cv_have_decl_snprintf = no; then
+ HAVE_DECL_SNPRINTF=0
+ fi
+])
+
+AC_DEFUN([gl_REPLACE_SNPRINTF],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_LIBOBJ([snprintf])
+ if test $ac_cv_func_snprintf = yes; then
+ REPLACE_SNPRINTF=1
+ fi
+ gl_PREREQ_SNPRINTF
+])
+
+# Prerequisites of lib/snprintf.c.
+AC_DEFUN([gl_PREREQ_SNPRINTF], [:])
diff --git a/m4/socklen.m4 b/m4/socklen.m4
new file mode 100644
index 0000000..e824a09
--- /dev/null
+++ b/m4/socklen.m4
@@ -0,0 +1,52 @@
+# socklen.m4 serial 5
+dnl Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Albert Chin, Windows fixes from Simon Josefsson.
+
+dnl Check for socklen_t: historically on BSD it is an int, and in
+dnl POSIX 1g it is a type of its own, but some platforms use different
+dnl types for the argument to getsockopt, getpeername, etc. So we
+dnl have to test to find something that will work.
+
+dnl On mingw32, socklen_t is in ws2tcpip.h ('int'), so we try to find
+dnl it there first. That file is included by gnulib's socket_.h, which
+dnl all users of this module should include. Cygwin must not include
+dnl ws2tcpip.h.
+AC_DEFUN([gl_TYPE_SOCKLEN_T],
+ [AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl
+ AC_CHECK_TYPE([socklen_t], ,
+ [AC_MSG_CHECKING([for socklen_t equivalent])
+ AC_CACHE_VAL([gl_cv_socklen_t_equiv],
+ [# Systems have either "struct sockaddr *" or
+ # "void *" as the second argument to getpeername
+ gl_cv_socklen_t_equiv=
+ for arg2 in "struct sockaddr" void; do
+ for t in int size_t "unsigned int" "long int" "unsigned long int"; do
+ AC_TRY_COMPILE(
+ [#include <sys/types.h>
+ #include <sys/socket.h>
+
+ int getpeername (int, $arg2 *, $t *);],
+ [$t len;
+ getpeername (0, 0, &len);],
+ [gl_cv_socklen_t_equiv="$t"])
+ test "$gl_cv_socklen_t_equiv" != "" && break
+ done
+ test "$gl_cv_socklen_t_equiv" != "" && break
+ done
+ ])
+ if test "$gl_cv_socklen_t_equiv" = ""; then
+ AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
+ fi
+ AC_MSG_RESULT([$gl_cv_socklen_t_equiv])
+ AC_DEFINE_UNQUOTED([socklen_t], [$gl_cv_socklen_t_equiv],
+ [type to use in place of socklen_t if not defined])],
+ [#include <sys/types.h>
+ #if HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #elif HAVE_WS2TCPIP_H
+ # include <ws2tcpip.h>
+ #endif])])
diff --git a/m4/sockpfaf.m4 b/m4/sockpfaf.m4
new file mode 100644
index 0000000..25d9755
--- /dev/null
+++ b/m4/sockpfaf.m4
@@ -0,0 +1,58 @@
+# sockpfaf.m4 serial 5
+dnl Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Test for some common socket protocol families (PF_INET, PF_INET6, ...)
+dnl and some common address families (AF_INET, AF_INET6, ...).
+dnl This test assumes that a system supports an address family if and only if
+dnl it supports the corresponding protocol family.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gl_SOCKET_FAMILIES],
+[
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ AC_CHECK_HEADERS_ONCE([netinet/in.h])
+
+ AC_MSG_CHECKING(for IPv4 sockets)
+ AC_CACHE_VAL(gl_cv_socket_ipv4,
+ [AC_TRY_COMPILE([#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif],
+[int x = AF_INET; struct in_addr y; struct sockaddr_in z;
+ if (&x && &y && &z) return 0;],
+ gl_cv_socket_ipv4=yes, gl_cv_socket_ipv4=no)])
+ AC_MSG_RESULT($gl_cv_socket_ipv4)
+ if test $gl_cv_socket_ipv4 = yes; then
+ AC_DEFINE(HAVE_IPV4, 1, [Define to 1 if <sys/socket.h> defines AF_INET.])
+ fi
+
+ AC_MSG_CHECKING(for IPv6 sockets)
+ AC_CACHE_VAL(gl_cv_socket_ipv6,
+ [AC_TRY_COMPILE([#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif],
+[int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
+ if (&x && &y && &z) return 0;],
+ gl_cv_socket_ipv6=yes, gl_cv_socket_ipv6=no)])
+ AC_MSG_RESULT($gl_cv_socket_ipv6)
+ if test $gl_cv_socket_ipv6 = yes; then
+ AC_DEFINE(HAVE_IPV6, 1, [Define to 1 if <sys/socket.h> defines AF_INET6.])
+ fi
+])
diff --git a/m4/ssize_t.m4 b/m4/ssize_t.m4
new file mode 100644
index 0000000..4eaef93
--- /dev/null
+++ b/m4/ssize_t.m4
@@ -0,0 +1,21 @@
+# ssize_t.m4 serial 4 (gettext-0.15)
+dnl Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether ssize_t is defined.
+
+AC_DEFUN([gt_TYPE_SSIZE_T],
+[
+ AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t],
+ [AC_TRY_COMPILE([#include <sys/types.h>],
+ [int x = sizeof (ssize_t *) + sizeof (ssize_t);
+ return !x;],
+ [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])])
+ if test $gt_cv_ssize_t = no; then
+ AC_DEFINE([ssize_t], [int],
+ [Define as a signed type of the same size as size_t.])
+ fi
+])
diff --git a/m4/st_dm_mode.m4 b/m4/st_dm_mode.m4
new file mode 100644
index 0000000..c1da154
--- /dev/null
+++ b/m4/st_dm_mode.m4
@@ -0,0 +1,22 @@
+#serial 4
+
+# Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Define HAVE_ST_DM_MODE if struct stat has an st_dm_mode member.
+
+AC_DEFUN([AC_STRUCT_ST_DM_MODE],
+ [AC_CACHE_CHECK([for st_dm_mode in struct stat], ac_cv_struct_st_dm_mode,
+ [AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/stat.h>], [struct stat s; s.st_dm_mode;],
+ ac_cv_struct_st_dm_mode=yes,
+ ac_cv_struct_st_dm_mode=no)])
+
+ if test $ac_cv_struct_st_dm_mode = yes; then
+ AC_DEFINE(HAVE_ST_DM_MODE, 1,
+ [Define if struct stat has an st_dm_mode member. ])
+ fi
+ ]
+)
diff --git a/m4/stat-prog.m4 b/m4/stat-prog.m4
new file mode 100644
index 0000000..df9b40d
--- /dev/null
+++ b/m4/stat-prog.m4
@@ -0,0 +1,87 @@
+# stat-prog.m4 serial 5
+# Record the prerequisites of src/stat.c from the coreutils package.
+
+# Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Written by Jim Meyering.
+
+AC_DEFUN([cu_PREREQ_STAT_PROG],
+[
+ AC_REQUIRE([gl_FSUSAGE])
+ AC_REQUIRE([gl_FSTYPENAME])
+ AC_CHECK_HEADERS_ONCE([OS.h netinet/in.h sys/param.h sys/vfs.h])
+
+ dnl Check for vfs.h first, since this avoids a warning with nfs_client.h
+ dnl on Solaris 8.
+ test $ac_cv_header_sys_param_h = yes &&
+ test $ac_cv_header_sys_mount_h = yes &&
+ AC_CHECK_HEADERS([nfs/vfs.h],
+ [AC_CHECK_HEADERS([nfs/nfs_client.h])])
+
+ statvfs_includes="\
+AC_INCLUDES_DEFAULT
+#include <sys/statvfs.h>
+"
+ statfs_includes="\
+AC_INCLUDES_DEFAULT
+#if HAVE_SYS_VFS_H
+# include <sys/vfs.h>
+#elif HAVE_SYS_MOUNT_H && HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# include <sys/mount.h>
+# if HAVE_NETINET_IN_H && HAVE_NFS_NFS_CLNT_H && HAVE_NFS_VFS_H
+# include <netinet/in.h>
+# include <nfs/nfs_clnt.h>
+# include <nfs/vfs.h>
+# endif
+#elif HAVE_OS_H
+# include <fs_info.h>
+#endif
+"
+ dnl Keep this long conditional in sync with the USE_STATVFS conditional
+ dnl in ../src/stat.c.
+ if test "$fu_cv_sys_stat_statvfs" = yes &&
+ { AC_CHECK_MEMBERS([struct statvfs.f_basetype],,, [$statvfs_includes])
+ test $ac_cv_member_struct_statvfs_f_basetype = yes ||
+ { AC_CHECK_MEMBERS([struct statvfs.f_fstypename],,, [$statvfs_includes])
+ test $ac_cv_member_struct_statvfs_f_fstypename = yes ||
+ { test $ac_cv_member_struct_statfs_f_fstypename != yes &&
+ { AC_CHECK_MEMBERS([struct statvfs.f_type],,, [$statvfs_includes])
+ test $ac_cv_member_struct_statvfs_f_type = yes; }; }; }; }
+ then
+ AC_CHECK_MEMBERS([struct statvfs.f_namemax],,, [$statvfs_includes])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [$statvfs_includes],
+ [static statvfs s;
+ return (s.s_fsid ^ 0) == 0;])],
+ [AC_DEFINE([STRUCT_STATVFS_F_FSID_IS_INTEGER], 1,
+ [Define to 1 if the f_fsid member of struct statvfs is an integer.])])
+ else
+ AC_CHECK_MEMBERS([struct statfs.f_namelen, struct statfs.f_type],,,
+ [$statfs_includes])
+ if test $ac_cv_header_OS_h != yes; then
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [$statfs_includes],
+ [static statfs s;
+ return (s.s_fsid ^ 0) == 0;])],
+ [AC_DEFINE([STRUCT_STATFS_F_FSID_IS_INTEGER], 1,
+ [Define to 1 if the f_fsid member of struct statfs is an integer.])])
+ fi
+ fi
+])
diff --git a/m4/stat-time.m4 b/m4/stat-time.m4
new file mode 100644
index 0000000..353de21
--- /dev/null
+++ b/m4/stat-time.m4
@@ -0,0 +1,63 @@
+# Checks for stat-related time functions.
+
+# Copyright (C) 1998, 1999, 2001, 2003, 2005, 2006, 2007 Free Software
+# Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# st_atim.tv_nsec - Linux, Solaris
+# st_atimespec.tv_nsec - FreeBSD, if ! defined _POSIX_SOURCE
+# st_atimensec - FreeBSD, if defined _POSIX_SOURCE
+# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1)
+# st_spare1 - Cygwin?
+
+AC_DEFUN([gl_STAT_TIME],
+[
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_HEADERS_ONCE([sys/time.h])
+
+ AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec],
+ [AC_CACHE_CHECK([whether struct stat.st_atim is of type struct timespec],
+ [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec],
+ [AC_TRY_COMPILE(
+ [
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #if HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ #endif
+ #include <time.h>
+ struct timespec ts;
+ struct stat st;
+ ],
+ [
+ st.st_atim = ts;
+ ],
+ [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes],
+ [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no])])
+ if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
+ AC_DEFINE([TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC], 1,
+ [Define to 1 if the type of the st_atim member of a struct stat is
+ struct timespec.])
+ fi],
+ [AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec], [],
+ [AC_CHECK_MEMBERS([struct stat.st_atimensec], [],
+ [AC_CHECK_MEMBERS([struct stat.st_atim.st__tim.tv_nsec], [],
+ [AC_CHECK_MEMBERS([struct stat.st_spare1], [],
+ [],
+ [#include <sys/types.h>
+ #include <sys/stat.h>])],
+ [#include <sys/types.h>
+ #include <sys/stat.h>])],
+ [#include <sys/types.h>
+ #include <sys/stat.h>])],
+ [#include <sys/types.h>
+ #include <sys/stat.h>])],
+ [#include <sys/types.h>
+ #include <sys/stat.h>])
+])
diff --git a/m4/stdarg.m4 b/m4/stdarg.m4
new file mode 100644
index 0000000..e8e680a
--- /dev/null
+++ b/m4/stdarg.m4
@@ -0,0 +1,40 @@
+# stdarg.m4 serial 1
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Provide a working va_copy in combination with <stdarg.h>.
+
+AC_DEFUN([gl_STDARG_H],
+[
+ AC_MSG_CHECKING([for va_copy])
+ AC_CACHE_VAL([gl_cv_func_va_copy], [
+ AC_TRY_COMPILE([#include <stdarg.h>], [
+#ifndef va_copy
+void (*func) (va_list, va_list) = va_copy;
+#endif
+],
+ [gl_cv_func_va_copy=yes], [gl_cv_func_va_copy=no])])
+ AC_MSG_RESULT([$gl_cv_func_va_copy])
+ if test $gl_cv_func_va_copy = no; then
+ # Provide a substitute, either __va_copy or as a simple assignment.
+ AC_CACHE_VAL([gl_cv_func___va_copy], [
+ AC_TRY_COMPILE([#include <stdarg.h>], [
+#ifndef __va_copy
+error, bail out
+#endif
+],
+ [gl_cv_func___va_copy=yes], [gl_cv_func___va_copy=no])])
+ if test $gl_cv_func___va_copy = yes; then
+ AC_DEFINE([va_copy], [__va_copy],
+ [Define as a macro for copying va_list variables.])
+ else
+ AH_VERBATIM([gl_VA_COPY], [/* A replacement for va_copy, if needed. */
+#define gl_va_copy(a,b) ((a) = (b))])
+ AC_DEFINE([va_copy], [gl_va_copy],
+ [Define as a macro for copying va_list variables.])
+ fi
+ fi
+])
diff --git a/m4/stdbool.m4 b/m4/stdbool.m4
new file mode 100644
index 0000000..2204ecd
--- /dev/null
+++ b/m4/stdbool.m4
@@ -0,0 +1,115 @@
+# Check for stdbool.h that conforms to C99.
+
+dnl Copyright (C) 2002-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Prepare for substituting <stdbool.h> if it is not supported.
+
+AC_DEFUN([AM_STDBOOL_H],
+[
+ AC_REQUIRE([AC_HEADER_STDBOOL])
+
+ # Define two additional variables used in the Makefile substitution.
+
+ if test "$ac_cv_header_stdbool_h" = yes; then
+ STDBOOL_H=''
+ else
+ STDBOOL_H='stdbool.h'
+ fi
+ AC_SUBST([STDBOOL_H])
+
+ if test "$ac_cv_type__Bool" = yes; then
+ HAVE__BOOL=1
+ else
+ HAVE__BOOL=0
+ fi
+ AC_SUBST([HAVE__BOOL])
+])
+
+# AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future.
+AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H])
+
+# This macro is only needed in autoconf <= 2.59. Newer versions of autoconf
+# have this macro built-in.
+
+AC_DEFUN([AC_HEADER_STDBOOL],
+ [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
+ [ac_cv_header_stdbool_h],
+ [AC_TRY_COMPILE(
+ [
+ #include <stdbool.h>
+ #ifndef bool
+ "error: bool is not defined"
+ #endif
+ #ifndef false
+ "error: false is not defined"
+ #endif
+ #if false
+ "error: false is not 0"
+ #endif
+ #ifndef true
+ "error: true is not defined"
+ #endif
+ #if true != 1
+ "error: true is not 1"
+ #endif
+ #ifndef __bool_true_false_are_defined
+ "error: __bool_true_false_are_defined is not defined"
+ #endif
+
+ struct s { _Bool s: 1; _Bool t; } s;
+
+ char a[true == 1 ? 1 : -1];
+ char b[false == 0 ? 1 : -1];
+ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+ char d[(bool) 0.5 == true ? 1 : -1];
+ bool e = &s;
+ char f[(_Bool) 0.0 == false ? 1 : -1];
+ char g[true];
+ char h[sizeof (_Bool)];
+ char i[sizeof s.t];
+ enum { j = false, k = true, l = false * true, m = true * 256 };
+ _Bool n[m];
+ char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+ char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+ #if defined __xlc__ || defined __GNUC__
+ /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
+ reported by James Lemley on 2005-10-05; see
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
+ This test is not quite right, since xlc is allowed to
+ reject this program, as the initializer for xlcbug is
+ not one of the forms that C requires support for.
+ However, doing the test right would require a run-time
+ test, and that would make cross-compilation harder.
+ Let us hope that IBM fixes the xlc bug, and also adds
+ support for this kind of constant expression. In the
+ meantime, this test will reject xlc, which is OK, since
+ our stdbool.h substitute should suffice. We also test
+ this with GCC, where it should work, to detect more
+ quickly whether someone messes up the test in the
+ future. */
+ char digs[] = "0123456789";
+ int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
+ #endif
+ /* Catch a bug in an HP-UX C compiler. See
+ http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ */
+ _Bool q = true;
+ _Bool *pq = &q;
+ ],
+ [
+ *pq |= q;
+ *pq |= ! q;
+ /* Refer to every declared value, to avoid compiler optimizations. */
+ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+ + !m + !n + !o + !p + !q + !pq);
+ ],
+ [ac_cv_header_stdbool_h=yes],
+ [ac_cv_header_stdbool_h=no])])
+ AC_CHECK_TYPES([_Bool])
+ if test $ac_cv_header_stdbool_h = yes; then
+ AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.])
+ fi])
diff --git a/m4/stdint.m4 b/m4/stdint.m4
new file mode 100644
index 0000000..1a4b4a6
--- /dev/null
+++ b/m4/stdint.m4
@@ -0,0 +1,369 @@
+# stdint.m4 serial 22
+dnl Copyright (C) 2001-2002, 2004-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert and Bruno Haible.
+dnl Test whether <stdint.h> is supported or must be substituted.
+
+AC_DEFUN([gl_STDINT_H],
+[
+ AC_PREREQ(2.59)dnl
+
+ dnl Check for long long int and unsigned long long int.
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ if test $ac_cv_type_long_long_int = yes; then
+ HAVE_LONG_LONG_INT=1
+ else
+ HAVE_LONG_LONG_INT=0
+ fi
+ AC_SUBST([HAVE_LONG_LONG_INT])
+ AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+ HAVE_UNSIGNED_LONG_LONG_INT=1
+ else
+ HAVE_UNSIGNED_LONG_LONG_INT=0
+ fi
+ AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT])
+
+ dnl Check for <inttypes.h>.
+ dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h.
+ if test $ac_cv_header_inttypes_h = yes; then
+ HAVE_INTTYPES_H=1
+ else
+ HAVE_INTTYPES_H=0
+ fi
+ AC_SUBST([HAVE_INTTYPES_H])
+
+ dnl Check for <sys/types.h>.
+ dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_sys_types_h.
+ if test $ac_cv_header_sys_types_h = yes; then
+ HAVE_SYS_TYPES_H=1
+ else
+ HAVE_SYS_TYPES_H=0
+ fi
+ AC_SUBST([HAVE_SYS_TYPES_H])
+
+ dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_stdint_h.
+ if test $ac_cv_header_stdint_h = yes; then
+ gl_ABSOLUTE_HEADER([stdint.h])
+ ABSOLUTE_STDINT_H=\"$gl_cv_absolute_stdint_h\"
+ HAVE_STDINT_H=1
+ else
+ ABSOLUTE_STDINT_H=\"no/such/file/stdint.h\"
+ HAVE_STDINT_H=0
+ fi
+ AC_SUBST([ABSOLUTE_STDINT_H])
+ AC_SUBST([HAVE_STDINT_H])
+
+ dnl Now see whether we need a substitute <stdint.h>. Use
+ dnl ABSOLUTE_STDINT_H, not <stdint.h>, so that it also works during
+ dnl a "config.status --recheck" if a stdint.h has been
+ dnl created in the build directory.
+ if test $ac_cv_header_stdint_h = yes; then
+ AC_CACHE_CHECK([whether stdint.h conforms to C99],
+ [gl_cv_header_working_stdint_h],
+ [gl_cv_header_working_stdint_h=no
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+#include <stddef.h>
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#include ABSOLUTE_STDINT_H
+#ifdef INT8_MAX
+int8_t a1 = INT8_MAX;
+int8_t a1min = INT8_MIN;
+#endif
+#ifdef INT16_MAX
+int16_t a2 = INT16_MAX;
+int16_t a2min = INT16_MIN;
+#endif
+#ifdef INT32_MAX
+int32_t a3 = INT32_MAX;
+int32_t a3min = INT32_MIN;
+#endif
+#ifdef INT64_MAX
+int64_t a4 = INT64_MAX;
+int64_t a4min = INT64_MIN;
+#endif
+#ifdef UINT8_MAX
+uint8_t b1 = UINT8_MAX;
+#else
+typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
+#endif
+#ifdef UINT16_MAX
+uint16_t b2 = UINT16_MAX;
+#endif
+#ifdef UINT32_MAX
+uint32_t b3 = UINT32_MAX;
+#endif
+#ifdef UINT64_MAX
+uint64_t b4 = UINT64_MAX;
+#endif
+int_least8_t c1 = INT8_C (0x7f);
+int_least8_t c1max = INT_LEAST8_MAX;
+int_least8_t c1min = INT_LEAST8_MIN;
+int_least16_t c2 = INT16_C (0x7fff);
+int_least16_t c2max = INT_LEAST16_MAX;
+int_least16_t c2min = INT_LEAST16_MIN;
+int_least32_t c3 = INT32_C (0x7fffffff);
+int_least32_t c3max = INT_LEAST32_MAX;
+int_least32_t c3min = INT_LEAST32_MIN;
+int_least64_t c4 = INT64_C (0x7fffffffffffffff);
+int_least64_t c4max = INT_LEAST64_MAX;
+int_least64_t c4min = INT_LEAST64_MIN;
+uint_least8_t d1 = UINT8_C (0xff);
+uint_least8_t d1max = UINT_LEAST8_MAX;
+uint_least16_t d2 = UINT16_C (0xffff);
+uint_least16_t d2max = UINT_LEAST16_MAX;
+uint_least32_t d3 = UINT32_C (0xffffffff);
+uint_least32_t d3max = UINT_LEAST32_MAX;
+uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
+uint_least64_t d4max = UINT_LEAST64_MAX;
+int_fast8_t e1 = INT_FAST8_MAX;
+int_fast8_t e1min = INT_FAST8_MIN;
+int_fast16_t e2 = INT_FAST16_MAX;
+int_fast16_t e2min = INT_FAST16_MIN;
+int_fast32_t e3 = INT_FAST32_MAX;
+int_fast32_t e3min = INT_FAST32_MIN;
+int_fast64_t e4 = INT_FAST64_MAX;
+int_fast64_t e4min = INT_FAST64_MIN;
+uint_fast8_t f1 = UINT_FAST8_MAX;
+uint_fast16_t f2 = UINT_FAST16_MAX;
+uint_fast32_t f3 = UINT_FAST32_MAX;
+uint_fast64_t f4 = UINT_FAST64_MAX;
+#ifdef INTPTR_MAX
+intptr_t g = INTPTR_MAX;
+intptr_t gmin = INTPTR_MIN;
+#endif
+#ifdef UINTPTR_MAX
+uintptr_t h = UINTPTR_MAX;
+#endif
+intmax_t i = INTMAX_MAX;
+uintmax_t j = UINTMAX_MAX;
+struct s {
+ int check_PTRDIFF: PTRDIFF_MIN < 0 && 0 < PTRDIFF_MAX ? 1 : -1;
+ int check_SIG_ATOMIC: SIG_ATOMIC_MIN <= 0 && 0 < SIG_ATOMIC_MAX ? 1 : -1;
+ int check_SIZE: 0 < SIZE_MAX ? 1 : -1;
+ int check_WCHAR: WCHAR_MIN <= 0 && 0 < WCHAR_MAX ? 1 : -1;
+ int check_WINT: WINT_MIN <= 0 && 0 < WINT_MAX ? 1 : -1;
+
+ /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
+ int check_UINT8_C:
+ (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
+ int check_UINT16_C:
+ (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
+
+ /* Detect bugs in OpenBSD 3.9 stdint.h. */
+#ifdef UINT8_MAX
+ int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
+#endif
+#ifdef UINT16_MAX
+ int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
+#endif
+#ifdef UINT32_MAX
+ int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
+#endif
+#ifdef UINT64_MAX
+ int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
+#endif
+ int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
+ int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
+ int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
+ int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
+ int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
+ int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
+ int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
+ int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
+ int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
+ int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
+ int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
+};
+ ]])],
+ [gl_cv_header_working_stdint_h=yes])])
+ fi
+ if test "$gl_cv_header_working_stdint_h" = yes; then
+ STDINT_H=
+ else
+ dnl Check for <sys/inttypes.h>, and for
+ dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5).
+ AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h])
+ if test $ac_cv_header_sys_inttypes_h = yes; then
+ HAVE_SYS_INTTYPES_H=1
+ else
+ HAVE_SYS_INTTYPES_H=0
+ fi
+ AC_SUBST([HAVE_SYS_INTTYPES_H])
+ if test $ac_cv_header_sys_bitypes_h = yes; then
+ HAVE_SYS_BITYPES_H=1
+ else
+ HAVE_SYS_BITYPES_H=0
+ fi
+ AC_SUBST([HAVE_SYS_BITYPES_H])
+
+ gl_STDINT_TYPE_PROPERTIES
+ STDINT_H=stdint.h
+ fi
+ AC_SUBST(STDINT_H)
+])
+
+dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES)
+dnl Determine the size of each of the given types in bits.
+AC_DEFUN([gl_STDINT_BITSIZEOF],
+[
+ dnl Use a shell loop, to avoid bloating configure, and
+ dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
+ dnl config.h.in,
+ dnl - extra AC_SUBST calls, so that the right substitutions are made.
+ AC_FOREACH([gltype], [$1],
+ [AH_TEMPLATE([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
+ [Define to the number of bits in type ']gltype['.])])
+ for gltype in $1 ; do
+ AC_CACHE_CHECK([for bit size of $gltype], [gl_cv_bitsizeof_${gltype}],
+ [AC_COMPUTE_INT([result], [sizeof ($gltype) * CHAR_BIT],
+ [$2
+#include <limits.h>], [result=unknown])
+ eval gl_cv_bitsizeof_${gltype}=\$result
+ ])
+ eval result=\$gl_cv_bitsizeof_${gltype}
+ if test $result = unknown; then
+ dnl Use a nonempty default, because some compilers, such as IRIX 5 cc,
+ dnl do a syntax check even on unused #if conditions and give an error
+ dnl on valid C code like this:
+ dnl #if 0
+ dnl # if > 32
+ dnl # endif
+ dnl #endif
+ result=0
+ fi
+ GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ AC_DEFINE_UNQUOTED([BITSIZEOF_${GLTYPE}], [$result])
+ eval BITSIZEOF_${GLTYPE}=\$result
+ done
+ AC_FOREACH([gltype], [$1],
+ [AC_SUBST([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
+])
+
+dnl gl_CHECK_TYPES_SIGNED(TYPES, INCLUDES)
+dnl Determine the signedness of each of the given types.
+dnl Define HAVE_SIGNED_TYPE if type is signed.
+AC_DEFUN([gl_CHECK_TYPES_SIGNED],
+[
+ dnl Use a shell loop, to avoid bloating configure, and
+ dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
+ dnl config.h.in,
+ dnl - extra AC_SUBST calls, so that the right substitutions are made.
+ AC_FOREACH([gltype], [$1],
+ [AH_TEMPLATE([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
+ [Define to 1 if ']gltype[' is a signed integer type.])])
+ for gltype in $1 ; do
+ AC_CACHE_CHECK([whether $gltype is signed], [gl_cv_type_${gltype}_signed],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([$2[
+ int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];]])],
+ result=yes, result=no)
+ eval gl_cv_type_${gltype}_signed=\$result
+ ])
+ eval result=\$gl_cv_type_${gltype}_signed
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ if test "$result" = yes; then
+ AC_DEFINE_UNQUOTED([HAVE_SIGNED_${GLTYPE}], 1)
+ eval HAVE_SIGNED_${GLTYPE}=1
+ else
+ eval HAVE_SIGNED_${GLTYPE}=0
+ fi
+ done
+ AC_FOREACH([gltype], [$1],
+ [AC_SUBST([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
+])
+
+dnl gl_INTEGER_TYPE_SUFFIX(TYPES, INCLUDES)
+dnl Determine the suffix to use for integer constants of the given types.
+dnl Define t_SUFFIX for each such type.
+AC_DEFUN([gl_INTEGER_TYPE_SUFFIX],
+[
+ dnl Use a shell loop, to avoid bloating configure, and
+ dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
+ dnl config.h.in,
+ dnl - extra AC_SUBST calls, so that the right substitutions are made.
+ AC_FOREACH([gltype], [$1],
+ [AH_TEMPLATE(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX],
+ [Define to l, ll, u, ul, ull, etc., as suitable for
+ constants of type ']gltype['.])])
+ for gltype in $1 ; do
+ AC_CACHE_CHECK([for $gltype integer literal suffix],
+ [gl_cv_type_${gltype}_suffix],
+ [eval gl_cv_type_${gltype}_suffix=no
+ eval result=\$gl_cv_type_${gltype}_signed
+ if test "$result" = yes; then
+ glsufu=
+ else
+ glsufu=u
+ fi
+ for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+ case $glsuf in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ i64) gltype1='__int64';;
+ u) gltype1='unsigned int';;
+ ul) gltype1='unsigned long int';;
+ ull) gltype1='unsigned long long int';;
+ ui64)gltype1='unsigned __int64';;
+ esac
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([$2
+ extern $gltype foo;
+ extern $gltype1 foo;])],
+ [eval gl_cv_type_${gltype}_suffix=\$glsuf])
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" != no && break
+ done])
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" = no && result=
+ eval ${GLTYPE}_SUFFIX=\$result
+ AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], $result)
+ done
+ AC_FOREACH([gltype], [$1],
+ [AC_SUBST(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])])
+])
+
+dnl gl_STDINT_INCLUDES
+AC_DEFUN([gl_STDINT_INCLUDES],
+[[
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #include <stdio.h>
+ #include <time.h>
+ #include <wchar.h>
+]])
+
+dnl gl_STDINT_TYPE_PROPERTIES
+dnl Compute HAVE_SIGNED_t, BITSIZEOF_t and t_SUFFIX, for all the types t
+dnl of interest to stdint_.h.
+AC_DEFUN([gl_STDINT_TYPE_PROPERTIES],
+[
+ gl_STDINT_BITSIZEOF([ptrdiff_t sig_atomic_t size_t wchar_t wint_t],
+ [gl_STDINT_INCLUDES])
+ gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t],
+ [gl_STDINT_INCLUDES])
+ gl_cv_type_ptrdiff_t_signed=yes
+ gl_cv_type_size_t_signed=no
+ gl_INTEGER_TYPE_SUFFIX([ptrdiff_t sig_atomic_t size_t wchar_t wint_t],
+ [gl_STDINT_INCLUDES])
+])
+
+dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
+dnl Remove this when we can assume autoconf >= 2.61.
+m4_ifdef([AC_COMPUTE_INT], [], [
+ AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
+])
+
+# Hey Emacs!
+# Local Variables:
+# indent-tabs-mode: nil
+# End:
diff --git a/m4/stdint_h.m4 b/m4/stdint_h.m4
new file mode 100644
index 0000000..db9a8ac
--- /dev/null
+++ b/m4/stdint_h.m4
@@ -0,0 +1,26 @@
+# stdint_h.m4 serial 6
+dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([gl_AC_HEADER_STDINT_H],
+[
+ AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h,
+ [AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <stdint.h>],
+ [uintmax_t i = (uintmax_t) -1; return !i;],
+ gl_cv_header_stdint_h=yes,
+ gl_cv_header_stdint_h=no)])
+ if test $gl_cv_header_stdint_h = yes; then
+ AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
+ [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. ])
+ fi
+])
diff --git a/m4/stdio-safer.m4 b/m4/stdio-safer.m4
new file mode 100644
index 0000000..3d71452
--- /dev/null
+++ b/m4/stdio-safer.m4
@@ -0,0 +1,15 @@
+#serial 10
+dnl Copyright (C) 2002, 2005-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FOPEN_SAFER],
+[
+ AC_LIBOBJ([fopen-safer])
+])
+
+AC_DEFUN([gl_TMPFILE_SAFER],
+[
+ AC_LIBOBJ([tmpfile-safer])
+])
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4
new file mode 100644
index 0000000..6b4170b
--- /dev/null
+++ b/m4/stdio_h.m4
@@ -0,0 +1,43 @@
+# stdio_h.m4 serial 2
+dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_STDIO_H],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ gl_ABSOLUTE_HEADER([stdio.h])
+ ABSOLUTE_STDIO_H=\"$gl_cv_absolute_stdio_h\"
+ AC_SUBST([ABSOLUTE_STDIO_H])
+])
+
+AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_STDIO_H_DEFAULTS],
+[
+ GNULIB_FPRINTF_POSIX=0; AC_SUBST([GNULIB_FPRINTF_POSIX])
+ GNULIB_PRINTF_POSIX=0; AC_SUBST([GNULIB_PRINTF_POSIX])
+ GNULIB_SNPRINTF=0; AC_SUBST([GNULIB_SNPRINTF])
+ GNULIB_SPRINTF_POSIX=0; AC_SUBST([GNULIB_SPRINTF_POSIX])
+ GNULIB_VFPRINTF_POSIX=0; AC_SUBST([GNULIB_VFPRINTF_POSIX])
+ GNULIB_VPRINTF_POSIX=0; AC_SUBST([GNULIB_VPRINTF_POSIX])
+ GNULIB_VSNPRINTF=0; AC_SUBST([GNULIB_VSNPRINTF])
+ GNULIB_VSPRINTF_POSIX=0; AC_SUBST([GNULIB_VSPRINTF_POSIX])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF])
+ REPLACE_VFPRINTF=0; AC_SUBST([REPLACE_VFPRINTF])
+ REPLACE_PRINTF=0; AC_SUBST([REPLACE_PRINTF])
+ REPLACE_VPRINTF=0; AC_SUBST([REPLACE_VPRINTF])
+ REPLACE_SNPRINTF=0; AC_SUBST([REPLACE_SNPRINTF])
+ HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF])
+ REPLACE_VSNPRINTF=0; AC_SUBST([REPLACE_VSNPRINTF])
+ HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF])
+ REPLACE_SPRINTF=0; AC_SUBST([REPLACE_SPRINTF])
+ REPLACE_VSPRINTF=0; AC_SUBST([REPLACE_VSPRINTF])
+])
diff --git a/m4/stdlib-safer.m4 b/m4/stdlib-safer.m4
new file mode 100644
index 0000000..36fd17c
--- /dev/null
+++ b/m4/stdlib-safer.m4
@@ -0,0 +1,10 @@
+# stdlib-safer.m4 serial 2
+dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_STDLIB_SAFER],
+[
+ AC_LIBOBJ([mkstemp-safer])
+])
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4
new file mode 100644
index 0000000..d46a5f0
--- /dev/null
+++ b/m4/stdlib_h.m4
@@ -0,0 +1,31 @@
+# stdlib_h.m4 serial 1
+dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_STDLIB_H],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ gl_ABSOLUTE_HEADER([stdlib.h])
+ ABSOLUTE_STDLIB_H=\"$gl_cv_absolute_stdlib_h\"
+ AC_SUBST([ABSOLUTE_STDLIB_H])
+])
+
+AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_STDLIB_H_DEFAULTS],
+[
+ GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT])
+ GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP])
+ GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT])
+ HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP])
+ REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
+])
diff --git a/m4/stpcpy.m4 b/m4/stpcpy.m4
new file mode 100644
index 0000000..d42196e
--- /dev/null
+++ b/m4/stpcpy.m4
@@ -0,0 +1,23 @@
+# stpcpy.m4 serial 3
+dnl Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STPCPY],
+[
+ dnl Persuade glibc <string.h> to declare stpcpy().
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REPLACE_FUNCS(stpcpy)
+ if test $ac_cv_func_stpcpy = no; then
+ HAVE_STPCPY=0
+ gl_PREREQ_STPCPY
+ fi
+])
+
+# Prerequisites of lib/stpcpy.c.
+AC_DEFUN([gl_PREREQ_STPCPY], [
+ :
+])
diff --git a/m4/strcspn.m4 b/m4/strcspn.m4
new file mode 100644
index 0000000..9565004
--- /dev/null
+++ b/m4/strcspn.m4
@@ -0,0 +1,16 @@
+# strcspn.m4 serial 2
+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRCSPN],
+[
+ AC_REPLACE_FUNCS(strcspn)
+ if test $ac_cv_func_strcspn = no; then
+ gl_PREREQ_STRCSPN
+ fi
+])
+
+# Prerequisites of lib/strcspn.c.
+AC_DEFUN([gl_PREREQ_STRCSPN], [:])
diff --git a/m4/strdup.m4 b/m4/strdup.m4
new file mode 100644
index 0000000..8796e9e
--- /dev/null
+++ b/m4/strdup.m4
@@ -0,0 +1,22 @@
+# strdup.m4 serial 9
+
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software
+dnl Foundation, Inc.
+
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRDUP],
+[
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REPLACE_FUNCS(strdup)
+ AC_CHECK_DECLS_ONCE(strdup)
+ if test $ac_cv_have_decl_strdup = no; then
+ HAVE_DECL_STRDUP=0
+ fi
+ gl_PREREQ_STRDUP
+])
+
+# Prerequisites of lib/strdup.c.
+AC_DEFUN([gl_PREREQ_STRDUP], [:])
diff --git a/m4/strftime.m4 b/m4/strftime.m4
new file mode 100644
index 0000000..70b5378
--- /dev/null
+++ b/m4/strftime.m4
@@ -0,0 +1,33 @@
+#serial 29
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+# 2006, 2007 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Jim Meyering and Paul Eggert.
+
+AC_DEFUN([gl_FUNC_GNU_STRFTIME],
+[
+ gl_FUNC_STRFTIME
+])
+
+# These are the prerequisite macros for GNU's strftime.c replacement.
+AC_DEFUN([gl_FUNC_STRFTIME],
+[
+ AC_LIBOBJ([strftime])
+
+ # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
+ AC_REQUIRE([AC_STRUCT_TIMEZONE])
+
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ AC_REQUIRE([gl_TM_GMTOFF])
+
+ AC_CHECK_FUNCS_ONCE(mblen mbrlen mempcpy tzset)
+ AC_CHECK_HEADERS_ONCE(wchar.h)
+
+ AC_DEFINE([my_strftime], [nstrftime],
+ [Define to the name of the strftime replacement function.])
+])
diff --git a/m4/string_h.m4 b/m4/string_h.m4
new file mode 100644
index 0000000..f706d49
--- /dev/null
+++ b/m4/string_h.m4
@@ -0,0 +1,78 @@
+# Configure a GNU-like replacement for <string.h>.
+
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert.
+
+AC_DEFUN([gl_HEADER_STRING_H],
+[
+ dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+ dnl once only, before all statements that occur in other macros.
+ AC_REQUIRE([gl_HEADER_STRING_H_BODY])
+])
+
+AC_DEFUN([gl_HEADER_STRING_H_BODY],
+[
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ gl_ABSOLUTE_HEADER([string.h])
+ ABSOLUTE_STRING_H=\"$gl_cv_absolute_string_h\"
+ AC_SUBST([ABSOLUTE_STRING_H])
+])
+
+AC_DEFUN([gl_STRING_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
+[
+ GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM])
+ GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY])
+ GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR])
+ GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY])
+ GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY])
+ GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL])
+ GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP])
+ GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP])
+ GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN])
+ GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK])
+ GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP])
+ GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR])
+ GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R])
+ GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN])
+ GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR])
+ GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR])
+ GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR])
+ GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP])
+ GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP])
+ GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP])
+ GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR])
+ GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN])
+ GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK])
+ GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN])
+ GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP])
+ GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM])
+ HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY])
+ HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR])
+ HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY])
+ HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY])
+ HAVE_STRCASECMP=1; AC_SUBST([HAVE_STRCASECMP])
+ HAVE_DECL_STRNCASECMP=1; AC_SUBST([HAVE_DECL_STRNCASECMP])
+ HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL])
+ HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP])
+ HAVE_STRNDUP=1; AC_SUBST([HAVE_STRNDUP])
+ HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP])
+ HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN])
+ HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK])
+ HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP])
+ HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR])
+ HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R])
+])
diff --git a/m4/strndup.m4 b/m4/strndup.m4
new file mode 100644
index 0000000..baa6c03
--- /dev/null
+++ b/m4/strndup.m4
@@ -0,0 +1,53 @@
+# strndup.m4 serial 13
+dnl Copyright (C) 2002-2003, 2005-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRNDUP],
+[
+ dnl Persuade glibc <string.h> to declare strndup().
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_CHECK_DECLS_ONCE([strndup])
+ if test $ac_cv_have_decl_strndup = no; then
+ HAVE_DECL_STRNDUP=0
+ fi
+
+ # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
+ AC_CACHE_CHECK([for working strndup], gl_cv_func_strndup,
+ [AC_RUN_IFELSE([
+ AC_LANG_PROGRAM([#include <string.h>
+ #include <stdlib.h>], [[
+#ifndef HAVE_DECL_STRNDUP
+ extern char *strndup (const char *, size_t);
+#endif
+ char *s;
+ s = strndup ("some longer string", 15);
+ free (s);
+ s = strndup ("shorter string", 13);
+ return s[13] != '\0';]])],
+ [gl_cv_func_strndup=yes],
+ [gl_cv_func_strndup=no],
+ [AC_CHECK_FUNC([strndup],
+ [AC_EGREP_CPP([too risky], [
+#ifdef _AIX
+ too risky
+#endif
+ ],
+ [gl_cv_func_strndup=no],
+ [gl_cv_func_strndup=yes])],
+ [gl_cv_func_strndup=no])])])
+ if test $gl_cv_func_strndup = yes; then
+ AC_DEFINE([HAVE_STRNDUP], 1,
+ [Define if you have the strndup() function and it works.])
+ else
+ HAVE_STRNDUP=0
+ AC_LIBOBJ([strndup])
+ gl_PREREQ_STRNDUP
+ fi
+])
+
+# Prerequisites of lib/strndup.c.
+AC_DEFUN([gl_PREREQ_STRNDUP], [:])
diff --git a/m4/strnlen.m4 b/m4/strnlen.m4
new file mode 100644
index 0000000..0e2815b
--- /dev/null
+++ b/m4/strnlen.m4
@@ -0,0 +1,31 @@
+# strnlen.m4 serial 8
+dnl Copyright (C) 2002-2003, 2005-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRNLEN],
+[
+ dnl Persuade glibc <string.h> to declare strnlen().
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_CHECK_DECLS_ONCE([strnlen])
+ if test $ac_cv_have_decl_strnlen = no; then
+ HAVE_DECL_STRNLEN=0
+ fi
+
+ AC_FUNC_STRNLEN
+ if test $ac_cv_func_strnlen_working = no; then
+ # This is necessary because automake-1.6.1 doens't understand
+ # that the above use of AC_FUNC_STRNLEN means we may have to use
+ # lib/strnlen.c.
+ #AC_LIBOBJ(strnlen)
+ AC_DEFINE(strnlen, rpl_strnlen,
+ [Define to rpl_strnlen if the replacement function should be used.])
+ gl_PREREQ_STRNLEN
+ fi
+])
+
+# Prerequisites of lib/strnlen.c.
+AC_DEFUN([gl_PREREQ_STRNLEN], [:])
diff --git a/m4/strnumcmp.m4 b/m4/strnumcmp.m4
new file mode 100644
index 0000000..a7418c1
--- /dev/null
+++ b/m4/strnumcmp.m4
@@ -0,0 +1,27 @@
+# Compare numeric strings.
+
+dnl Copyright (C) 2005 Free Software Foundation, Inc.
+
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+AC_DEFUN([gl_STRINTCMP],
+[
+ AC_LIBSOURCES([strintcmp.c, strnumcmp.h, strnumcmp-in.h])
+ AC_LIBOBJ([strintcmp])
+
+ dnl Prerequisites of lib/strintcmp.c.
+ AC_REQUIRE([AC_INLINE])
+])
+
+AC_DEFUN([gl_STRNUMCMP],
+[
+ AC_LIBSOURCES([strnumcmp.c, strnumcmp.h, strnumcmp-in.h])
+ AC_LIBOBJ([strnumcmp])
+
+ dnl Prerequisites of lib/strnumcmp.c.
+ AC_REQUIRE([AC_INLINE])
+])
diff --git a/m4/strpbrk.m4 b/m4/strpbrk.m4
new file mode 100644
index 0000000..0398d45
--- /dev/null
+++ b/m4/strpbrk.m4
@@ -0,0 +1,18 @@
+# strpbrk.m4 serial 4
+dnl Copyright (C) 2002-2003, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRPBRK],
+[
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REPLACE_FUNCS(strpbrk)
+ if test $ac_cv_func_strpbrk = no; then
+ HAVE_STRPBRK=0
+ gl_PREREQ_STRPBRK
+ fi
+])
+
+# Prerequisites of lib/strpbrk.c.
+AC_DEFUN([gl_PREREQ_STRPBRK], [:])
diff --git a/m4/strtod.m4 b/m4/strtod.m4
new file mode 100644
index 0000000..1de2f2f
--- /dev/null
+++ b/m4/strtod.m4
@@ -0,0 +1,20 @@
+# strtod.m4 serial 6
+dnl Copyright (C) 2002, 2003, 2006, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRTOD],
+[
+ AC_FUNC_STRTOD
+ dnl Note: AC_FUNC_STRTOD does AC_LIBOBJ(strtod).
+ if test $ac_cv_func_strtod = no; then
+ AC_DEFINE(strtod, rpl_strtod,
+ [Define to rpl_strtod if the replacement function should be used.])
+ gl_PREREQ_STRTOD
+ fi
+])
+
+# Prerequisites of lib/strtod.c.
+# The need for pow() is already handled by AC_FUNC_STRTOD.
+AC_DEFUN([gl_PREREQ_STRTOD], [:])
diff --git a/m4/strtoimax.m4 b/m4/strtoimax.m4
new file mode 100644
index 0000000..9957637
--- /dev/null
+++ b/m4/strtoimax.m4
@@ -0,0 +1,34 @@
+# strtoimax.m4 serial 6
+dnl Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRTOIMAX],
+[
+ dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
+ AC_REQUIRE([AC_PROG_CPP])
+ AC_REQUIRE([AC_PROG_EGREP])
+
+ 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)
+ if test $ac_cv_func_strtoimax = no; then
+ gl_PREREQ_STRTOIMAX
+ fi
+ fi
+])
+
+# Prerequisites of lib/strtoimax.c.
+AC_DEFUN([gl_PREREQ_STRTOIMAX], [
+ AC_CHECK_DECLS(strtoll)
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+])
diff --git a/m4/strtol.m4 b/m4/strtol.m4
new file mode 100644
index 0000000..7fbae60
--- /dev/null
+++ b/m4/strtol.m4
@@ -0,0 +1,10 @@
+# strtol.m4 serial 4
+dnl Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRTOL],
+[
+ AC_REPLACE_FUNCS(strtol)
+])
diff --git a/m4/strtoll.m4 b/m4/strtoll.m4
new file mode 100644
index 0000000..53cbed2
--- /dev/null
+++ b/m4/strtoll.m4
@@ -0,0 +1,23 @@
+# strtoll.m4 serial 4
+dnl Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRTOLL],
+[
+ dnl We don't need (and can't compile) the replacement strtoll
+ dnl unless the type 'long long int' exists.
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ if test "$ac_cv_type_long_long_int" = yes; then
+ AC_REPLACE_FUNCS(strtoll)
+ if test $ac_cv_func_strtoll = no; then
+ gl_PREREQ_STRTOLL
+ fi
+ fi
+])
+
+# Prerequisites of lib/strtoll.c.
+AC_DEFUN([gl_PREREQ_STRTOLL], [
+ :
+])
diff --git a/m4/strtoul.m4 b/m4/strtoul.m4
new file mode 100644
index 0000000..5ec54aa
--- /dev/null
+++ b/m4/strtoul.m4
@@ -0,0 +1,10 @@
+# strtoul.m4 serial 3
+dnl Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRTOUL],
+[
+ AC_REPLACE_FUNCS(strtoul)
+])
diff --git a/m4/strtoull.m4 b/m4/strtoull.m4
new file mode 100644
index 0000000..fcec3de
--- /dev/null
+++ b/m4/strtoull.m4
@@ -0,0 +1,23 @@
+# strtoull.m4 serial 4
+dnl Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRTOULL],
+[
+ dnl We don't need (and can't compile) the replacement strtoull
+ dnl unless the type 'unsigned long long int' exists.
+ AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+ if test "$ac_cv_type_unsigned_long_long_int" = yes; then
+ AC_REPLACE_FUNCS(strtoull)
+ if test $ac_cv_func_strtoull = no; then
+ gl_PREREQ_STRTOULL
+ fi
+ fi
+])
+
+# Prerequisites of lib/strtoull.c.
+AC_DEFUN([gl_PREREQ_STRTOULL], [
+ :
+])
diff --git a/m4/strtoumax.m4 b/m4/strtoumax.m4
new file mode 100644
index 0000000..1935250
--- /dev/null
+++ b/m4/strtoumax.m4
@@ -0,0 +1,34 @@
+# strtoumax.m4 serial 6
+dnl Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRTOUMAX],
+[
+ dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
+ AC_REQUIRE([AC_PROG_CPP])
+ AC_REQUIRE([AC_PROG_EGREP])
+
+ 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)
+ if test $ac_cv_func_strtoumax = no; then
+ gl_PREREQ_STRTOUMAX
+ fi
+ fi
+])
+
+# Prerequisites of lib/strtoumax.c.
+AC_DEFUN([gl_PREREQ_STRTOUMAX], [
+ AC_CHECK_DECLS(strtoull)
+ AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+])
diff --git a/m4/strverscmp.m4 b/m4/strverscmp.m4
new file mode 100644
index 0000000..ab20c18
--- /dev/null
+++ b/m4/strverscmp.m4
@@ -0,0 +1,21 @@
+# strverscmp.m4 serial 4
+dnl Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRVERSCMP],
+[
+ dnl Persuade glibc <string.h> to declare strverscmp().
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ AC_REPLACE_FUNCS(strverscmp)
+ if test $ac_cv_func_strverscmp = no; then
+ gl_PREREQ_STRVERSCMP
+ fi
+])
+
+# Prerequisites of lib/strverscmp.c.
+AC_DEFUN([gl_PREREQ_STRVERSCMP], [
+ :
+])
diff --git a/m4/sys_socket_h.m4 b/m4/sys_socket_h.m4
new file mode 100644
index 0000000..ce5acf6
--- /dev/null
+++ b/m4/sys_socket_h.m4
@@ -0,0 +1,54 @@
+# sys_socket_h.m4 serial 3
+dnl Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Simon Josefsson.
+
+AC_DEFUN([gl_HEADER_SYS_SOCKET],
+[
+ AC_CACHE_CHECK([whether <sys/socket.h> is self-contained],
+ [gl_cv_header_sys_socket_h_selfcontained],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/socket.h>], [])],
+ [gl_cv_header_sys_socket_h_selfcontained=yes],
+ [gl_cv_header_sys_socket_h_selfcontained=no])
+ ])
+ if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
+ SYS_SOCKET_H=''
+ else
+ SYS_SOCKET_H='sys/socket.h'
+
+ AC_CHECK_HEADERS([sys/socket.h])
+ gl_ABSOLUTE_HEADER([sys/socket.h])
+ ABSOLUTE_SYS_SOCKET_H=\"$gl_cv_absolute_sys_socket_h\"
+ AC_SUBST([ABSOLUTE_SYS_SOCKET_H])
+ if test $ac_cv_header_sys_socket_h = yes; then
+ HAVE_SYS_SOCKET_H=1
+ HAVE_WINSOCK2_H=0
+ HAVE_WS2TCPIP_H=0
+ else
+ HAVE_SYS_SOCKET_H=0
+ dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
+ dnl the check for those headers unconditional; yet cygwin reports
+ dnl that the headers are present but cannot be compiled (since on
+ dnl cygwin, all socket information should come from sys/socket.h).
+ AC_CHECK_HEADERS([winsock2.h ws2tcpip.h])
+ if test $ac_cv_header_winsock2_h = yes; then
+ HAVE_WINSOCK2_H=1
+ else
+ HAVE_WINSOCK2_H=0
+ fi
+ if test $ac_cv_header_ws2tcpip_h = yes; then
+ HAVE_WS2TCPIP_H=1
+ else
+ HAVE_WS2TCPIP_H=0
+ fi
+ fi
+ AC_SUBST([HAVE_SYS_SOCKET_H])
+ AC_SUBST([HAVE_WINSOCK2_H])
+ AC_SUBST([HAVE_WS2TCPIP_H])
+ fi
+ AC_SUBST([SYS_SOCKET_H])
+])
diff --git a/m4/sys_stat_h.m4 b/m4/sys_stat_h.m4
new file mode 100644
index 0000000..9ca1311
--- /dev/null
+++ b/m4/sys_stat_h.m4
@@ -0,0 +1,32 @@
+# sys_stat_h.m4 serial 4 -*- Autoconf -*-
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Eric Blake.
+dnl Test whether <sys/stat.h> contains lstat and mkdir or must be substituted.
+
+AC_DEFUN([gl_HEADER_SYS_STAT_H],
+[
+ dnl Check for lstat. Systems that lack it (mingw) also lack symlinks, so
+ dnl stat is a good replacement.
+ AC_CHECK_FUNCS_ONCE([lstat])
+
+ dnl Check for mkdir. Mingw has _mkdir(name) in the nonstandard <io.h>
+ dnl instead.
+ AC_CHECK_DECLS([mkdir],
+ [],
+ [AC_CHECK_HEADERS([io.h])],
+ [#include <sys/stat.h>])
+ AC_REQUIRE([AC_C_INLINE])
+
+ dnl Check for broken stat macros.
+ AC_REQUIRE([AC_HEADER_STAT])
+
+ gl_ABSOLUTE_HEADER([sys/stat.h])
+ ABSOLUTE_SYS_STAT_H=\"$gl_cv_absolute_sys_stat_h\"
+ AC_SUBST([ABSOLUTE_SYS_STAT_H])
+ SYS_STAT_H='sys/stat.h'
+ AC_SUBST([SYS_STAT_H])
+]) # gl_HEADER_SYS_STAT_H
diff --git a/m4/sys_time_h.m4 b/m4/sys_time_h.m4
new file mode 100644
index 0000000..b38e1bc
--- /dev/null
+++ b/m4/sys_time_h.m4
@@ -0,0 +1,61 @@
+# Configure a replacement for <sys/time.h>.
+
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert and Martin Lambers.
+
+AC_DEFUN([gl_HEADER_SYS_TIME_H],
+[
+ dnl Use AC_REQUIRE here, so that the REPLACE_GETTIMEOFDAY=0 statement
+ dnl below is expanded once only, before all REPLACE_GETTIMEOFDAY=1
+ dnl statements that occur in other macros.
+ AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY])
+])
+
+AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
+[
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_CHECK_HEADERS_ONCE([sys/time.h])
+
+ if test $ac_cv_header_sys_time_h = yes; then
+ gl_ABSOLUTE_HEADER([sys/time.h])
+ ABSOLUTE_SYS_TIME_H=\"$gl_cv_absolute_sys_time_h\"
+ HAVE_SYS_TIME_H=1
+ else
+ ABSOLUTE_SYS_TIME_H=\"no/such/file/sys/time.h\"
+ HAVE_SYS_TIME_H=0
+ fi
+ AC_SUBST([ABSOLUTE_SYS_TIME_H])
+ AC_SUBST([HAVE_SYS_TIME_H])
+
+ AC_CACHE_CHECK([for struct timeval], [gl_cv_sys_struct_timeval],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#if HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #include <time.h>
+ ]],
+ [[static struct timeval x; x.tv_sec = x.tv_usec;]])],
+ [gl_cv_sys_struct_timeval=yes],
+ [gl_cv_sys_struct_timeval=no])])
+ if test $gl_cv_sys_struct_timeval = yes; then
+ HAVE_STRUCT_TIMEVAL=1
+ else
+ HAVE_STRUCT_TIMEVAL=0
+ fi
+ AC_SUBST([HAVE_STRUCT_TIMEVAL])
+
+ dnl Assume POSIX behavior unless another module says otherwise.
+ REPLACE_GETTIMEOFDAY=0
+ AC_SUBST([REPLACE_GETTIMEOFDAY])
+ if test $HAVE_SYS_TIME_H = 0 || test $HAVE_STRUCT_TIMEVAL = 0; then
+ SYS_TIME_H=sys/time.h
+ else
+ SYS_TIME_H=
+ fi
+ AC_SUBST([SYS_TIME_H])
+])
diff --git a/m4/tempname.m4 b/m4/tempname.m4
new file mode 100644
index 0000000..4c44d37
--- /dev/null
+++ b/m4/tempname.m4
@@ -0,0 +1,22 @@
+#serial 3
+
+# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# glibc provides __gen_tempname as a wrapper for mk[ds]temp. Expose
+# it as a public API, and provide it on systems that are lacking.
+AC_DEFUN([gl_FUNC_GEN_TEMPNAME],
+[
+ AC_REQUIRE([AC_SYS_LARGEFILE])
+
+ AC_LIBOBJ([tempname])
+ gl_PREREQ_TEMPNAME
+])
+
+# Prerequisites of lib/tempname.c.
+AC_DEFUN([gl_PREREQ_TEMPNAME],
+[
+ :
+])
diff --git a/m4/time_h.m4 b/m4/time_h.m4
new file mode 100644
index 0000000..e90ed7a
--- /dev/null
+++ b/m4/time_h.m4
@@ -0,0 +1,76 @@
+# Configure a more-standard replacement for <time.h>.
+
+# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007 Free Software
+# Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert and Jim Meyering.
+
+AC_DEFUN([gl_HEADER_TIME_H],
+[
+ dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+ dnl once only, before all statements that occur in other macros.
+ AC_REQUIRE([gl_HEADER_TIME_H_BODY])
+])
+
+AC_DEFUN([gl_HEADER_TIME_H_BODY],
+[
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+ gl_ABSOLUTE_HEADER([time.h])
+ ABSOLUTE_TIME_H=\"$gl_cv_absolute_time_h\"
+ AC_SUBST([ABSOLUTE_TIME_H])
+ AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
+])
+
+AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
+[
+ dnl If another module says to replace or to not replace, do that.
+ dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK;
+ dnl this lets maintainers check for portability.
+ REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R])
+ REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP])
+ REPLACE_STRPTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_STRPTIME])
+ REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM])
+])
+
+dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared
+dnl in time.h or sys/time.h.
+
+AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
+[
+ AC_CHECK_HEADERS_ONCE([sys/time.h])
+ AC_CACHE_CHECK([for struct timespec in <time.h>],
+ [gl_cv_sys_struct_timespec_in_time_h],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <time.h>
+ ]],
+ [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
+ [gl_cv_sys_struct_timespec_in_time_h=yes],
+ [gl_cv_sys_struct_timespec_in_time_h=no])])
+
+ TIME_H_DEFINES_STRUCT_TIMESPEC=0
+ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
+ if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
+ TIME_H_DEFINES_STRUCT_TIMESPEC=1
+ else
+ AC_CACHE_CHECK([for struct timespec in <sys/time.h>],
+ [gl_cv_sys_struct_timespec_in_sys_time_h],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/time.h>
+ ]],
+ [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
+ [gl_cv_sys_struct_timespec_in_sys_time_h=yes],
+ [gl_cv_sys_struct_timespec_in_sys_time_h=no])])
+ if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
+ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
+ fi
+ fi
+ AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC])
+ AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC])
+])
diff --git a/m4/time_r.m4 b/m4/time_r.m4
new file mode 100644
index 0000000..dbb6396
--- /dev/null
+++ b/m4/time_r.m4
@@ -0,0 +1,41 @@
+dnl Reentrant time functions like localtime_r.
+
+dnl Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+AC_DEFUN([gl_TIME_R],
+[
+ dnl Persuade glibc and Solaris <time.h> to declare localtime_r.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+ AC_REQUIRE([AC_C_RESTRICT])
+
+ AC_CACHE_CHECK([whether localtime_r is compatible with its POSIX signature],
+ [gl_cv_time_r_posix],
+ [AC_TRY_COMPILE(
+ [#include <time.h>],
+ [/* We don't need to append 'restrict's to the argument types,
+ even though the POSIX signature has the 'restrict's,
+ since C99 says they can't affect type compatibility. */
+ struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
+ if (ptr) return 0;],
+ [gl_cv_time_r_posix=yes],
+ [gl_cv_time_r_posix=no])])
+ if test $gl_cv_time_r_posix = yes; then
+ REPLACE_LOCALTIME_R=0
+ else
+ REPLACE_LOCALTIME_R=1
+ AC_LIBOBJ([time_r])
+ gl_PREREQ_TIME_R
+ fi
+])
+
+# Prerequisites of lib/time_r.c.
+AC_DEFUN([gl_PREREQ_TIME_R], [
+ :
+])
diff --git a/m4/timespec.m4 b/m4/timespec.m4
new file mode 100644
index 0000000..36f1238
--- /dev/null
+++ b/m4/timespec.m4
@@ -0,0 +1,16 @@
+#serial 14
+
+# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007 Free Software
+# Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering
+
+AC_DEFUN([gl_TIMESPEC],
+[
+ dnl Prerequisites of lib/timespec.h.
+ AC_REQUIRE([AC_C_INLINE])
+])
diff --git a/m4/tm_gmtoff.m4 b/m4/tm_gmtoff.m4
new file mode 100644
index 0000000..cb0b3c8
--- /dev/null
+++ b/m4/tm_gmtoff.m4
@@ -0,0 +1,14 @@
+# tm_gmtoff.m4 serial 2
+dnl Copyright (C) 2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_TM_GMTOFF],
+[
+ AC_CHECK_MEMBER([struct tm.tm_gmtoff],
+ [AC_DEFINE(HAVE_TM_GMTOFF, 1,
+ [Define if struct tm has the tm_gmtoff member.])],
+ ,
+ [#include <time.h>])
+])
diff --git a/m4/tzset.m4 b/m4/tzset.m4
new file mode 100644
index 0000000..b8c111b
--- /dev/null
+++ b/m4/tzset.m4
@@ -0,0 +1,59 @@
+#serial 3
+
+# Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# See if we have a working tzset function.
+# If so, arrange to compile the wrapper function.
+# For at least Solaris 2.5.1 and 2.6, this is necessary
+# because tzset can clobber the contents of the buffer
+# used by localtime.
+
+# Written by Paul Eggert and Jim Meyering.
+
+AC_DEFUN([gl_FUNC_TZSET_CLOBBER],
+[
+ AC_REQUIRE([gl_HEADER_SYS_TIME_H])
+ AC_CACHE_CHECK([whether tzset clobbers localtime buffer],
+ gl_cv_func_tzset_clobber,
+ [
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <time.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+ time_t t1 = 853958121;
+ struct tm *p, s;
+ putenv ("TZ=GMT0");
+ p = localtime (&t1);
+ s = *p;
+ putenv ("TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00");
+ tzset ();
+ return (p->tm_year != s.tm_year
+ || p->tm_mon != s.tm_mon
+ || p->tm_mday != s.tm_mday
+ || p->tm_hour != s.tm_hour
+ || p->tm_min != s.tm_min
+ || p->tm_sec != s.tm_sec);
+}
+ ]])],
+ [gl_cv_func_tzset_clobber=no],
+ [gl_cv_func_tzset_clobber=yes],
+ [gl_cv_func_tzset_clobber=yes])])
+
+ AC_DEFINE(HAVE_RUN_TZSET_TEST, 1,
+ [Define to 1 if you have run the test for working tzset.])
+
+ if test $gl_cv_func_tzset_clobber = yes; then
+ gl_GETTIMEOFDAY_REPLACE_LOCALTIME
+
+ AC_DEFINE(tzset, rpl_tzset,
+ [Define to rpl_tzset if the wrapper function should be used.])
+ AC_DEFINE([TZSET_CLOBBERS_LOCALTIME], 1,
+ [Define if tzset clobbers localtime's static buffer.])
+ fi
+])
diff --git a/m4/unicodeio.m4 b/m4/unicodeio.m4
new file mode 100644
index 0000000..9edd527
--- /dev/null
+++ b/m4/unicodeio.m4
@@ -0,0 +1,11 @@
+# unicodeio.m4 serial 2
+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_UNICODEIO],
+[
+ dnl No prerequisites of lib/unicodeio.c.
+ :
+])
diff --git a/m4/unistd-safer.m4 b/m4/unistd-safer.m4
new file mode 100644
index 0000000..09adf93
--- /dev/null
+++ b/m4/unistd-safer.m4
@@ -0,0 +1,13 @@
+#serial 8
+dnl Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_UNISTD_SAFER],
+[
+ AC_CHECK_FUNCS_ONCE([pipe])
+ AC_LIBOBJ([dup-safer])
+ AC_LIBOBJ([fd-safer])
+ AC_LIBOBJ([pipe-safer])
+])
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4
new file mode 100644
index 0000000..628b818
--- /dev/null
+++ b/m4/unistd_h.m4
@@ -0,0 +1,51 @@
+# unistd_h.m4 serial 5
+dnl Copyright (C) 2006-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Simon Josefsson, Bruno Haible.
+
+AC_DEFUN([gl_UNISTD_H],
+[
+ dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+ dnl once only, before all statements that occur in other macros.
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+
+ AC_CHECK_HEADERS_ONCE([unistd.h])
+ if test $ac_cv_header_unistd_h = yes; then
+ HAVE_UNISTD_H=1
+ gl_ABSOLUTE_HEADER([unistd.h])
+ ABSOLUTE_UNISTD_H=\"$gl_cv_absolute_unistd_h\"
+ else
+ HAVE_UNISTD_H=0
+ fi
+ AC_SUBST([HAVE_UNISTD_H])
+ AC_SUBST([ABSOLUTE_UNISTD_H])
+])
+
+AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_UNISTD_H_DEFAULTS],
+[
+ GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN])
+ GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2])
+ GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR])
+ GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE])
+ GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD])
+ GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R])
+ GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_DUP2=1; AC_SUBST([HAVE_DUP2])
+ HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE])
+ HAVE_READLINK=1; AC_SUBST([HAVE_READLINK])
+ HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
+ REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN])
+ REPLACE_FCHDIR=0; AC_SUBST([REPLACE_FCHDIR])
+ REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
+])
diff --git a/m4/unlink-busy.m4 b/m4/unlink-busy.m4
new file mode 100644
index 0000000..687f900
--- /dev/null
+++ b/m4/unlink-busy.m4
@@ -0,0 +1,35 @@
+#serial 11
+
+dnl From J. David Anglin.
+
+dnl HPUX and other systems can't unlink shared text that is being executed.
+
+# Copyright (C) 2000, 2001, 2004, 2007 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_UNLINK_BUSY_TEXT],
+[dnl
+ AC_CACHE_CHECK([whether a running program can be unlinked],
+ jm_cv_func_unlink_busy_text,
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE(
+ [AC_INCLUDES_DEFAULT[
+ int
+ main (int argc, char **argv)
+ {
+ return !argc || unlink (argv[0]) != 0;
+ }]])],
+ jm_cv_func_unlink_busy_text=yes,
+ jm_cv_func_unlink_busy_text=no,
+ jm_cv_func_unlink_busy_text=no
+ )
+ ]
+ )
+
+ if test $jm_cv_func_unlink_busy_text = no; then
+ INSTALL=$ac_install_sh
+ fi
+])
diff --git a/m4/unlinkdir.m4 b/m4/unlinkdir.m4
new file mode 100644
index 0000000..6ef7168
--- /dev/null
+++ b/m4/unlinkdir.m4
@@ -0,0 +1,33 @@
+#serial 5
+
+# Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert.
+
+AC_DEFUN([gl_UNLINKDIR],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CHECK_HEADERS_ONCE(priv.h)
+
+ AC_LIBOBJ([unlinkdir])
+
+ # The Hurd, the Linux kernel, the FreeBSD kernel version 2.2 and later,
+ # and Cygwin never let anyone (even root) unlink directories.
+ # If anyone knows of another system for which unlink can never
+ # remove a directory, please report it to <bug-coreutils@gnu.org>.
+ # Unfortunately this is difficult to test for, since it requires root access
+ # and might create garbage in the file system,
+ # so the code below simply relies on the kernel name and version number.
+ case $host in
+ *-*-gnu[[0-9]]* | \
+ *-*-linux-* | *-*-linux | \
+ *-*-freebsd2.2* | *-*-freebsd[[3-9]]* | *-*-freebsd[[1-9]][[0-9]]* | \
+ *-cygwin)
+ AC_DEFINE([UNLINK_CANNOT_UNLINK_DIR], 1,
+ [Define to 1 if unlink (dir) cannot possibly succeed.]);;
+ esac
+])
diff --git a/m4/unlocked-io.m4 b/m4/unlocked-io.m4
new file mode 100644
index 0000000..20b2da2
--- /dev/null
+++ b/m4/unlocked-io.m4
@@ -0,0 +1,42 @@
+# unlocked-io.m4 serial 14
+
+# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering.
+dnl
+dnl See if the glibc *_unlocked I/O macros or functions are available.
+dnl Use only those *_unlocked macros or functions that are declared
+dnl (because some of them were declared in Solaris 2.5.1 but were removed
+dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run
+dnl on Solaris 2.6).
+
+AC_DEFUN([gl_FUNC_GLIBC_UNLOCKED_IO],
+[
+ AC_DEFINE([USE_UNLOCKED_IO], 1,
+ [Define to 1 if you want getc etc. to use unlocked I/O if available.
+ Unlocked I/O can improve performance in unithreaded apps,
+ but it is not safe for multithreaded apps.])
+
+ dnl Persuade glibc and Solaris <stdio.h> to declare
+ dnl fgets_unlocked(), fputs_unlocked() etc.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+ AC_CHECK_DECLS_ONCE([clearerr_unlocked])
+ AC_CHECK_DECLS_ONCE([feof_unlocked])
+ AC_CHECK_DECLS_ONCE([ferror_unlocked])
+ AC_CHECK_DECLS_ONCE([fflush_unlocked])
+ AC_CHECK_DECLS_ONCE([fgets_unlocked])
+ AC_CHECK_DECLS_ONCE([fputc_unlocked])
+ AC_CHECK_DECLS_ONCE([fputs_unlocked])
+ AC_CHECK_DECLS_ONCE([fread_unlocked])
+ AC_CHECK_DECLS_ONCE([fwrite_unlocked])
+ AC_CHECK_DECLS_ONCE([getc_unlocked])
+ AC_CHECK_DECLS_ONCE([getchar_unlocked])
+ AC_CHECK_DECLS_ONCE([putc_unlocked])
+ AC_CHECK_DECLS_ONCE([putchar_unlocked])
+])
diff --git a/m4/uptime.m4 b/m4/uptime.m4
new file mode 100644
index 0000000..680e30f
--- /dev/null
+++ b/m4/uptime.m4
@@ -0,0 +1,23 @@
+#serial 7
+
+# Copyright (C) 1996, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+AC_PREREQ(2.13)
+
+AC_DEFUN([gl_SYS_PROC_UPTIME],
+[ dnl Require AC_PROG_CC to see if we're cross compiling.
+ AC_REQUIRE([AC_PROG_CC])
+ AC_CACHE_CHECK([for /proc/uptime], jm_cv_have_proc_uptime,
+ [jm_cv_have_proc_uptime=no
+ test -f /proc/uptime \
+ && test "$cross_compiling" = no \
+ && cat < /proc/uptime >/dev/null 2>/dev/null \
+ && jm_cv_have_proc_uptime=yes])
+ if test $jm_cv_have_proc_uptime = yes; then
+ AC_DEFINE(HAVE_PROC_UPTIME, 1,
+ [ Define if your system has the /proc/uptime special file.])
+ fi
+])
diff --git a/m4/userspec.m4 b/m4/userspec.m4
new file mode 100644
index 0000000..ce981e9
--- /dev/null
+++ b/m4/userspec.m4
@@ -0,0 +1,13 @@
+#serial 9
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_USERSPEC],
+[
+ AC_LIBOBJ([userspec])
+
+ dnl Prerequisites of lib/userspec.c.
+ AC_CHECK_HEADERS_ONCE(sys/param.h)
+])
diff --git a/m4/utimbuf.m4 b/m4/utimbuf.m4
new file mode 100644
index 0000000..9927908
--- /dev/null
+++ b/m4/utimbuf.m4
@@ -0,0 +1,39 @@
+#serial 8
+
+# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2007 Free Software
+# Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering
+
+dnl Define HAVE_STRUCT_UTIMBUF if `struct utimbuf' is declared --
+dnl usually in <utime.h>.
+dnl Some systems have utime.h but don't declare the struct anywhere.
+
+AC_DEFUN([gl_CHECK_TYPE_STRUCT_UTIMBUF],
+[
+ AC_CHECK_HEADERS_ONCE(sys/time.h utime.h)
+ AC_CACHE_CHECK([for struct utimbuf], [gl_cv_sys_struct_utimbuf],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#if HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #include <time.h>
+ #ifdef HAVE_UTIME_H
+ #include <utime.h>
+ #endif
+ ]],
+ [[static struct utimbuf x; x.actime = x.modtime;]])],
+ [gl_cv_sys_struct_utimbuf=yes],
+ [gl_cv_sys_struct_utimbuf=no])])
+
+ if test $gl_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. ])
+ fi
+])
diff --git a/m4/utime.m4 b/m4/utime.m4
new file mode 100644
index 0000000..967faa2
--- /dev/null
+++ b/m4/utime.m4
@@ -0,0 +1,30 @@
+#serial 7
+
+dnl From Jim Meyering
+dnl Replace the utime function on systems that need it.
+
+# Copyright (C) 1998, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl FIXME
+
+AC_DEFUN([gl_FUNC_UTIME],
+[
+ AC_REQUIRE([AC_FUNC_UTIME_NULL])
+ if test $ac_cv_func_utime_null = no; then
+ 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([gl_CHECK_TYPE_STRUCT_UTIMBUF])
+ gl_FUNC_UTIMES_NULL
+])
diff --git a/m4/utimecmp.m4 b/m4/utimecmp.m4
new file mode 100644
index 0000000..29d3419
--- /dev/null
+++ b/m4/utimecmp.m4
@@ -0,0 +1,14 @@
+#serial 3
+dnl Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_UTIMECMP],
+[
+ AC_LIBOBJ([utimecmp])
+
+ dnl Prerequisites of lib/utimecmp.c.
+ AC_REQUIRE([gl_FUNC_UTIMES])
+ :
+])
diff --git a/m4/utimens.m4 b/m4/utimens.m4
new file mode 100644
index 0000000..9ac9c3e
--- /dev/null
+++ b/m4/utimens.m4
@@ -0,0 +1,15 @@
+dnl Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_UTIMENS],
+[
+ AC_LIBOBJ([utimens])
+
+ dnl Prerequisites of lib/utimens.c.
+ AC_REQUIRE([gl_FUNC_UTIMES])
+ AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
+ AC_REQUIRE([gl_CHECK_TYPE_STRUCT_UTIMBUF])
+ AC_CHECK_FUNCS_ONCE([futimes futimesat])
+])
diff --git a/m4/utimes-null.m4 b/m4/utimes-null.m4
new file mode 100644
index 0000000..8d5c8ae
--- /dev/null
+++ b/m4/utimes-null.m4
@@ -0,0 +1,41 @@
+#serial 7
+
+# Copyright (C) 1998, 1999, 2001, 2003, 2004, 2006 Free Software
+# Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl Shamelessly cloned from acspecific.m4's AC_FUNC_UTIME_NULL,
+dnl then do case-insensitive s/utime/utimes/.
+
+AC_DEFUN([gl_FUNC_UTIMES_NULL],
+[AC_CACHE_CHECK(whether utimes accepts a null argument, ac_cv_func_utimes_null,
+[rm -f conftest.data; > conftest.data
+AC_TRY_RUN([
+/* In case stat has been defined to rpl_stat, undef it here. */
+#undef stat
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+int
+main () {
+struct stat s, t;
+return ! (stat ("conftest.data", &s) == 0
+ && utimes ("conftest.data", 0) == 0
+ && stat ("conftest.data", &t) == 0
+ && t.st_mtime >= s.st_mtime
+ && t.st_mtime - s.st_mtime < 120));
+}],
+ ac_cv_func_utimes_null=yes,
+ ac_cv_func_utimes_null=no,
+ ac_cv_func_utimes_null=no)
+rm -f core core.* *.core])
+
+ if test $ac_cv_func_utimes_null = yes; then
+ AC_DEFINE(HAVE_UTIMES_NULL, 1,
+ [Define if utimes accepts a null argument])
+ fi
+ ]
+)
diff --git a/m4/utimes.m4 b/m4/utimes.m4
new file mode 100644
index 0000000..7efb2b0
--- /dev/null
+++ b/m4/utimes.m4
@@ -0,0 +1,83 @@
+# Detect some bugs in glibc's implementation of utimes.
+
+dnl Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# See if we need to work around bugs in glibc's implementation of
+# utimes from 2003-07-12 to 2003-09-17.
+# First, there was a bug that would make utimes set mtime
+# and atime to zero (1970-01-01) unconditionally.
+# Then, there was code to round rather than truncate.
+# Then, there was an implementation (sparc64, Linux-2.4.28, glibc-2.3.3)
+# that didn't honor the NULL-means-set-to-current-time semantics.
+# Finally, there was also a version of utimes that failed on read-only
+# files, while utime worked fine (linux-2.2.20, glibc-2.2.5).
+#
+# From Jim Meyering, with suggestions from Paul Eggert.
+
+AC_DEFUN([gl_FUNC_UTIMES],
+[
+ AC_CACHE_CHECK([determine whether the utimes function works],
+ gl_cv_func_working_utimes,
+ [
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <sys/time.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <utime.h>
+
+int
+main ()
+{
+ static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
+ struct stat sbuf;
+ char const *file = "conftest.utimes";
+ FILE *f;
+ time_t now;
+ int fd;
+
+ int ok = ((f = fopen (file, "w"))
+ && fclose (f) == 0
+ && utimes (file, timeval) == 0
+ && lstat (file, &sbuf) == 0
+ && sbuf.st_atime == timeval[0].tv_sec
+ && sbuf.st_mtime == timeval[1].tv_sec);
+ unlink (file);
+ if (!ok)
+ exit (1);
+
+ ok =
+ ((f = fopen (file, "w"))
+ && fclose (f) == 0
+ && time (&now) != (time_t)-1
+ && utimes (file, NULL) == 0
+ && lstat (file, &sbuf) == 0
+ && now - sbuf.st_atime <= 2
+ && now - sbuf.st_mtime <= 2);
+ unlink (file);
+ if (!ok)
+ exit (1);
+
+ ok = (0 <= (fd = open (file, O_WRONLY|O_CREAT, 0444))
+ && close (fd) == 0
+ && utimes (file, NULL) == 0);
+ unlink (file);
+
+ exit (!ok);
+}
+ ]])],
+ [gl_cv_func_working_utimes=yes],
+ [gl_cv_func_working_utimes=no],
+ [gl_cv_func_working_utimes=no])])
+
+ if test $gl_cv_func_working_utimes = yes; then
+ AC_DEFINE([HAVE_WORKING_UTIMES], 1, [Define if utimes works properly. ])
+ fi
+])
diff --git a/m4/vasnprintf.m4 b/m4/vasnprintf.m4
new file mode 100644
index 0000000..5aa05bc
--- /dev/null
+++ b/m4/vasnprintf.m4
@@ -0,0 +1,68 @@
+# vasnprintf.m4 serial 9
+dnl Copyright (C) 2002-2004, 2006-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_VASNPRINTF],
+[
+ AC_REQUIRE([gl_EOVERFLOW])
+ AC_CHECK_FUNCS_ONCE([vasnprintf])
+ if test $ac_cv_func_vasnprintf = no; then
+ gl_REPLACE_VASNPRINTF
+ fi
+])
+
+AC_DEFUN([gl_REPLACE_VASNPRINTF],
+[
+ AC_CHECK_FUNCS_ONCE([vasnprintf])
+ AC_LIBOBJ([vasnprintf])
+ AC_LIBOBJ([printf-args])
+ AC_LIBOBJ([printf-parse])
+ AC_LIBOBJ([asnprintf])
+ if test $ac_cv_func_vasnprintf = yes; then
+ AC_DEFINE([REPLACE_VASNPRINTF], 1,
+ [Define if vasnprintf exists but is overridden by gnulib.])
+ fi
+ gl_PREREQ_PRINTF_ARGS
+ gl_PREREQ_PRINTF_PARSE
+ gl_PREREQ_VASNPRINTF
+ gl_PREREQ_ASNPRINTF
+])
+
+# Prequisites of lib/printf-args.h, lib/printf-args.c.
+AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
+[
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ AC_REQUIRE([gt_TYPE_LONGDOUBLE])
+ AC_REQUIRE([gt_TYPE_WCHAR_T])
+ AC_REQUIRE([gt_TYPE_WINT_T])
+])
+
+# Prequisites of lib/printf-parse.h, lib/printf-parse.c.
+AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
+[
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ AC_REQUIRE([gt_TYPE_LONGDOUBLE])
+ AC_REQUIRE([gt_TYPE_WCHAR_T])
+ AC_REQUIRE([gt_TYPE_WINT_T])
+ AC_REQUIRE([AC_TYPE_SIZE_T])
+ AC_CHECK_TYPES(ptrdiff_t)
+ AC_REQUIRE([gt_AC_TYPE_INTMAX_T])
+])
+
+# Prerequisites of lib/vasnprintf.c.
+AC_DEFUN([gl_PREREQ_VASNPRINTF],
+[
+ AC_REQUIRE([AC_FUNC_ALLOCA])
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ AC_REQUIRE([gt_TYPE_LONGDOUBLE])
+ AC_REQUIRE([gt_TYPE_WCHAR_T])
+ AC_REQUIRE([gt_TYPE_WINT_T])
+ AC_CHECK_FUNCS(snprintf wcslen)
+])
+
+# Prerequisites of lib/asnprintf.c.
+AC_DEFUN([gl_PREREQ_ASNPRINTF],
+[
+])
diff --git a/m4/vasprintf.m4 b/m4/vasprintf.m4
new file mode 100644
index 0000000..0f4c123
--- /dev/null
+++ b/m4/vasprintf.m4
@@ -0,0 +1,43 @@
+# vasprintf.m4 serial 3
+dnl Copyright (C) 2002-2003, 2006-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_VASPRINTF],
+[
+ AC_CHECK_FUNCS([vasprintf])
+ if test $ac_cv_func_vasprintf = no; then
+ gl_REPLACE_VASPRINTF
+ fi
+])
+
+AC_DEFUN([gl_REPLACE_VASPRINTF],
+[
+ AC_LIBOBJ([vasprintf])
+ AC_LIBOBJ([asprintf])
+ if test $ac_cv_func_vasprintf = yes; then
+ AC_DEFINE([REPLACE_VASPRINTF], 1,
+ [Define if vasprintf exists but is overridden by gnulib.])
+ fi
+ gl_PREREQ_VASPRINTF_H
+ gl_PREREQ_VASPRINTF
+ gl_PREREQ_ASPRINTF
+])
+
+# Prerequisites of lib/vasprintf.h.
+AC_DEFUN([gl_PREREQ_VASPRINTF_H],
+[
+ dnl Persuade glibc <stdio.h> to declare asprintf() and vasprintf().
+ AC_REQUIRE([AC_GNU_SOURCE])
+])
+
+# Prerequisites of lib/vasprintf.c.
+AC_DEFUN([gl_PREREQ_VASPRINTF],
+[
+])
+
+# Prerequisites of lib/asprintf.c.
+AC_DEFUN([gl_PREREQ_ASPRINTF],
+[
+])
diff --git a/m4/wchar.m4 b/m4/wchar.m4
new file mode 100644
index 0000000..068f22d
--- /dev/null
+++ b/m4/wchar.m4
@@ -0,0 +1,29 @@
+dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
+
+dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Eric Blake.
+
+# wchar.m4 serial 1
+
+AC_DEFUN([gl_WCHAR_H],
+[
+ AC_CACHE_CHECK([whether <wchar.h> is standalone],
+ [gl_cv_header_wchar_h_standalone],
+ [AC_COMPILE_IFELSE([[#include <wchar.h>
+wchar_t w;]],
+ [gl_cv_header_wchar_h_standalone=yes],
+ [gl_cv_header_wchar_h_standalone=no])])
+ if test $gl_cv_header_wchar_h_standalone = yes; then
+ WCHAR_H=
+ else
+ gl_ABSOLUTE_HEADER([wchar.h])
+ ABSOLUTE_WCHAR_H=\"$gl_cv_absolute_wchar_h\"
+ WCHAR_H=wchar.h
+ fi
+ AC_SUBST([ABSOLUTE_WCHAR_H])
+ AC_SUBST([WCHAR_H])
+])
diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4
new file mode 100644
index 0000000..cde2129
--- /dev/null
+++ b/m4/wchar_t.m4
@@ -0,0 +1,20 @@
+# wchar_t.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether <stddef.h> has the 'wchar_t' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WCHAR_T],
+[
+ AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
+ [AC_TRY_COMPILE([#include <stddef.h>
+ wchar_t foo = (wchar_t)'\0';], ,
+ gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
+ if test $gt_cv_c_wchar_t = yes; then
+ AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
+ fi
+])
diff --git a/m4/wctype.m4 b/m4/wctype.m4
new file mode 100644
index 0000000..62994c6
--- /dev/null
+++ b/m4/wctype.m4
@@ -0,0 +1,41 @@
+dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
+
+dnl Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+AC_DEFUN([gl_WCTYPE_H],
+[
+ AC_CHECK_FUNCS_ONCE([iswcntrl])
+ AC_CHECK_HEADERS_ONCE([wctype.h])
+ AC_REQUIRE([AC_C_INLINE])
+
+ AC_REQUIRE([gt_TYPE_WINT_T])
+ if test $gt_cv_c_wint_t = yes; then
+ HAVE_WINT_T=1
+ else
+ HAVE_WINT_T=0
+ fi
+ AC_SUBST([HAVE_WINT_T])
+
+ WCTYPE_H=wctype.h
+ if test $ac_cv_header_wctype_h = yes; then
+ if test "$ac_cv_func_iswcntrl" = yes; then
+ WCTYPE_H=
+ fi
+ dnl Compute ABSOLUTE_WCTYPE_H even if WCTYPE_H is empty,
+ dnl for the benefit of builds from non-distclean directories.
+ gl_ABSOLUTE_HEADER([wctype.h])
+ ABSOLUTE_WCTYPE_H=\"$gl_cv_absolute_wctype_h\"
+ HAVE_WCTYPE_H=1
+ else
+ ABSOLUTE_WCTYPE_H=\"no/such/file/wctype.h\"
+ HAVE_WCTYPE_H=0
+ fi
+ AC_SUBST([ABSOLUTE_WCTYPE_H])
+ AC_SUBST([HAVE_WCTYPE_H])
+ AC_SUBST([WCTYPE_H])
+])
diff --git a/m4/wcwidth.m4 b/m4/wcwidth.m4
new file mode 100644
index 0000000..b483499
--- /dev/null
+++ b/m4/wcwidth.m4
@@ -0,0 +1,30 @@
+# wcwidth.m4 serial 8
+dnl Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_WCWIDTH],
+[
+ dnl Persuade glibc <wchar.h> to declare wcwidth().
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([gt_TYPE_WCHAR_T])
+ AC_REQUIRE([gt_TYPE_WINT_T])
+
+ AC_CHECK_HEADERS_ONCE([wchar.h])
+ AC_CHECK_FUNCS_ONCE([wcwidth])
+
+ AC_CHECK_DECLS([wcwidth], [], [], [
+/* AIX 3.2.5 declares wcwidth in <string.h>. */
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+])])
diff --git a/m4/wint_t.m4 b/m4/wint_t.m4
new file mode 100644
index 0000000..3706c04
--- /dev/null
+++ b/m4/wint_t.m4
@@ -0,0 +1,28 @@
+# wint_t.m4 serial 2 (gettext-0.12)
+dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether <wchar.h> has the 'wint_t' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WINT_T],
+[
+ AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
+ [AC_TRY_COMPILE([
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+ wint_t foo = (wchar_t)'\0';], ,
+ gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
+ if test $gt_cv_c_wint_t = yes; then
+ AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
+ fi
+])
diff --git a/m4/xalloc.m4 b/m4/xalloc.m4
new file mode 100644
index 0000000..837a948
--- /dev/null
+++ b/m4/xalloc.m4
@@ -0,0 +1,24 @@
+# xalloc.m4 serial 16
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_XALLOC],
+[
+ AC_LIBOBJ([xmalloc])
+
+ gl_PREREQ_XALLOC
+ gl_PREREQ_XMALLOC
+])
+
+# Prerequisites of lib/xalloc.h.
+AC_DEFUN([gl_PREREQ_XALLOC], [
+ AC_REQUIRE([gl_INLINE])
+ :
+])
+
+# Prerequisites of lib/xmalloc.c.
+AC_DEFUN([gl_PREREQ_XMALLOC], [
+ :
+])
diff --git a/m4/xfts.m4 b/m4/xfts.m4
new file mode 100644
index 0000000..adaf0e0
--- /dev/null
+++ b/m4/xfts.m4
@@ -0,0 +1,14 @@
+#serial 1
+dnl Copyright (C) 2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_XFTS],
+[
+ AC_LIBSOURCES([xfts.c, xfts.h])
+ AC_LIBOBJ([xfts])
+
+ dnl Prerequisites of lib/xfts.c.
+ :
+])
diff --git a/m4/xgetcwd.m4 b/m4/xgetcwd.m4
new file mode 100644
index 0000000..d8609d1
--- /dev/null
+++ b/m4/xgetcwd.m4
@@ -0,0 +1,12 @@
+#serial 6
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_XGETCWD],
+[
+ AC_LIBOBJ([xgetcwd])
+
+ AC_REQUIRE([gl_FUNC_GETCWD])
+])
diff --git a/m4/xnanosleep.m4 b/m4/xnanosleep.m4
new file mode 100644
index 0000000..0cad790
--- /dev/null
+++ b/m4/xnanosleep.m4
@@ -0,0 +1,12 @@
+#serial 4
+dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+AC_DEFUN([gl_XNANOSLEEP],
+[
+ AC_LIBOBJ([xnanosleep])
+])
diff --git a/m4/xstrndup.m4 b/m4/xstrndup.m4
new file mode 100644
index 0000000..8a30ab1
--- /dev/null
+++ b/m4/xstrndup.m4
@@ -0,0 +1,15 @@
+# xstrndup.m4 serial 2
+dnl Copyright (C) 2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_XSTRNDUP],
+[
+ gl_PREREQ_XSTRNDUP
+])
+
+# Prerequisites of lib/xstrndup.c.
+AC_DEFUN([gl_PREREQ_XSTRNDUP], [
+ :
+])
diff --git a/m4/xstrtod.m4 b/m4/xstrtod.m4
new file mode 100644
index 0000000..625e19c
--- /dev/null
+++ b/m4/xstrtod.m4
@@ -0,0 +1,17 @@
+#serial 6
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Prerequisites of lib/xstrtod.c.
+AC_DEFUN([gl_XSTRTOD],
+[
+ AC_LIBOBJ([xstrtod])
+])
+
+# Prerequisites of lib/xstrtold.c.
+AC_DEFUN([gl_XSTRTOLD],
+[
+ AC_LIBOBJ([xstrtold])
+])
diff --git a/m4/xstrtol.m4 b/m4/xstrtol.m4
new file mode 100644
index 0000000..cd5a549
--- /dev/null
+++ b/m4/xstrtol.m4
@@ -0,0 +1,11 @@
+#serial 9
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_XSTRTOL],
+[
+ AC_LIBOBJ([xstrtol])
+ AC_LIBOBJ([xstrtoul])
+])
diff --git a/m4/yesno.m4 b/m4/yesno.m4
new file mode 100644
index 0000000..3506217
--- /dev/null
+++ b/m4/yesno.m4
@@ -0,0 +1,13 @@
+# yesno.m4 serial 5
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_YESNO],
+[
+ AC_LIBOBJ([yesno])
+
+ dnl No prerequisites of lib/yesno.c.
+ :
+])