cvs-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Cvs-cvs] ccvs/m4 ChangeLog absolute-header.m4 alloca.m4 ...


From: Derek Robert Price
Subject: [Cvs-cvs] ccvs/m4 ChangeLog absolute-header.m4 alloca.m4 ...
Date: Wed, 22 Aug 2007 13:44:08 +0000

CVSROOT:        /cvsroot/cvs
Module name:    ccvs
Changes by:     Derek Robert Price <dprice>     07/08/22 13:44:05

Modified files:
        m4             : ChangeLog absolute-header.m4 alloca.m4 
                         canon-host.m4 canonicalize.m4 chdir-long.m4 
                         chown.m4 clock_time.m4 close-stream.m4 
                         codeset.m4 cycle-check.m4 d-ino.m4 
                         double-slash-root.m4 dup2.m4 eoverflow.m4 
                         extensions.m4 fcntl-safer.m4 fcntl_h.m4 
                         fnmatch.m4 fpending.m4 ftruncate.m4 
                         getaddrinfo.m4 getcwd-path-max.m4 getcwd.m4 
                         getlogin_r.m4 getndelim2.m4 getpass.m4 
                         gettext.m4 gettimeofday.m4 glob.m4 
                         gnulib-cache.m4 gnulib-comp.m4 iconv.m4 
                         intdiv0.m4 intmax.m4 inttypes-pri.m4 
                         inttypes.m4 lchown.m4 lib-link.m4 lock.m4 
                         longlong.m4 lstat.m4 mbchar.m4 mempcpy.m4 
                         memrchr.m4 mkstemp.m4 mktime.m4 nanosleep.m4 
                         netinet_in_h.m4 openat.m4 printf-posix.m4 
                         quotearg.m4 readlink.m4 regex.m4 setenv.m4 
                         size_max.m4 snprintf.m4 socklen.m4 stdint.m4 
                         strcase.m4 strdup.m4 strerror.m4 strftime.m4 
                         strndup.m4 strnlen.m4 sys_socket_h.m4 
                         sys_stat_h.m4 time_r.m4 timespec.m4 tzset.m4 
                         ulonglong.m4 unistd_h.m4 vasnprintf.m4 
                         vasprintf.m4 wcwidth.m4 wint_t.m4 xalloc.m4 
Added files:
        m4             : .cvsignore canonicalize-lgpl.m4 dirfd.m4 
                         fchdir.m4 float_h.m4 gnulib-common.m4 
                         include_next.m4 inline.m4 intl.m4 intldir.m4 
                         intlmacosx.m4 localcharset.m4 malloca.m4 
                         mbslen.m4 mbsstr.m4 stdio_h.m4 stdlib_h.m4 
                         string_h.m4 sys_time_h.m4 tempname.m4 time_h.m4 
                         wchar.m4 wctype.m4 
Removed files:
        m4             : allocsa.m4 inttypes-h.m4 longdouble.m4 
                         signed.m4 stat-macros.m4 strstr.m4 xreadlink.m4 

Log message:
        * .cvsignore: New file from GNULIB.
        * absolute-header.m4, alloca.m4, canon-host.m4, canonicalize.m4,
        chdir-long.m4, chown.m4, clock_time.m4, close-stream.m4, codeset.m4,
        cycle-check.m4, d-ino.m4, double-slash-root.m4, dup2.m4, eoverflow.m4,
        extensions.m4, fcntl-safer.m4, fcntl_h.m4, fnmatch.m4, fpending.m4,
        ftruncate.m4, getaddrinfo.m4, getcwd-path-max.m4, getcwd.m4,
        getlogin_r.m4, getndelim2.m4, getpass.m4, gettext.m4, gettimeofday.m4,
        glob.m4, gnulib-cache.m4, gnulib-comp.m4, iconv.m4, intdiv0.m4,
        intmax.m4, inttypes-pri.m4, inttypes.m4, lchown.m4, lib-link.m4,
        lock.m4, longlong.m4, lstat.m4, mbchar.m4, mempcpy.m4, memrchr.m4,
        mkstemp.m4, mktime.m4, nanosleep.m4, netinet_in_h.m4, openat.m4,
        printf-posix.m4, quotearg.m4, readlink.m4, regex.m4, setenv.m4,
        size_max.m4, snprintf.m4, socklen.m4, stdint.m4, strcase.m4,
        strdup.m4, strerror.m4, strftime.m4, strndup.m4, strnlen.m4,
        sys_socket_h.m4, sys_stat_h.m4, time_r.m4, timespec.m4, tzset.m4,
        ulonglong.m4, unistd_h.m4, vasnprintf.m4, vasprintf.m4, wcwidth.m4,
        wint_t.m4, xalloc.m4: Update from GNULIB.
        * allocsa.m4: GNULIB update renamed to...
        * malloca.m4: ...this.
        * strstr.m4: GNULIB update renamed to...
        * mbsstr.m4: ...this.
        * longdouble.m4, inttypes-h.m4, signed.m4, stat-macros.m4,
        xreadlink.m4: GNULIB update removed this obsolete file.
        * canonicalize-lgpl.m4, dirfd.m4, fchdir.m4, float_h.m4,
        gnulib-common.m4, include_next.m4, inline.m4, intl.m4, intldir.m4,
        intlmacosx.m4, localcharset.m4, mbslen.m4, stdio_h.m4, stdlib_h.m4,
        string_h.m4, sys_time_h.m4, tempname.m4, time_h.m4, wchar.m4,
        wctype.m4: New files from GNULIB.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/ChangeLog?cvsroot=cvs&r1=1.191&r2=1.192
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/absolute-header.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/alloca.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/canon-host.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/canonicalize.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/chdir-long.m4?cvsroot=cvs&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/chown.m4?cvsroot=cvs&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/clock_time.m4?cvsroot=cvs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/close-stream.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/codeset.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/cycle-check.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/d-ino.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/double-slash-root.m4?cvsroot=cvs&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/dup2.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/eoverflow.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/extensions.m4?cvsroot=cvs&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/fcntl-safer.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/fcntl_h.m4?cvsroot=cvs&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/fnmatch.m4?cvsroot=cvs&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/fpending.m4?cvsroot=cvs&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/ftruncate.m4?cvsroot=cvs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/getaddrinfo.m4?cvsroot=cvs&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/getcwd-path-max.m4?cvsroot=cvs&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/getcwd.m4?cvsroot=cvs&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/getlogin_r.m4?cvsroot=cvs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/getndelim2.m4?cvsroot=cvs&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/getpass.m4?cvsroot=cvs&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/gettext.m4?cvsroot=cvs&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/gettimeofday.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/glob.m4?cvsroot=cvs&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/gnulib-cache.m4?cvsroot=cvs&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/gnulib-comp.m4?cvsroot=cvs&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/iconv.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/intdiv0.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/intmax.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/inttypes-pri.m4?cvsroot=cvs&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/inttypes.m4?cvsroot=cvs&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/lchown.m4?cvsroot=cvs&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/lib-link.m4?cvsroot=cvs&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/lock.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/longlong.m4?cvsroot=cvs&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/lstat.m4?cvsroot=cvs&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/mbchar.m4?cvsroot=cvs&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/mempcpy.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/memrchr.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/mkstemp.m4?cvsroot=cvs&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/mktime.m4?cvsroot=cvs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/nanosleep.m4?cvsroot=cvs&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/netinet_in_h.m4?cvsroot=cvs&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/openat.m4?cvsroot=cvs&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/printf-posix.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/quotearg.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/readlink.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/regex.m4?cvsroot=cvs&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/setenv.m4?cvsroot=cvs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/size_max.m4?cvsroot=cvs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/snprintf.m4?cvsroot=cvs&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/socklen.m4?cvsroot=cvs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/stdint.m4?cvsroot=cvs&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/strcase.m4?cvsroot=cvs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/strdup.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/strerror.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/strftime.m4?cvsroot=cvs&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/strndup.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/strnlen.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/sys_socket_h.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/sys_stat_h.m4?cvsroot=cvs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/time_r.m4?cvsroot=cvs&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/timespec.m4?cvsroot=cvs&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/tzset.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/ulonglong.m4?cvsroot=cvs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/unistd_h.m4?cvsroot=cvs&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/vasnprintf.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/vasprintf.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/wcwidth.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/wint_t.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/xalloc.m4?cvsroot=cvs&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/.cvsignore?cvsroot=cvs&rev=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/canonicalize-lgpl.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/dirfd.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/fchdir.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/float_h.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/gnulib-common.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/include_next.m4?cvsroot=cvs&rev=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/inline.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/intl.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/intldir.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/intlmacosx.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/localcharset.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/malloca.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/mbslen.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/mbsstr.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/stdio_h.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/stdlib_h.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/string_h.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/sys_time_h.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/tempname.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/time_h.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/wchar.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/wctype.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/allocsa.m4?cvsroot=cvs&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/inttypes-h.m4?cvsroot=cvs&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/longdouble.m4?cvsroot=cvs&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/signed.m4?cvsroot=cvs&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/stat-macros.m4?cvsroot=cvs&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/strstr.m4?cvsroot=cvs&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/xreadlink.m4?cvsroot=cvs&r1=1.4&r2=0

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/ChangeLog,v
retrieving revision 1.191
retrieving revision 1.192
diff -u -b -r1.191 -r1.192
--- ChangeLog   21 Aug 2007 18:42:21 -0000      1.191
+++ ChangeLog   22 Aug 2007 13:43:55 -0000      1.192
@@ -1,3 +1,34 @@
+2007-08-22  Derek Price  <address@hidden>
+
+       * .cvsignore: New file from GNULIB.
+       * absolute-header.m4, alloca.m4, canon-host.m4, canonicalize.m4,
+       chdir-long.m4, chown.m4, clock_time.m4, close-stream.m4, codeset.m4,
+       cycle-check.m4, d-ino.m4, double-slash-root.m4, dup2.m4, eoverflow.m4,
+       extensions.m4, fcntl-safer.m4, fcntl_h.m4, fnmatch.m4, fpending.m4,
+       ftruncate.m4, getaddrinfo.m4, getcwd-path-max.m4, getcwd.m4,
+       getlogin_r.m4, getndelim2.m4, getpass.m4, gettext.m4, gettimeofday.m4,
+       glob.m4, gnulib-cache.m4, gnulib-comp.m4, iconv.m4, intdiv0.m4,
+       intmax.m4, inttypes-pri.m4, inttypes.m4, lchown.m4, lib-link.m4,
+       lock.m4, longlong.m4, lstat.m4, mbchar.m4, mempcpy.m4, memrchr.m4,
+       mkstemp.m4, mktime.m4, nanosleep.m4, netinet_in_h.m4, openat.m4,
+       printf-posix.m4, quotearg.m4, readlink.m4, regex.m4, setenv.m4,
+       size_max.m4, snprintf.m4, socklen.m4, stdint.m4, strcase.m4,
+       strdup.m4, strerror.m4, strftime.m4, strndup.m4, strnlen.m4,
+       sys_socket_h.m4, sys_stat_h.m4, time_r.m4, timespec.m4, tzset.m4,
+       ulonglong.m4, unistd_h.m4, vasnprintf.m4, vasprintf.m4, wcwidth.m4,
+       wint_t.m4, xalloc.m4: Update from GNULIB.
+       * allocsa.m4: GNULIB update renamed to...
+       * malloca.m4: ...this.
+       * strstr.m4: GNULIB update renamed to...
+       * mbsstr.m4: ...this.
+       * longdouble.m4, inttypes-h.m4, signed.m4, stat-macros.m4,
+       xreadlink.m4: GNULIB update removed this obsolete file.
+       * canonicalize-lgpl.m4, dirfd.m4, fchdir.m4, float_h.m4,
+       gnulib-common.m4, include_next.m4, inline.m4, intl.m4, intldir.m4,
+       intlmacosx.m4, localcharset.m4, mbslen.m4, stdio_h.m4, stdlib_h.m4,
+       string_h.m4, sys_time_h.m4, tempname.m4, time_h.m4, wchar.m4,
+       wctype.m4: New files from GNULIB.
+
 2007-08-21  Derek Price  <address@hidden>
 
        * bison.m4: Unfork.

Index: absolute-header.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/absolute-header.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- absolute-header.m4  16 Aug 2006 18:12:09 -0000      1.3
+++ absolute-header.m4  22 Aug 2007 13:43:55 -0000      1.4
@@ -1,5 +1,5 @@
-# absolute-header.m4 serial 6
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+# absolute-header.m4 serial 7
+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.
@@ -32,7 +32,12 @@
 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;}'`])
+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

Index: alloca.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/alloca.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- alloca.m4   1 Mar 2005 18:15:07 -0000       1.3
+++ alloca.m4   22 Aug 2007 13:43:55 -0000      1.4
@@ -1,5 +1,5 @@
-# alloca.m4 serial 5
-dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+# 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.
@@ -17,16 +17,24 @@
 
   # 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
-      ],
-      [AC_DEFINE(HAVE_ALLOCA, 1,
-           [Define to 1 if you have `alloca' after including <alloca.h>,
+        ], [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],
-      [ALLOCA_H=])
+      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

Index: canon-host.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/canon-host.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- canon-host.m4       24 Aug 2006 01:24:14 -0000      1.3
+++ canon-host.m4       22 Aug 2007 13:43:56 -0000      1.4
@@ -1,5 +1,5 @@
-# canon-host.m4 serial 8
-dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 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.
@@ -11,5 +11,5 @@
 ])
 
 AC_DEFUN([gl_PREREQ_CANON_HOST], [
-  AC_REQUIRE([gl_GETADDRINFO])
+  :
 ])

Index: canonicalize.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/canonicalize.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- canonicalize.m4     24 Aug 2006 01:24:14 -0000      1.3
+++ canonicalize.m4     22 Aug 2007 13:43:56 -0000      1.4
@@ -1,6 +1,6 @@
-#serial 10
+#serial 12
 
-# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+# 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.
@@ -11,6 +11,7 @@
   [
     AC_LIBOBJ([canonicalize])
 
-    AC_CHECK_HEADERS(sys/param.h)
-    AC_CHECK_FUNCS(resolvepath canonicalize_file_name)
+    AC_CHECK_HEADERS_ONCE([sys/param.h])
+    AC_CHECK_DECLS_ONCE([canonicalize_file_name])
+    AC_CHECK_FUNCS_ONCE([canonicalize_file_name resolvepath])
   ])

Index: chdir-long.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/chdir-long.m4,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- chdir-long.m4       24 Aug 2006 01:24:14 -0000      1.5
+++ chdir-long.m4       22 Aug 2007 13:43:56 -0000      1.6
@@ -1,4 +1,4 @@
-#serial 8
+#serial 10
 
 # Use Gnulib's robust chdir function.
 # It can handle arbitrarily long directory names, which means
@@ -6,7 +6,7 @@
 # never fails with ENAMETOOLONG.
 # Arrange to compile chdir-long.c only on systems that define PATH_MAX.
 
-dnl Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+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.
@@ -16,17 +16,17 @@
 AC_DEFUN([gl_FUNC_CHDIR_LONG],
 [
   AC_CACHE_CHECK([whether this system has an arbitrary file name length limit],
-    gl_have_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_have_arbitrary_file_name_length_limit=yes,
-    gl_have_arbitrary_file_name_length_limit=no)])
+    gl_cv_have_arbitrary_file_name_length_limit=yes,
+    gl_cv_have_arbitrary_file_name_length_limit=no)])
 
-  if test $gl_have_arbitrary_file_name_length_limit = yes; then
+  if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
     AC_LIBOBJ([chdir-long])
     gl_PREREQ_CHDIR_LONG
   fi
@@ -34,8 +34,5 @@
 
 AC_DEFUN([gl_PREREQ_CHDIR_LONG],
 [
-  AM_STDBOOL_H
-  gl_FUNC_MEMPCPY
-  gl_FUNC_OPENAT
-  gl_FUNC_MEMRCHR
+  :
 ])

Index: chown.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/chown.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- chown.m4    24 Aug 2006 01:24:14 -0000      1.1
+++ chown.m4    22 Aug 2007 13:43:56 -0000      1.2
@@ -1,7 +1,7 @@
-#serial 16
+#serial 17
 # Determine whether we need the chown wrapper.
 
-dnl Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 Free
+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
@@ -16,6 +16,7 @@
 
 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])
@@ -29,9 +30,8 @@
   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)
-    AC_DEFINE(chown, rpl_chown,
-      [Define to rpl_chown if the replacement function should be used.])
     gl_PREREQ_CHOWN
   fi
 ])

Index: clock_time.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/clock_time.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- clock_time.m4       20 Mar 2006 02:21:56 -0000      1.4
+++ clock_time.m4       22 Aug 2007 13:43:56 -0000      1.5
@@ -1,10 +1,14 @@
-# clock_time.m4 serial 7
-dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 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 sets LIB_CLOCK_GETTIME.
+# 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.
@@ -20,7 +24,7 @@
     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_SUBST([LIB_CLOCK_GETTIME])
     AC_CHECK_FUNCS(clock_gettime clock_settime)
   LIBS=$gl_saved_libs
 ])

Index: close-stream.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/close-stream.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- close-stream.m4     24 Aug 2006 01:24:14 -0000      1.2
+++ close-stream.m4     22 Aug 2007 13:43:56 -0000      1.3
@@ -1,4 +1,5 @@
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+#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.

Index: codeset.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/codeset.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- codeset.m4  2 Sep 2006 23:17:59 -0000       1.3
+++ codeset.m4  22 Aug 2007 13:43:56 -0000      1.4
@@ -1,4 +1,4 @@
-# codeset.m4 serial 2 (gettext-0.15.1)
+# 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,

Index: cycle-check.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/cycle-check.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- cycle-check.m4      21 Aug 2006 19:22:22 -0000      1.2
+++ cycle-check.m4      22 Aug 2007 13:43:56 -0000      1.3
@@ -1,10 +1,11 @@
-#serial 4
-dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+#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])
 ])

Index: d-ino.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/d-ino.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- d-ino.m4    11 Jul 2006 16:42:23 -0000      1.3
+++ d-ino.m4    22 Aug 2007 13:43:56 -0000      1.4
@@ -1,11 +1,11 @@
-#serial 8
+#serial 10
 
 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
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2006, 2007 Free Software
 # Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
@@ -14,22 +14,28 @@
 
 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
+                 gl_cv_struct_dirent_d_ino,
+     [AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <sys/types.h>
+            #include <sys/stat.h>
+            #include <dirent.h>
+          ]],
+          [[DIR *dp = opendir (".");
+            struct dirent *e;
+            struct stat st;
+            if (! dp)
+              return 1;
+            e = readdir (dp);
+            return ! (e
+                      && stat (e->d_name, &st) == 0
+                      && e->d_ino == st.st_ino);]])],
+           [gl_cv_struct_dirent_d_ino=yes],
+           [gl_cv_struct_dirent_d_ino=no],
+           [gl_cv_struct_dirent_d_ino=no])])
+   if test $gl_cv_struct_dirent_d_ino = yes; then
      AC_DEFINE(D_INO_IN_DIRENT, 1,
-       [Define if there is a member named d_ino in the struct describing
-        directory headers.])
+       [Define if struct dirent has a member d_ino that actually works.])
    fi
   ]
 )

Index: double-slash-root.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/double-slash-root.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- double-slash-root.m4        6 Jul 2006 02:20:19 -0000       1.1
+++ double-slash-root.m4        22 Aug 2007 13:43:57 -0000      1.2
@@ -1,4 +1,4 @@
-#serial 1   -*- autoconf -*-
+# 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,
@@ -7,37 +7,32 @@
 AC_DEFUN([gl_DOUBLE_SLASH_ROOT],
 [
   AC_REQUIRE([AC_CANONICAL_HOST])
-  AC_CACHE_CHECK([whether // is distinct from /], [ac_cv_double_slash_root],
+  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)
-       # and Cygwin.  If anyone knows of another system for which // has
+       # 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
-       # <address@hidden>.
+       # <address@hidden>.
        case $host in
-         *-cygwin)
-           ac_cv_double_slash_root=yes ;;
+         *-cygwin | i370-ibm-openedition)
+           gl_cv_double_slash_root=yes ;;
          *)
            # Be optimistic and assume that / and // are the same when we
            # don't know.
-           ac_cv_double_slash_root='unknown, assuming no' ;;
+           gl_cv_double_slash_root='unknown, assuming no' ;;
        esac
       else
        set x `ls -di / //`
-       if test $[2] = $[4]; then
-         ac_cv_double_slash_root=no
+       if test $[2] = $[4] && wc //dev/null >/dev/null 2>&1; then
+         gl_cv_double_slash_root=no
        else
-         ac_cv_double_slash_root=yes
+         gl_cv_double_slash_root=yes
        fi
       fi])
-  if test x"$ac_cv_double_slash_root" = xyes; then
-    ac_double_slash_root=1
-  else
-    ac_double_slash_root=0
-  fi
-
-  AC_DEFINE_UNQUOTED([DOUBLE_SLASH_IS_DISTINCT_ROOT],
-   $ac_double_slash_root,
+  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
 ])

Index: dup2.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/dup2.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- dup2.m4     4 Oct 2005 02:33:12 -0000       1.3
+++ dup2.m4     22 Aug 2007 13:43:57 -0000      1.4
@@ -1,10 +1,15 @@
-#serial 4
-dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+#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_REPLACE_FUNCS(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
 ])

Index: eoverflow.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/eoverflow.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- eoverflow.m4        1 Mar 2005 18:15:07 -0000       1.2
+++ eoverflow.m4        22 Aug 2007 13:43:57 -0000      1.3
@@ -1,5 +1,5 @@
-# eoverflow.m4 serial 1
-dnl Copyright (C) 2004 Free Software Foundation, Inc.
+# 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.
@@ -40,7 +40,7 @@
       if test -n "$have_eoverflow"; then
         dnl EOVERFLOW exists but is hidden.
         dnl Define it to the same value.
-        _AC_COMPUTE_INT([EOVERFLOW], ac_cv_decl_EOVERFLOW, [
+        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.  */
@@ -62,3 +62,9 @@
     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])])
+])

Index: extensions.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/extensions.m4,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- extensions.m4       25 Apr 2006 14:50:23 -0000      1.5
+++ extensions.m4       22 Aug 2007 13:43:57 -0000      1.6
@@ -1,3 +1,4 @@
+# serial 4  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
 # Copyright (C) 2003, 2006 Free Software Foundation, Inc.
@@ -5,14 +6,18 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# This file is only needed in autoconf <= 2.59.  Newer versions of autoconf
-# have a macro AC_USE_SYSTEM_EXTENSIONS with identical semantics.
+# 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.
 
-# gl_USE_SYSTEM_EXTENSIONS
+# AC_USE_SYSTEM_EXTENSIONS
 # ------------------------
 # Enable extensions on systems that normally disable them,
 # typically due to standards-conformance issues.
-AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS], [
+AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
+[
   AC_BEFORE([$0], [AC_COMPILE_IFELSE])
   AC_BEFORE([$0], [AC_RUN_IFELSE])
 
@@ -27,16 +32,27 @@
 #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
+#        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])])

Index: fcntl-safer.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/fcntl-safer.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- fcntl-safer.m4      24 Aug 2006 01:24:14 -0000      1.2
+++ fcntl-safer.m4      22 Aug 2007 13:43:57 -0000      1.3
@@ -1,5 +1,5 @@
-#serial 3
-dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+#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.

Index: fcntl_h.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/fcntl_h.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- fcntl_h.m4  2 Sep 2006 23:17:59 -0000       1.1
+++ fcntl_h.m4  22 Aug 2007 13:43:57 -0000      1.2
@@ -1,5 +1,5 @@
 # Configure fcntl.h.
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+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.
@@ -15,6 +15,9 @@
           #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
@@ -24,27 +27,53 @@
              O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
            };
          ]],
-         [[static char const sym[] = "conftest.sym";
-           if (O_NOFOLLOW)
+         [[
+           int status = !constants;
+           {
+             static char const sym[] = "conftest.sym";
+             if (symlink (".", sym) != 0
+                 || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0)
+               status |= 32;
+           }
              {
-               if (symlink (".", sym) != 0)
-                 return 1;
-               if (open (sym, O_RDONLY | O_NOFOLLOW) == 0)
-                 return 1;
+             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 !constants;]])],
+           return status;]])],
        [gl_cv_header_working_fcntl_h=yes],
-       [gl_cv_header_working_fcntl_h=no],
+       [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])])
 
-  if test $gl_cv_header_working_fcntl_h != yes; then
-    AC_DEFINE([O_NOFOLLOW_IS_INEFFECTIVE], 1,
-      [Define to 1 if O_NOFOLLOW is ineffective.])
-  fi
+  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])
+  gl_CHECK_NEXT_HEADERS([fcntl.h])
   FCNTL_H='fcntl.h'
   AC_SUBST([FCNTL_H])
 ])

Index: fnmatch.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/fnmatch.m4,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- fnmatch.m4  25 Sep 2006 10:38:20 -0000      1.8
+++ fnmatch.m4  22 Aug 2007 13:43:57 -0000      1.9
@@ -1,6 +1,6 @@
 # Check for fnmatch.
 
-# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
+# 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,
@@ -23,33 +23,52 @@
    dnl Thanks to John Oleynick, François Pinard, and Paul Eggert for this 
test.
    AC_RUN_IFELSE(
       [AC_LANG_PROGRAM(
-        [
-#         include <stdlib.h>
-#         include <fnmatch.h>
-#         define y(a, b, c) (fnmatch (a, b, c) == 0)
-#         define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH)
+        [[#include <fnmatch.h>
           static int
-          fnm (char const *pattern, char const *string, int flags)
+          y (char const *pattern, char const *string, int flags)
           {
-            return fnmatch (pattern, string, flags);
+            return fnmatch (pattern, string, flags) == 0;
           }
-         ],
-        [exit
-          (!(fnm ("a*", "", 0) == FNM_NOMATCH
+          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)
-             && m4_if([$1], [GNU],
+             && 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)));])],
+                  1))[;]])],
       [$2=yes],
       [$2=no],
       [$2=cross])])
@@ -64,8 +83,8 @@
 [AC_REQUIRE([AC_FUNC_ALLOCA])dnl
 AC_REQUIRE([AC_TYPE_MBSTATE_T])dnl
 AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
-AC_CHECK_FUNCS([btowc mbsrtowcs mempcpy wmemchr wmemcpy wmempcpy])
-AC_CHECK_HEADERS([wchar.h wctype.h])
+AC_CHECK_FUNCS_ONCE([btowc isblank iswctype mbsrtowcs mempcpy wmemchr wmemcpy 
wmempcpy])
+AC_CHECK_HEADERS_ONCE([wctype.h])
 AC_LIBOBJ([fnmatch])
 FNMATCH_H=fnmatch.h
 ])# _AC_LIBOBJ_FNMATCH

Index: fpending.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/fpending.m4,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- fpending.m4 24 Aug 2006 01:24:14 -0000      1.5
+++ fpending.m4 22 Aug 2007 13:43:57 -0000      1.6
@@ -1,4 +1,4 @@
-#serial 9
+#serial 10
 
 # Copyright (C) 2000, 2001, 2004, 2005, 2006 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -15,7 +15,7 @@
 
 AC_DEFUN([gl_FUNC_FPENDING],
 [
-  AC_CHECK_HEADERS(stdio_ext.h)
+  AC_CHECK_HEADERS_ONCE(stdio_ext.h)
   AC_REPLACE_FUNCS([__fpending])
   fp_headers='
 #     include <stdio.h>

Index: ftruncate.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/ftruncate.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- ftruncate.m4        6 Jul 2006 13:49:16 -0000       1.4
+++ ftruncate.m4        22 Aug 2007 13:43:57 -0000      1.5
@@ -1,20 +1,31 @@
-#serial 10
+#serial 13
 
 # See if we need to emulate a missing ftruncate function using fcntl or chsize.
 
-# Copyright (C) 2000, 2001, 2003-2006 Free Software Foundation, Inc.
+# 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 2007,
-# if the check below provokes no reports.
+# 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_REPLACE_FUNCS(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
@@ -24,6 +35,7 @@
          rerun configure with SKIP_FTRUNCATE_CHECK=yes.
          E.g., ./configure SKIP_FTRUNCATE_CHECK=yes])
     fi
+    esac
   fi
 ])
 

Index: getaddrinfo.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/getaddrinfo.m4,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- getaddrinfo.m4      16 Aug 2006 18:12:09 -0000      1.7
+++ getaddrinfo.m4      22 Aug 2007 13:43:57 -0000      1.8
@@ -1,11 +1,12 @@
-# getaddrinfo.m4 serial 11
-dnl Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+# getaddrinfo.m4 serial 12
+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_GETADDRINFO],
 [
+  AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H
   AC_MSG_NOTICE([checking how to do getaddrinfo, freeaddrinfo and getnameinfo])
 
   AC_SEARCH_LIBS(getaddrinfo, [nsl socket])
@@ -28,12 +29,36 @@
     fi
     ])
 
-  AC_REPLACE_FUNCS(gai_strerror)
+  # We can't use AC_REPLACE_FUNCS here because gai_strerror may be an
+  # inline function declared in ws2tcpip.h, so we need to get that
+  # header included somehow.
+  AC_CHECK_HEADERS_ONCE(netdb.h)
+  AC_CACHE_CHECK([for gai_strerror (possibly via ws2tcpip.h)],
+    gl_cv_func_gai_strerror, [
+      AC_TRY_LINK([
+#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
+], [gai_strerror (0);],
+        [gl_cv_func_gai_strerror=yes],
+        [gl_cv_func_gai_strerror=no])])
+  if test $gl_cv_func_gai_strerror = no; then
+    AC_LIBOBJ(gai_strerror)
+  fi
+
   gl_PREREQ_GETADDRINFO
 ])
 
 # Prerequisites of lib/getaddrinfo.h and lib/getaddrinfo.c.
 AC_DEFUN([gl_PREREQ_GETADDRINFO], [
+  AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H
   AC_SEARCH_LIBS(gethostbyname, [inet nsl])
   AC_SEARCH_LIBS(getservbyname, [inet nsl socket xnet])
   AC_CHECK_FUNCS(gethostbyname,, [

Index: getcwd-path-max.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/getcwd-path-max.m4,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- getcwd-path-max.m4  6 Jul 2006 02:20:19 -0000       1.6
+++ getcwd-path-max.m4  22 Aug 2007 13:43:57 -0000      1.7
@@ -1,4 +1,4 @@
-#serial 12
+#serial 13
 # Check for several getcwd bugs with long file names.
 # If so, arrange to compile the wrapper function.
 
@@ -6,7 +6,7 @@
 # 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.
+# 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.
@@ -163,7 +163,8 @@
       {
        if (chdir ("..") < 0)
          break;
-       rmdir (DIR_NAME);
+       if (rmdir (DIR_NAME) != 0)
+         break;
       }
   }
 

Index: getcwd.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/getcwd.m4,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- getcwd.m4   24 Aug 2006 01:24:14 -0000      1.9
+++ getcwd.m4   22 Aug 2007 13:43:57 -0000      1.10
@@ -1,6 +1,6 @@
 # getcwd.m4 - check for working getcwd that is compatible with glibc
 
-# Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 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.
@@ -36,6 +36,7 @@
 
 AC_DEFUN([gl_FUNC_GETCWD],
 [
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_GETCWD_NULL])
 
   gl_abort_bug=no
@@ -48,9 +49,8 @@
   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])
-    AC_DEFINE([__GETCWD_PREFIX], [[rpl_]],
-      [Define to rpl_ if the getcwd replacement function should be used.])
     gl_PREREQ_GETCWD;;
   esac
 ])

Index: getlogin_r.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/getlogin_r.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- getlogin_r.m4       24 Aug 2006 01:24:14 -0000      1.4
+++ getlogin_r.m4       22 Aug 2007 13:43:57 -0000      1.5
@@ -1,6 +1,6 @@
-#serial 3
+#serial 4
 
-# Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+# 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,
@@ -11,23 +11,23 @@
 dnl Provide getlogin_r when the system lacks it.
 dnl
 
-AC_DEFUN([gl_GETLOGIN_R_SUBSTITUTE],
-[
-  gl_PREREQ_GETLOGIN_R
-  AC_LIBOBJ([getlogin_r])
-])
-
 AC_DEFUN([gl_GETLOGIN_R],
 [
-  AC_REPLACE_FUNCS([getlogin_r])
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_CHECK_FUNCS_ONCE([getlogin_r])
   if test $ac_cv_func_getlogin_r = no; then
-    gl_GETLOGIN_R_SUBSTITUTE
+    AC_LIBOBJ([getlogin_r])
+    gl_PREREQ_GETLOGIN_R
+    if test $ac_cv_have_decl_getlogin_r = yes; then
+      HAVE_DECL_GETLOGIN_R=1
+    else
+      HAVE_DECL_GETLOGIN_R=0
+    fi
   fi
 ])
 
 AC_DEFUN([gl_PREREQ_GETLOGIN_R],
 [
-  AC_CHECK_HEADERS_ONCE([unistd.h])
   AC_CHECK_DECLS_ONCE([getlogin])
   AC_CHECK_DECLS_ONCE([getlogin_r])
 ])

Index: getndelim2.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/getndelim2.m4,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- getndelim2.m4       1 Mar 2005 18:15:07 -0000       1.7
+++ getndelim2.m4       22 Aug 2007 13:43:57 -0000      1.8
@@ -1,18 +1,12 @@
-# getndelim2.m4 serial 4
-dnl Copyright (C) 2003 Free Software Foundation, Inc.
+# 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],
 [
-  # Avoid multiple inclusions of getndelim2.o into LIBOBJS.
-  # This hack won't be needed after gnulib requires Autoconf 2.58 or later.
-  case " $LIB@&address@hidden " in
-  *" getndelim2.$ac_objext "* ) ;;
-  *) AC_LIBOBJ(getndelim2);;
-  esac
-
+  AC_LIBOBJ(getndelim2)
   gl_PREREQ_GETNDELIM2
 ])
 

Index: getpass.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/getpass.m4,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- getpass.m4  24 Aug 2006 01:24:14 -0000      1.11
+++ getpass.m4  22 Aug 2007 13:43:58 -0000      1.12
@@ -1,4 +1,4 @@
-# getpass.m4 serial 9
+# 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,
@@ -33,6 +33,11 @@
 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])

Index: gettext.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/gettext.m4,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- gettext.m4  22 Sep 2006 17:54:40 -0000      1.10
+++ gettext.m4  22 Aug 2007 13:43:58 -0000      1.11
@@ -1,4 +1,4 @@
-# gettext.m4 serial 53.1
+# gettext.m4 serial 59a (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,
@@ -15,9 +15,7 @@
 
 dnl Authors:
 dnl   Ulrich Drepper <address@hidden>, 1995-2000.
-dnl   Bruno Haible <address@hidden>, 2000-2005.
-
-AC_PREREQ(2.52)
+dnl   Bruno Haible <address@hidden>, 2000-2006.
 
 dnl Macro to add for using GNU gettext.
 
@@ -65,8 +63,13 @@
   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], [no], [yes]))
+  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, [
@@ -80,7 +83,7 @@
   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 test "$gt_cv_func_gnugettext_libc" != "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:
@@ -106,6 +109,15 @@
   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
@@ -124,26 +136,35 @@
         dnl to use.  If GNU gettext is available we use this.  Else we have
         dnl to fall back to GNU NLS library.
 
-        dnl Add a version number to the cache macros.
-        define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, 
ifelse([$2], [need-ngettext], 2, 1)))
-        define([gt_cv_func_gnugettext_libc], 
[gt_cv_func_gnugettext]gt_api_version[_libc])
-        define([gt_cv_func_gnugettext_libintl], 
[gt_cv_func_gnugettext]gt_api_version[_libintl])
-
-        AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
-         [AC_TRY_LINK([#include <libintl.h>
-]ifelse([$2], [need-formatstring-macros],
-[[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+        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];
-]], [])[extern int _nl_msg_cat_cntr;
+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 ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 
0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
-            gt_cv_func_gnugettext_libc=yes,
-            gt_cv_func_gnugettext_libc=no)])
+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 test "$gt_cv_func_gnugettext_libc" != "yes"; then
+        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
@@ -154,48 +175,40 @@
           dnl even if libiconv doesn't exist.
           AC_LIB_LINKFLAGS_BODY([intl])
           AC_CACHE_CHECK([for GNU gettext in libintl],
-            gt_cv_func_gnugettext_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>
-]ifelse([$2], [need-formatstring-macros],
-[[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
-#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
-#endif
-typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
-]], [])[extern int _nl_msg_cat_cntr;
+$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 ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 
0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
-              gt_cv_func_gnugettext_libintl=yes,
-              gt_cv_func_gnugettext_libintl=no)
+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 test "$gt_cv_func_gnugettext_libintl" != yes && test -n 
"$LIBICONV"; then
+            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>
-]ifelse([$2], [need-formatstring-macros],
-[[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
-#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
-#endif
-typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
-]], [])[extern int _nl_msg_cat_cntr;
+$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 ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 
0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + 
*_nl_expand_alias ("")],
                [LIBINTL="$LIBINTL $LIBICONV"
                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
-                gt_cv_func_gnugettext_libintl=yes
+                eval "$gt_func_gnugettext_libintl=yes"
                ])
             fi
             CPPFLAGS="$gt_save_CPPFLAGS"
@@ -206,8 +219,8 @@
         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 test "$gt_cv_func_gnugettext_libc" = "yes" \
-           || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
+        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
@@ -267,7 +280,7 @@
   if test "$USE_NLS" = "yes"; then
     AC_MSG_CHECKING([where the gettext function comes from])
     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
-      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = 
"yes"; }; then
         gt_source="external libintl"
       else
         gt_source="libc"
@@ -281,7 +294,7 @@
   if test "$USE_NLS" = "yes"; then
 
     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
-      if test "$gt_cv_func_gnugettext_libintl" = "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])
@@ -349,282 +362,18 @@
 ])
 
 
-dnl Checks for all prerequisites of the intl subdirectory,
-dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
-dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
-AC_DEFUN([AM_INTL_SUBDIR],
-[
-  AC_REQUIRE([AC_PROG_INSTALL])dnl
-  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
-  AC_REQUIRE([AC_PROG_CC])dnl
-  AC_REQUIRE([AC_CANONICAL_HOST])dnl
-  AC_REQUIRE([gt_GLIBC2])dnl
-  AC_REQUIRE([AC_PROG_RANLIB])dnl
-  AC_REQUIRE([gl_VISIBILITY])dnl
-  AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl
-  AC_REQUIRE([bh_C_SIGNED])dnl
-  AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl
-  AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
-  AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
-  AC_REQUIRE([gt_TYPE_WINT_T])dnl
-  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
-  AC_REQUIRE([gt_TYPE_INTMAX_T])
-  AC_REQUIRE([gt_PRINTF_POSIX])
-  AC_REQUIRE([gl_GLIBC21])dnl
-  AC_REQUIRE([gl_XSIZE])dnl
-  AC_REQUIRE([gt_INTL_MACOSX])dnl
-
-  AC_CHECK_TYPE([ptrdiff_t], ,
-    [AC_DEFINE([ptrdiff_t], [long],
-       [Define as the type of the result of subtracting two pointers, if the 
system doesn't define it.])
-    ])
-  AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
-  AC_CHECK_FUNCS([asprintf fwprintf putenv setenv setlocale snprintf wcslen])
-
-  dnl Use the _snprintf function only if it is declared (because on NetBSD it
-  dnl is defined as a weak alias of snprintf; we prefer to use the latter).
-  gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
-  gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
-
-  dnl Use the *_unlocked functions only if they are declared.
-  dnl (because some of them were defined without being declared in Solaris
-  dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
-  dnl on Solaris 2.5.1 to run on Solaris 2.6).
-  dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
-  gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
-
-  case $gt_cv_func_printf_posix in
-    *yes) HAVE_POSIX_PRINTF=1 ;;
-    *) HAVE_POSIX_PRINTF=0 ;;
-  esac
-  AC_SUBST([HAVE_POSIX_PRINTF])
-  if test "$ac_cv_func_asprintf" = yes; then
-    HAVE_ASPRINTF=1
-  else
-    HAVE_ASPRINTF=0
-  fi
-  AC_SUBST([HAVE_ASPRINTF])
-  if test "$ac_cv_func_snprintf" = yes; then
-    HAVE_SNPRINTF=1
-  else
-    HAVE_SNPRINTF=0
-  fi
-  AC_SUBST([HAVE_SNPRINTF])
-  if test "$ac_cv_func_wprintf" = yes; then
-    HAVE_WPRINTF=1
-  else
-    HAVE_WPRINTF=0
-  fi
-  AC_SUBST([HAVE_WPRINTF])
-
-  AM_LANGINFO_CODESET
-  gt_LC_MESSAGES
-
-  dnl Compilation on mingw and Cygwin needs special Makefile rules, because
-  dnl 1. when we install a shared library, we must arrange to export
-  dnl    auxiliary pointer variables for every exported variable,
-  dnl 2. when we install a shared library and a static library simultaneously,
-  dnl    the include file specifies __declspec(dllimport) and therefore we
-  dnl    must arrange to define the auxiliary pointer variables for the
-  dnl    exported variables _also_ in the static library.
-  if test "$enable_shared" = yes; then
-    case "$host_os" in
-      cygwin*) is_woe32dll=yes ;;
-      *) is_woe32dll=no ;;
-    esac
-  else
-    is_woe32dll=no
-  fi
-  WOE32DLL=$is_woe32dll
-  AC_SUBST([WOE32DLL])
-
-  dnl Rename some macros and functions used for locking.
-  AH_BOTTOM([
-#define __libc_lock_t                   gl_lock_t
-#define __libc_lock_define              gl_lock_define
-#define __libc_lock_define_initialized  gl_lock_define_initialized
-#define __libc_lock_init                gl_lock_init
-#define __libc_lock_lock                gl_lock_lock
-#define __libc_lock_unlock              gl_lock_unlock
-#define __libc_lock_recursive_t                   gl_recursive_lock_t
-#define __libc_lock_define_recursive              gl_recursive_lock_define
-#define __libc_lock_define_initialized_recursive  
gl_recursive_lock_define_initialized
-#define __libc_lock_init_recursive                gl_recursive_lock_init
-#define __libc_lock_lock_recursive                gl_recursive_lock_lock
-#define __libc_lock_unlock_recursive              gl_recursive_lock_unlock
-#define glthread_in_use  libintl_thread_in_use
-#define glthread_lock_init     libintl_lock_init
-#define glthread_lock_lock     libintl_lock_lock
-#define glthread_lock_unlock   libintl_lock_unlock
-#define glthread_lock_destroy  libintl_lock_destroy
-#define glthread_rwlock_init     libintl_rwlock_init
-#define glthread_rwlock_rdlock   libintl_rwlock_rdlock
-#define glthread_rwlock_wrlock   libintl_rwlock_wrlock
-#define glthread_rwlock_unlock   libintl_rwlock_unlock
-#define glthread_rwlock_destroy  libintl_rwlock_destroy
-#define glthread_recursive_lock_init     libintl_recursive_lock_init
-#define glthread_recursive_lock_lock     libintl_recursive_lock_lock
-#define glthread_recursive_lock_unlock   libintl_recursive_lock_unlock
-#define glthread_recursive_lock_destroy  libintl_recursive_lock_destroy
-#define glthread_once                 libintl_once
-#define glthread_once_call            libintl_once_call
-#define glthread_once_singlethreaded  libintl_once_singlethreaded
-])
-])
-
-
-dnl Checks for the core files of the intl subdirectory:
-dnl   dcigettext.c
-dnl   eval-plural.h
-dnl   explodename.c
-dnl   finddomain.c
-dnl   gettextP.h
-dnl   gmo.h
-dnl   hash-string.h hash-string.c
-dnl   l10nflist.c
-dnl   libgnuintl.h.in (except the *printf stuff)
-dnl   loadinfo.h
-dnl   loadmsgcat.c
-dnl   localealias.c
-dnl   log.c
-dnl   plural-exp.h plural-exp.c
-dnl   plural.y
-dnl Used by libglocale.
-AC_DEFUN([gt_INTL_SUBDIR_CORE],
-[
-  AC_REQUIRE([AC_C_INLINE])dnl
-  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
-  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
-  AC_REQUIRE([AC_FUNC_ALLOCA])dnl
-  AC_REQUIRE([AC_FUNC_MMAP])dnl
-  AC_REQUIRE([gt_INTDIV0])dnl
-  AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
-  AC_REQUIRE([gt_INTTYPES_PRI])dnl
-  AC_REQUIRE([gl_LOCK])dnl
-
-  AC_TRY_LINK(
-    [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; 
}],
-    [],
-    [AC_DEFINE([HAVE_BUILTIN_EXPECT], 1,
-       [Define to 1 if the compiler understands __builtin_expect.])])
-
-  AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h])
-  AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \
-    stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \
-    argz_next __fsetlocking])
-
-  dnl Use the *_unlocked functions only if they are declared.
-  dnl (because some of them were defined without being declared in Solaris
-  dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
-  dnl on Solaris 2.5.1 to run on Solaris 2.6).
-  dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
-  gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
-  gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
-
-  AM_ICONV
-
-  dnl glibc >= 2.4 has a NL_LOCALE_NAME macro when _GNU_SOURCE is defined,
-  dnl and a _NL_LOCALE_NAME macro always.
-  AC_CACHE_CHECK([for NL_LOCALE_NAME macro], gt_cv_nl_locale_name,
-    [AC_TRY_LINK([#include <langinfo.h>
-#include <locale.h>],
-      [char* cs = nl_langinfo(_NL_LOCALE_NAME(LC_MESSAGES));],
-      gt_cv_nl_locale_name=yes,
-      gt_cv_nl_locale_name=no)
-    ])
-  if test $gt_cv_nl_locale_name = yes; then
-    AC_DEFINE(HAVE_NL_LOCALE_NAME, 1,
-      [Define if you have <langinfo.h> and it defines the NL_LOCALE_NAME macro 
if _GNU_SOURCE is defined.])
-  fi
-
-  dnl intl/plural.c is generated from intl/plural.y. It requires bison,
-  dnl because plural.y uses bison specific features. It requires at least
-  dnl bison-1.26 because earlier versions generate a plural.c that doesn't
-  dnl compile.
-  dnl bison is only needed for the maintainer (who touches plural.y). But in
-  dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
-  dnl the rule in general Makefile. Now, some people carelessly touch the
-  dnl files or have a broken "make" program, hence the plural.c rule will
-  dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
-  dnl present or too old.
-  AC_CHECK_PROGS([INTLBISON], [bison])
-  if test -z "$INTLBISON"; then
-    ac_verc_fail=yes
-  else
-    dnl Found it, now check the version.
-    AC_MSG_CHECKING([version of bison])
-changequote(<<,>>)dnl
-    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* 
\([0-9]*\.[0-9.]*\).*$/\1/p'`
-    case $ac_prog_version in
-      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
-      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
-changequote([,])dnl
-         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
-      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
-    esac
-    AC_MSG_RESULT([$ac_prog_version])
-  fi
-  if test $ac_verc_fail = yes; then
-    INTLBISON=:
-  fi
-])
-
-
-dnl Checks for special options needed on MacOS X.
-dnl Defines INTL_MACOSX_LIBS.
-AC_DEFUN([gt_INTL_MACOSX],
+dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
+m4_define([gt_NEEDS_INIT],
 [
-  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])
+  m4_divert_text([DEFAULTS], [gt_needs=])
+  m4_define([gt_NEEDS_INIT], [])
 ])
 
 
-dnl gt_CHECK_DECL(FUNC, INCLUDES)
-dnl Check whether a function is declared.
-AC_DEFUN([gt_CHECK_DECL],
+dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
+AC_DEFUN([AM_GNU_GETTEXT_NEED],
 [
-  AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
-    [AC_TRY_COMPILE([$2], [
-#ifndef $1
-  char *p = (char *) $1;
-#endif
-], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
-  if test $ac_cv_have_decl_$1 = yes; then
-    gt_value=1
-  else
-    gt_value=0
-  fi
-  AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
-    [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
+  m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
 ])
 
 

Index: gettimeofday.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/gettimeofday.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- gettimeofday.m4     23 May 2005 17:46:14 -0000      1.3
+++ gettimeofday.m4     22 Aug 2007 13:43:58 -0000      1.4
@@ -1,12 +1,46 @@
-#serial 7
+#serial 11
 
-# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+# 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.
-dnl
+
+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.
@@ -14,31 +48,20 @@
 dnl If it does, then arrange to use gettimeofday and localtime only via
 dnl the wrapper functions that work around the problem.
 
-AC_DEFUN([AC_FUNC_GETTIMEOFDAY_CLOBBER],
+AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
 [
- AC_REQUIRE([AC_HEADER_TIME])
+ AC_REQUIRE([gl_HEADER_SYS_TIME_H])
+
  AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer],
-  jm_cv_func_gettimeofday_clobber,
-  [AC_TRY_RUN([
-#include <stdio.h>
-#include <string.h>
-
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
+  [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;
@@ -46,35 +69,33 @@
   lt = localtime (&t);
   saved_lt = *lt;
   gettimeofday (&tv, NULL);
-  if (memcmp (lt, &saved_lt, sizeof (struct tm)) != 0)
-    exit (1);
-
-  exit (0);
-}
-         ],
-        jm_cv_func_gettimeofday_clobber=no,
-        jm_cv_func_gettimeofday_clobber=yes,
+         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.
-        jm_cv_func_gettimeofday_clobber=yes)
-  ])
-  if test $jm_cv_func_gettimeofday_clobber = yes; then
-    gl_GETTIMEOFDAY_REPLACE_LOCALTIME
+     [gl_cv_func_gettimeofday_clobber=yes])])
 
-    AC_DEFINE(gettimeofday, rpl_gettimeofday,
-      [Define to rpl_gettimeofday if the replacement function should be used.])
-    gl_PREREQ_GETTIMEOFDAY
+ 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)
-  AC_DEFINE(gmtime, rpl_gmtime,
+  gl_PREREQ_GETTIMEOFDAY
+  AC_DEFINE([gmtime], [rpl_gmtime],
     [Define to rpl_gmtime if the replacement function should be used.])
-  AC_DEFINE(localtime, rpl_localtime,
+  AC_DEFINE([localtime], [rpl_localtime],
     [Define to rpl_localtime if the replacement function should be used.])
 ])
 
 # Prerequisites of lib/gettimeofday.c.
 AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [
-  AC_REQUIRE([AC_HEADER_TIME])
+  AC_CHECK_HEADERS([sys/timeb.h])
+  AC_CHECK_FUNCS([_ftime])
 ])

Index: glob.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/glob.m4,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- glob.m4     24 Aug 2006 01:24:14 -0000      1.17
+++ glob.m4     22 Aug 2007 13:43:58 -0000      1.18
@@ -1,5 +1,5 @@
-# glob.m4 serial 7
-dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+# glob.m4 serial 8
+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.
@@ -71,9 +71,16 @@
 
 # Prerequisites of lib/glob.*.
 AC_DEFUN([gl_PREREQ_GLOB],
-[ AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE])dnl
+[
+  AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE])dnl
   AC_REQUIRE([AC_C_RESTRICT])dnl
   AC_REQUIRE([AC_GNU_SOURCE])dnl
   AC_CHECK_HEADERS_ONCE([sys/cdefs.h unistd.h])dnl
+  if test $ac_cv_header_sys_cdefs_h = yes; then
+    HAVE_SYS_CDEFS_H=1
+  else
+    HAVE_SYS_CDEFS_H=0
+  fi
+  AC_SUBST([HAVE_SYS_CDEFS_H])
   AC_CHECK_FUNCS_ONCE([getlogin_r getpwnam_r])dnl
-  :])
+])

Index: gnulib-cache.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/gnulib-cache.m4,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- gnulib-cache.m4     22 Sep 2006 17:54:40 -0000      1.12
+++ gnulib-cache.m4     22 Aug 2007 13:43:58 -0000      1.13
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2006 Free Software Foundation, Inc.
+# 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
@@ -15,16 +15,18 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --lib=libcvs --source-base=lib --m4-base=m4 
--doc-base=doc --aux-dir=build-aux --no-libtool --macro-prefix=gl allocsa 
atexit base64 canon-host canonicalize closeout dirname dup2 error exit exitfail 
extensions fnmatch fnmatch-posix ftruncate getdate gethostname getline 
getlogin_r getndelim2 getnline getopt getpagesize getpass-gnu gettext gettime 
gettimeofday glob inttypes lstat malloc md5 memmove minmax mkdir mkstemp mktime 
nanosleep pathmax quotearg readlink realloc regex rename save-cwd setenv 
stat-macros stdbool stdint strcase strdup strerror strftime strstr strtoul 
strtoumax time_r timespec tzset unlocked-io vasnprintf vasprintf xalloc-die 
xgethostname xreadlink xsize yesno
+#   gnulib-tool --import --dir=. --lib=libcvs --source-base=lib --m4-base=m4 
--doc-base=doc --aux-dir=build-aux --no-libtool --macro-prefix=gl atexit base64 
canon-host canonicalize closeout crypto/md5 dirname dup2 error exit exitfail 
extensions fnmatch fnmatch-posix ftruncate getdate gethostname getline 
getlogin_r getndelim2 getnline getopt getpagesize getpass-gnu gettext gettime 
gettimeofday glob inttypes lstat malloc mbsstr memmove minmax mkdir mkstemp 
mktime mreadlink-with-size nanosleep pathmax quotearg readlink realloc regex 
rename save-cwd setenv stat-macros stdbool stdint strcase strdup strerror 
strftime strtoul strtoumax time_r timespec tzset unlocked-io vasnprintf 
vasprintf xalloc-die xgethostname xsize yesno
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([])
-gl_MODULES([allocsa atexit base64 canon-host canonicalize closeout dirname 
dup2 error exit exitfail extensions fnmatch fnmatch-posix ftruncate getdate 
gethostname getline getlogin_r getndelim2 getnline getopt getpagesize 
getpass-gnu gettext gettime gettimeofday glob inttypes lstat malloc md5 memmove 
minmax mkdir mkstemp mktime nanosleep pathmax quotearg readlink realloc regex 
rename save-cwd setenv stat-macros stdbool stdint strcase strdup strerror 
strftime strstr strtoul strtoumax time_r timespec tzset unlocked-io vasnprintf 
vasprintf xalloc-die xgethostname xreadlink xsize yesno])
+gl_MODULES([atexit base64 canon-host canonicalize closeout crypto/md5 dirname 
dup2 error exit exitfail extensions fnmatch fnmatch-posix ftruncate getdate 
gethostname getline getlogin_r getndelim2 getnline getopt getpagesize 
getpass-gnu gettext gettime gettimeofday glob inttypes lstat malloc mbsstr 
memmove minmax mkdir mkstemp mktime mreadlink-with-size nanosleep pathmax 
quotearg readlink realloc regex rename save-cwd setenv stat-macros stdbool 
stdint strcase strdup strerror strftime strtoul strtoumax time_r timespec tzset 
unlocked-io vasnprintf vasprintf xalloc-die xgethostname xsize yesno])
 gl_AVOID([])
 gl_SOURCE_BASE([lib])
 gl_M4_BASE([m4])
+gl_PO_BASE([])
 gl_DOC_BASE([doc])
 gl_TESTS_BASE([tests])
 gl_LIB([libcvs])
 gl_MAKEFILE_NAME([])
 gl_MACRO_PREFIX([gl])
+gl_PO_DOMAIN([])

Index: gnulib-comp.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/gnulib-comp.m4,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- gnulib-comp.m4      22 Sep 2006 17:54:40 -0000      1.26
+++ gnulib-comp.m4      22 Aug 2007 13:43:58 -0000      1.27
@@ -1,4 +1,5 @@
-# Copyright (C) 2004-2006 Free Software Foundation, Inc.
+# 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
@@ -21,126 +22,177 @@
 [
   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([AM_PROG_CC_C_O])
   AC_REQUIRE([AC_GNU_SOURCE])
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
-  AC_REQUIRE([gl_LOCK_EARLY])
 ])
 
 # This macro should be invoked from ./configure.in, 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'
   gl_FUNC_ALLOCA
-  gl_ALLOCSA
   gl_HEADER_ARPA_INET
+  AC_PROG_MKDIR_P
   gl_FUNC_ATEXIT
   gl_FUNC_BASE64
   gl_CANON_HOST
   AC_FUNC_CANONICALIZE_FILE_NAME
+  gl_MODULE_INDICATOR([canonicalize])
+  gl_CANONICALIZE_LGPL
   gl_FUNC_CHDIR_LONG
   gl_FUNC_CHOWN
+  gl_UNISTD_MODULE_INDICATOR([chown])
+  gl_CLOCK_TIME
   gl_CLOSE_STREAM
+  gl_MODULE_INDICATOR([close-stream])
   gl_CLOSEOUT
+  gl_MD5
   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_EXITFAIL
-  dnl gl_USE_SYSTEM_EXTENSIONS must be added quite early to configure.ac.
+  gl_FUNC_FCHDIR
+  gl_UNISTD_MODULE_INDICATOR([fchdir])
   gl_FCNTL_H
   gl_FCNTL_SAFER
+  gl_MODULE_INDICATOR([fcntl-safer])
   gl_FILE_NAME_CONCAT
+  gl_FLOAT_H
   # No macro. You should also use one of fnmatch-posix or fnmatch-gnu.
   gl_FUNC_FNMATCH_POSIX
   gl_FUNC_FPENDING
   gl_FUNC_FTRUNCATE
+  gl_UNISTD_MODULE_INDICATOR([ftruncate])
   gl_GETADDRINFO
   gl_FUNC_GETCWD
+  gl_UNISTD_MODULE_INDICATOR([getcwd])
   gl_GETDATE
   gl_FUNC_GETDELIM
   gl_FUNC_GETHOSTNAME
   gl_FUNC_GETLINE
   gl_GETLOGIN_R
+  gl_UNISTD_MODULE_INDICATOR([getlogin_r])
   gl_GETNDELIM2
   gl_GETNLINE
   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.15])
+  AM_GNU_GETTEXT_VERSION([0.16.1])
+  AC_SUBST([LIBINTL])
+  AC_SUBST([LTLIBINTL])
   gl_GETTIME
-  AC_FUNC_GETTIMEOFDAY_CLOBBER
+  gl_FUNC_GETTIMEOFDAY
   gl_GLOB
   gl_INET_NTOP
+  gl_INLINE
   gl_INTTYPES_H
   gl_FUNC_LCHOWN
+  gl_UNISTD_MODULE_INDICATOR([lchown])
+  gl_LOCALCHARSET
   gl_FUNC_LSTAT
   AC_FUNC_MALLOC
+  gl_MALLOCA
   gl_MBCHAR
+  gl_FUNC_MBSLEN
+  gl_STRING_MODULE_INDICATOR([mbslen])
+  gl_FUNC_MBSSTR
+  gl_STRING_MODULE_INDICATOR([mbsstr])
   gl_MBITER
-  gl_MD5
   gl_FUNC_MEMCHR
   gl_FUNC_MEMMOVE
   gl_FUNC_MEMPCPY
+  gl_STRING_MODULE_INDICATOR([mempcpy])
   gl_FUNC_MEMRCHR
+  gl_STRING_MODULE_INDICATOR([memrchr])
   gl_MINMAX
   gl_FUNC_MKDIR_TRAILING_SLASH
   gl_FUNC_MKSTEMP
+  gl_STDLIB_MODULE_INDICATOR([mkstemp])
   gl_FUNC_MKTIME
   gl_FUNC_NANOSLEEP
   gl_HEADER_NETINET_IN
+  AC_PROG_MKDIR_P
   gl_FUNC_OPENAT
   gl_PATHMAX
   gl_QUOTEARG
   gl_FUNC_READLINK
+  gl_UNISTD_MODULE_INDICATOR([readlink])
   AC_FUNC_REALLOC
   gl_REGEX
   gl_FUNC_RENAME
   gl_FUNC_RPMATCH
   gl_SAVE_CWD
-  gt_FUNC_SETENV
+  gl_FUNC_SETENV
+  gl_FUNC_UNSETENV
   gl_SIZE_MAX
   gl_FUNC_SNPRINTF
+  gl_STDIO_MODULE_INDICATOR([snprintf])
   gl_TYPE_SOCKLEN_T
   gt_TYPE_SSIZE_T
-  gl_STAT_MACROS
   AM_STDBOOL_H
   gl_STDINT_H
+  gl_STDIO_H
+  gl_STDLIB_H
   gl_STRCASE
   gl_FUNC_STRDUP
+  gl_STRING_MODULE_INDICATOR([strdup])
   gl_FUNC_STRERROR
   gl_FUNC_GNU_STRFTIME
+  gl_HEADER_STRING_H
   gl_FUNC_STRNDUP
+  gl_STRING_MODULE_INDICATOR([strndup])
   gl_FUNC_STRNLEN
-  gl_FUNC_STRSTR
+  gl_STRING_MODULE_INDICATOR([strnlen])
   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_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_HEADER_UNISTD
+  gl_UNISTD_H
   gl_UNISTD_SAFER
   gl_FUNC_GLIBC_UNLOCKED_IO
   gl_FUNC_VASNPRINTF
   gl_FUNC_VASPRINTF
+  gl_STDIO_MODULE_INDICATOR([vasprintf])
+  gl_WCHAR_H
+  gl_WCTYPE_H
   gl_FUNC_WCWIDTH
+  gl_WCHAR_MODULE_INDICATOR([wcwidth])
   gl_XALLOC
   gl_XGETCWD
-  gl_XREADLINK
   gl_XSIZE
   gl_XSTRNDUP
   gl_YESNO
@@ -148,20 +200,50 @@
   AC_SUBST([LIBCVS_LIBDEPS])
   LIBCVS_LTLIBDEPS="$gl_ltlibdeps"
   AC_SUBST([LIBCVS_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/config.rpath
+  build-aux/link-warning.h
   doc/getdate.texi
   lib/__fpending.c
   lib/__fpending.h
   lib/alloca.c
   lib/alloca_.h
-  lib/allocsa.c
-  lib/allocsa.h
-  lib/allocsa.valgrind
   lib/asnprintf.c
   lib/asprintf.c
   lib/at-func.c
@@ -171,6 +253,7 @@
   lib/basename.c
   lib/canon-host.c
   lib/canon-host.h
+  lib/canonicalize-lgpl.c
   lib/canonicalize.c
   lib/canonicalize.h
   lib/chdir-long.c
@@ -180,36 +263,43 @@
   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/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/exit.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/filenamecat.c
   lib/filenamecat.h
+  lib/float+.h
+  lib/float_.h
   lib/fnmatch.c
   lib/fnmatch_.h
   lib/fnmatch_loop.c
+  lib/fstatat.c
   lib/ftruncate.c
   lib/gai_strerror.c
   lib/getaddrinfo.c
   lib/getaddrinfo.h
   lib/getcwd.c
-  lib/getcwd.h
   lib/getdate.h
   lib/getdate.y
   lib/getdelim.c
@@ -218,7 +308,6 @@
   lib/getline.c
   lib/getline.h
   lib/getlogin_r.c
-  lib/getlogin_r.h
   lib/getndelim2.c
   lib/getndelim2.h
   lib/getnline.c
@@ -241,31 +330,38 @@
   lib/intprops.h
   lib/inttypes_.h
   lib/lchown.c
-  lib/lchown.h
+  lib/localcharset.c
+  lib/localcharset.h
   lib/lstat.c
   lib/lstat.h
   lib/malloc.c
+  lib/malloca.c
+  lib/malloca.h
+  lib/malloca.valgrind
   lib/mbchar.c
   lib/mbchar.h
+  lib/mbslen.c
+  lib/mbsstr.c
   lib/mbuiter.h
   lib/md5.c
   lib/md5.h
   lib/memchr.c
   lib/memmove.c
   lib/mempcpy.c
-  lib/mempcpy.h
   lib/memrchr.c
-  lib/memrchr.h
   lib/minmax.h
   lib/mkdir.c
   lib/mkdirat.c
   lib/mkstemp.c
-  lib/mkstemp.h
   lib/mktime.c
+  lib/mreadlink-with-size.c
+  lib/mreadlink.h
   lib/nanosleep.c
+  lib/netinet_in_.h
   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
@@ -278,6 +374,8 @@
   lib/quotearg.h
   lib/readlink.c
   lib/realloc.c
+  lib/ref-add.sin
+  lib/ref-del.sin
   lib/regcomp.c
   lib/regex.c
   lib/regex.h
@@ -293,49 +391,54 @@
   lib/setenv.h
   lib/size_max.h
   lib/snprintf.c
-  lib/snprintf.h
-  lib/socket_.h
   lib/stat-macros.h
-  lib/stat_.h
   lib/stdbool_.h
   lib/stdint_.h
-  lib/strcase.h
+  lib/stdio_.h
+  lib/stdlib_.h
   lib/strcasecmp.c
   lib/strdup.c
-  lib/strdup.h
+  lib/streq.h
   lib/strerror.c
   lib/strftime.c
   lib/strftime.h
+  lib/string_.h
   lib/stripslash.c
   lib/strncasecmp.c
   lib/strndup.c
-  lib/strndup.h
   lib/strnlen.c
-  lib/strnlen.h
   lib/strnlen1.c
   lib/strnlen1.h
-  lib/strstr.c
-  lib/strstr.h
   lib/strtoimax.c
   lib/strtol.c
   lib/strtoll.c
   lib/strtoul.c
   lib/strtoull.c
   lib/strtoumax.c
+  lib/sys_socket_.h
+  lib/sys_stat_.h
+  lib/sys_time_.h
   lib/tempname.c
+  lib/tempname.h
+  lib/time_.h
   lib/time_r.c
-  lib/time_r.h
   lib/timespec.h
   lib/unistd--.h
   lib/unistd-safer.h
+  lib/unistd_.h
+  lib/unitypes.h
+  lib/uniwidth.h
+  lib/uniwidth/cjk.h
+  lib/uniwidth/width.c
   lib/unlocked-io.h
   lib/unsetenv.c
   lib/vasnprintf.c
   lib/vasnprintf.h
   lib/vasprintf.c
-  lib/vasprintf.h
   lib/verify.h
-  lib/wcwidth.h
+  lib/wchar_.h
+  lib/wctype_.h
+  lib/wcwidth.c
   lib/xalloc-die.c
   lib/xalloc.h
   lib/xgetcwd.c
@@ -343,8 +446,6 @@
   lib/xgethostname.c
   lib/xgethostname.h
   lib/xmalloc.c
-  lib/xreadlink.c
-  lib/xreadlink.h
   lib/xsize.h
   lib/xstrndup.c
   lib/xstrndup.h
@@ -352,12 +453,12 @@
   lib/yesno.h
   m4/absolute-header.m4
   m4/alloca.m4
-  m4/allocsa.m4
   m4/arpa_inet_h.m4
   m4/atexit.m4
   m4/base64.m4
   m4/bison.m4
   m4/canon-host.m4
+  m4/canonicalize-lgpl.m4
   m4/canonicalize.m4
   m4/chdir-long.m4
   m4/chown.m4
@@ -368,6 +469,7 @@
   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
@@ -377,9 +479,11 @@
   m4/error.m4
   m4/exitfail.m4
   m4/extensions.m4
+  m4/fchdir.m4
   m4/fcntl-safer.m4
   m4/fcntl_h.m4
   m4/filenamecat.m4
+  m4/float_h.m4
   m4/fnmatch.m4
   m4/fpending.m4
   m4/ftruncate.m4
@@ -403,12 +507,17 @@
   m4/glibc2.m4
   m4/glibc21.m4
   m4/glob.m4
+  m4/gnulib-common.m4
   m4/iconv.m4
+  m4/include_next.m4
   m4/inet_ntop.m4
+  m4/inline.m4
   m4/intdiv0.m4
+  m4/intl.m4
+  m4/intldir.m4
+  m4/intlmacosx.m4
   m4/intmax.m4
   m4/intmax_t.m4
-  m4/inttypes-h.m4
   m4/inttypes-pri.m4
   m4/inttypes.m4
   m4/inttypes_h.m4
@@ -417,13 +526,16 @@
   m4/lib-ld.m4
   m4/lib-link.m4
   m4/lib-prefix.m4
+  m4/localcharset.m4
   m4/lock.m4
-  m4/longdouble.m4
   m4/longlong.m4
   m4/lstat.m4
+  m4/malloca.m4
   m4/mbchar.m4
   m4/mbiter.m4
   m4/mbrtowc.m4
+  m4/mbslen.m4
+  m4/mbsstr.m4
   m4/mbstate_t.m4
   m4/md5.m4
   m4/memchr.m4
@@ -449,23 +561,23 @@
   m4/rpmatch.m4
   m4/save-cwd.m4
   m4/setenv.m4
-  m4/signed.m4
   m4/size_max.m4
   m4/snprintf.m4
   m4/socklen.m4
   m4/sockpfaf.m4
   m4/ssize_t.m4
-  m4/stat-macros.m4
   m4/stdbool.m4
   m4/stdint.m4
   m4/stdint_h.m4
+  m4/stdio_h.m4
+  m4/stdlib_h.m4
   m4/strcase.m4
   m4/strdup.m4
   m4/strerror.m4
   m4/strftime.m4
+  m4/string_h.m4
   m4/strndup.m4
   m4/strnlen.m4
-  m4/strstr.m4
   m4/strtoimax.m4
   m4/strtol.m4
   m4/strtoll.m4
@@ -474,6 +586,9 @@
   m4/strtoumax.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
@@ -486,12 +601,13 @@
   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/xreadlink.m4
   m4/xsize.m4
   m4/xstrndup.m4
   m4/yesno.m4

Index: iconv.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/iconv.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- iconv.m4    1 Mar 2005 18:15:07 -0000       1.2
+++ iconv.m4    22 Aug 2007 13:43:58 -0000      1.3
@@ -1,5 +1,5 @@
-# iconv.m4 serial AM4 (gettext-0.11.3)
-dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+# iconv.m4 serial AM6 (gettext-0.16.2)
+dnl Copyright (C) 2000-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.
@@ -21,6 +21,7 @@
 [
   dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
   dnl those with the standalone portable GNU libiconv installed).
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
 
   dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
   dnl accordingly.
@@ -33,7 +34,7 @@
   am_save_CPPFLAGS="$CPPFLAGS"
   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
 
-  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
+  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>
@@ -56,7 +57,85 @@
     fi
   ])
   if test "$am_cv_func_iconv" = yes; then
-    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+    AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
+      dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
+      am_save_LIBS="$LIBS"
+      if test $am_cv_lib_iconv = yes; then
+        LIBS="$LIBS $LIBICONV"
+      fi
+      AC_TRY_RUN([
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+     returns.  */
+  {
+    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+    if (cd_utf8_to_88591 != (iconv_t)(-1))
+      {
+        static const char input[] = "\342\202\254"; /* EURO SIGN */
+        char buf[10];
+        const char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_utf8_to_88591,
+                            (char **) &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res == 0)
+          return 1;
+      }
+  }
+#if 0 /* This bug could be worked around by the caller.  */
+  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
+  {
+    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+    if (cd_88591_to_utf8 != (iconv_t)(-1))
+      {
+        static const char input[] = "\304rger mit b\366sen B\374bchen ohne 
Augenma\337";
+        char buf[50];
+        const char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_88591_to_utf8,
+                            (char **) &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if ((int)res > 0)
+          return 1;
+      }
+  }
+#endif
+  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+     provided.  */
+  if (/* Try standardized names.  */
+      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+      /* Try IRIX, OSF/1 names.  */
+      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+      /* Try AIX names.  */
+      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+      /* Try HP-UX names.  */
+      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+    return 1;
+  return 0;
+}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
+        [case "$host_os" in
+           aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+           *)            am_cv_func_iconv_works="guessing yes" ;;
+         esac])
+      LIBS="$am_save_LIBS"
+    ])
+    case "$am_cv_func_iconv_works" in
+      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+      *)   am_func_iconv=yes ;;
+    esac
+  else
+    am_func_iconv=no am_cv_lib_iconv=no
+  fi
+  if test "$am_func_iconv" = yes; then
+    AC_DEFINE(HAVE_ICONV, 1,
+      [Define if you have the iconv() function and it works.])
   fi
   if test "$am_cv_lib_iconv" = yes; then
     AC_MSG_CHECKING([how to link with libiconv])

Index: intdiv0.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/intdiv0.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- intdiv0.m4  1 Mar 2005 18:15:07 -0000       1.2
+++ intdiv0.m4  22 Aug 2007 13:43:58 -0000      1.3
@@ -1,5 +1,5 @@
-# intdiv0.m4 serial 1 (gettext-0.11.3)
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# intdiv0.m4 serial 2 (gettext-0.16.2)
+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.
@@ -14,16 +14,27 @@
   AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
     gt_cv_int_divbyzero_sigfpe,
     [
+      gt_cv_int_divbyzero_sigfpe=
+changequote(,)dnl
+      case "$host_os" in
+        macos* | darwin[6-9]* | darwin[1-9][0-9]*)
+          # On MacOS X 10.2 or newer, just assume the same as when cross-
+          # compiling. If we were to perform the real test, 1 Crash Report
+          # dialog window would pop up.
+          case "$host_cpu" in
+            i[34567]86 | x86_64)
+              gt_cv_int_divbyzero_sigfpe="guessing yes" ;;
+          esac
+          ;;
+      esac
+changequote([,])dnl
+      if test -z "$gt_cv_int_divbyzero_sigfpe"; then
       AC_TRY_RUN([
 #include <stdlib.h>
 #include <signal.h>
 
 static void
-#ifdef __cplusplus
 sigfpe_handler (int sig)
-#else
-sigfpe_handler (sig) int sig;
-#endif
 {
   /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
   exit (sig != SIGFPE);
@@ -53,13 +64,16 @@
 ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
         [
           # Guess based on the CPU.
+changequote(,)dnl
           case "$host_cpu" in
-            alpha* | i[34567]86 | m68k | s390*)
+              alpha* | i[34567]86 | x86_64 | m68k | s390*)
               gt_cv_int_divbyzero_sigfpe="guessing yes";;
             *)
               gt_cv_int_divbyzero_sigfpe="guessing no";;
           esac
+changequote([,])dnl
         ])
+      fi
     ])
   case "$gt_cv_int_divbyzero_sigfpe" in
     *yes) value=1;;

Index: intmax.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/intmax.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- intmax.m4   1 Mar 2005 18:15:07 -0000       1.2
+++ intmax.m4   22 Aug 2007 13:43:59 -0000      1.3
@@ -1,4 +1,4 @@
-# intmax.m4 serial 2 (gettext-0.14.2)
+# intmax.m4 serial 3 (gettext-0.16)
 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,
@@ -22,7 +22,10 @@
 #if HAVE_INTTYPES_H_WITH_UINTMAX
 #include <inttypes.h>
 #endif
-], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
+],     [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>.])

Index: inttypes-pri.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/inttypes-pri.m4,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- inttypes-pri.m4     22 Sep 2006 17:54:40 -0000      1.5
+++ inttypes-pri.m4     22 Aug 2007 13:43:59 -0000      1.6
@@ -1,4 +1,4 @@
-# inttypes-pri.m4 serial 4 (gettext-0.15.1)
+# 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,

Index: inttypes.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/inttypes.m4,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- inttypes.m4 22 Sep 2006 17:54:40 -0000      1.5
+++ inttypes.m4 22 Aug 2007 13:43:59 -0000      1.6
@@ -1,5 +1,5 @@
-# inttypes.m4 serial 5
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+# inttypes.m4 serial 11
+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.
@@ -22,7 +22,9 @@
   dnl   - the existence of an <inttypes.h>,
   dnl   - that imaxabs, imaxdiv, strtoimax, strtoumax are declared,
   dnl   - some additional tests.
-  gl_cv_header_working_inttypes_h=no
+  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 \
@@ -35,7 +37,8 @@
 #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
+#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* work if build isn't clean */
+#include <inttypes.h>
 
 /* No need to duplicate the tests of stdint.m4; they are subsumed by
    $gl_cv_header_working_stdint_h = yes.  */
@@ -130,20 +133,32 @@
   ;
       ])],
       [gl_cv_header_working_inttypes_h=yes])
-  fi
-  if test $gl_cv_header_working_inttypes_h = yes; then
+     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
 
-    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])
+    AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
+    gl_CHECK_NEXT_HEADERS([inttypes.h])
+
+    dnl Ensure that <stdint.h> defines the limit macros, since gnulib's
+    dnl <inttypes.h> relies on them.  This macro is only needed when a
+    dnl C++ compiler is in use; it has no effect for a C compiler.
+    dnl Also be careful to define __STDC_LIMIT_MACROS only when gnulib's
+    dnl <inttypes.h> is going to be created, and to avoid redefinition warnings
+    dnl if the __STDC_LIMIT_MACROS is already defined through the CPPFLAGS.
+    AC_DEFINE([GL_TRIGGER_STDC_LIMIT_MACROS], 1,
+      [Define to make the limit macros in <stdint.h> visible.])
+    AH_VERBATIM([__STDC_LIMIT_MACROS_ZZZ],
+[/* Ensure that <stdint.h> defines the limit macros, since gnulib's
+   <inttypes.h> relies on them.  */
+#if defined __cplusplus && !defined __STDC_LIMIT_MACROS && 
GL_TRIGGER_STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS 1
+#endif
+])
 
     PRIPTR_PREFIX=
     if test -n "$STDINT_H"; then
@@ -173,30 +188,46 @@
     else
       HAVE_DECL_IMAXABS=0
     fi
-    AC_SUBST([HAVE_DECL_IMAXABS])
 
     if test "$ac_cv_have_decl_imaxdiv" = yes; then
       HAVE_DECL_IMAXDIV=1
     else
       HAVE_DECL_IMAXDIV=0
     fi
-    AC_SUBST([HAVE_DECL_IMAXDIV])
 
     if test "$ac_cv_have_decl_strtoimax" = yes; then
       HAVE_DECL_STRTOIMAX=1
     else
       HAVE_DECL_STRTOIMAX=0
     fi
-    AC_SUBST([HAVE_DECL_STRTOIMAX])
 
     if test "$ac_cv_have_decl_strtoumax" = yes; then
       HAVE_DECL_STRTOUMAX=1
     else
       HAVE_DECL_STRTOUMAX=0
     fi
-    AC_SUBST([HAVE_DECL_STRTOUMAX])
 
     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])
+])

Index: lchown.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/lchown.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- lchown.m4   24 Aug 2006 01:24:14 -0000      1.1
+++ lchown.m4   22 Aug 2007 13:43:59 -0000      1.2
@@ -1,7 +1,8 @@
-#serial 9
+#serial 12
+# Determine whether we need the lchown wrapper.
 
-dnl Copyright (C) 1998, 2001, 2003, 2004, 2005, 2006 Free Software
-dnl Foundation, Inc.
+dnl Copyright (C) 1998, 2001, 2003, 2004, 2005, 2006, 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,
@@ -12,8 +13,10 @@
 
 AC_DEFUN([gl_FUNC_LCHOWN],
 [
-  AC_REQUIRE([AC_TYPE_UID_T])
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_CHOWN])
-  AC_REQUIRE([gl_STAT_MACROS])
   AC_REPLACE_FUNCS(lchown)
+  if test $ac_cv_func_lchown = no; then
+    REPLACE_LCHOWN=1
+  fi
 ])

Index: lib-link.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/lib-link.m4,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- lib-link.m4 22 Sep 2006 17:54:40 -0000      1.7
+++ lib-link.m4 22 Aug 2007 13:43:59 -0000      1.8
@@ -1,17 +1,19 @@
-# lib-link.m4 serial 9 (gettext-0.15.1)
-dnl Copyright (C) 2001-2006 Free Software Foundation, Inc.
+# 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.50)
+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])
@@ -24,13 +26,16 @@
     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
@@ -46,6 +51,8 @@
 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])
@@ -82,17 +89,23 @@
     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 libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
-dnl hardcode_direct, hardcode_minus_L.
+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.
@@ -109,12 +122,14 @@
     acl_cv_rpath=done
   ])
   wl="$acl_cv_wl"
-  libext="$acl_cv_libext"
-  shlibext="$acl_cv_shlibext"
-  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
-  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
-  hardcode_direct="$acl_cv_hardcode_direct"
-  hardcode_minus_L="$acl_cv_hardcode_minus_L"
+  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],
@@ -124,20 +139,24 @@
 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$1-prefix],
-[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
-  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
+  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
@@ -158,6 +177,7 @@
   LIB[]NAME=
   LTLIB[]NAME=
   INC[]NAME=
+  LIB[]NAME[]_PREFIX=
   rpathdirs=
   ltrpathdirs=
   names_already_handled=
@@ -197,27 +217,53 @@
           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
-            if test -n "$shlibext" \
-               && { test -f "$additional_libdir/lib$name.$shlibext" \
-                    || { test "$shlibext" = dll \
-                         && test -f "$additional_libdir/lib$name.dll.a"; }; }; 
then
-              found_dir="$additional_libdir"
-              if test -f "$additional_libdir/lib$name.$shlibext"; then
-                found_so="$additional_libdir/lib$name.$shlibext"
-              else
-                found_so="$additional_libdir/lib$name.dll.a"
-              fi
-              if test -f "$additional_libdir/lib$name.la"; then
-                found_la="$additional_libdir/lib$name.la"
-              fi
-            else
-              if test -f "$additional_libdir/lib$name.$libext"; then
-                found_dir="$additional_libdir"
-                found_a="$additional_libdir/lib$name.$libext"
-                if test -f "$additional_libdir/lib$name.la"; then
-                  found_la="$additional_libdir/lib$name.la"
+            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
@@ -227,28 +273,46 @@
               case "$x" in
                 -L*)
                   dir=`echo "X$x" | sed -e 's/^X-L//'`
-                  if test -n "$shlibext" \
-                     && { test -f "$dir/lib$name.$shlibext" \
-                          || { test "$shlibext" = dll \
-                               && test -f "$dir/lib$name.dll.a"; }; }; then
+                  dnl First look for a shared library.
+                  if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext"; then
                     found_dir="$dir"
-                    if test -f "$dir/lib$name.$shlibext"; then
-                      found_so="$dir/lib$name.$shlibext"
+                      found_so="$dir/$libname$shrext"
                     else
-                      found_so="$dir/lib$name.dll.a"
-                    fi
-                    if test -f "$dir/lib$name.la"; then
-                      found_la="$dir/lib$name.la"
+                      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
-                    if test -f "$dir/lib$name.$libext"; then
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f"; then
                       found_dir="$dir"
-                      found_a="$dir/lib$name.$libext"
-                      if test -f "$dir/lib$name.la"; then
-                        found_la="$dir/lib$name.la"
+                            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
@@ -282,12 +346,12 @@
                   ltrpathdirs="$ltrpathdirs $found_dir"
                 fi
                 dnl The hardcoding into $LIBNAME is system dependent.
-                if test "$hardcode_direct" = yes; then
+                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 "$hardcode_libdir_flag_spec" && test 
"$hardcode_minus_L" = no; then
+                  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"
@@ -318,13 +382,13 @@
                     if test -z "$haveit"; then
                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
                     fi
-                    if test "$hardcode_minus_L" != no; then
+                    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 $hardcode_runpath_var and LD_RUN_PATH
+                      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.
@@ -351,6 +415,7 @@
             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
@@ -512,18 +577,18 @@
     done
   done
   if test "X$rpathdirs" != "X"; then
-    if test -n "$hardcode_libdir_separator"; 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:+$hardcode_libdir_separator}$found_dir"
+        
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
       done
-      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
+      dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
       acl_save_libdir="$libdir"
       libdir="$alldirs"
-      eval flag=\"$hardcode_libdir_flag_spec\"
+      eval flag=\"$acl_hardcode_libdir_flag_spec\"
       libdir="$acl_save_libdir"
       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
     else
@@ -531,7 +596,7 @@
       for found_dir in $rpathdirs; do
         acl_save_libdir="$libdir"
         libdir="$found_dir"
-        eval flag=\"$hardcode_libdir_flag_spec\"
+        eval flag=\"$acl_hardcode_libdir_flag_spec\"
         libdir="$acl_save_libdir"
         LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
       done
@@ -580,7 +645,7 @@
   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
   $1=
   if test "$enable_rpath" != no; then
-    if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = 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=
@@ -614,16 +679,16 @@
           done
         else
           dnl The linker is used for linking directly.
-          if test -n "$hardcode_libdir_separator"; then
+          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:+$hardcode_libdir_separator}$dir"
+              
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
             done
             acl_save_libdir="$libdir"
             libdir="$alldirs"
-            eval flag=\"$hardcode_libdir_flag_spec\"
+            eval flag=\"$acl_hardcode_libdir_flag_spec\"
             libdir="$acl_save_libdir"
             $1="$flag"
           else
@@ -631,7 +696,7 @@
             for dir in $rpathdirs; do
               acl_save_libdir="$libdir"
               libdir="$dir"
-              eval flag=\"$hardcode_libdir_flag_spec\"
+              eval flag=\"$acl_hardcode_libdir_flag_spec\"
               libdir="$acl_save_libdir"
               $1="${$1}${$1:+ }$flag"
             done

Index: lock.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/lock.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- lock.m4     25 Sep 2006 10:38:20 -0000      1.3
+++ lock.m4     22 Aug 2007 13:44:00 -0000      1.4
@@ -1,4 +1,4 @@
-# lock.m4 serial 5 (gettext-0.15.1)
+# lock.m4 serial 6 (gettext-0.16)
 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,
@@ -21,12 +21,12 @@
 
 AC_DEFUN([gl_LOCK_EARLY],
 [
-  AC_REQUIRE([gl_LOCK_BODY])
+  AC_REQUIRE([gl_LOCK_EARLY_BODY])
 ])
 
 dnl The guts of gl_LOCK_EARLY. Needs to be expanded only once.
 
-AC_DEFUN([gl_LOCK_BODY],
+AC_DEFUN([gl_LOCK_EARLY_BODY],
 [
   dnl Ordering constraints: This macro modifies CPPFLAGS in a way that
   dnl influences the result of the autoconf tests that test for *_unlocked
@@ -49,6 +49,34 @@
        *)    gl_use_threads=yes ;;
      esac
     ])
+  if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+    # For using <pthread.h>:
+    case "$host_os" in
+      osf*)
+        # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
+        # groks <pthread.h>. cc also understands the flag -pthread, but
+        # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
+        # 2. putting a flag into CPPFLAGS that has an effect on the linker
+        # causes the AC_TRY_LINK test below to succeed unexpectedly,
+        # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
+        CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+        ;;
+    esac
+    # Some systems optimize for single-threaded programs by default, and
+    # need special flags to disable these optimizations. For example, the
+    # definition of 'errno' in <errno.h>.
+    case "$host_os" in
+      aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
+      solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
+    esac
+  fi
+])
+
+dnl The guts of gl_LOCK. Needs to be expanded only once.
+
+AC_DEFUN([gl_LOCK_BODY],
+[
+  AC_REQUIRE([gl_LOCK_EARLY_BODY])
   gl_threads_api=none
   LIBTHREAD=
   LTLIBTHREAD=
@@ -63,26 +91,12 @@
     AC_MSG_RESULT([$gl_have_weak])
     if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
       # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
-      # it groks <pthread.h>.
-      gl_save_CPPFLAGS="$CPPFLAGS"
-      CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+      # it groks <pthread.h>. It's added above, in gl_LOCK_EARLY_BODY.
       AC_CHECK_HEADER(pthread.h, gl_have_pthread_h=yes, gl_have_pthread_h=no)
-      CPPFLAGS="$gl_save_CPPFLAGS"
       if test "$gl_have_pthread_h" = yes; then
         # Other possible tests:
         #   -lpthreads (FSU threads, PCthreads)
         #   -lgthreads
-        case "$host_os" in
-          osf*)
-            # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
-            # groks <pthread.h>. cc also understands the flag -pthread, but
-            # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
-            # 2. putting a flag into CPPFLAGS that has an effect on the linker
-            # causes the AC_TRY_LINK test below to succeed unexpectedly,
-            # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
-            CPPFLAGS="$CPPFLAGS -D_REENTRANT"
-            ;;
-        esac
         gl_have_pthread=
         # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
         # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
@@ -151,13 +165,6 @@
 #endif],
             [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], 1,
                [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])])
-          # Some systems optimize for single-threaded programs by default, and
-          # need special flags to disable these optimizations. For example, the
-          # definition of 'errno' in <errno.h>.
-          case "$host_os" in
-            aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
-            solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
-          esac
         fi
       fi
     fi
@@ -241,6 +248,7 @@
 AC_DEFUN([gl_LOCK],
 [
   AC_REQUIRE([gl_LOCK_EARLY])
+  AC_REQUIRE([gl_LOCK_BODY])
   gl_PREREQ_LOCK
 ])
 

Index: longlong.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/longlong.m4,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- longlong.m4 24 Aug 2006 01:24:14 -0000      1.5
+++ longlong.m4 22 Aug 2007 13:44:00 -0000      1.6
@@ -1,4 +1,4 @@
-# longlong.m4 serial 7
+# 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,
@@ -10,6 +10,10 @@
 # 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],
@@ -24,7 +28,31 @@
          [[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(
+            address@hidden:@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,

Index: lstat.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/lstat.m4,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- lstat.m4    24 Aug 2006 01:24:14 -0000      1.10
+++ lstat.m4    22 Aug 2007 13:44:00 -0000      1.11
@@ -1,6 +1,6 @@
-#serial 15
+#serial 16
 
-# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
+# 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
@@ -11,7 +11,7 @@
 
 AC_DEFUN([gl_FUNC_LSTAT],
 [
-  AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
+  AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
   dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ(lstat).
   :
 ])

Index: mbchar.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/mbchar.m4,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- mbchar.m4   24 Aug 2006 01:24:14 -0000      1.5
+++ mbchar.m4   22 Aug 2007 13:44:00 -0000      1.6
@@ -1,5 +1,5 @@
-# mbchar.m4 serial 4
-dnl Copyright (C) 2005-2006 Free Software Foundation, Inc.
+# 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.
@@ -10,14 +10,4 @@
 AC_DEFUN([gl_MBCHAR],
 [
   AC_REQUIRE([AC_GNU_SOURCE])
-  dnl The following line is that so the user can test HAVE_WCHAR_H
-  dnl before #include "mbchar.h".
-  AC_CHECK_HEADERS_ONCE([wchar.h])
-  dnl Compile mbchar.c only if HAVE_WCHAR_H.
-  if test $ac_cv_header_wchar_h = yes; then
-    AC_LIBOBJ([mbchar])
-    dnl Prerequisites of mbchar.h and mbchar.c.
-    AC_CHECK_HEADERS_ONCE([wctype.h])
-    AC_CHECK_FUNCS([iswcntrl])
-  fi
 ])

Index: mempcpy.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/mempcpy.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- mempcpy.m4  24 Aug 2006 01:24:14 -0000      1.2
+++ mempcpy.m4  22 Aug 2007 13:44:01 -0000      1.3
@@ -1,17 +1,21 @@
-# mempcpy.m4 serial 4
-dnl Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
+# 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
 ])

Index: memrchr.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/memrchr.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- memrchr.m4  24 Aug 2006 01:24:14 -0000      1.3
+++ memrchr.m4  22 Aug 2007 13:44:01 -0000      1.4
@@ -1,5 +1,5 @@
-# memrchr.m4 serial 5
-dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+# 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.
@@ -9,7 +9,11 @@
   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

Index: mkstemp.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/mkstemp.m4,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- mkstemp.m4  22 Sep 2006 17:54:40 -0000      1.9
+++ mkstemp.m4  22 Aug 2007 13:44:01 -0000      1.10
@@ -1,6 +1,6 @@
-#serial 14
+#serial 17
 
-# Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 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.
@@ -13,6 +13,7 @@
 # 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],
@@ -28,9 +29,9 @@
              large = 2147483647;
            for (i = 0; i < 70; i++)
              {
-               char template[] = "conftest.mkstemp/coXXXXXX";
+               char templ[] = "conftest.mkstemp/coXXXXXX";
                int (*mkstemp_function) (char *) = mkstemp;
-               int fd = mkstemp_function (template);
+               int fd = mkstemp_function (templ);
                if (fd < 0 || lseek (fd, large, SEEK_SET) != large)
                  return 1;
                close (fd);
@@ -43,12 +44,9 @@
     ])
 
   if test $gl_cv_func_working_mkstemp != yes; then
-    AC_DEFINE([__MKSTEMP_PREFIX], [[rpl_]],
-      [Define to rpl_ if the mkstemp replacement function should be used.])
-    AC_LIBOBJ(mkstemp)
-    AC_LIBOBJ(tempname)
+    REPLACE_MKSTEMP=1
+    AC_LIBOBJ([mkstemp])
     gl_PREREQ_MKSTEMP
-    gl_PREREQ_TEMPNAME
   fi
 ])
 
@@ -56,10 +54,3 @@
 AC_DEFUN([gl_PREREQ_MKSTEMP],
 [
 ])
-
-# Prerequisites of lib/tempname.c.
-AC_DEFUN([gl_PREREQ_TEMPNAME],
-[
-  AC_CHECK_HEADERS_ONCE(sys/time.h)
-  AC_CHECK_FUNCS(__secure_getenv gettimeofday)
-])

Index: mktime.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/mktime.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- mktime.m4   22 Sep 2006 17:54:40 -0000      1.4
+++ mktime.m4   22 Aug 2007 13:44:01 -0000      1.5
@@ -1,36 +1,26 @@
-#serial 8
-dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+#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.60a and earlier.
+# 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/lib/autoconf/functions.m4?rev=1.108&root=autoconf>.
+# 
<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_REQUIRE([AC_HEADER_TIME])dnl
-AC_CHECK_HEADERS_ONCE(sys/time.h unistd.h)
+[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.  */
-#ifdef TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# ifdef HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
-
+#include <limits.h>
 #include <stdlib.h>
+#include <time.h>
 
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
@@ -178,12 +168,15 @@
      isn't worth using anyway.  */
   alarm (60);
 
-  for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
-    continue;
-  time_t_max--;
-  if ((time_t) -1 < 0)
-    for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
-      continue;
+  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++)
     {
@@ -198,10 +191,12 @@
             && mktime_test ((time_t) (60 * 60 * 24))))
        return 1;
 
-      for (j = 1; 0 < j; j *= 2)
+      for (j = 1; ; j <<= 1)
        if (! bigtime_test (j))
          return 1;
-      if (! bigtime_test (j - 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 ());
@@ -216,7 +211,8 @@
 
 AC_DEFUN([gl_FUNC_MKTIME],
 [
-  AC_REQUIRE([AC_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.])
@@ -225,4 +221,7 @@
 ])
 
 # Prerequisites of lib/mktime.c.
-AC_DEFUN([gl_PREREQ_MKTIME], [:])
+AC_DEFUN([gl_PREREQ_MKTIME],
+[
+  AC_REQUIRE([AC_C_INLINE])
+])

Index: nanosleep.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/nanosleep.m4,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- nanosleep.m4        2 Sep 2006 23:17:59 -0000       1.10
+++ nanosleep.m4        22 Aug 2007 13:44:01 -0000      1.11
@@ -1,12 +1,12 @@
-#serial 19
+#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 Free Software
-# Foundation, Inc.
+# 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,
@@ -17,7 +17,7 @@
  dnl Persuade glibc and Solaris <time.h> to declare nanosleep.
  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
 
- AC_REQUIRE([AC_HEADER_TIME])
+ AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
  AC_REQUIRE([gl_CLOCK_TIME])
  AC_CHECK_HEADERS_ONCE(sys/time.h)
 
@@ -34,19 +34,13 @@
   [
    AC_RUN_IFELSE(
      [AC_LANG_SOURCE([[
-       #if TIME_WITH_SYS_TIME
-        #include <sys/time.h>
-        #include <time.h>
-       #else
-        #if HAVE_SYS_TIME_H
-         #include <sys/time.h>
-        #else
-         #include <time.h>
-        #endif
-       #endif
        #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) \
@@ -67,9 +61,16 @@
          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);
@@ -85,7 +86,10 @@
       esac],
      [gl_cv_func_nanosleep=cross-compiling])
   ])
-  if test "$gl_cv_func_nanosleep" != yes; then
+  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.])
@@ -97,8 +101,6 @@
       done
     fi
     AC_LIBOBJ(nanosleep)
-    AC_DEFINE(nanosleep, rpl_nanosleep,
-      [Define to rpl_nanosleep if the replacement function should be used.])
     gl_PREREQ_NANOSLEEP
   fi
 

Index: netinet_in_h.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/netinet_in_h.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- netinet_in_h.m4     16 Aug 2006 18:12:09 -0000      1.1
+++ netinet_in_h.m4     22 Aug 2007 13:44:01 -0000      1.2
@@ -1,18 +1,30 @@
-# netinet_in_h.m4 serial 1
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+# netinet_in_h.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.
 
-dnl Written by Simon Josefsson
-
 AC_DEFUN([gl_HEADER_NETINET_IN],
 [
-  AC_CHECK_HEADERS_ONCE([netinet/in.h])
-  if test $ac_cv_header_netinet_in_h = yes; then
+  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_CHECK_NEXT_HEADERS([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)
+  AC_SUBST([NETINET_IN_H])
 ])

Index: openat.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/openat.m4,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- openat.m4   24 Aug 2006 01:24:14 -0000      1.5
+++ openat.m4   22 Aug 2007 13:44:01 -0000      1.6
@@ -1,7 +1,7 @@
-#serial 10
+#serial 15
 # See if we need to use our replacement for Solaris' openat et al functions.
 
-dnl Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+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.
@@ -10,25 +10,81 @@
 
 AC_DEFUN([gl_FUNC_OPENAT],
 [
-  # No system provides these functions; compile them unconditionally.
-  AC_LIBOBJ([mkdirat])
-  AC_LIBOBJ([fchmodat])
-
-  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(openat)
-  case $ac_cv_func_openat in
-  yes) ;;
+  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"
+     ln -s conftest.no-such $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([], [use_replacement_fchownat=no])
+  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],
 [
-  AC_REQUIRE([gl_SAVE_CWD])
+  :
 ])

Index: printf-posix.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/printf-posix.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- printf-posix.m4     1 Mar 2005 18:15:07 -0000       1.2
+++ printf-posix.m4     22 Aug 2007 13:44:01 -0000      1.3
@@ -1,5 +1,5 @@
-# printf-posix.m4 serial 2 (gettext-0.13.1)
-dnl Copyright (C) 2003 Free Software Foundation, Inc.
+# printf-posix.m4 serial 3 (gettext-0.16.2)
+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.
@@ -28,7 +28,7 @@
 }], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
       [
         AC_EGREP_CPP(notposix, [
-#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined 
__CYGWIN__
+#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined 
__MINGW32__ || defined __CYGWIN__
   notposix
 #endif
         ], gt_cv_func_printf_posix="guessing no",

Index: quotearg.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/quotearg.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- quotearg.m4 24 Aug 2006 01:24:14 -0000      1.3
+++ quotearg.m4 22 Aug 2007 13:44:01 -0000      1.4
@@ -1,5 +1,5 @@
-# quotearg.m4 serial 5
-dnl Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 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.
@@ -9,8 +9,7 @@
   AC_LIBOBJ([quotearg])
 
   dnl Prerequisites of lib/quotearg.c.
-  AC_CHECK_HEADERS_ONCE(wchar.h wctype.h)
-  AC_CHECK_FUNCS_ONCE(iswprint mbsinit)
+  AC_CHECK_FUNCS_ONCE([mbsinit])
   AC_TYPE_MBSTATE_T
   gl_FUNC_MBRTOWC
 ])

Index: readlink.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/readlink.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- readlink.m4 1 Mar 2005 18:15:07 -0000       1.2
+++ readlink.m4 22 Aug 2007 13:44:01 -0000      1.3
@@ -1,18 +1,27 @@
-# readlink.m4 serial 2
-dnl Copyright (C) 2003 Free Software Foundation, Inc.
+# 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_CHECK_FUNCS(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],
 [

Index: regex.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/regex.m4,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- regex.m4    22 Sep 2006 17:54:40 -0000      1.15
+++ regex.m4    22 Aug 2007 13:44:01 -0000      1.16
@@ -1,7 +1,7 @@
-#serial 40
+#serial 47
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006 Free Software Foundation, Inc.
+# 2006, 2007 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -18,9 +18,12 @@
 
   AC_ARG_WITH([included-regex],
     [AC_HELP_STRING([--without-included-regex],
-                   [don't compile regex; this is the default on
+                   [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)])])
+                    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
@@ -29,8 +32,7 @@
     # 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.  The first failing regular expression is from `Spencer ere
-    # test #75' in grep-2.3.
+    # regex.c.
     AC_CACHE_CHECK([for working re_compile_pattern],
                   [gl_cv_func_re_compile_pattern_working],
       [AC_RUN_IFELSE(
@@ -74,68 +76,91 @@
                }
            #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));
+           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)
-             exit (1);
+             return 1;
 
-           /* This should succeed, but does not for e.g. glibc-2.1.3.  */
-           memset (&regex, 0, sizeof (regex));
+           /* 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)
-             exit (1);
+             return 1;
 
            /* The following example is derived from a problem report
               against gawk from Jorge Stolfi <address@hidden>.  */
-           memset (&regex, 0, sizeof (regex));
+           memset (&regex, 0, sizeof regex);
            s = re_compile_pattern ("[an\371]*n", 7, &regex);
            if (s)
-             exit (1);
+             return 1;
 
-           /* This should match, but does not for e.g. glibc-2.2.1.  */
+           /* This should match, but does not for glibc-2.2.1.  */
            if (re_match (&regex, "an", 2, 0, &regs) != 2)
-             exit (1);
+             return 1;
 
-           memset (&regex, 0, sizeof (regex));
+           memset (&regex, 0, sizeof regex);
            s = re_compile_pattern ("x", 1, &regex);
            if (s)
-             exit (1);
+             return 1;
 
-           /* The version of regex.c in e.g. GNU libc-2.2.93 did not
-              work with a negative RANGE argument.  */
+           /* glibc-2.2.93 does not work with a negative RANGE argument.  */
            if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
-             exit (1);
+             return 1;
 
            /* The version of regex.c in older versions of gnulib
               ignored RE_ICASE.  Detect that problem too.  */
-           memset (&regex, 0, sizeof (regex));
            re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
+           memset (&regex, 0, sizeof regex);
            s = re_compile_pattern ("x", 1, &regex);
            if (s)
-             exit (1);
+             return 1;
 
            if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
-             exit (1);
+             return 1;
+
+           /* Catch a bug reported by Vin Shelton in
+              
http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
+              */
+           re_set_syntax (RE_SYNTAX_POSIX_BASIC
+                          & ~RE_CONTEXT_INVALID_DUP
+                          & ~RE_NO_EMPTY_RANGES);
+           memset (&regex, 0, sizeof regex);
+           s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
+           if (s)
+             return 1;
 
            /* REG_STARTEND was added to glibc on 2004-01-15.
               Reject older versions.  */
            if (! REG_STARTEND)
-             exit (1);
+             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))
-             exit (1);
+             return 1;
 
-           exit (0);]])],
+           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.
@@ -192,8 +217,6 @@
 [
   AC_REQUIRE([AC_GNU_SOURCE])
   AC_REQUIRE([AC_C_RESTRICT])
-  AC_REQUIRE([AM_LANGINFO_CODESET])
-  AC_CHECK_HEADERS_ONCE([wchar.h wctype.h])
-  AC_CHECK_FUNCS_ONCE([mbrtowc mempcpy wcrtomb wcscoll])
+  AC_CHECK_FUNCS_ONCE([isblank iswctype mbrtowc wcrtomb wcscoll])
   AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
 ])

Index: setenv.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/setenv.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- setenv.m4   19 Jun 2006 17:45:58 -0000      1.4
+++ setenv.m4   22 Aug 2007 13:44:01 -0000      1.5
@@ -1,16 +1,30 @@
-# setenv.m4 serial 6
-dnl Copyright (C) 2001-2004, 2006 Free Software Foundation, Inc.
+# 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([gt_FUNC_SETENV],
+AC_DEFUN([gl_FUNC_SETENV],
 [
-  AC_REPLACE_FUNCS(setenv unsetenv)
+  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,

Index: size_max.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/size_max.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- size_max.m4 19 Jun 2006 17:45:58 -0000      1.4
+++ size_max.m4 22 Aug 2007 13:44:02 -0000      1.5
@@ -1,4 +1,4 @@
-# size_max.m4 serial 4
+# size_max.m4 serial 6
 dnl Copyright (C) 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,
@@ -11,7 +11,8 @@
   AC_CHECK_HEADERS(stdint.h)
   dnl First test whether the system already has SIZE_MAX.
   AC_MSG_CHECKING([for SIZE_MAX])
-  result=
+  AC_CACHE_VAL([gl_cv_size_max], [
+    gl_cv_size_max=
   AC_EGREP_CPP([Found it], [
 #include <limits.h>
 #if HAVE_STDINT_H
@@ -20,15 +21,15 @@
 #ifdef SIZE_MAX
 Found it
 #endif
-], result=yes)
-  if test -z "$result"; then
+], gl_cv_size_max=yes)
+    if test -z "$gl_cv_size_max"; then
     dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
     dnl than the type 'unsigned long'. Try hard to find a definition that can
     dnl be used in a preprocessor #if, i.e. doesn't contain a cast.
-    _AC_COMPUTE_INT([sizeof (size_t) * CHAR_BIT - 1], size_t_bits_minus_1,
+      AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1],
       [#include <stddef.h>
 #include <limits.h>], size_t_bits_minus_1=)
-    _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
+      AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned 
int)],
       [#include <stddef.h>], fits_in_uint=)
     if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
       if test $fits_in_uint = 1; then
@@ -43,18 +44,25 @@
       dnl works only with 'long' integers in the host environment, while we
       dnl might be cross-compiling from a 32-bit platform to a 64-bit platform.
       if test $fits_in_uint = 1; then
-        result="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
+          gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
       else
-        result="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
+          gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
       fi
     else
       dnl Shouldn't happen, but who knows...
-      result='((size_t)~(size_t)0)'
+        gl_cv_size_max='((size_t)~(size_t)0)'
     fi
   fi
-  AC_MSG_RESULT([$result])
-  if test "$result" != yes; then
-    AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
+  ])
+  AC_MSG_RESULT([$gl_cv_size_max])
+  if test "$gl_cv_size_max" != yes; then
+    AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max],
       [Define as the maximum value of type 'size_t', if the system doesn't 
define it.])
   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])])
+])

Index: snprintf.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/snprintf.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- snprintf.m4 6 Jul 2006 13:49:16 -0000       1.1
+++ snprintf.m4 22 Aug 2007 13:44:02 -0000      1.2
@@ -1,13 +1,29 @@
-# snprintf.m4 serial 2
-dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+# 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_REPLACE_FUNCS(snprintf)
-  AC_CHECK_DECLS_ONCE(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
 ])
 

Index: socklen.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/socklen.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- socklen.m4  20 Mar 2006 02:21:56 -0000      1.4
+++ socklen.m4  22 Aug 2007 13:44:02 -0000      1.5
@@ -1,5 +1,5 @@
-# socklen.m4 serial 4
-dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+# 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.
@@ -12,14 +12,14 @@
 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 it there first.  That file is included by gnulib's sys_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_gl_cv_socklen_t_equiv],
+      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=

Index: stdint.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/stdint.m4,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- stdint.m4   16 Aug 2006 18:12:09 -0000      1.15
+++ stdint.m4   22 Aug 2007 13:44:02 -0000      1.16
@@ -1,5 +1,5 @@
-# stdint.m4 serial 18
-dnl Copyright (C) 2001-2002, 2004-2006 Free Software Foundation, Inc.
+# stdint.m4 serial 28
+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.
@@ -11,7 +11,7 @@
 [
   AC_PREREQ(2.59)dnl
 
-  dnl Check for long long int.
+  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
@@ -19,15 +19,13 @@
     HAVE_LONG_LONG_INT=0
   fi
   AC_SUBST([HAVE_LONG_LONG_INT])
-
-  dnl Check for <wchar.h>.
-  AC_CHECK_HEADERS_ONCE([wchar.h])
-  if test $ac_cv_header_wchar_h = yes; then
-    HAVE_WCHAR_H=1
+  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_WCHAR_H=0
+    HAVE_UNSIGNED_LONG_LONG_INT=0
   fi
-  AC_SUBST([HAVE_WCHAR_H])
+  AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT])
 
   dnl Check for <inttypes.h>.
   dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h.
@@ -47,32 +45,32 @@
   fi
   AC_SUBST([HAVE_SYS_TYPES_H])
 
-  dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_stdint_h.
+  gl_CHECK_NEXT_HEADERS([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.
+  dnl Now see whether we need a substitute <stdint.h>.
   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
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
+#if !(defined WCHAR_MIN && defined WCHAR_MAX)
+#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
+#endif
+]
+gl_STDINT_INCLUDES
+[
 #ifdef INT8_MAX
 int8_t a1 = INT8_MAX;
 int8_t a1min = INT8_MIN;
@@ -144,12 +142,32 @@
 #endif
 intmax_t i = INTMAX_MAX;
 uintmax_t j = UINTMAX_MAX;
+
+#include <limits.h> /* for CHAR_BIT */
+#define TYPE_MINIMUM(t) \
+  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
+#define TYPE_MAXIMUM(t) \
+  ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
 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;
+  int check_PTRDIFF:
+      PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
+      && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
+      ? 1 : -1;
+  /* Detect bug in FreeBSD 6.0 / ia64.  */
+  int check_SIG_ATOMIC:
+      SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
+      && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
+      ? 1 : -1;
+  int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
+  int check_WCHAR:
+      WCHAR_MIN == TYPE_MINIMUM (wchar_t)
+      && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
+      ? 1 : -1;
+  /* Detect bug in mingw.  */
+  int check_WINT:
+      WINT_MIN == TYPE_MINIMUM (wint_t)
+      && WINT_MAX == TYPE_MAXIMUM (wint_t)
+      ? 1 : -1;
 
   /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
   int check_UINT8_C:
@@ -185,8 +203,9 @@
         ]])],
          [gl_cv_header_working_stdint_h=yes])])
   fi
-  if test "$gl_cv_header_working_stdint_h" != yes; then
-
+  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])
@@ -203,6 +222,10 @@
     fi
     AC_SUBST([HAVE_SYS_BITYPES_H])
 
+    dnl Check for <wchar.h> (missing in Linux uClibc when built without wide
+    dnl character support).
+    AC_CHECK_HEADERS_ONCE([wchar.h])
+
     gl_STDINT_TYPE_PROPERTIES
     STDINT_H=stdint.h
   fi
@@ -222,7 +245,7 @@
        [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([sizeof ($gltype) * CHAR_BIT], result,
+      [AC_COMPUTE_INT([result], [sizeof ($gltype) * CHAR_BIT],
         [$2
 #include <limits.h>], [result=unknown])
        eval gl_cv_bitsizeof_${gltype}=\$result
@@ -334,11 +357,11 @@
 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>
   #if HAVE_WCHAR_H
-    /* BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before
-       <wchar.h>.  */
   # include <stdio.h>
   # include <time.h>
   # include <wchar.h>
@@ -359,3 +382,14 @@
   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:

Index: strcase.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/strcase.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- strcase.m4  4 Oct 2005 02:33:12 -0000       1.4
+++ strcase.m4  22 Aug 2007 13:44:02 -0000      1.5
@@ -1,5 +1,5 @@
-# strcase.m4 serial 3
-dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+# strcase.m4 serial 8
+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.
@@ -12,24 +12,29 @@
 
 AC_DEFUN([gl_FUNC_STRCASECMP],
 [
-  dnl No known system has a strcasecmp() function that works correctly in
-  dnl multibyte locales. Therefore we use our version always.
-  AC_LIBOBJ(strcasecmp)
-  AC_DEFINE(strcasecmp, rpl_strcasecmp, [Define to rpl_strcasecmp always.])
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_REPLACE_FUNCS(strcasecmp)
+  if test $ac_cv_func_strcasecmp = no; then
+    HAVE_STRCASECMP=0
   gl_PREREQ_STRCASECMP
+  fi
 ])
 
 AC_DEFUN([gl_FUNC_STRNCASECMP],
 [
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
   AC_REPLACE_FUNCS(strncasecmp)
   if test $ac_cv_func_strncasecmp = no; then
     gl_PREREQ_STRNCASECMP
   fi
+  AC_CHECK_DECLS(strncasecmp)
+  if test $ac_cv_have_decl_strncasecmp = no; then
+    HAVE_DECL_STRNCASECMP=0
+  fi
 ])
 
 # Prerequisites of lib/strcasecmp.c.
 AC_DEFUN([gl_PREREQ_STRCASECMP], [
-  AC_REQUIRE([gl_FUNC_MBRTOWC])
   :
 ])
 

Index: strdup.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/strdup.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- strdup.m4   24 Aug 2006 01:24:14 -0000      1.2
+++ strdup.m4   22 Aug 2007 13:44:02 -0000      1.3
@@ -1,13 +1,20 @@
-# strdup.m4 serial 7
-dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 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
 ])
 

Index: strerror.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/strerror.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- strerror.m4 1 Mar 2005 18:15:07 -0000       1.2
+++ strerror.m4 22 Aug 2007 13:44:03 -0000      1.3
@@ -1,17 +1,25 @@
-# strerror.m4 serial 2
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# strerror.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_STRERROR],
 [
-  AC_REPLACE_FUNCS(strerror)
+  AC_CHECK_FUNCS_ONCE([strerror])
   if test $ac_cv_func_strerror = no; then
+    AC_LIBOBJ([strerror])
     gl_PREREQ_STRERROR
   fi
 ])
 
+# Like gl_FUNC_STRERROR, except prepare for separate compilation (no 
AC_LIBOBJ).
+AC_DEFUN([gl_FUNC_STRERROR_SEPARATE],
+[
+  AC_CHECK_FUNCS_ONCE([strerror])
+  gl_PREREQ_STRERROR
+])
+
 # Prerequisites of lib/strerror.c.
 AC_DEFUN([gl_PREREQ_STRERROR], [
   :

Index: strftime.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/strftime.m4,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- strftime.m4 24 Aug 2006 01:24:14 -0000      1.8
+++ strftime.m4 22 Aug 2007 13:44:03 -0000      1.9
@@ -1,7 +1,7 @@
-#serial 28
+#serial 29
 
-# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-# Free Software Foundation, Inc.
+# 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,
@@ -10,7 +10,8 @@
 # Written by Jim Meyering and Paul Eggert.
 
 AC_DEFUN([gl_FUNC_GNU_STRFTIME],
-[AC_REQUIRE([gl_FUNC_STRFTIME])dnl
+[
+  gl_FUNC_STRFTIME
 ])
 
 # These are the prerequisite macros for GNU's strftime.c replacement.
@@ -21,12 +22,11 @@
  # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
  AC_REQUIRE([AC_STRUCT_TIMEZONE])
 
- AC_REQUIRE([AC_HEADER_TIME])
  AC_REQUIRE([AC_TYPE_MBSTATE_T])
  AC_REQUIRE([gl_TM_GMTOFF])
 
  AC_CHECK_FUNCS_ONCE(mblen mbrlen mempcpy tzset)
- AC_CHECK_HEADERS_ONCE(sys/time.h wchar.h)
+ AC_CHECK_HEADERS_ONCE(wchar.h)
 
  AC_DEFINE([my_strftime], [nstrftime],
    [Define to the name of the strftime replacement function.])

Index: strndup.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/strndup.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- strndup.m4  25 Sep 2006 10:38:20 -0000      1.3
+++ strndup.m4  22 Aug 2007 13:44:03 -0000      1.4
@@ -1,5 +1,5 @@
-# strndup.m4 serial 9
-dnl Copyright (C) 2002-2003, 2005-2006 Free Software Foundation, Inc.
+# 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.
@@ -9,7 +9,11 @@
   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,
@@ -39,9 +43,8 @@
     AC_DEFINE([HAVE_STRNDUP], 1,
       [Define if you have the strndup() function and it works.])
   else
+    HAVE_STRNDUP=0
     AC_LIBOBJ([strndup])
-    AC_DEFINE(strndup, rpl_strndup,
-      [Define to rpl_strndup if the replacement function should be used,])
     gl_PREREQ_STRNDUP
   fi
 ])

Index: strnlen.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/strnlen.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- strnlen.m4  24 Aug 2006 01:24:14 -0000      1.2
+++ strnlen.m4  22 Aug 2007 13:44:03 -0000      1.3
@@ -1,5 +1,5 @@
-# strnlen.m4 serial 6
-dnl Copyright (C) 2002-2003, 2005, 2006 Free Software Foundation, Inc.
+# 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.
@@ -9,6 +9,12 @@
   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
@@ -22,6 +28,4 @@
 ])
 
 # Prerequisites of lib/strnlen.c.
-AC_DEFUN([gl_PREREQ_STRNLEN], [
-  AC_CHECK_DECLS_ONCE(strnlen)
-])
+AC_DEFUN([gl_PREREQ_STRNLEN], [:])

Index: sys_socket_h.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/sys_socket_h.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- sys_socket_h.m4     20 Mar 2006 02:21:56 -0000      1.2
+++ sys_socket_h.m4     22 Aug 2007 13:44:03 -0000      1.3
@@ -1,5 +1,5 @@
-# sys_socket_h.m4 serial 2
-dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+# sys_socket_h.m4 serial 4
+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.
@@ -8,16 +8,44 @@
 
 AC_DEFUN([gl_HEADER_SYS_SOCKET],
 [
-  AC_CHECK_HEADERS_ONCE([sys/socket.h])
-  if test $ac_cv_header_sys_socket_h = yes; then
+  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'
+
+    gl_CHECK_NEXT_HEADERS([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])
-    SYS_SOCKET_H='sys/socket.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)
+  AC_SUBST([SYS_SOCKET_H])
 ])

Index: sys_stat_h.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/sys_stat_h.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- sys_stat_h.m4       11 Jul 2006 16:42:23 -0000      1.4
+++ sys_stat_h.m4       22 Aug 2007 13:44:03 -0000      1.5
@@ -1,5 +1,5 @@
-# sys_stat_h.m4 serial 3   -*- Autoconf -*-
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+# sys_stat_h.m4 serial 6   -*- Autoconf -*-
+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.
@@ -12,21 +12,37 @@
   dnl Check for lstat.  Systems that lack it (mingw) also lack symlinks, so
   dnl stat is a good replacement.
   AC_CHECK_FUNCS_ONCE([lstat])
+  if test $ac_cv_func_lstat = yes; then
+    HAVE_LSTAT=1
+  else
+    HAVE_LSTAT=0
+  fi
+  AC_SUBST([HAVE_LSTAT])
 
   dnl Check for mkdir.  Mingw has _mkdir(name) in the nonstandard <io.h>
   dnl instead.
-  AC_CHECK_DECLS([mkdir], [], [], [#include <sys/stat.h>])
-
-  SYS_STAT_H=
-  if test $ac_cv_func_lstat:$ac_cv_have_decl_mkdir != yes:yes ; then
-    gl_ABSOLUTE_HEADER([sys/stat.h])
-    ABSOLUTE_SYS_STAT_H=\"$gl_cv_absolute_sys_stat_h\"
-    AC_CHECK_HEADERS([io.h])
-    AC_REQUIRE([AC_C_INLINE])
-    SYS_STAT_H='sys/stat.h'
+  AC_CHECK_DECLS([mkdir],
+    [],
+    [AC_CHECK_HEADERS([io.h])],
+    [#include <sys/stat.h>])
+  if test $ac_cv_have_decl_mkdir = yes; then
+    HAVE_DECL_MKDIR=1
   else
-    ABSOLUTE_SYS_STAT_H=\"no/such/file/sys/stat.h\"
+    HAVE_DECL_MKDIR=0
   fi
-  AC_SUBST([ABSOLUTE_SYS_STAT_H])
+  AC_SUBST([HAVE_DECL_MKDIR])
+  if test "$ac_cv_header_io_h" = yes; then
+    HAVE_IO_H=1
+  else
+    HAVE_IO_H=0
+  fi
+  AC_SUBST([HAVE_IO_H])
+  AC_REQUIRE([AC_C_INLINE])
+
+  dnl Check for broken stat macros.
+  AC_REQUIRE([AC_HEADER_STAT])
+
+  gl_CHECK_NEXT_HEADERS([sys/stat.h])
+  SYS_STAT_H='sys/stat.h'
   AC_SUBST([SYS_STAT_H])
 ]) # gl_HEADER_SYS_STAT_H

Index: time_r.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/time_r.m4,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- time_r.m4   25 Sep 2006 10:38:20 -0000      1.6
+++ time_r.m4   22 Aug 2007 13:44:03 -0000      1.7
@@ -1,6 +1,6 @@
 dnl Reentrant time functions like localtime_r.
 
-dnl Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+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.
@@ -9,7 +9,10 @@
 
 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],
@@ -24,10 +27,9 @@
        [gl_cv_time_r_posix=yes],
        [gl_cv_time_r_posix=no])])
   if test $gl_cv_time_r_posix = yes; then
-    AC_DEFINE([HAVE_TIME_R_POSIX], 1,
-      [Define to 1 if localtime_r, etc. have the type signatures that
-       POSIX requires.])
+    REPLACE_LOCALTIME_R=0
   else
+    REPLACE_LOCALTIME_R=1
     AC_LIBOBJ([time_r])
     gl_PREREQ_TIME_R
   fi

Index: timespec.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/timespec.m4,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- timespec.m4 24 Aug 2006 01:24:14 -0000      1.6
+++ timespec.m4 22 Aug 2007 13:44:03 -0000      1.7
@@ -1,6 +1,6 @@
-#serial 12
+#serial 14
 
-# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006 Free Software
+# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007 Free Software
 # Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
@@ -13,47 +13,4 @@
 [
   dnl Prerequisites of lib/timespec.h.
   AC_REQUIRE([AC_C_INLINE])
-  AC_REQUIRE([AC_HEADER_TIME])
-  AC_CHECK_HEADERS_ONCE(sys/time.h)
-  gl_CHECK_TYPE_STRUCT_TIMESPEC
-
-  dnl Persuade glibc and Solaris <time.h> to declare nanosleep.
-  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
-
-  AC_CHECK_DECLS(nanosleep, , , [#include <time.h>])
-])
-
-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],
-[
-  dnl Persuade pedantic Solaris to declare struct timespec.
-  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
-
-  AC_REQUIRE([AC_HEADER_TIME])
-  AC_CHECK_HEADERS_ONCE(sys/time.h)
-  AC_CACHE_CHECK([for struct timespec], fu_cv_sys_struct_timespec,
-    [AC_TRY_COMPILE(
-      [
-#      if TIME_WITH_SYS_TIME
-#       include <sys/time.h>
-#       include <time.h>
-#      else
-#       if HAVE_SYS_TIME_H
-#        include <sys/time.h>
-#       else
-#        include <time.h>
-#       endif
-#      endif
-      ],
-      [static struct timespec x; x.tv_sec = x.tv_nsec;],
-      fu_cv_sys_struct_timespec=yes,
-      fu_cv_sys_struct_timespec=no)
-    ])
-
-  if test $fu_cv_sys_struct_timespec = yes; then
-    AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1,
-             [Define if struct timespec is declared in <time.h>. ])
-  fi
 ])

Index: tzset.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/tzset.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- tzset.m4    1 Mar 2005 18:15:07 -0000       1.2
+++ tzset.m4    22 Aug 2007 13:44:04 -0000      1.3
@@ -1,6 +1,6 @@
-#serial 2
+#serial 3
 
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# 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.
@@ -15,21 +15,12 @@
 
 AC_DEFUN([gl_FUNC_TZSET_CLOBBER],
 [
-  AC_REQUIRE([AC_HEADER_TIME])
+  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([[
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
+#include <time.h>
 #include <stdlib.h>
 
 int
@@ -42,7 +33,7 @@
   s = *p;
   putenv ("TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00");
   tzset ();
-  exit (p->tm_year != s.tm_year
+  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
@@ -62,7 +53,7 @@
 
     AC_DEFINE(tzset, rpl_tzset,
       [Define to rpl_tzset if the wrapper function should be used.])
-    AC_DEFINE(TZSET_CLOBBERS_LOCALTIME_BUFFER, 1,
+    AC_DEFINE([TZSET_CLOBBERS_LOCALTIME], 1,
       [Define if tzset clobbers localtime's static buffer.])
   fi
 ])

Index: ulonglong.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/ulonglong.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- ulonglong.m4        3 Jul 2006 02:12:35 -0000       1.4
+++ ulonglong.m4        22 Aug 2007 13:44:04 -0000      1.5
@@ -1,4 +1,4 @@
-# ulonglong.m4 serial 5
+# ulonglong.m4 serial 6
 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,
@@ -10,6 +10,11 @@
 # This fixes a bug in Autoconf 2.60, but can be removed once we
 # assume 2.61 everywhere.
 
+# Note: If the type 'unsigned long long int' exists but is only 32 bits
+# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
+# will not be defined. In this case you can treat 'unsigned long long int'
+# like 'unsigned long int'.
+
 AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
 [
   AC_CACHE_CHECK([for unsigned long long int],

Index: unistd_h.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/unistd_h.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- unistd_h.m4 20 Mar 2006 02:21:56 -0000      1.1
+++ unistd_h.m4 22 Aug 2007 13:44:04 -0000      1.2
@@ -1,18 +1,56 @@
-# unistd_h.m4 serial 2
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+# unistd_h.m4 serial 9
+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
+dnl Written by Simon Josefsson, Bruno Haible.
 
-AC_DEFUN([gl_HEADER_UNISTD],
+AC_DEFUN([gl_UNISTD_H],
 [
-  dnl Prerequisites of lib/unistd.h.
-  AC_CHECK_HEADERS([unistd.h], [
-    UNISTD_H=''
-  ], [
-    UNISTD_H='unistd.h'
-  ])
-  AC_SUBST(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])
+
+  gl_CHECK_NEXT_HEADERS([unistd.h])
+
+  AC_CHECK_HEADERS_ONCE([unistd.h])
+  if test $ac_cv_header_unistd_h = yes; then
+    HAVE_UNISTD_H=1
+  else
+    HAVE_UNISTD_H=0
+  fi
+  AC_SUBST([HAVE_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_LCHOWN=0;        AC_SUBST([GNULIB_LCHOWN])
+  GNULIB_LSEEK=0;         AC_SUBST([GNULIB_LSEEK])
+  GNULIB_READLINK=0;      AC_SUBST([GNULIB_READLINK])
+  GNULIB_SLEEP=0;         AC_SUBST([GNULIB_SLEEP])
+  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_SLEEP=1;           AC_SUBST([HAVE_SLEEP])
+  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])
+  REPLACE_LCHOWN=0;       AC_SUBST([REPLACE_LCHOWN])
+  REPLACE_LSEEK=0;        AC_SUBST([REPLACE_LSEEK])
 ])

Index: vasnprintf.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/vasnprintf.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- vasnprintf.m4       1 Mar 2005 18:15:07 -0000       1.3
+++ vasnprintf.m4       22 Aug 2007 13:44:04 -0000      1.4
@@ -1,5 +1,5 @@
-# vasnprintf.m4 serial 5
-dnl Copyright (C) 2002-2004 Free Software Foundation, Inc.
+# vasnprintf.m4 serial 20
+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.
@@ -7,24 +7,33 @@
 AC_DEFUN([gl_FUNC_VASNPRINTF],
 [
   AC_REQUIRE([gl_EOVERFLOW])
-  AC_REPLACE_FUNCS(vasnprintf)
+  AC_CHECK_FUNCS_ONCE([vasnprintf])
   if test $ac_cv_func_vasnprintf = no; then
-    AC_LIBOBJ(printf-args)
-    AC_LIBOBJ(printf-parse)
-    AC_LIBOBJ(asnprintf)
+    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
-  fi
 ])
 
 # Prequisites of lib/printf-args.h, lib/printf-args.c.
 AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
 [
-  AC_REQUIRE([bh_C_SIGNED])
-  AC_REQUIRE([gl_AC_TYPE_LONG_LONG])
-  AC_REQUIRE([gt_TYPE_LONGDOUBLE])
+  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
   AC_REQUIRE([gt_TYPE_WCHAR_T])
   AC_REQUIRE([gt_TYPE_WINT_T])
 ])
@@ -32,8 +41,7 @@
 # Prequisites of lib/printf-parse.h, lib/printf-parse.c.
 AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
 [
-  AC_REQUIRE([gl_AC_TYPE_LONG_LONG])
-  AC_REQUIRE([gt_TYPE_LONGDOUBLE])
+  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
   AC_REQUIRE([gt_TYPE_WCHAR_T])
   AC_REQUIRE([gt_TYPE_WINT_T])
   AC_REQUIRE([AC_TYPE_SIZE_T])
@@ -45,11 +53,142 @@
 AC_DEFUN([gl_PREREQ_VASNPRINTF],
 [
   AC_REQUIRE([AC_FUNC_ALLOCA])
-  AC_REQUIRE([gl_AC_TYPE_LONG_LONG])
-  AC_REQUIRE([gt_TYPE_LONGDOUBLE])
+  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
   AC_REQUIRE([gt_TYPE_WCHAR_T])
   AC_REQUIRE([gt_TYPE_WINT_T])
   AC_CHECK_FUNCS(snprintf wcslen)
+  dnl Use the _snprintf function only if it is declared (because on NetBSD it
+  dnl is defined as a weak alias of snprintf; we prefer to use the latter).
+  AC_CHECK_DECLS([_snprintf], , , [#include <stdio.h>])
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting 'long double'
+# arguments.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_LONG_DOUBLE],
+[
+  AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
+  case "$gl_cv_func_printf_long_double" in
+    *yes)
+      ;;
+    *)
+      AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], 1,
+        [Define if the vasnprintf implementation needs special code for
+         'long double' arguments.])
+      ;;
+  esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting infinite 'double'
+# arguments.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE],
+[
+  AC_REQUIRE([gl_PRINTF_INFINITE])
+  case "$gl_cv_func_printf_infinite" in
+    *yes)
+      ;;
+    *)
+      AC_DEFINE([NEED_PRINTF_INFINITE_DOUBLE], 1,
+        [Define if the vasnprintf implementation needs special code for
+         infinite 'double' arguments.])
+      ;;
+  esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting infinite 'long double'
+# arguments.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE],
+[
+  AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE])
+  dnl There is no need to set NEED_PRINTF_INFINITE_LONG_DOUBLE if
+  dnl NEED_PRINTF_LONG_DOUBLE is already set.
+  AC_REQUIRE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE])
+  case "$gl_cv_func_printf_long_double" in
+    *yes)
+      case "$gl_cv_func_printf_infinite_long_double" in
+        *yes)
+          ;;
+        *)
+          AC_DEFINE([NEED_PRINTF_INFINITE_LONG_DOUBLE], 1,
+            [Define if the vasnprintf implementation needs special code for
+             infinite 'long double' arguments.])
+          ;;
+      esac
+      ;;
+  esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting the 'a' directive.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_A],
+[
+  AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
+  case "$gl_cv_func_printf_directive_a" in
+    *yes)
+      ;;
+    *)
+      AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], 1,
+        [Define if the vasnprintf implementation needs special code for
+         the 'a' and 'A' directives.])
+      AC_CHECK_FUNCS([nl_langinfo])
+      ;;
+  esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting the 'F' directive.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_F],
+[
+  AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
+  case "$gl_cv_func_printf_directive_f" in
+    *yes)
+      ;;
+    *)
+      AC_DEFINE([NEED_PRINTF_DIRECTIVE_F], 1,
+        [Define if the vasnprintf implementation needs special code for
+         the 'F' directive.])
+      ;;
+  esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting the ' flag.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_GROUPING],
+[
+  AC_REQUIRE([gl_PRINTF_FLAG_GROUPING])
+  case "$gl_cv_func_printf_flag_grouping" in
+    *yes)
+      ;;
+    *)
+      AC_DEFINE([NEED_PRINTF_FLAG_GROUPING], 1,
+        [Define if the vasnprintf implementation needs special code for the
+         ' flag.])
+      ;;
+  esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting the 0 flag.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_ZERO],
+[
+  AC_REQUIRE([gl_PRINTF_FLAG_ZERO])
+  case "$gl_cv_func_printf_flag_zero" in
+    *yes)
+      ;;
+    *)
+      AC_DEFINE([NEED_PRINTF_FLAG_ZERO], 1,
+        [Define if the vasnprintf implementation needs special code for the
+         0 flag.])
+      ;;
+  esac
+])
+
+# Prerequisites of lib/vasnprintf.c including all extras for POSIX compliance.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_EXTRAS],
+[
+  AC_REQUIRE([gl_PREREQ_VASNPRINTF])
+  gl_PREREQ_VASNPRINTF_LONG_DOUBLE
+  gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
+  gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
+  gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+  gl_PREREQ_VASNPRINTF_DIRECTIVE_F
+  gl_PREREQ_VASNPRINTF_FLAG_GROUPING
+  gl_PREREQ_VASNPRINTF_FLAG_ZERO
 ])
 
 # Prerequisites of lib/asnprintf.c.

Index: vasprintf.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/vasprintf.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- vasprintf.m4        25 Sep 2006 10:38:20 -0000      1.3
+++ vasprintf.m4        22 Aug 2007 13:44:04 -0000      1.4
@@ -1,21 +1,33 @@
-# vasprintf.m4 serial 2
-dnl Copyright (C) 2002-2003, 2006 Free Software Foundation, Inc.
+# vasprintf.m4 serial 5
+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_REPLACE_FUNCS(vasprintf)
+  AC_CHECK_FUNCS([vasprintf])
   if test $ac_cv_func_vasprintf = no; then
-    AC_LIBOBJ(asprintf)
+    gl_REPLACE_VASPRINTF
+  fi
+])
+
+AC_DEFUN([gl_REPLACE_VASPRINTF],
+[
+  AC_LIBOBJ([vasprintf])
+  AC_LIBOBJ([asprintf])
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+  if test $ac_cv_func_vasprintf = yes; then
+    REPLACE_VASPRINTF=1
+  else
+    HAVE_VASPRINTF=0
+  fi
     gl_PREREQ_VASPRINTF_H
     gl_PREREQ_VASPRINTF
     gl_PREREQ_ASPRINTF
-  fi
 ])
 
-# Prerequisites of lib/vasprintf.h.
+# Prerequisites of the vasprintf portion of lib/stdio.h.
 AC_DEFUN([gl_PREREQ_VASPRINTF_H],
 [
   dnl Persuade glibc <stdio.h> to declare asprintf() and vasprintf().

Index: wcwidth.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/wcwidth.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- wcwidth.m4  16 Aug 2006 18:12:09 -0000      1.3
+++ wcwidth.m4  22 Aug 2007 13:44:04 -0000      1.4
@@ -1,30 +1,84 @@
-# wcwidth.m4 serial 5
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+# wcwidth.m4 serial 11
+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],
 [
+  AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
   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 wctype.h])
-  AC_CHECK_FUNCS_ONCE([iswprint wcwidth])
+  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>
-#if HAVE_WCHAR_H
 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
    <wchar.h>.
-   BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before
-   <wchar.h>.  */
-# include <stdio.h>
-# include <time.h>
-# include <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>
+])
+  if test $ac_cv_have_decl_wcwidth != yes; then
+    HAVE_DECL_WCWIDTH=0
+  fi
+
+  if test $ac_cv_func_wcwidth = no; then
+    REPLACE_WCWIDTH=1
+  else
+    dnl On MacOS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1.
+    dnl This leads to bugs in 'ls' (coreutils).
+    AC_CACHE_CHECK([whether wcwidth works reasonably in UTF-8 locales],
+      [gl_cv_func_wcwidth_works],
+      [
+        AC_TRY_RUN([
+#include <locale.h>
+/* 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>
+#if !HAVE_DECL_WCWIDTH
+extern
+# ifdef __cplusplus
+"C"
+# endif
+int wcwidth (int);
 #endif
-])])
+int main ()
+{
+  if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
+    if (wcwidth (0x0301) > 0)
+      return 1;
+  return 0;
+}], [gl_cv_func_wcwidth_works=yes], [gl_cv_func_wcwidth_works=no],
+          [gl_cv_func_wcwidth_works="guessing no"])
+      ])
+    case "$gl_cv_func_wcwidth_works" in
+      *yes) ;;
+      *no) REPLACE_WCWIDTH=1 ;;
+    esac
+  fi
+  if test $REPLACE_WCWIDTH = 1; then
+    AC_LIBOBJ([wcwidth])
+  fi
+
+  if test $REPLACE_WCWIDTH = 1 || test $HAVE_DECL_WCWIDTH = 0; then
+    WCHAR_H=wchar.h
+  fi
+])

Index: wint_t.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/wint_t.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- wint_t.m4   1 Mar 2005 18:15:07 -0000       1.2
+++ wint_t.m4   22 Aug 2007 13:44:04 -0000      1.3
@@ -1,5 +1,5 @@
-# wint_t.m4 serial 1 (gettext-0.12)
-dnl Copyright (C) 2003 Free Software Foundation, Inc.
+# wint_t.m4 serial 2 (gettext-0.16.2)
+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.
@@ -11,7 +11,15 @@
 AC_DEFUN([gt_TYPE_WINT_T],
 [
   AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
-    [AC_TRY_COMPILE([#include <wchar.h>
+    [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

Index: xalloc.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/xalloc.m4,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- xalloc.m4   24 Aug 2006 01:24:14 -0000      1.5
+++ xalloc.m4   22 Aug 2007 13:44:04 -0000      1.6
@@ -1,4 +1,4 @@
-# xalloc.m4 serial 13
+# 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,
@@ -14,11 +14,11 @@
 
 # Prerequisites of lib/xalloc.h.
 AC_DEFUN([gl_PREREQ_XALLOC], [
+  AC_REQUIRE([gl_INLINE])
   :
 ])
 
 # Prerequisites of lib/xmalloc.c.
 AC_DEFUN([gl_PREREQ_XMALLOC], [
-  AC_REQUIRE([AC_C_INLINE])
   :
 ])

Index: .cvsignore
===================================================================
RCS file: .cvsignore
diff -N .cvsignore
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ .cvsignore  22 Aug 2007 13:43:55 -0000      1.3
@@ -0,0 +1,3 @@
+.deps
+.dirstamp
+error.m4

Index: canonicalize-lgpl.m4
===================================================================
RCS file: canonicalize-lgpl.m4
diff -N canonicalize-lgpl.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ canonicalize-lgpl.m4        22 Aug 2007 13:43:56 -0000      1.1
@@ -0,0 +1,35 @@
+# canonicalize-lgpl.m4 serial 4
+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.
+
+AC_DEFUN([gl_CANONICALIZE_LGPL],
+[
+  dnl Do this replacement check manually because the file name is shorter
+  dnl than the function name.
+  AC_CHECK_DECLS_ONCE(canonicalize_file_name)
+  AC_CHECK_FUNCS_ONCE(canonicalize_file_name)
+  if test $ac_cv_func_canonicalize_file_name = no; then
+    AC_LIBOBJ(canonicalize-lgpl)
+    AC_DEFINE([realpath], [rpl_realpath],
+      [Define to a replacement function name for realpath().])
+    gl_PREREQ_CANONICALIZE_LGPL
+  fi
+])
+
+# Like gl_CANONICALIZE_LGPL, except prepare for separate compilation
+# (no AC_LIBOBJ).
+AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE],
+[
+  AC_CHECK_DECLS_ONCE(canonicalize_file_name)
+  AC_CHECK_FUNCS_ONCE(canonicalize_file_name)
+  gl_PREREQ_CANONICALIZE_LGPL
+])
+
+# Prerequisites of lib/canonicalize-lgpl.c.
+AC_DEFUN([gl_PREREQ_CANONICALIZE_LGPL],
+[
+  AC_CHECK_HEADERS_ONCE(sys/param.h unistd.h)
+  AC_CHECK_FUNCS_ONCE(getcwd readlink)
+])

Index: dirfd.m4
===================================================================
RCS file: dirfd.m4
diff -N dirfd.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ dirfd.m4    22 Aug 2007 13:43:56 -0000      1.1
@@ -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
+])

Index: fchdir.m4
===================================================================
RCS file: fchdir.m4
diff -N fchdir.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ fchdir.m4   22 Aug 2007 13:43:57 -0000      1.1
@@ -0,0 +1,26 @@
+# fchdir.m4 serial 4
+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_CHECK_NEXT_HEADERS([dirent.h])
+    DIRENT_H='dirent.h'
+  else
+    DIRENT_H=
+  fi
+  AC_SUBST([DIRENT_H])
+])
+
+# Prerequisites of lib/fchdir.c.
+AC_DEFUN([gl_PREREQ_FCHDIR], [:])

Index: float_h.m4
===================================================================
RCS file: float_h.m4
diff -N float_h.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ float_h.m4  22 Aug 2007 13:43:57 -0000      1.1
@@ -0,0 +1,19 @@
+# float_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_FLOAT_H],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  FLOAT_H=
+  case "$host_os" in
+    beos*)
+      FLOAT_H=float.h
+      gl_CHECK_NEXT_HEADERS([float.h])
+      ;;
+  esac
+  AC_SUBST([FLOAT_H])
+])

Index: gnulib-common.m4
===================================================================
RCS file: gnulib-common.m4
diff -N gnulib-common.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ gnulib-common.m4    22 Aug 2007 13:43:58 -0000      1.1
@@ -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])])])

Index: include_next.m4
===================================================================
RCS file: include_next.m4
diff -N include_next.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ include_next.m4     22 Aug 2007 13:43:58 -0000      1.3
@@ -0,0 +1,107 @@
+# include_next.m4 serial 4
+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 Paul Eggert and Derek Price.
+
+AC_DEFUN([gl_INCLUDE_NEXT],
+[
+  AC_LANG_PREPROC_REQUIRE()
+  AC_CACHE_CHECK([whether the preprocessor supports include_next],
+    [gl_cv_have_include_next],
+    [rm -rf conftestd1 conftestd2
+     mkdir conftestd1 conftestd2
+     cat <<EOF > conftestd1/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
+#error "include_next doesn't work"
+#endif
+EOF
+     cat <<EOF > conftestd2/conftest.h
+#ifndef DEFINED_IN_CONFTESTD1
+#error "include_next test doesn't work"
+#endif
+#define DEFINED_IN_CONFTESTD2
+EOF
+     save_CPPFLAGS="$CPPFLAGS"
+     CPPFLAGS="$CPPFLAGS -Iconftestd1 -Iconftestd2"
+     AC_COMPILE_IFELSE([#include <conftest.h>],
+       [gl_cv_have_include_next=yes],
+       [gl_cv_have_include_next=no])
+     CPPFLAGS="$save_CPPFLAGS"
+     rm -rf conftestd1 conftestd2
+    ])
+  if test $gl_cv_have_include_next = yes; then
+
+    dnl FIXME: Remove HAVE_INCLUDE_NEXT and update everything that uses it
+    dnl to use @INCLUDE_NEXT@ instead.
+    AC_DEFINE([HAVE_INCLUDE_NEXT], 1,
+             [Define if your compiler supports the #include_next directive.])
+
+    INCLUDE_NEXT=include_next
+  else
+    INCLUDE_NEXT=include
+  fi
+  AC_SUBST([INCLUDE_NEXT])
+])
+
+# gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...)
+# ------------------------------------------
+# For each arg foo.h, if #include_next works, define NEXT_FOO_H to be
+# '<foo.h>'; otherwise define it to be
+# '"///usr/include/foo.h"', or whatever other absolute file name is suitable.
+# That way, a header file with the following line:
+#      address@hidden@ @NEXT_FOO_H@
+# behaves (after sed substitution) as if it contained
+#      #include_next <foo.h>
+# even if the compiler does not support include_next.
+# 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_CHECK_NEXT_HEADERS],
+[
+  AC_REQUIRE([gl_INCLUDE_NEXT])
+  AC_CHECK_HEADERS_ONCE([$1])
+
+  AC_FOREACH([gl_HEADER_NAME], [$1],
+    [AS_VAR_PUSHDEF([gl_next_header],
+                   [gl_cv_next_]m4_quote(m4_defn([gl_HEADER_NAME])))
+     if test $gl_cv_have_include_next = yes; then
+       AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
+     else
+       AC_CACHE_CHECK(
+        [absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>],
+        m4_quote(m4_defn([gl_next_header])),
+        [AS_VAR_PUSHDEF([gl_header_exists],
+                        [ac_cv_header_]m4_quote(m4_defn([gl_HEADER_NAME])))
+         if test AS_VAR_GET(gl_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,
+           dnl so use subshell.
+           AS_VAR_SET([gl_next_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
+              }'`'"'])
+         else
+           AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
+         fi
+         AS_VAR_POPDEF([gl_header_exists])])
+     fi
+     AC_SUBST(
+       AS_TR_CPP([NEXT_]m4_quote(m4_defn([gl_HEADER_NAME]))),
+       [AS_VAR_GET([gl_next_header])])
+     AS_VAR_POPDEF([gl_next_header])])
+])

Index: inline.m4
===================================================================
RCS file: inline.m4
diff -N inline.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ inline.m4   22 Aug 2007 13:43:58 -0000      1.1
@@ -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
+])

Index: intl.m4
===================================================================
RCS file: intl.m4
diff -N intl.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ intl.m4     22 Aug 2007 13:43:58 -0000      1.1
@@ -0,0 +1,271 @@
+# intl.m4 serial 5 (gettext-0.16.2)
+dnl Copyright (C) 1995-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
+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 <address@hidden>, 1995-2000.
+dnl   Bruno Haible <address@hidden>, 2000-2006.
+
+AC_PREREQ(2.52)
+
+dnl Checks for all prerequisites of the intl subdirectory,
+dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
+dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
+AC_DEFUN([AM_INTL_SUBDIR],
+[
+  AC_REQUIRE([AC_PROG_INSTALL])dnl
+  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+  AC_REQUIRE([AC_PROG_CC])dnl
+  AC_REQUIRE([AC_CANONICAL_HOST])dnl
+  AC_REQUIRE([gt_GLIBC2])dnl
+  AC_REQUIRE([AC_PROG_RANLIB])dnl
+  AC_REQUIRE([gl_VISIBILITY])dnl
+  AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl
+  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl
+  AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
+  AC_REQUIRE([gt_TYPE_WINT_T])dnl
+  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+  AC_REQUIRE([gt_TYPE_INTMAX_T])
+  AC_REQUIRE([gt_PRINTF_POSIX])
+  AC_REQUIRE([gl_GLIBC21])dnl
+  AC_REQUIRE([gl_XSIZE])dnl
+  AC_REQUIRE([gt_INTL_MACOSX])dnl
+
+  AC_CHECK_TYPE([ptrdiff_t], ,
+    [AC_DEFINE([ptrdiff_t], [long],
+       [Define as the type of the result of subtracting two pointers, if the 
system doesn't define it.])
+    ])
+  AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
+  AC_CHECK_FUNCS([asprintf fwprintf putenv setenv setlocale snprintf wcslen])
+
+  dnl Use the _snprintf function only if it is declared (because on NetBSD it
+  dnl is defined as a weak alias of snprintf; we prefer to use the latter).
+  gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
+  gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
+
+  dnl Use the *_unlocked functions only if they are declared.
+  dnl (because some of them were defined without being declared in Solaris
+  dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
+  dnl on Solaris 2.5.1 to run on Solaris 2.6).
+  dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
+  gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
+
+  case $gt_cv_func_printf_posix in
+    *yes) HAVE_POSIX_PRINTF=1 ;;
+    *) HAVE_POSIX_PRINTF=0 ;;
+  esac
+  AC_SUBST([HAVE_POSIX_PRINTF])
+  if test "$ac_cv_func_asprintf" = yes; then
+    HAVE_ASPRINTF=1
+  else
+    HAVE_ASPRINTF=0
+  fi
+  AC_SUBST([HAVE_ASPRINTF])
+  if test "$ac_cv_func_snprintf" = yes; then
+    HAVE_SNPRINTF=1
+  else
+    HAVE_SNPRINTF=0
+  fi
+  AC_SUBST([HAVE_SNPRINTF])
+  if test "$ac_cv_func_wprintf" = yes; then
+    HAVE_WPRINTF=1
+  else
+    HAVE_WPRINTF=0
+  fi
+  AC_SUBST([HAVE_WPRINTF])
+
+  AM_LANGINFO_CODESET
+  gt_LC_MESSAGES
+
+  dnl Compilation on mingw and Cygwin needs special Makefile rules, because
+  dnl 1. when we install a shared library, we must arrange to export
+  dnl    auxiliary pointer variables for every exported variable,
+  dnl 2. when we install a shared library and a static library simultaneously,
+  dnl    the include file specifies __declspec(dllimport) and therefore we
+  dnl    must arrange to define the auxiliary pointer variables for the
+  dnl    exported variables _also_ in the static library.
+  if test "$enable_shared" = yes; then
+    case "$host_os" in
+      cygwin*) is_woe32dll=yes ;;
+      *) is_woe32dll=no ;;
+    esac
+  else
+    is_woe32dll=no
+  fi
+  WOE32DLL=$is_woe32dll
+  AC_SUBST([WOE32DLL])
+
+  dnl On mingw and Cygwin, we can activate special Makefile rules which add
+  dnl version information to the shared libraries and executables.
+  case "$host_os" in
+    mingw* | cygwin*) is_woe32=yes ;;
+    *) is_woe32=no ;;
+  esac
+  WOE32=$is_woe32
+  AC_SUBST([WOE32])
+  if test $WOE32 = yes; then
+    dnl Check for a program that compiles Windows resource files.
+    AC_CHECK_TOOL([WINDRES], [windres])
+  fi
+
+  dnl Rename some macros and functions used for locking.
+  AH_BOTTOM([
+#define __libc_lock_t                   gl_lock_t
+#define __libc_lock_define              gl_lock_define
+#define __libc_lock_define_initialized  gl_lock_define_initialized
+#define __libc_lock_init                gl_lock_init
+#define __libc_lock_lock                gl_lock_lock
+#define __libc_lock_unlock              gl_lock_unlock
+#define __libc_lock_recursive_t                   gl_recursive_lock_t
+#define __libc_lock_define_recursive              gl_recursive_lock_define
+#define __libc_lock_define_initialized_recursive  
gl_recursive_lock_define_initialized
+#define __libc_lock_init_recursive                gl_recursive_lock_init
+#define __libc_lock_lock_recursive                gl_recursive_lock_lock
+#define __libc_lock_unlock_recursive              gl_recursive_lock_unlock
+#define glthread_in_use  libintl_thread_in_use
+#define glthread_lock_init     libintl_lock_init
+#define glthread_lock_lock     libintl_lock_lock
+#define glthread_lock_unlock   libintl_lock_unlock
+#define glthread_lock_destroy  libintl_lock_destroy
+#define glthread_rwlock_init     libintl_rwlock_init
+#define glthread_rwlock_rdlock   libintl_rwlock_rdlock
+#define glthread_rwlock_wrlock   libintl_rwlock_wrlock
+#define glthread_rwlock_unlock   libintl_rwlock_unlock
+#define glthread_rwlock_destroy  libintl_rwlock_destroy
+#define glthread_recursive_lock_init     libintl_recursive_lock_init
+#define glthread_recursive_lock_lock     libintl_recursive_lock_lock
+#define glthread_recursive_lock_unlock   libintl_recursive_lock_unlock
+#define glthread_recursive_lock_destroy  libintl_recursive_lock_destroy
+#define glthread_once                 libintl_once
+#define glthread_once_call            libintl_once_call
+#define glthread_once_singlethreaded  libintl_once_singlethreaded
+])
+])
+
+
+dnl Checks for the core files of the intl subdirectory:
+dnl   dcigettext.c
+dnl   eval-plural.h
+dnl   explodename.c
+dnl   finddomain.c
+dnl   gettextP.h
+dnl   gmo.h
+dnl   hash-string.h hash-string.c
+dnl   l10nflist.c
+dnl   libgnuintl.h.in (except the *printf stuff)
+dnl   loadinfo.h
+dnl   loadmsgcat.c
+dnl   localealias.c
+dnl   log.c
+dnl   plural-exp.h plural-exp.c
+dnl   plural.y
+dnl Used by libglocale.
+AC_DEFUN([gt_INTL_SUBDIR_CORE],
+[
+  AC_REQUIRE([AC_C_INLINE])dnl
+  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+  AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+  AC_REQUIRE([AC_FUNC_MMAP])dnl
+  AC_REQUIRE([gt_INTDIV0])dnl
+  AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
+  AC_REQUIRE([gt_INTTYPES_PRI])dnl
+  AC_REQUIRE([gl_LOCK])dnl
+
+  AC_TRY_LINK(
+    [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; 
}],
+    [],
+    [AC_DEFINE([HAVE_BUILTIN_EXPECT], 1,
+       [Define to 1 if the compiler understands __builtin_expect.])])
+
+  AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h])
+  AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \
+    stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \
+    argz_next __fsetlocking])
+
+  dnl Use the *_unlocked functions only if they are declared.
+  dnl (because some of them were defined without being declared in Solaris
+  dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
+  dnl on Solaris 2.5.1 to run on Solaris 2.6).
+  dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
+  gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
+  gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
+
+  AM_ICONV
+
+  dnl glibc >= 2.4 has a NL_LOCALE_NAME macro when _GNU_SOURCE is defined,
+  dnl and a _NL_LOCALE_NAME macro always.
+  AC_CACHE_CHECK([for NL_LOCALE_NAME macro], gt_cv_nl_locale_name,
+    [AC_TRY_LINK([#include <langinfo.h>
+#include <locale.h>],
+      [char* cs = nl_langinfo(_NL_LOCALE_NAME(LC_MESSAGES));],
+      gt_cv_nl_locale_name=yes,
+      gt_cv_nl_locale_name=no)
+    ])
+  if test $gt_cv_nl_locale_name = yes; then
+    AC_DEFINE(HAVE_NL_LOCALE_NAME, 1,
+      [Define if you have <langinfo.h> and it defines the NL_LOCALE_NAME macro 
if _GNU_SOURCE is defined.])
+  fi
+
+  dnl intl/plural.c is generated from intl/plural.y. It requires bison,
+  dnl because plural.y uses bison specific features. It requires at least
+  dnl bison-1.26 because earlier versions generate a plural.c that doesn't
+  dnl compile.
+  dnl bison is only needed for the maintainer (who touches plural.y). But in
+  dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
+  dnl the rule in general Makefile. Now, some people carelessly touch the
+  dnl files or have a broken "make" program, hence the plural.c rule will
+  dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
+  dnl present or too old.
+  AC_CHECK_PROGS([INTLBISON], [bison])
+  if test -z "$INTLBISON"; then
+    ac_verc_fail=yes
+  else
+    dnl Found it, now check the version.
+    AC_MSG_CHECKING([version of bison])
+changequote(<<,>>)dnl
+    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* 
\([0-9]*\.[0-9.]*\).*$/\1/p'`
+    case $ac_prog_version in
+      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+changequote([,])dnl
+         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+    esac
+    AC_MSG_RESULT([$ac_prog_version])
+  fi
+  if test $ac_verc_fail = yes; then
+    INTLBISON=:
+  fi
+])
+
+
+dnl gt_CHECK_DECL(FUNC, INCLUDES)
+dnl Check whether a function is declared.
+AC_DEFUN([gt_CHECK_DECL],
+[
+  AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
+    [AC_TRY_COMPILE([$2], [
+#ifndef $1
+  char *p = (char *) $1;
+#endif
+], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
+  if test $ac_cv_have_decl_$1 = yes; then
+    gt_value=1
+  else
+    gt_value=0
+  fi
+  AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
+    [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
+])

Index: intldir.m4
===================================================================
RCS file: intldir.m4
diff -N intldir.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ intldir.m4  22 Aug 2007 13:43:59 -0000      1.1
@@ -0,0 +1,19 @@
+# intldir.m4 serial 1 (gettext-0.16)
+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
+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.
+
+AC_PREREQ(2.52)
+
+dnl Tells the AM_GNU_GETTEXT macro to consider an intl/ directory.
+AC_DEFUN([AM_GNU_GETTEXT_INTL_SUBDIR], [])

Index: intlmacosx.m4
===================================================================
RCS file: intlmacosx.m4
diff -N intlmacosx.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ intlmacosx.m4       22 Aug 2007 13:43:59 -0000      1.1
@@ -0,0 +1,51 @@
+# intlmacosx.m4 serial 1 (gettext-0.16.2)
+dnl Copyright (C) 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
+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 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])
+])

Index: localcharset.m4
===================================================================
RCS file: localcharset.m4
diff -N localcharset.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ localcharset.m4     22 Aug 2007 13:44:00 -0000      1.1
@@ -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])
+])

Index: malloca.m4
===================================================================
RCS file: malloca.m4
diff -N malloca.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ malloca.m4  22 Aug 2007 13:44:00 -0000      1.1
@@ -0,0 +1,14 @@
+# malloca.m4 serial 1
+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_MALLOCA],
+[
+  dnl Use the autoconf tests for alloca(), but not the AC_SUBSTed variables
+  dnl @ALLOCA@ and @address@hidden
+  dnl gl_FUNC_ALLOCA   dnl Already brought in by the module dependencies.
+  AC_REQUIRE([gl_EEMALLOC])
+  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+])

Index: mbslen.m4
===================================================================
RCS file: mbslen.m4
diff -N mbslen.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ mbslen.m4   22 Aug 2007 13:44:00 -0000      1.1
@@ -0,0 +1,16 @@
+# mbslen.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_MBSLEN],
+[
+  gl_PREREQ_MBSLEN
+])
+
+# Prerequisites of lib/mbslen.c.
+AC_DEFUN([gl_PREREQ_MBSLEN], [
+  AC_REQUIRE([gl_FUNC_MBRTOWC])
+  :
+])

Index: mbsstr.m4
===================================================================
RCS file: mbsstr.m4
diff -N mbsstr.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ mbsstr.m4   22 Aug 2007 13:44:01 -0000      1.1
@@ -0,0 +1,16 @@
+# mbsstr.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_MBSSTR],
+[
+  gl_PREREQ_MBSSTR
+])
+
+# Prerequisites of lib/mbsstr.c.
+AC_DEFUN([gl_PREREQ_MBSSTR], [
+  AC_REQUIRE([gl_FUNC_MBRTOWC])
+  :
+])

Index: stdio_h.m4
===================================================================
RCS file: stdio_h.m4
diff -N stdio_h.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ stdio_h.m4  22 Aug 2007 13:44:02 -0000      1.1
@@ -0,0 +1,77 @@
+# stdio_h.m4 serial 7
+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_CHECK_NEXT_HEADERS([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])
+  GNULIB_VASPRINTF=0;      AC_SUBST([GNULIB_VASPRINTF])
+  GNULIB_FSEEK=0;          AC_SUBST([GNULIB_FSEEK])
+  GNULIB_FSEEKO=0;         AC_SUBST([GNULIB_FSEEKO])
+  GNULIB_FTELL=0;          AC_SUBST([GNULIB_FTELL])
+  GNULIB_FTELLO=0;         AC_SUBST([GNULIB_FTELLO])
+  GNULIB_FFLUSH=0;         AC_SUBST([GNULIB_FFLUSH])
+  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])
+  HAVE_VASPRINTF=1;        AC_SUBST([HAVE_VASPRINTF])
+  REPLACE_VASPRINTF=0;     AC_SUBST([REPLACE_VASPRINTF])
+  HAVE_FSEEKO=1;           AC_SUBST([HAVE_FSEEKO])
+  REPLACE_FSEEKO=0;        AC_SUBST([REPLACE_FSEEKO])
+  REPLACE_FSEEK=0;         AC_SUBST([REPLACE_FSEEK])
+  HAVE_FTELLO=1;           AC_SUBST([HAVE_FTELLO])
+  REPLACE_FTELLO=0;        AC_SUBST([REPLACE_FTELLO])
+  REPLACE_FTELL=0;         AC_SUBST([REPLACE_FTELL])
+  REPLACE_FFLUSH=0;        AC_SUBST([REPLACE_FFLUSH])
+])
+
+dnl Code shared by fseeko and ftello.  Determine if large files are supported,
+dnl but stdin does not start as a large file by default.
+AC_DEFUN([gl_STDIN_LARGE_OFFSET],
+  [
+    AC_CACHE_CHECK([whether stdin defaults to large file offsets],
+      [gl_cv_var_stdin_large_offset],
+      [AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>],
+[#if defined __SL64 && defined __SCLE /* cygwin */
+  /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
+     fseeko/ftello needlessly fail.  This bug was fixed at the same time
+     that cygwin started exporting asnprintf (cygwin 1.7.0), so we use
+     that as a link-time test for cross-compiles rather than building
+     a runtime test.  */
+  size_t s;
+  if (asnprintf (NULL, &s, ""))
+    return 0;
+#endif])],
+       [gl_cv_var_stdin_large_offset=yes],
+       [gl_cv_var_stdin_large_offset=no])])
+])

Index: stdlib_h.m4
===================================================================
RCS file: stdlib_h.m4
diff -N stdlib_h.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ stdlib_h.m4 22 Aug 2007 13:44:02 -0000      1.1
@@ -0,0 +1,29 @@
+# stdlib_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_STDLIB_H],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  gl_CHECK_NEXT_HEADERS([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])
+])

Index: string_h.m4
===================================================================
RCS file: string_h.m4
diff -N string_h.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ string_h.m4 22 Aug 2007 13:44:03 -0000      1.1
@@ -0,0 +1,77 @@
+# 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_CHECK_NEXT_HEADERS([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_MBSNLEN=0;     AC_SUBST([GNULIB_MBSNLEN])
+  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])
+])

Index: sys_time_h.m4
===================================================================
RCS file: sys_time_h.m4
diff -N sys_time_h.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ sys_time_h.m4       22 Aug 2007 13:44:03 -0000      1.1
@@ -0,0 +1,57 @@
+# 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])
+  gl_CHECK_NEXT_HEADERS([sys/time.h])
+
+  if test $ac_cv_header_sys_time_h = yes; then
+    HAVE_SYS_TIME_H=1
+  else
+    HAVE_SYS_TIME_H=0
+  fi
+  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])
+])

Index: tempname.m4
===================================================================
RCS file: tempname.m4
diff -N tempname.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ tempname.m4 22 Aug 2007 13:44:03 -0000      1.1
@@ -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],
+[
+  :
+])

Index: time_h.m4
===================================================================
RCS file: time_h.m4
diff -N time_h.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ time_h.m4   22 Aug 2007 13:44:03 -0000      1.1
@@ -0,0 +1,74 @@
+# 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_CHECK_NEXT_HEADERS([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])
+])

Index: wchar.m4
===================================================================
RCS file: wchar.m4
diff -N wchar.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ wchar.m4    22 Aug 2007 13:44:04 -0000      1.1
@@ -0,0 +1,54 @@
+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 4
+
+AC_DEFUN([gl_WCHAR_H],
+[
+  AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+  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=wchar.h
+  fi
+
+  dnl Prepare for creating substitute <wchar.h>.
+  dnl Do it always: WCHAR_H may be empty here but can be set later.
+  dnl Check for <wchar.h> (missing in Linux uClibc when built without wide
+  dnl character support).
+  AC_CHECK_HEADERS_ONCE([wchar.h])
+  if test $ac_cv_header_wchar_h = yes; then
+    HAVE_WCHAR_H=1
+  else
+    HAVE_WCHAR_H=0
+  fi
+  AC_SUBST([HAVE_WCHAR_H])
+  gl_CHECK_NEXT_HEADERS([wchar.h])
+])
+
+AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+  
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_WCHAR_H_DEFAULTS],
+[
+  GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH])
+  REPLACE_WCWIDTH=0;   AC_SUBST([REPLACE_WCWIDTH])
+  WCHAR_H=
+  AC_SUBST([WCHAR_H])
+])

Index: wctype.m4
===================================================================
RCS file: wctype.m4
diff -N wctype.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ wctype.m4   22 Aug 2007 13:44:04 -0000      1.1
@@ -0,0 +1,44 @@
+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])
+  if test $ac_cv_func_iswcntrl = yes; then
+    HAVE_ISWCNTRL=1
+  else
+    HAVE_ISWCNTRL=0
+  fi
+  AC_SUBST([HAVE_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 NEXT_WCTYPE_H even if WCTYPE_H is empty,
+    dnl for the benefit of builds from non-distclean directories.
+    gl_CHECK_NEXT_HEADERS([wctype.h])
+    HAVE_WCTYPE_H=1
+  else
+    HAVE_WCTYPE_H=0
+  fi
+  AC_SUBST([HAVE_WCTYPE_H])
+  AC_SUBST([WCTYPE_H])
+])

Index: allocsa.m4
===================================================================
RCS file: allocsa.m4
diff -N allocsa.m4
--- allocsa.m4  1 Mar 2005 18:15:07 -0000       1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-# allocsa.m4 serial 3
-dnl Copyright (C) 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_ALLOCSA],
-[
-  dnl Use the autoconf tests for alloca(), but not the AC_SUBSTed variables
-  dnl @ALLOCA@ and @address@hidden
-  AC_REQUIRE([gl_FUNC_ALLOCA])
-  AC_REQUIRE([gl_EEMALLOC])
-  AC_REQUIRE([gl_AC_TYPE_LONG_LONG])
-  AC_REQUIRE([gt_TYPE_LONGDOUBLE])
-])

Index: inttypes-h.m4
===================================================================
RCS file: inttypes-h.m4
diff -N inttypes-h.m4
--- inttypes-h.m4       22 Sep 2006 17:54:40 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1 +0,0 @@
-/* This file will go away when gettext-0.15.1 is released.  */

Index: longdouble.m4
===================================================================
RCS file: longdouble.m4
diff -N longdouble.m4
--- longdouble.m4       19 Apr 2006 16:49:25 -0000      1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,31 +0,0 @@
-# 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
-])

Index: signed.m4
===================================================================
RCS file: signed.m4
diff -N signed.m4
--- signed.m4   25 Sep 2006 10:38:20 -0000      1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,18 +0,0 @@
-# signed.m4 serial 2
-dnl Copyright (C) 2001-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([bh_C_SIGNED],
-[
-  AC_CACHE_CHECK([for signed], bh_cv_c_signed,
-   [AC_TRY_COMPILE(, [signed char x; return !x;],
-      bh_cv_c_signed=yes, bh_cv_c_signed=no)])
-  if test $bh_cv_c_signed = no; then
-    AC_DEFINE(signed, ,
-              [Define to empty if the C compiler doesn't support this 
keyword.])
-  fi
-])

Index: stat-macros.m4
===================================================================
RCS file: stat-macros.m4
diff -N stat-macros.m4
--- stat-macros.m4      24 Aug 2006 01:24:14 -0000      1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-#serial 3
-
-# Copyright (C) 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_STAT_MACROS],
-[
-  AC_REQUIRE([AC_HEADER_STAT])
-])

Index: strstr.m4
===================================================================
RCS file: strstr.m4
diff -N strstr.m4
--- strstr.m4   4 Oct 2005 02:33:12 -0000       1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
-# strstr.m4 serial 5
-dnl Copyright (C) 2002-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.
-
-AC_DEFUN([gl_FUNC_STRSTR],
-[
-  dnl No known system has a strstr() function that works correctly in
-  dnl multibyte locales. Therefore we use our version always.
-  AC_LIBOBJ(strstr)
-  gl_PREREQ_STRSTR
-])
-
-# Prerequisites of lib/strstr.c.
-AC_DEFUN([gl_PREREQ_STRSTR], [
-  AC_REQUIRE([gl_FUNC_MBRTOWC])
-  :
-])

Index: xreadlink.m4
===================================================================
RCS file: xreadlink.m4
diff -N xreadlink.m4
--- xreadlink.m4        24 Aug 2006 01:24:14 -0000      1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-#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_XREADLINK],
-[
-  AC_LIBOBJ([xreadlink])
-
-  dnl Prerequisites of lib/xreadlink.c.
-  AC_REQUIRE([gt_TYPE_SSIZE_T])
-])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]