[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs/m4 ChangeLog alloca.m4 arpa_inet_h.m4 d-ty...
From: |
Derek Robert Price |
Subject: |
[Cvs-cvs] ccvs/m4 ChangeLog alloca.m4 arpa_inet_h.m4 d-ty... |
Date: |
Mon, 15 Sep 2008 21:47:03 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Changes by: Derek Robert Price <dprice> 08/09/15 21:47:01
Modified files:
m4 : ChangeLog alloca.m4 arpa_inet_h.m4 d-type.m4
double-slash-root.m4 extensions.m4 fcntl_h.m4
float_h.m4 fnmatch.m4 fpending.m4 fseeko.m4
ftello.m4 getaddrinfo.m4 getdate.m4 getdelim.m4
getline.m4 getndelim2.m4 getopt.m4
getpagesize.m4 gettext.m4 glob.m4
gnulib-cache.m4 gnulib-common.m4 gnulib-comp.m4
gnulib-tool.m4 iconv.m4 include_next.m4
inet_ntop.m4 intdiv0.m4 intl.m4 intlmacosx.m4
intmax_t.m4 inttypes.m4 lib-link.m4
lib-prefix.m4 lock.m4 longlong.m4 mbchar.m4
mbstate_t.m4 md5.m4 mempcpy.m4 memrchr.m4
mkdir-slash.m4 nanosleep.m4 netinet_in_h.m4
openat.m4 po.m4 printf-posix.m4 regex.m4
rpmatch.m4 setenv.m4 snprintf.m4 socklen.m4
stdint.m4 stdio_h.m4 stdlib_h.m4 strcase.m4
strerror.m4 string_h.m4 strndup.m4 strnlen.m4
strtoimax.m4 strtoumax.m4 sys_socket_h.m4
sys_stat_h.m4 time_h.m4 time_r.m4 uintmax_t.m4
unistd_h.m4 vasnprintf.m4 vasprintf.m4
wctype.m4 wcwidth.m4 wint_t.m4
Added files:
m4 : environ.m4 errno_h.m4 hash.m4 malloc.m4 open.m4
printf.m4 realloc.m4 same.m4 sigaction.m4
signal_h.m4 signalblocking.m4 strings_h.m4
sys_select_h.m4 threadlib.m4
Removed files:
m4 : absolute-header.m4 cycle-check.m4 eoverflow.m4
ulonglong.m4
Log message:
Update from GNULIB.
* absolute-header.m4, cycle-check.m4, eoverflow.m4, ulonglong.m4:
Removed.
* environ.m4, errno_h.m4, hash.m4, malloc.m4, open.m4, printf.m4,
realloc.m4, same.m4, sigaction.m4, signal_h.m4, signalblocking.m4,
strings_h.m4, sys_select_h.m4, threadlib.m4: New files.
* alloca.m4, arpa_inet_h.m4, d-type.m4, double-slash-root.m4,
extensions.m4, fcntl_h.m4, float_h.m4, fnmatch.m4, fpending.m4,
fseeko.m4, ftello.m4, getaddrinfo.m4, getdate.m4, getdelim.m4,
getline.m4, getndelim2.m4, getopt.m4, getpagesize.m4, gettext.m4,
glob.m4, gnulib-cache.m4, gnulib-common.m4, gnulib-comp.m4,
gnulib-tool.m4, iconv.m4, include_next.m4, inet_ntop.m4, intdiv0.m4,
intl.m4, intlmacosx.m4, intmax_t.m4, inttypes.m4, lib-link.m4,
lib-prefix.m4, lock.m4, longlong.m4, mbchar.m4, mbstate_t.m4, md5.m4,
mempcpy.m4, memrchr.m4, mkdir-slash.m4, nanosleep.m4, netinet_in_h.m4,
openat.m4, po.m4, printf-posix.m4, regex.m4, rpmatch.m4, setenv.m4,
snprintf.m4, socklen.m4, stdint.m4, stdio_h.m4, stdlib_h.m4,
strcase.m4, strerror.m4, string_h.m4, strndup.m4, strnlen.m4,
strtoimax.m4, strtoumax.m4, sys_socket_h.m4, sys_stat_h.m4, time_h.m4,
time_r.m4, uintmax_t.m4, unistd_h.m4, vasnprintf.m4, vasprintf.m4,
wctype.m4, wcwidth.m4, wint_t.m4: Updated.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/ChangeLog?cvsroot=cvs&r1=1.195&r2=1.196
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/alloca.m4?cvsroot=cvs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/arpa_inet_h.m4?cvsroot=cvs&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/d-type.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.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/extensions.m4?cvsroot=cvs&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/fcntl_h.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/float_h.m4?cvsroot=cvs&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/fnmatch.m4?cvsroot=cvs&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/fpending.m4?cvsroot=cvs&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/fseeko.m4?cvsroot=cvs&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/ftello.m4?cvsroot=cvs&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/getaddrinfo.m4?cvsroot=cvs&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/getdate.m4?cvsroot=cvs&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/getdelim.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/getline.m4?cvsroot=cvs&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/getndelim2.m4?cvsroot=cvs&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/getopt.m4?cvsroot=cvs&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/getpagesize.m4?cvsroot=cvs&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/gettext.m4?cvsroot=cvs&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/glob.m4?cvsroot=cvs&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/gnulib-cache.m4?cvsroot=cvs&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/gnulib-common.m4?cvsroot=cvs&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/gnulib-comp.m4?cvsroot=cvs&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/gnulib-tool.m4?cvsroot=cvs&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/iconv.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/include_next.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/inet_ntop.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/intdiv0.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/intl.m4?cvsroot=cvs&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/intlmacosx.m4?cvsroot=cvs&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/intmax_t.m4?cvsroot=cvs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/inttypes.m4?cvsroot=cvs&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/lib-link.m4?cvsroot=cvs&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/lib-prefix.m4?cvsroot=cvs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/lock.m4?cvsroot=cvs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/longlong.m4?cvsroot=cvs&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/mbchar.m4?cvsroot=cvs&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/mbstate_t.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/md5.m4?cvsroot=cvs&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/mempcpy.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/memrchr.m4?cvsroot=cvs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/mkdir-slash.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/nanosleep.m4?cvsroot=cvs&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/netinet_in_h.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/openat.m4?cvsroot=cvs&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/po.m4?cvsroot=cvs&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/printf-posix.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/regex.m4?cvsroot=cvs&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/rpmatch.m4?cvsroot=cvs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/setenv.m4?cvsroot=cvs&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/snprintf.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/socklen.m4?cvsroot=cvs&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/stdint.m4?cvsroot=cvs&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/stdio_h.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/stdlib_h.m4?cvsroot=cvs&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/strcase.m4?cvsroot=cvs&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/strerror.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/string_h.m4?cvsroot=cvs&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/strndup.m4?cvsroot=cvs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/strnlen.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/strtoimax.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/strtoumax.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.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/sys_stat_h.m4?cvsroot=cvs&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/time_h.m4?cvsroot=cvs&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/time_r.m4?cvsroot=cvs&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/uintmax_t.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/unistd_h.m4?cvsroot=cvs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/vasnprintf.m4?cvsroot=cvs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/vasprintf.m4?cvsroot=cvs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/wctype.m4?cvsroot=cvs&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/wcwidth.m4?cvsroot=cvs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/wint_t.m4?cvsroot=cvs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/environ.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/errno_h.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/hash.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/malloc.m4?cvsroot=cvs&rev=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/open.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/printf.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/realloc.m4?cvsroot=cvs&rev=1.3
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/same.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/sigaction.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/signal_h.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/signalblocking.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/strings_h.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/sys_select_h.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/threadlib.m4?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/absolute-header.m4?cvsroot=cvs&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/cycle-check.m4?cvsroot=cvs&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/eoverflow.m4?cvsroot=cvs&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/ccvs/m4/ulonglong.m4?cvsroot=cvs&r1=1.5&r2=0
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/ChangeLog,v
retrieving revision 1.195
retrieving revision 1.196
diff -u -b -r1.195 -r1.196
--- ChangeLog 27 Aug 2007 02:12:25 -0000 1.195
+++ ChangeLog 15 Sep 2008 21:46:53 -0000 1.196
@@ -1,3 +1,27 @@
+2008-09-15 Derek Price <address@hidden>
+
+ Update from GNULIB.
+ * absolute-header.m4, cycle-check.m4, eoverflow.m4, ulonglong.m4:
+ Removed.
+ * environ.m4, errno_h.m4, hash.m4, malloc.m4, open.m4, printf.m4,
+ realloc.m4, same.m4, sigaction.m4, signal_h.m4, signalblocking.m4,
+ strings_h.m4, sys_select_h.m4, threadlib.m4: New files.
+ * alloca.m4, arpa_inet_h.m4, d-type.m4, double-slash-root.m4,
+ extensions.m4, fcntl_h.m4, float_h.m4, fnmatch.m4, fpending.m4,
+ fseeko.m4, ftello.m4, getaddrinfo.m4, getdate.m4, getdelim.m4,
+ getline.m4, getndelim2.m4, getopt.m4, getpagesize.m4, gettext.m4,
+ glob.m4, gnulib-cache.m4, gnulib-common.m4, gnulib-comp.m4,
+ gnulib-tool.m4, iconv.m4, include_next.m4, inet_ntop.m4, intdiv0.m4,
+ intl.m4, intlmacosx.m4, intmax_t.m4, inttypes.m4, lib-link.m4,
+ lib-prefix.m4, lock.m4, longlong.m4, mbchar.m4, mbstate_t.m4, md5.m4,
+ mempcpy.m4, memrchr.m4, mkdir-slash.m4, nanosleep.m4, netinet_in_h.m4,
+ openat.m4, po.m4, printf-posix.m4, regex.m4, rpmatch.m4, setenv.m4,
+ snprintf.m4, socklen.m4, stdint.m4, stdio_h.m4, stdlib_h.m4,
+ strcase.m4, strerror.m4, string_h.m4, strndup.m4, strnlen.m4,
+ strtoimax.m4, strtoumax.m4, sys_socket_h.m4, sys_stat_h.m4, time_h.m4,
+ time_r.m4, uintmax_t.m4, unistd_h.m4, vasnprintf.m4, vasprintf.m4,
+ wctype.m4, wcwidth.m4, wint_t.m4: Updated.
+
2007-08-26 Derek Price <address@hidden>
* getdelim.m4, getline.m4, stdio_h.m4: Update from GNULIB.
Index: alloca.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/alloca.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- alloca.m4 22 Aug 2007 13:43:55 -0000 1.4
+++ alloca.m4 15 Sep 2008 21:46:53 -0000 1.5
@@ -1,5 +1,5 @@
-# alloca.m4 serial 7
-dnl Copyright (C) 2002-2004, 2006 Free Software Foundation, Inc.
+# alloca.m4 serial 8
+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.
@@ -39,10 +39,6 @@
ALLOCA_H=alloca.h
fi
AC_SUBST([ALLOCA_H])
-
- AC_DEFINE(HAVE_ALLOCA_H, 1,
- [Define HAVE_ALLOCA_H for backward compatibility with older code
- that includes <alloca.h> only if HAVE_ALLOCA_H is defined.])
])
# Prerequisites of lib/alloca.c.
Index: arpa_inet_h.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/arpa_inet_h.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- arpa_inet_h.m4 16 Aug 2006 18:12:09 -0000 1.1
+++ arpa_inet_h.m4 15 Sep 2008 21:46:53 -0000 1.2
@@ -1,18 +1,43 @@
-# arpa_inet_h.m4 serial 1
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+# arpa_inet_h.m4 serial 4
+dnl Copyright (C) 2006, 2008 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 and Bruno Haible
AC_DEFUN([gl_HEADER_ARPA_INET],
[
+ 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_ARPA_INET_H_DEFAULTS])
+
AC_CHECK_HEADERS_ONCE([arpa/inet.h])
if test $ac_cv_header_arpa_inet_h = yes; then
- ARPA_INET_H=''
+ HAVE_ARPA_INET_H=1
else
ARPA_INET_H='arpa/inet.h'
+ HAVE_ARPA_INET_H=0
fi
- AC_SUBST(ARPA_INET_H)
+ AC_SUBST([HAVE_ARPA_INET_H])
+ dnl Execute this unconditionally, because ARPA_INET_H may be set by other
+ dnl modules, after this code is executed.
+ gl_CHECK_NEXT_HEADERS([arpa/inet.h])
+])
+
+AC_DEFUN([gl_ARPA_INET_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS])
+
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_ARPA_INET_H_DEFAULTS],
+[
+ GNULIB_INET_NTOP=0; AC_SUBST([GNULIB_INET_NTOP])
+ GNULIB_INET_PTON=0; AC_SUBST([GNULIB_INET_PTON])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_DECL_INET_NTOP=1; AC_SUBST([HAVE_DECL_INET_NTOP])
+ HAVE_DECL_INET_PTON=1; AC_SUBST([HAVE_DECL_INET_PTON])
+ ARPA_INET_H=''; AC_SUBST([ARPA_INET_H])
])
Index: d-type.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/d-type.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- d-type.m4 11 Jul 2006 16:42:23 -0000 1.3
+++ d-type.m4 15 Sep 2008 21:46:54 -0000 1.4
@@ -14,7 +14,7 @@
AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE],
[AC_CACHE_CHECK([for d_type member in directory struct],
- jm_cv_struct_dirent_d_type,
+ gl_cv_struct_dirent_d_type,
[AC_TRY_LINK(dnl
[
#include <sys/types.h>
@@ -22,11 +22,11 @@
],
[struct dirent dp; dp.d_type = 0;],
- jm_cv_struct_dirent_d_type=yes,
- jm_cv_struct_dirent_d_type=no)
+ gl_cv_struct_dirent_d_type=yes,
+ gl_cv_struct_dirent_d_type=no)
]
)
- if test $jm_cv_struct_dirent_d_type = yes; then
+ if test $gl_cv_struct_dirent_d_type = yes; then
AC_DEFINE(HAVE_STRUCT_DIRENT_D_TYPE, 1,
[Define if there is a member named d_type in the struct describing
directory headers.])
Index: double-slash-root.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/double-slash-root.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- double-slash-root.m4 22 Aug 2007 13:43:57 -0000 1.2
+++ double-slash-root.m4 15 Sep 2008 21:46:54 -0000 1.3
@@ -1,5 +1,5 @@
-# double-slash-root.m4 serial 2 -*- Autoconf -*-
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+# double-slash-root.m4 serial 3 -*- Autoconf -*-
+dnl Copyright (C) 2006, 2008 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.
@@ -24,8 +24,8 @@
gl_cv_double_slash_root='unknown, assuming no' ;;
esac
else
- set x `ls -di / //`
- if test $[2] = $[4] && wc //dev/null >/dev/null 2>&1; then
+ set x `ls -di / // 2>/dev/null`
+ if test "$[2]" = "$[4]" && wc //dev/null >/dev/null 2>&1; then
gl_cv_double_slash_root=no
else
gl_cv_double_slash_root=yes
Index: extensions.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/extensions.m4,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- extensions.m4 22 Aug 2007 13:43:57 -0000 1.6
+++ extensions.m4 15 Sep 2008 21:46:54 -0000 1.7
@@ -1,14 +1,14 @@
-# serial 4 -*- Autoconf -*-
+# serial 5 -*- Autoconf -*-
# Enable extensions on systems that normally disable them.
-# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
# Autoconf. Perhaps we can remove this once we can assume Autoconf
-# 2.61 or later everywhere, but since CVS Autoconf mutates rapidly
+# 2.62 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.
@@ -16,39 +16,63 @@
# ------------------------
# Enable extensions on systems that normally disable them,
# typically due to standards-conformance issues.
+# Remember that #undef in AH_VERBATIM gets replaced with #define by
+# AC_DEFINE. The goal here is to define all known feature-enabling
+# macros, then, if reports of conflicts are made, disable macros that
+# cause problems on some platforms (such as __EXTENSIONS__).
AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
-[
- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
- AC_BEFORE([$0], [AC_RUN_IFELSE])
-
- AC_REQUIRE([AC_GNU_SOURCE])
- AC_REQUIRE([AC_AIX])
- AC_REQUIRE([AC_MINIX])
+[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
+
+ AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
+ if test "$MINIX" = yes; then
+ AC_DEFINE([_POSIX_SOURCE], [1],
+ [Define to 1 if you need to in order for `stat' and other
+ things to work.])
+ AC_DEFINE([_POSIX_1_SOURCE], [2],
+ [Define to 2 if the system does not provide POSIX.1 features
+ except with this defined.])
+ AC_DEFINE([_MINIX], [1],
+ [Define to 1 if on MINIX.])
+ fi
AH_VERBATIM([__EXTENSIONS__],
-[/* Enable extensions on Solaris. */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
+[/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
+/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
-#endif])
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+])
AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
[ac_cv_safe_to_define___extensions__],
[AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([
+ [AC_LANG_PROGRAM([[
# define __EXTENSIONS__ 1
- AC_INCLUDES_DEFAULT])],
+ ]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([_ALL_SOURCE])
+ AC_DEFINE([_GNU_SOURCE])
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
AC_DEFINE([_TANDEM_SOURCE])
-])
+])# AC_USE_SYSTEM_EXTENSIONS
# gl_USE_SYSTEM_EXTENSIONS
# ------------------------
Index: fcntl_h.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/fcntl_h.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- fcntl_h.m4 22 Aug 2007 13:43:57 -0000 1.2
+++ fcntl_h.m4 15 Sep 2008 21:46:54 -0000 1.3
@@ -8,6 +8,7 @@
AC_DEFUN([gl_FCNTL_H],
[
+ AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
AC_CACHE_CHECK([for working fcntl.h], gl_cv_header_working_fcntl_h,
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
@@ -77,3 +78,17 @@
FCNTL_H='fcntl.h'
AC_SUBST([FCNTL_H])
])
+
+AC_DEFUN([gl_FCNTL_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_FCNTL_H_DEFAULTS],
+[
+ GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN])
+])
Index: float_h.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/float_h.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- float_h.m4 22 Aug 2007 13:43:57 -0000 1.1
+++ float_h.m4 15 Sep 2008 21:46:54 -0000 1.2
@@ -1,4 +1,4 @@
-# float_h.m4 serial 2
+# float_h.m4 serial 3
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,
@@ -10,7 +10,7 @@
AC_REQUIRE([AC_CANONICAL_HOST])
FLOAT_H=
case "$host_os" in
- beos*)
+ beos* | openbsd*)
FLOAT_H=float.h
gl_CHECK_NEXT_HEADERS([float.h])
;;
Index: fnmatch.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/fnmatch.m4,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- fnmatch.m4 22 Aug 2007 13:43:57 -0000 1.9
+++ fnmatch.m4 15 Sep 2008 21:46:55 -0000 1.10
@@ -1,4 +1,4 @@
-# Check for fnmatch.
+# Check for fnmatch - serial 2.
# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
# Foundation, Inc.
@@ -110,7 +110,7 @@
AC_DEFUN([gl_FUNC_FNMATCH_GNU],
[
dnl Persuade glibc <fnmatch.h> to declare FNM_CASEFOLD etc.
- AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
FNMATCH_H=
_AC_FUNC_FNMATCH_IF([GNU], [ac_cv_func_fnmatch_gnu],
Index: fpending.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/fpending.m4,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- fpending.m4 22 Aug 2007 13:43:57 -0000 1.6
+++ fpending.m4 15 Sep 2008 21:46:55 -0000 1.7
@@ -1,6 +1,7 @@
-#serial 10
+#serial 13
-# Copyright (C) 2000, 2001, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2004, 2005, 2006, 2007, 2008 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.
@@ -16,7 +17,7 @@
AC_DEFUN([gl_FUNC_FPENDING],
[
AC_CHECK_HEADERS_ONCE(stdio_ext.h)
- AC_REPLACE_FUNCS([__fpending])
+ AC_CHECK_FUNCS_ONCE([__fpending])
fp_headers='
# include <stdio.h>
# if HAVE_STDIO_EXT_H
@@ -43,12 +44,18 @@
'# SCO, Unixware' \
'(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
\
+ '# QNX' \
+ '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
+ \
'# old glibc?' \
'fp->__bufp - fp->__buffer' \
\
'# old glibc iostream?' \
'fp->_pptr - fp->_pbase' \
\
+ '# emx+gcc' \
+ 'fp->_ptr - fp->_buffer' \
+ \
'# VMS' \
'(*fp)->_ptr - (*fp)->_base' \
\
@@ -74,5 +81,6 @@
AC_DEFINE_UNQUOTED(PENDING_OUTPUT_N_BYTES,
$ac_cv_sys_pending_output_n_bytes,
[the number of pending output bytes on stream `fp'])
+ AC_LIBOBJ([fpending])
fi
])
Index: fseeko.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/fseeko.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- fseeko.m4 23 Aug 2007 21:37:48 -0000 1.1
+++ fseeko.m4 15 Sep 2008 21:46:55 -0000 1.2
@@ -1,5 +1,5 @@
-# fseeko.m4 serial 3
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+# fseeko.m4 serial 4
+dnl Copyright (C) 2007-2008 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,10 @@
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([gl_STDIN_LARGE_OFFSET])
+
+ dnl Persuade glibc <stdio.h> to declare fseeko().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
AC_CACHE_CHECK([for fseeko], [gl_cv_func_fseeko],
[
AC_TRY_LINK([#include <stdio.h>], [fseeko (stdin, 0, 0);],
Index: ftello.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/ftello.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- ftello.m4 23 Aug 2007 21:37:48 -0000 1.1
+++ ftello.m4 15 Sep 2008 21:46:55 -0000 1.2
@@ -1,5 +1,5 @@
-# ftello.m4 serial 3
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+# ftello.m4 serial 4
+dnl Copyright (C) 2007, 2008 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,10 @@
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([gl_STDIN_LARGE_OFFSET])
+
+ dnl Persuade glibc <stdio.h> to declare fseeko().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
AC_CACHE_CHECK([for ftello], [gl_cv_func_ftello],
[
AC_TRY_LINK([#include <stdio.h>], [ftello (stdin);],
Index: getaddrinfo.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/getaddrinfo.m4,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- getaddrinfo.m4 22 Aug 2007 13:43:57 -0000 1.8
+++ getaddrinfo.m4 15 Sep 2008 21:46:55 -0000 1.9
@@ -1,4 +1,4 @@
-# getaddrinfo.m4 serial 12
+# getaddrinfo.m4 serial 15
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,
@@ -9,8 +9,23 @@
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_CHECK_HEADERS_ONCE(netdb.h)
+
AC_SEARCH_LIBS(getaddrinfo, [nsl socket])
- AC_CHECK_FUNCS(getaddrinfo,, [
+ AC_CACHE_CHECK([for getaddrinfo], [gl_cv_func_getaddrinfo], [
+ 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
+#include <stddef.h>
+], [getaddrinfo("", "", NULL, NULL);],
+ [gl_cv_func_getaddrinfo=yes],
+ [gl_cv_func_getaddrinfo=no])])
+ if test $gl_cv_func_getaddrinfo = no; then
AC_CACHE_CHECK(for getaddrinfo in ws2tcpip.h and -lws2_32,
gl_cv_w32_getaddrinfo, [
gl_cv_w32_getaddrinfo=no
@@ -20,19 +35,19 @@
#ifdef HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
#endif
-], [getaddrinfo(0, 0, 0, 0);], gl_cv_w32_getaddrinfo=yes)
+#include <stddef.h>
+], [getaddrinfo(NULL, NULL, NULL, NULL);], gl_cv_w32_getaddrinfo=yes)
LIBS="$am_save_LIBS"])
if test "$gl_cv_w32_getaddrinfo" = "yes"; then
LIBS="$LIBS -lws2_32"
else
AC_LIBOBJ(getaddrinfo)
fi
- ])
+ fi
# 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([
@@ -46,7 +61,8 @@
#ifdef HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
#endif
-], [gai_strerror (0);],
+#include <stddef.h>
+], [gai_strerror (NULL);],
[gl_cv_func_gai_strerror=yes],
[gl_cv_func_gai_strerror=no])])
if test $gl_cv_func_gai_strerror = no; then
@@ -71,7 +87,8 @@
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
-], [gethostbyname(0);], gl_cv_w32_gethostbyname=yes)
+#include <stddef.h>
+], [gethostbyname(NULL);], gl_cv_w32_gethostbyname=yes)
LIBS="$am_save_LIBS"])
if test "$gl_cv_w32_gethostbyname" = "yes"; then
LIBS="$LIBS -lws2_32"
@@ -81,7 +98,7 @@
AC_REQUIRE([gl_SOCKET_FAMILIES])
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
AC_REQUIRE([AC_C_INLINE])
- AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
AC_CHECK_HEADERS_ONCE(netinet/in.h netdb.h)
AC_CHECK_DECLS([getaddrinfo, freeaddrinfo, gai_strerror, getnameinfo],,,[
/* sys/types.h is not needed according to POSIX, but the
Index: getdate.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/getdate.m4,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- getdate.m4 25 Sep 2006 10:38:20 -0000 1.8
+++ getdate.m4 15 Sep 2008 21:46:55 -0000 1.9
@@ -1,13 +1,19 @@
-# getdate.m4 serial 12
-dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# getdate.m4 serial 13
+dnl Copyright (C) 2002-2006, 2008 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 Define HAVE_COMPOUND_LITERALS if the C compiler supports compound literals
+dnl as in ISO C99.
+dnl Note that compound literals such as (struct s) { 3, 4 } can be used for
+dnl initialization of stack-allocated variables, but are not constant
+dnl expressions and therefore cannot be used as initializer for global or
+dnl static variables (even though gcc supports this in pre-C99 mode).
AC_DEFUN([gl_C_COMPOUND_LITERALS],
[
AC_CACHE_CHECK([for compound literals], gl_cv_compound_literals,
- [AC_TRY_COMPILE([struct s { int i, j; }; struct s s = (struct s) { 1, 2 };],
+ [AC_TRY_COMPILE([struct s { int i, j; };],
[struct s t = (struct s) { 3, 4 };
if (t.i != 0) return 0;],
gl_cv_compound_literals=yes,
Index: getdelim.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/getdelim.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- getdelim.m4 27 Aug 2007 02:12:25 -0000 1.3
+++ getdelim.m4 15 Sep 2008 21:46:55 -0000 1.4
@@ -1,4 +1,4 @@
-# getdelim.m4 serial 3
+# getdelim.m4 serial 5
dnl Copyright (C) 2005, 2006, 2007 Free Software dnl Foundation, Inc.
dnl
@@ -6,14 +6,14 @@
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-AC_PREREQ([2.60])
+AC_PREREQ([2.59])
AC_DEFUN([gl_FUNC_GETDELIM],
[
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
dnl Persuade glibc <stdio.h> to declare getdelim().
- AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
AC_REPLACE_FUNCS([getdelim])
AC_CHECK_DECLS_ONCE([getdelim])
@@ -31,4 +31,5 @@
AC_DEFUN([gl_PREREQ_GETDELIM],
[
AC_CHECK_FUNCS([flockfile funlockfile])
+ AC_CHECK_DECLS([getc_unlocked])
])
Index: getline.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/getline.m4,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- getline.m4 27 Aug 2007 02:12:25 -0000 1.14
+++ getline.m4 15 Sep 2008 21:46:55 -0000 1.15
@@ -1,4 +1,4 @@
-# getline.m4 serial 16
+# getline.m4 serial 18
dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007 Free
dnl Software Foundation, Inc.
@@ -7,7 +7,7 @@
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-AC_PREREQ([2.60])
+AC_PREREQ([2.59])
dnl See if there's a working, system-supplied version of the getline function.
dnl We can't just do AC_REPLACE_FUNCS(getline) because some systems
@@ -18,7 +18,7 @@
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
dnl Persuade glibc <stdio.h> to declare getline().
- AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
AC_CHECK_DECLS_ONCE([getline])
Index: getndelim2.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/getndelim2.m4,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- getndelim2.m4 22 Aug 2007 13:43:57 -0000 1.8
+++ getndelim2.m4 15 Sep 2008 21:46:55 -0000 1.9
@@ -1,5 +1,5 @@
-# getndelim2.m4 serial 5
-dnl Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+# getndelim2.m4 serial 6
+dnl Copyright (C) 2003, 2006, 2008 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,6 +8,8 @@
[
AC_LIBOBJ(getndelim2)
gl_PREREQ_GETNDELIM2
+ AC_CHECK_FUNCS_ONCE([flockfile])
+ AC_CHECK_FUNCS_ONCE([funlockfile])
])
# Prerequisites of lib/getndelim2.h and lib/getndelim2.c.
Index: getopt.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/getopt.m4,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- getopt.m4 11 Jul 2006 16:42:23 -0000 1.12
+++ getopt.m4 15 Sep 2008 21:46:55 -0000 1.13
@@ -1,5 +1,5 @@
-# getopt.m4 serial 13
-dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# getopt.m4 serial 14
+dnl Copyright (C) 2002-2006, 2008 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.
@@ -46,7 +46,7 @@
if test -z "$GETOPT_H"; then
AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_gnu_getopt],
[AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([#include <getopt.h>],
+ [AC_LANG_PROGRAM([[#include <getopt.h>]],
[[
char *myargv[3];
myargv[0] = "conftest";
Index: getpagesize.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/getpagesize.m4,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- getpagesize.m4 24 Aug 2006 01:24:14 -0000 1.6
+++ getpagesize.m4 15 Sep 2008 21:46:55 -0000 1.7
@@ -1,13 +1,29 @@
-# getpagesize.m4 serial 6
-dnl Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
+# getpagesize.m4 serial 7
+dnl Copyright (C) 2002, 2004-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_GETPAGESIZE],
+AC_DEFUN([gl_FUNC_GETPAGESIZE],
[
- dnl Prerequisites of lib/getpagesize.h.
- AC_CHECK_HEADERS_ONCE(sys/param.h)
- AC_CHECK_HEADERS(OS.h)
- AC_CHECK_FUNCS(getpagesize)
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CHECK_FUNCS([getpagesize])
+ if test $ac_cv_func_getpagesize = no; then
+ HAVE_GETPAGESIZE=0
+ AC_CHECK_HEADERS([OS.h])
+ if test $ac_cv_header_OS_h = yes; then
+ HAVE_OS_H=1
+ fi
+ AC_CHECK_HEADERS([sys/param.h])
+ if test $ac_cv_header_sys_param_h = yes; then
+ HAVE_SYS_PARAM_H=1
+ fi
+ fi
+ case "$host_os" in
+ mingw*)
+ REPLACE_GETPAGESIZE=1
+ AC_LIBOBJ([getpagesize])
+ ;;
+ esac
])
Index: gettext.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/gettext.m4,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- gettext.m4 22 Aug 2007 13:43:58 -0000 1.11
+++ gettext.m4 15 Sep 2008 21:46:55 -0000 1.12
@@ -1,5 +1,5 @@
-# gettext.m4 serial 59a (gettext-0.16.1)
-dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
+# gettext.m4 serial 60 (gettext-0.17)
+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.
Index: glob.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/glob.m4,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- glob.m4 22 Aug 2007 13:43:58 -0000 1.18
+++ glob.m4 15 Sep 2008 21:46:55 -0000 1.19
@@ -1,4 +1,4 @@
-# glob.m4 serial 8
+# glob.m4 serial 10
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,
@@ -74,7 +74,7 @@
[
AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE])dnl
AC_REQUIRE([AC_C_RESTRICT])dnl
- AC_REQUIRE([AC_GNU_SOURCE])dnl
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])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
@@ -82,5 +82,5 @@
HAVE_SYS_CDEFS_H=0
fi
AC_SUBST([HAVE_SYS_CDEFS_H])
- AC_CHECK_FUNCS_ONCE([getlogin_r getpwnam_r])dnl
+ AC_CHECK_FUNCS_ONCE([fstatat getlogin_r getpwnam_r])dnl
])
Index: gnulib-cache.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/gnulib-cache.m4,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- gnulib-cache.m4 24 Aug 2007 18:08:07 -0000 1.15
+++ gnulib-cache.m4 15 Sep 2008 21:46:55 -0000 1.16
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2008 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,11 +15,82 @@
# 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 atexit base64
canon-host canonicalize closeout crypto/md5 dirname dup2 error exit exitfail
extensions fnmatch fnmatch-posix fseeko ftello ftruncate getdate gethostname
getline getlogin_r getndelim2 getnline getopt getpagesize getpass-gnu gettext
gettime gettimeofday glob inttypes lstat malloc mbsstr memmove minmax mkdir
mkdir-p 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
+# gnulib-tool --import --dir=. --lib=libcvs --source-base=lib --m4-base=m4
--doc-base=doc --aux-dir=build-aux --no-libtool --macro-prefix=gl
areadlink-with-size atexit base64 canon-host canonicalize closeout crypto/md5
dirname dup2 error exit exitfail extensions fnmatch fnmatch-posix fseeko ftello
ftruncate getdate gethostname getline getlogin_r getndelim2 getnline getopt
getpagesize getpass-gnu gettext gettime gettimeofday glob inttypes longlong
lstat malloc mbsstr memmove minmax mkdir mkdir-p mkstemp mktime 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([atexit base64 canon-host canonicalize closeout crypto/md5 dirname
dup2 error exit exitfail extensions fnmatch fnmatch-posix fseeko ftello
ftruncate getdate gethostname getline getlogin_r getndelim2 getnline getopt
getpagesize getpass-gnu gettext gettime gettimeofday glob inttypes lstat malloc
mbsstr memmove minmax mkdir mkdir-p 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_MODULES([
+ areadlink-with-size
+ atexit
+ base64
+ canon-host
+ canonicalize
+ closeout
+ crypto/md5
+ dirname
+ dup2
+ error
+ exit
+ exitfail
+ extensions
+ fnmatch
+ fnmatch-posix
+ fseeko
+ ftello
+ ftruncate
+ getdate
+ gethostname
+ getline
+ getlogin_r
+ getndelim2
+ getnline
+ getopt
+ getpagesize
+ getpass-gnu
+ gettext
+ gettime
+ gettimeofday
+ glob
+ inttypes
+ longlong
+ lstat
+ malloc
+ mbsstr
+ memmove
+ minmax
+ mkdir
+ mkdir-p
+ mkstemp
+ mktime
+ 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])
Index: gnulib-common.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/gnulib-common.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- gnulib-common.m4 22 Aug 2007 13:43:58 -0000 1.1
+++ gnulib-common.m4 15 Sep 2008 21:46:56 -0000 1.2
@@ -1,9 +1,28 @@
-# gnulib-common.m4 serial 2
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+# gnulib-common.m4 serial 5
+dnl Copyright (C) 2007-2008 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_COMMON
+# is expanded unconditionally through gnulib-tool magic.
+AC_DEFUN([gl_COMMON], [
+ dnl Use AC_REQUIRE here, so that the code is expanded once only.
+ AC_REQUIRE([gl_COMMON_BODY])
+])
+AC_DEFUN([gl_COMMON_BODY], [
+ AH_VERBATIM([isoc99_inline],
+[/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
+ the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
+ earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
+ __APPLE__ && __MACH__ test for MacOS X.
+ __APPLE_CC__ tests for the Apple compiler and its version.
+ __STDC_VERSION__ tests for the C99 mode. */
+#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined
__cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
+# define __GNUC_STDC_INLINE__ 1
+#endif])
+])
+
# gl_MODULE_INDICATOR([modulename])
# defines a C macro indicating the presence of the given module.
AC_DEFUN([gl_MODULE_INDICATOR],
@@ -12,6 +31,13 @@
[Define to 1 when using the gnulib module ]$1[.])
])
+# m4_foreach_w
+# is a backport of autoconf-2.59c's m4_foreach_w.
+# Remove this macro when we can assume autoconf >= 2.60.
+m4_ifndef([m4_foreach_w],
+ [m4_define([m4_foreach_w],
+ [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])])
+
# 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.
@@ -20,3 +46,46 @@
[AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
MKDIR_P='$(mkdir_p)'
AC_SUBST([MKDIR_P])])])
+
+# AC_C_RESTRICT
+# This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61,
+# so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++
+# works.
+# This definition can be removed once autoconf >= 2.62 can be assumed.
+AC_DEFUN([AC_C_RESTRICT],
+[AC_CACHE_CHECK([for C/C++ restrict keyword], ac_cv_c_restrict,
+ [ac_cv_c_restrict=no
+ # The order here caters to the fact that C++ does not require restrict.
+ for ac_kw in __restrict __restrict__ _Restrict restrict; do
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[typedef int * int_ptr;
+ int foo (int_ptr $ac_kw ip) {
+ return ip[0];
+ }]],
+ [[int s[1];
+ int * $ac_kw t = s;
+ t[0] = 0;
+ return foo(t)]])],
+ [ac_cv_c_restrict=$ac_kw])
+ test "$ac_cv_c_restrict" != no && break
+ done
+ ])
+ AH_VERBATIM([restrict],
+[/* Define to the equivalent of the C99 'restrict' keyword, or to
+ nothing if this is not supported. Do not define if restrict is
+ supported directly. */
+#undef restrict
+/* Work around a bug in Sun C++: it does not support _Restrict, even
+ though the corresponding Sun C compiler does, which causes
+ "#define restrict _Restrict" in the previous line. Perhaps some future
+ version of Sun C++ will work with _Restrict; if so, it'll probably
+ define __RESTRICT, just as Sun C does. */
+#if defined __SUNPRO_CC && !defined __RESTRICT
+# define _Restrict
+#endif])
+ case $ac_cv_c_restrict in
+ restrict) ;;
+ no) AC_DEFINE([restrict], []) ;;
+ *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;;
+ esac
+])
Index: gnulib-comp.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/gnulib-comp.m4,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- gnulib-comp.m4 27 Aug 2007 02:12:25 -0000 1.30
+++ gnulib-comp.m4 15 Sep 2008 21:46:56 -0000 1.31
@@ -1,5 +1,5 @@
# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2008 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
@@ -36,13 +36,16 @@
# "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=
+ 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]))
+ m4_pushdef([gl_LIBSOURCES_LIST], [])
+ m4_pushdef([gl_LIBSOURCES_DIR], [])
+ gl_COMMON
gl_source_base='lib'
gl_FUNC_ALLOCA
gl_HEADER_ARPA_INET
@@ -53,6 +56,7 @@
AC_FUNC_CANONICALIZE_FILE_NAME
gl_MODULE_INDICATOR([canonicalize])
gl_CANONICALIZE_LGPL
+ gl_MODULE_INDICATOR([canonicalize-lgpl])
gl_FUNC_CHDIR_LONG
gl_FUNC_CHOWN
gl_UNISTD_MODULE_INDICATOR([chown])
@@ -61,7 +65,6 @@
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
@@ -69,7 +72,13 @@
gl_DOUBLE_SLASH_ROOT
gl_FUNC_DUP2
gl_UNISTD_MODULE_INDICATOR([dup2])
+ gl_ENVIRON
+ gl_UNISTD_MODULE_INDICATOR([environ])
+ gl_HEADER_ERRNO_H
gl_ERROR
+ m4_ifdef([AM_XGETTEXT_OPTION],
+ [AM_XGETTEXT_OPTION([--flag=error:3:c-format])
+ AM_XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
gl_EXITFAIL
gl_FUNC_FCHDIR
gl_UNISTD_MODULE_INDICATOR([fchdir])
@@ -81,6 +90,7 @@
# No macro. You should also use one of fnmatch-posix or fnmatch-gnu.
gl_FUNC_FNMATCH_POSIX
gl_FUNC_FPENDING
+ AC_REQUIRE([AC_C_INLINE])
gl_FUNC_FSEEKO
gl_STDIO_MODULE_INDICATOR([fseeko])
gl_FUNC_FTELLO
@@ -101,26 +111,36 @@
gl_GETNDELIM2
gl_GETNLINE
gl_GETOPT
- gl_GETPAGESIZE
+ gl_FUNC_GETPAGESIZE
+ gl_UNISTD_MODULE_INDICATOR([getpagesize])
gl_FUNC_GETPASS_GNU
dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
- AM_GNU_GETTEXT_VERSION([0.16.1])
+ AM_GNU_GETTEXT_VERSION([0.17])
AC_SUBST([LIBINTL])
AC_SUBST([LTLIBINTL])
gl_GETTIME
gl_FUNC_GETTIMEOFDAY
gl_GLOB
+ gl_HASH
gl_INET_NTOP
+ gl_ARPA_INET_MODULE_INDICATOR([inet_ntop])
gl_INLINE
gl_INTTYPES_H
gl_FUNC_LCHMOD
gl_FUNC_LCHOWN
gl_UNISTD_MODULE_INDICATOR([lchown])
gl_LOCALCHARSET
+
LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
+ AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
gl_FUNC_LSEEK
gl_UNISTD_MODULE_INDICATOR([lseek])
gl_FUNC_LSTAT
AC_FUNC_MALLOC
+ AC_DEFINE([GNULIB_MALLOC_GNU], 1, [Define to indicate the 'malloc' module.])
+ gl_FUNC_MALLOC_POSIX
+ gl_STDLIB_MODULE_INDICATOR([malloc-posix])
gl_MALLOCA
gl_MBCHAR
gl_FUNC_MBSLEN
@@ -144,6 +164,9 @@
gl_FUNC_NANOSLEEP
gl_HEADER_NETINET_IN
AC_PROG_MKDIR_P
+ gl_FUNC_OPEN
+ gl_MODULE_INDICATOR([open])
+ gl_FCNTL_MODULE_INDICATOR([open])
gl_FUNC_OPENAT
gl_PATHMAX
gl_QUOTE
@@ -152,13 +175,23 @@
gl_FUNC_READLINK
gl_UNISTD_MODULE_INDICATOR([readlink])
AC_FUNC_REALLOC
+ AC_DEFINE([GNULIB_REALLOC_GNU], 1, [Define to indicate the 'realloc'
module.])
+ gl_FUNC_REALLOC_POSIX
+ gl_STDLIB_MODULE_INDICATOR([realloc-posix])
gl_REGEX
gl_FUNC_RENAME
gl_FUNC_RPMATCH
+ gl_STDLIB_MODULE_INDICATOR([rpmatch])
+ gl_SAME
gl_SAVE_CWD
gl_SAVEWD
gl_FUNC_SETENV
- gl_FUNC_UNSETENV
+ gl_STDLIB_MODULE_INDICATOR([setenv])
+ gl_SIGACTION
+ gl_SIGNAL_MODULE_INDICATOR([sigaction])
+ gl_SIGNAL_H
+ gl_SIGNALBLOCKING
+ gl_SIGNAL_MODULE_INDICATOR([sigprocmask])
gl_SIZE_MAX
gl_FUNC_SNPRINTF
gl_STDIO_MODULE_INDICATOR([snprintf])
@@ -172,8 +205,10 @@
gl_FUNC_STRDUP
gl_STRING_MODULE_INDICATOR([strdup])
gl_FUNC_STRERROR
+ gl_STRING_MODULE_INDICATOR([strerror])
gl_FUNC_GNU_STRFTIME
gl_HEADER_STRING_H
+ gl_HEADER_STRINGS_H
gl_FUNC_STRNDUP
gl_STRING_MODULE_INDICATOR([strndup])
gl_FUNC_STRNLEN
@@ -186,6 +221,8 @@
gl_FUNC_STRTOULL
gl_FUNC_STRTOUMAX
gl_INTTYPES_MODULE_INDICATOR([strtoumax])
+ gl_HEADER_SYS_SELECT
+ AC_PROG_MKDIR_P
gl_HEADER_SYS_SOCKET
AC_PROG_MKDIR_P
gl_HEADER_SYS_STAT_H
@@ -200,9 +237,14 @@
gl_UNISTD_H
gl_UNISTD_SAFER
gl_FUNC_GLIBC_UNLOCKED_IO
+ gl_FUNC_UNSETENV
+ gl_STDLIB_MODULE_INDICATOR([unsetenv])
gl_FUNC_VASNPRINTF
gl_FUNC_VASPRINTF
gl_STDIO_MODULE_INDICATOR([vasprintf])
+ m4_ifdef([AM_XGETTEXT_OPTION],
+ [AM_XGETTEXT_OPTION([--flag=asprintf:2:c-format])
+ AM_XGETTEXT_OPTION([--flag=vasprintf:2:c-format])])
gl_WCHAR_H
gl_WCTYPE_H
gl_FUNC_WCWIDTH
@@ -212,10 +254,19 @@
gl_XSIZE
gl_XSTRNDUP
gl_YESNO
- LIBCVS_LIBDEPS="$gl_libdeps"
- AC_SUBST([LIBCVS_LIBDEPS])
- LIBCVS_LTLIBDEPS="$gl_ltlibdeps"
- AC_SUBST([LIBCVS_LTLIBDEPS])
+ m4_ifval(gl_LIBSOURCES_LIST, [
+ m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
+ for gl_file in ]gl_LIBSOURCES_LIST[ ; do
+ if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
+ echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
+ exit 1
+ fi
+ done])dnl
+ m4_if(m4_sysval, [0], [],
+ [AC_FATAL([expected source file, required through AC_LIBSOURCES, not
found])])
+ ])
+ m4_popdef([gl_LIBSOURCES_DIR])
+ m4_popdef([gl_LIBSOURCES_LIST])
m4_popdef([AC_LIBSOURCES])
m4_popdef([AC_REPLACE_FUNCS])
m4_popdef([AC_LIBOBJ])
@@ -233,22 +284,104 @@
AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
])
+ gltests_libdeps=
+ gltests_ltlibdeps=
+ m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
+ m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
+ m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
+ m4_pushdef([gltests_LIBSOURCES_LIST], [])
+ m4_pushdef([gltests_LIBSOURCES_DIR], [])
+ gl_COMMON
+ gl_source_base='tests'
+ m4_ifval(gltests_LIBSOURCES_LIST, [
+ m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
+ for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
+ if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
+ echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
+ exit 1
+ fi
+ done])dnl
+ m4_if(m4_sysval, [0], [],
+ [AC_FATAL([expected source file, required through AC_LIBSOURCES, not
found])])
+ ])
+ m4_popdef([gltests_LIBSOURCES_DIR])
+ m4_popdef([gltests_LIBSOURCES_LIST])
+ m4_popdef([AC_LIBSOURCES])
+ m4_popdef([AC_REPLACE_FUNCS])
+ m4_popdef([AC_LIBOBJ])
+ AC_CONFIG_COMMANDS_PRE([
+ gltests_libobjs=
+ gltests_ltlibobjs=
+ if test -n "$gltests_LIBOBJS"; then
+ # Remove the extension.
+ sed_drop_objext='s/\.o$//;s/\.obj$//'
+ for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed
"$sed_drop_objext" | sort | uniq`; do
+ gltests_libobjs="$gltests_libobjs $i.$ac_objext"
+ gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
+ done
+ fi
+ AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
+ AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
+ ])
+ LIBCVS_LIBDEPS="$gl_libdeps"
+ AC_SUBST([LIBCVS_LIBDEPS])
+ LIBCVS_LTLIBDEPS="$gl_ltlibdeps"
+ AC_SUBST([LIBCVS_LTLIBDEPS])
])
# 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"])
+AC_DEFUN([gl_LIBOBJ], [
+ AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
+ 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)])])
+AC_DEFUN([gl_REPLACE_FUNCS], [
+ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
+ AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
+])
+
+# Like AC_LIBSOURCES, except the directory where the source file is
+# expected is derived from the gnulib-tool parameterization,
+# and alloca is special cased (for the alloca-opt module).
+# We could also entirely rely on EXTRA_lib..._SOURCES.
+AC_DEFUN([gl_LIBSOURCES], [
+ m4_foreach([_gl_NAME], [$1], [
+ m4_if(_gl_NAME, [alloca.c], [], [
+ m4_define([gl_LIBSOURCES_DIR], [lib])
+ m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
+ ])
+ ])
+])
+
+# Like AC_LIBOBJ, except that the module name goes
+# into gltests_LIBOBJS instead of into LIBOBJS.
+AC_DEFUN([gltests_LIBOBJ], [
+ AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
+ gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
+])
-# Like AC_LIBSOURCES, except that it does nothing.
-# We rely on EXTRA_lib..._SOURCES instead.
-AC_DEFUN([gl_LIBSOURCES],
- [])
+# Like AC_REPLACE_FUNCS, except that the module name goes
+# into gltests_LIBOBJS instead of into LIBOBJS.
+AC_DEFUN([gltests_REPLACE_FUNCS], [
+ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
+ AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
+])
+
+# Like AC_LIBSOURCES, except the directory where the source file is
+# expected is derived from the gnulib-tool parameterization,
+# and alloca is special cased (for the alloca-opt module).
+# We could also entirely rely on EXTRA_lib..._SOURCES.
+AC_DEFUN([gltests_LIBSOURCES], [
+ m4_foreach([_gl_NAME], [$1], [
+ m4_if(_gl_NAME, [alloca.c], [], [
+ m4_define([gltests_LIBSOURCES_DIR], [tests])
+ m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
+ ])
+ ])
+])
# This macro records the list of files which have been installed by
# gnulib-tool and may be removed by future gnulib-tool invocations.
@@ -256,10 +389,11 @@
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/alloca.in.h
+ lib/areadlink-with-size.c
+ lib/areadlink.h
+ lib/arpa_inet.in.h
lib/asnprintf.c
lib/asprintf.c
lib/at-func.c
@@ -267,6 +401,8 @@
lib/base64.c
lib/base64.h
lib/basename.c
+ lib/c-ctype.c
+ lib/c-ctype.h
lib/canon-host.c
lib/canon-host.h
lib/canonicalize-lgpl.c
@@ -281,18 +417,16 @@
lib/closeout.h
lib/config.charset
lib/creat-safer.c
- lib/cycle-check.c
- lib/cycle-check.h
- lib/dev-ino.h
lib/dirchownmod.c
lib/dirchownmod.h
- lib/dirent_.h
+ lib/dirent.in.h
lib/dirfd.c
lib/dirfd.h
lib/dirname.c
lib/dirname.h
lib/dup-safer.c
lib/dup2.c
+ lib/errno.in.h
lib/error.c
lib/error.h
lib/exitfail.c
@@ -303,15 +437,25 @@
lib/fchownat.c
lib/fcntl--.h
lib/fcntl-safer.h
- lib/fcntl_.h
+ lib/fcntl.in.h
lib/fd-safer.c
+ lib/file-set.c
+ lib/file-set.h
lib/filenamecat.c
lib/filenamecat.h
lib/float+.h
- lib/float_.h
+ lib/float.in.h
lib/fnmatch.c
- lib/fnmatch_.h
+ lib/fnmatch.in.h
lib/fnmatch_loop.c
+ lib/fpending.c
+ lib/fpending.h
+ lib/freadahead.c
+ lib/freadahead.h
+ lib/freadptr.c
+ lib/freadptr.h
+ lib/freadseek.c
+ lib/freadseek.h
lib/fseeko.c
lib/fstatat.c
lib/ftello.c
@@ -331,10 +475,10 @@
lib/getnline.c
lib/getnline.h
lib/getopt.c
+ lib/getopt.in.h
lib/getopt1.c
- lib/getopt_.h
lib/getopt_int.h
- lib/getpagesize.h
+ lib/getpagesize.c
lib/getpass.c
lib/getpass.h
lib/gettext.h
@@ -342,11 +486,16 @@
lib/gettimeofday.c
lib/glob-libc.h
lib/glob.c
- lib/glob_.h
+ lib/glob.in.h
+ lib/hash-pjw.c
+ lib/hash-pjw.h
+ lib/hash-triple.c
+ lib/hash-triple.h
+ lib/hash.c
+ lib/hash.h
lib/inet_ntop.c
- lib/inet_ntop.h
lib/intprops.h
- lib/inttypes_.h
+ lib/inttypes.in.h
lib/lchmod.h
lib/lchown.c
lib/localcharset.c
@@ -366,6 +515,8 @@
lib/md5.c
lib/md5.h
lib/memchr.c
+ lib/memchr2.c
+ lib/memchr2.h
lib/memmove.c
lib/mempcpy.c
lib/memrchr.c
@@ -378,11 +529,10 @@
lib/mkdirat.c
lib/mkstemp.c
lib/mktime.c
- lib/mreadlink-with-size.c
- lib/mreadlink.h
lib/nanosleep.c
- lib/netinet_in_.h
+ lib/netinet_in.in.h
lib/open-safer.c
+ lib/open.c
lib/openat-die.c
lib/openat-priv.h
lib/openat-proc.c
@@ -412,26 +562,34 @@
lib/rename.c
lib/rpmatch.c
lib/same-inode.h
+ lib/same.c
+ lib/same.h
lib/save-cwd.c
lib/save-cwd.h
lib/savewd.c
lib/savewd.h
lib/setenv.c
- lib/setenv.h
+ lib/sig-handler.h
+ lib/sigaction.c
+ lib/signal.in.h
+ lib/sigprocmask.c
lib/size_max.h
lib/snprintf.c
lib/stat-macros.h
- lib/stdbool_.h
- lib/stdint_.h
- lib/stdio_.h
- lib/stdlib_.h
+ lib/stdbool.in.h
+ lib/stdint.in.h
+ lib/stdio-impl.h
+ lib/stdio.in.h
+ lib/stdlib.in.h
+ lib/str-kmp.h
lib/strcasecmp.c
lib/strdup.c
lib/streq.h
lib/strerror.c
lib/strftime.c
lib/strftime.h
- lib/string_.h
+ lib/string.in.h
+ lib/strings.in.h
lib/stripslash.c
lib/strncasecmp.c
lib/strndup.c
@@ -444,17 +602,18 @@
lib/strtoul.c
lib/strtoull.c
lib/strtoumax.c
- lib/sys_socket_.h
- lib/sys_stat_.h
- lib/sys_time_.h
+ lib/sys_select.in.h
+ lib/sys_socket.in.h
+ lib/sys_stat.in.h
+ lib/sys_time.in.h
lib/tempname.c
lib/tempname.h
- lib/time_.h
+ lib/time.in.h
lib/time_r.c
lib/timespec.h
lib/unistd--.h
lib/unistd-safer.h
- lib/unistd_.h
+ lib/unistd.in.h
lib/unitypes.h
lib/uniwidth.h
lib/uniwidth/cjk.h
@@ -465,8 +624,8 @@
lib/vasnprintf.h
lib/vasprintf.c
lib/verify.h
- lib/wchar_.h
- lib/wctype_.h
+ lib/wchar.in.h
+ lib/wctype.in.h
lib/wcwidth.c
lib/xalloc-die.c
lib/xalloc.h
@@ -480,7 +639,6 @@
lib/xstrndup.h
lib/yesno.c
lib/yesno.h
- m4/absolute-header.m4
m4/alloca.m4
m4/arpa_inet_h.m4
m4/atexit.m4
@@ -495,7 +653,6 @@
m4/close-stream.m4
m4/closeout.m4
m4/codeset.m4
- m4/cycle-check.m4
m4/d-ino.m4
m4/d-type.m4
m4/dirfd.m4
@@ -504,7 +661,8 @@
m4/double-slash-root.m4
m4/dup2.m4
m4/eealloc.m4
- m4/eoverflow.m4
+ m4/environ.m4
+ m4/errno_h.m4
m4/error.m4
m4/exitfail.m4
m4/extensions.m4
@@ -539,6 +697,7 @@
m4/glibc21.m4
m4/glob.m4
m4/gnulib-common.m4
+ m4/hash.m4
m4/iconv.m4
m4/include_next.m4
m4/inet_ntop.m4
@@ -563,6 +722,7 @@
m4/longlong.m4
m4/lseek.m4
m4/lstat.m4
+ m4/malloc.m4
m4/malloca.m4
m4/mbchar.m4
m4/mbiter.m4
@@ -584,20 +744,27 @@
m4/nanosleep.m4
m4/netinet_in_h.m4
m4/nls.m4
+ m4/open.m4
m4/openat.m4
m4/pathmax.m4
m4/po.m4
m4/printf-posix.m4
+ m4/printf.m4
m4/progtest.m4
m4/quote.m4
m4/quotearg.m4
m4/readlink.m4
+ m4/realloc.m4
m4/regex.m4
m4/rename.m4
m4/rpmatch.m4
+ m4/same.m4
m4/save-cwd.m4
m4/savewd.m4
m4/setenv.m4
+ m4/sigaction.m4
+ m4/signal_h.m4
+ m4/signalblocking.m4
m4/size_max.m4
m4/snprintf.m4
m4/socklen.m4
@@ -613,6 +780,7 @@
m4/strerror.m4
m4/strftime.m4
m4/string_h.m4
+ m4/strings_h.m4
m4/strndup.m4
m4/strnlen.m4
m4/strtoimax.m4
@@ -621,17 +789,18 @@
m4/strtoul.m4
m4/strtoull.m4
m4/strtoumax.m4
+ m4/sys_select_h.m4
m4/sys_socket_h.m4
m4/sys_stat_h.m4
m4/sys_time_h.m4
m4/tempname.m4
+ m4/threadlib.m4
m4/time_h.m4
m4/time_r.m4
m4/timespec.m4
m4/tm_gmtoff.m4
m4/tzset.m4
m4/uintmax_t.m4
- m4/ulonglong.m4
m4/unistd-safer.m4
m4/unistd_h.m4
m4/unlocked-io.m4
Index: gnulib-tool.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/gnulib-tool.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- gnulib-tool.m4 4 Sep 2005 05:58:36 -0000 1.1
+++ gnulib-tool.m4 15 Sep 2008 21:46:56 -0000 1.2
@@ -1,4 +1,4 @@
-# gnulib-tool.m4 serial 1
+# gnulib-tool.m4 serial 2
dnl Copyright (C) 2004-2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -8,6 +8,9 @@
dnl Invoking them does nothing except to declare default arguments
dnl for "gnulib-tool --import".
+dnl Usage: gl_LOCAL_DIR([DIR])
+AC_DEFUN([gl_LOCAL_DIR], [])
+
dnl Usage: gl_MODULES([module1 module2 ...])
AC_DEFUN([gl_MODULES], [])
@@ -20,14 +23,35 @@
dnl Usage: gl_M4_BASE([DIR])
AC_DEFUN([gl_M4_BASE], [])
+dnl Usage: gl_PO_BASE([DIR])
+AC_DEFUN([gl_PO_BASE], [])
+
+dnl Usage: gl_DOC_BASE([DIR])
+AC_DEFUN([gl_DOC_BASE], [])
+
+dnl Usage: gl_TESTS_BASE([DIR])
+AC_DEFUN([gl_TESTS_BASE], [])
+
+dnl Usage: gl_WITH_TESTS
+AC_DEFUN([gl_WITH_TESTS], [])
+
dnl Usage: gl_LIB([LIBNAME])
AC_DEFUN([gl_LIB], [])
-dnl Usage: gl_LGPL
+dnl Usage: gl_LGPL or gl_LGPL([VERSION])
AC_DEFUN([gl_LGPL], [])
+dnl Usage: gl_MAKEFILE_NAME([FILENAME])
+AC_DEFUN([gl_MAKEFILE_NAME], [])
+
dnl Usage: gl_LIBTOOL
AC_DEFUN([gl_LIBTOOL], [])
dnl Usage: gl_MACRO_PREFIX([PREFIX])
AC_DEFUN([gl_MACRO_PREFIX], [])
+
+dnl Usage: gl_PO_DOMAIN([DOMAIN])
+AC_DEFUN([gl_PO_DOMAIN], [])
+
+dnl Usage: gl_VC_FILES([BOOLEAN])
+AC_DEFUN([gl_VC_FILES], [])
Index: iconv.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/iconv.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- iconv.m4 22 Aug 2007 13:43:58 -0000 1.3
+++ iconv.m4 15 Sep 2008 21:46:56 -0000 1.4
@@ -1,4 +1,4 @@
-# iconv.m4 serial AM6 (gettext-0.16.2)
+# iconv.m4 serial AM6 (gettext-0.17)
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,
Index: include_next.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/include_next.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- include_next.m4 22 Aug 2007 13:43:58 -0000 1.3
+++ include_next.m4 15 Sep 2008 21:46:56 -0000 1.4
@@ -1,11 +1,26 @@
-# include_next.m4 serial 4
-dnl Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# include_next.m4 serial 8
+dnl Copyright (C) 2006-2008 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.
+dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER.
+dnl
+dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to
+dnl 'include' otherwise.
+dnl
+dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next,
+dnl so as to avoid GCC warnings when the gcc option -pedantic is used.
+dnl '#pragma GCC system_header' has the same effect as if the file was found
+dnl through the include search path specified with '-isystem' options (as
+dnl opposed to the search path specified with '-I' options). Namely, gcc
+dnl does not warn about some things, and on some systems (Solaris and Interix)
+dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side
+dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead
+dnl of plain '__STDC__'.
+
AC_DEFUN([gl_INCLUDE_NEXT],
[
AC_LANG_PREPROC_REQUIRE()
@@ -13,8 +28,12 @@
[gl_cv_have_include_next],
[rm -rf conftestd1 conftestd2
mkdir conftestd1 conftestd2
+ dnl The include of <stdio.h> is because IBM C 9.0 on AIX 6.1 supports
+ dnl include_next when used as first preprocessor directive in a file,
+ dnl but not when preceded by another include directive.
cat <<EOF > conftestd1/conftest.h
#define DEFINED_IN_CONFTESTD1
+#include <stdio.h>
#include_next <conftest.h>
#ifdef DEFINED_IN_CONFTESTD2
int foo;
@@ -36,18 +55,17 @@
CPPFLAGS="$save_CPPFLAGS"
rm -rf conftestd1 conftestd2
])
+ PRAGMA_SYSTEM_HEADER=
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
+ if test -n "$GCC"; then
+ PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
+ fi
else
INCLUDE_NEXT=include
fi
AC_SUBST([INCLUDE_NEXT])
+ AC_SUBST([PRAGMA_SYSTEM_HEADER])
])
# gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...)
@@ -63,12 +81,15 @@
# 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.
+# Note: This macro assumes that the header file is not empty after
+# preprocessing, i.e. it does not only define preprocessor macros but also
+# provides some type/enum definitions or function/variable declarations.
AC_DEFUN([gl_CHECK_NEXT_HEADERS],
[
AC_REQUIRE([gl_INCLUDE_NEXT])
AC_CHECK_HEADERS_ONCE([$1])
- AC_FOREACH([gl_HEADER_NAME], [$1],
+ m4_foreach_w([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
Index: inet_ntop.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/inet_ntop.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- inet_ntop.m4 16 Aug 2006 18:12:09 -0000 1.2
+++ inet_ntop.m4 15 Sep 2008 21:46:56 -0000 1.3
@@ -1,19 +1,27 @@
-# inet_ntop.m4 serial 3
-dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+# inet_ntop.m4 serial 6
+dnl Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_INET_NTOP],
[
+ dnl Persuade Solaris <arpa/inet.h> to declare inet_ntop.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS])
+ ARPA_INET_H='arpa/inet.h'
+
AC_REPLACE_FUNCS(inet_ntop)
gl_PREREQ_INET_NTOP
])
-# Prerequisites of lib/inet_ntop.h and lib/inet_ntop.c.
+# Prerequisites of lib/inet_ntop.c.
AC_DEFUN([gl_PREREQ_INET_NTOP], [
- AC_CHECK_HEADERS_ONCE([netinet/in.h arpa/inet.h])
AC_CHECK_DECLS([inet_ntop],,,[#include <arpa/inet.h>])
+ if test $ac_cv_have_decl_inet_ntop = no; then
+ HAVE_DECL_INET_NTOP=0
+ fi
AC_REQUIRE([gl_SOCKET_FAMILIES])
AC_REQUIRE([AC_C_RESTRICT])
])
Index: intdiv0.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/intdiv0.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- intdiv0.m4 22 Aug 2007 13:43:58 -0000 1.3
+++ intdiv0.m4 15 Sep 2008 21:46:56 -0000 1.4
@@ -1,4 +1,4 @@
-# intdiv0.m4 serial 2 (gettext-0.16.2)
+# intdiv0.m4 serial 2 (gettext-0.17)
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,
Index: intl.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/intl.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- intl.m4 22 Aug 2007 13:43:58 -0000 1.1
+++ intl.m4 15 Sep 2008 21:46:56 -0000 1.2
@@ -1,4 +1,4 @@
-# intl.m4 serial 5 (gettext-0.16.2)
+# intl.m4 serial 8 (gettext-0.17)
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,
@@ -97,7 +97,7 @@
dnl exported variables _also_ in the static library.
if test "$enable_shared" = yes; then
case "$host_os" in
- cygwin*) is_woe32dll=yes ;;
+ mingw* | cygwin*) is_woe32dll=yes ;;
*) is_woe32dll=no ;;
esac
else
@@ -119,6 +119,18 @@
AC_CHECK_TOOL([WINDRES], [windres])
fi
+ dnl Determine whether when creating a library, "-lc" should be passed to
+ dnl libtool or not. On many platforms, it is required for the libtool option
+ dnl -no-undefined to work. On HP-UX, however, the -lc - stored by libtool
+ dnl in the *.la files - makes it impossible to create multithreaded programs,
+ dnl because libtool also reorders the -lc to come before the -pthread, and
+ dnl this disables pthread_create()
<http://docs.hp.com/en/1896/pthreads.html>.
+ case "$host_os" in
+ hpux*) LTLIBC="" ;;
+ *) LTLIBC="-lc" ;;
+ esac
+ AC_SUBST([LTLIBC])
+
dnl Rename some macros and functions used for locking.
AH_BOTTOM([
#define __libc_lock_t gl_lock_t
@@ -209,7 +221,9 @@
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));],
+ [char* cs = nl_langinfo(_NL_LOCALE_NAME(LC_MESSAGES));
+ return !cs;
+ ],
gt_cv_nl_locale_name=yes,
gt_cv_nl_locale_name=no)
])
Index: intlmacosx.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/intlmacosx.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- intlmacosx.m4 22 Aug 2007 13:43:59 -0000 1.1
+++ intlmacosx.m4 15 Sep 2008 21:46:56 -0000 1.2
@@ -1,4 +1,4 @@
-# intlmacosx.m4 serial 1 (gettext-0.16.2)
+# intlmacosx.m4 serial 1 (gettext-0.17)
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,
Index: intmax_t.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/intmax_t.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- intmax_t.m4 24 Aug 2006 01:24:14 -0000 1.4
+++ intmax_t.m4 15 Sep 2008 21:46:56 -0000 1.5
@@ -1,5 +1,5 @@
-# intmax_t.m4 serial 5
-dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc.
+# intmax_t.m4 serial 6
+dnl Copyright (C) 1997-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.
@@ -18,8 +18,8 @@
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
AC_REQUIRE([gl_AC_HEADER_STDINT_H])
if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no;
then
- AC_REQUIRE([gl_AC_TYPE_LONG_LONG])
- test $ac_cv_type_long_long = yes \
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ test $ac_cv_type_long_long_int = yes \
&& ac_type='long long' \
|| ac_type='long'
AC_DEFINE_UNQUOTED(intmax_t, $ac_type,
@@ -51,8 +51,8 @@
AC_DEFINE(HAVE_INTMAX_T, 1,
[Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
else
- AC_REQUIRE([gl_AC_TYPE_LONG_LONG])
- test $ac_cv_type_long_long = yes \
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ test $ac_cv_type_long_long_int = yes \
&& ac_type='long long' \
|| ac_type='long'
AC_DEFINE_UNQUOTED(intmax_t, $ac_type,
Index: inttypes.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/inttypes.m4,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- inttypes.m4 22 Aug 2007 13:43:59 -0000 1.6
+++ inttypes.m4 15 Sep 2008 21:46:56 -0000 1.7
@@ -1,5 +1,5 @@
-# inttypes.m4 serial 11
-dnl Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# inttypes.m4 serial 12
+dnl Copyright (C) 2006-2008 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,7 @@
&& test "$ac_cv_have_decl_strtoimax" = yes \
&& test "$ac_cv_have_decl_strtoumax" = yes; then
AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([
+ 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 */
@@ -131,7 +131,7 @@
SCNoPTR SCNuPTR SCNxPTR
#endif
;
- ])],
+ ]])],
[gl_cv_header_working_inttypes_h=yes])
fi])
@@ -174,9 +174,9 @@
I64) gltype1='__int64';;
esac
AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([#include <stdint.h>
+ [AC_LANG_PROGRAM([[#include <stdint.h>
extern intptr_t foo;
- extern $gltype1 foo;])],
+ extern $gltype1 foo;]])],
[PRIPTR_PREFIX='"'$glpfx'"'])
test -n "$PRIPTR_PREFIX" && break
done
@@ -207,11 +207,73 @@
HAVE_DECL_STRTOUMAX=0
fi
+ gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+ [INT32_MAX_LT_INTMAX_MAX],
+ [defined INT32_MAX && defined INTMAX_MAX],
+ [INT32_MAX < INTMAX_MAX],
+ [sizeof (int) < sizeof (long long int)])
+ gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+ [INT64_MAX_EQ_LONG_MAX],
+ [defined INT64_MAX],
+ [INT64_MAX == LONG_MAX],
+ [sizeof (long long int) == sizeof (long int)])
+ gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+ [UINT32_MAX_LT_UINTMAX_MAX],
+ [defined UINT32_MAX && defined UINTMAX_MAX],
+ [UINT32_MAX < UINTMAX_MAX],
+ [sizeof (unsigned int) < sizeof (unsigned long long int)])
+ gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+ [UINT64_MAX_EQ_ULONG_MAX],
+ [defined UINT64_MAX],
+ [UINT64_MAX == ULONG_MAX],
+ [sizeof (unsigned long long int) == sizeof (unsigned long int)])
+
INTTYPES_H='inttypes.h'
fi
AC_SUBST(INTTYPES_H)
])
+# Define the symbol $1 to be 1 if the condition is true, 0 otherwise.
+# If $2 is true, the condition is $3; otherwise if long long int is supported
+# approximate the condition with $4; otherwise, assume the condition is false.
+# The condition should work on all C99 platforms; the approximations should be
+# good enough to work on all practical pre-C99 platforms.
+# $2 is evaluated by the C preprocessor, $3 and $4 as compile-time constants.
+AC_DEFUN([gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION],
+[
+ AC_CACHE_CHECK([whether $3],
+ [gl_cv_test_$1],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[/* Work also in C++ mode. */
+ #define __STDC_LIMIT_MACROS 1
+
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+
+ #if $2
+ #define CONDITION ($3)
+ #elif HAVE_LONG_LONG_INT
+ #define CONDITION ($4)
+ #else
+ #define CONDITION 0
+ #endif
+ int test[CONDITION ? 1 : -1];]])],
+ [gl_cv_test_$1=yes],
+ [gl_cv_test_$1=no])])
+ if test $gl_cv_test_$1 = yes; then
+ $1=1;
+ else
+ $1=0;
+ fi
+ AC_SUBST([$1])
+])
+
AC_DEFUN([gl_INTTYPES_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
Index: lib-link.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/lib-link.m4,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- lib-link.m4 22 Aug 2007 13:43:59 -0000 1.8
+++ lib-link.m4 15 Sep 2008 21:46:56 -0000 1.9
@@ -1,5 +1,5 @@
-# lib-link.m4 serial 13 (gettext-0.16.2)
-dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
+# lib-link.m4 serial 16 (gettext-0.18)
+dnl Copyright (C) 2001-2008 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.
@@ -18,8 +18,8 @@
[
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ pushdef([Name],[translit([$1],[./-], [___])])
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
AC_LIB_LINKFLAGS_BODY([$1], [$2])
@@ -39,8 +39,8 @@
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
dnl results of this search when this library appears as a dependency.
HAVE_LIB[]NAME=yes
- undefine([Name])
- undefine([NAME])
+ popdef([NAME])
+ popdef([Name])
])
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
@@ -57,8 +57,8 @@
[
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ pushdef([Name],[translit([$1],[./-], [___])])
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
@@ -95,8 +95,8 @@
AC_SUBST([LIB]NAME)
AC_SUBST([LTLIB]NAME)
AC_SUBST([LIB]NAME[_PREFIX])
- undefine([Name])
- undefine([NAME])
+ popdef([NAME])
+ popdef([Name])
])
dnl Determine the platform dependent parameters needed to use rpath:
@@ -136,6 +136,27 @@
:, enable_rpath=yes)
])
+dnl AC_LIB_FROMPACKAGE(name, package)
+dnl declares that libname comes from the given package. The configure file
+dnl will then not have a --with-libname-prefix option but a
+dnl --with-package-prefix option. Several libraries can come from the same
+dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
+dnl macro call that searches for libname.
+AC_DEFUN([AC_LIB_FROMPACKAGE],
+[
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ define([acl_frompackage_]NAME, [$2])
+ popdef([NAME])
+ pushdef([PACK],[$2])
+ pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ define([acl_libsinpackage_]PACKUP,
+ m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[,
]],)[lib$1])
+ popdef([PACKUP])
+ popdef([PACK])
+])
+
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.
@@ -144,19 +165,23 @@
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
[
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME,
lib[$1])])
+ pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME,
[acl_libsinpackage_]PACKUP, lib[$1])])
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])])
+
pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
dnl By default, look in $includedir and $libdir.
use_additional=yes
AC_LIB_WITH_FINAL_PREFIX([
eval additional_includedir=\"$includedir\"
eval additional_libdir=\"$libdir\"
])
- AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
-[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and
DIR/lib
- --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and
libdir],
+ AC_ARG_WITH(P_A_C_K[-prefix],
+[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and
DIR/lib
+ --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir
and libdir]],
[
if test "X$withval" = "Xno"; then
use_additional=no
@@ -169,6 +194,10 @@
else
additional_includedir="$withval/include"
additional_libdir="$withval/$acl_libdirstem"
+ if test "$acl_libdirstem2" != "$acl_libdirstem" \
+ && ! test -d "$withval/$acl_libdirstem"; then
+ additional_libdir="$withval/$acl_libdirstem2"
+ fi
fi
fi
])
@@ -327,7 +356,9 @@
dnl Linking with a shared library. We attempt to hardcode its
dnl directory into the executable's runpath, unless it's the
dnl standard /usr/lib.
- if test "$enable_rpath" = no || test "X$found_dir" =
"X/usr/$acl_libdirstem"; then
+ if test "$enable_rpath" = no \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
dnl No hardcoding is needed.
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
else
@@ -418,6 +449,11 @@
LIB[]NAME[]_PREFIX="$basedir"
additional_includedir="$basedir/include"
;;
+ */$acl_libdirstem2 | */$acl_libdirstem2/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e
"s,/$acl_libdirstem2/"'*$,,'`
+ LIB[]NAME[]_PREFIX="$basedir"
+ additional_includedir="$basedir/include"
+ ;;
esac
if test "X$additional_includedir" != "X"; then
dnl Potentially add $additional_includedir to $INCNAME.
@@ -476,9 +512,11 @@
dnl 3. if it's already present in $LDFLAGS or the already
dnl constructed $LIBNAME,
dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/$acl_libdirstem";
then
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$additional_libdir" !=
"X/usr/$acl_libdirstem2"; then
haveit=
- if test "X$additional_libdir" =
"X/usr/local/$acl_libdirstem"; then
+ if test "X$additional_libdir" =
"X/usr/local/$acl_libdirstem" \
+ || test "X$additional_libdir" =
"X/usr/local/$acl_libdirstem2"; then
if test -n "$GCC"; then
case $host_os in
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
@@ -609,6 +647,11 @@
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
done
fi
+ popdef([P_A_C_K])
+ popdef([PACKLIBS])
+ popdef([PACKUP])
+ popdef([PACK])
+ popdef([NAME])
])
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
@@ -654,7 +697,8 @@
if test -n "$next"; then
dir="$next"
dnl No need to hardcode the standard /usr/lib.
- if test "X$dir" != "X/usr/$acl_libdirstem"; then
+ if test "X$dir" != "X/usr/$acl_libdirstem" \
+ && test "X$dir" != "X/usr/$acl_libdirstem2"; then
rpathdirs="$rpathdirs $dir"
fi
next=
@@ -663,7 +707,8 @@
-L) next=yes ;;
-L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
dnl No need to hardcode the standard /usr/lib.
- if test "X$dir" != "X/usr/$acl_libdirstem"; then
+ if test "X$dir" != "X/usr/$acl_libdirstem" \
+ && test "X$dir" != "X/usr/$acl_libdirstem2"; then
rpathdirs="$rpathdirs $dir"
fi
next= ;;
Index: lib-prefix.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/lib-prefix.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- lib-prefix.m4 4 Sep 2005 05:58:36 -0000 1.4
+++ lib-prefix.m4 15 Sep 2008 21:46:57 -0000 1.5
@@ -1,5 +1,5 @@
-# lib-prefix.m4 serial 5 (gettext-0.15)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
+# lib-prefix.m4 serial 6 (gettext-0.18)
+dnl Copyright (C) 2001-2005, 2008 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.
@@ -153,19 +153,52 @@
prefix="$acl_save_prefix"
])
-dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
-dnl the basename of the libdir, either "lib" or "lib64".
+dnl AC_LIB_PREPARE_MULTILIB creates
+dnl - a variable acl_libdirstem, containing the basename of the libdir, either
+dnl "lib" or "lib64" or "lib/64",
+dnl - a variable acl_libdirstem2, as a secondary possible value for
+dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
+dnl "lib/amd64".
AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
[
- dnl There is no formal standard regarding lib and lib64. The current
- dnl practice is that on a system supporting 32-bit and 64-bit instruction
- dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
- dnl libraries go under $prefix/lib. We determine the compiler's default
- dnl mode by looking at the compiler's library search path. If at least
- dnl of its elements ends in /lib64 or points to a directory whose absolute
- dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
- dnl default, namely "lib".
+ dnl There is no formal standard regarding lib and lib64.
+ dnl On glibc systems, the current practice is that on a system supporting
+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+ dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
+ dnl the compiler's default mode by looking at the compiler's library search
+ dnl path. If at least one of its elements ends in /lib64 or points to a
+ dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
+ dnl Otherwise we use the default, namely "lib".
+ dnl On Solaris systems, the current practice is that on a system supporting
+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+ dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
+ dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
+ AC_REQUIRE([AC_CANONICAL_HOST])
acl_libdirstem=lib
+ acl_libdirstem2=
+ case "$host_os" in
+ solaris*)
+ dnl See Solaris 10 Software Developer Collection > Solaris 64-bit
Developer's Guide > The Development Environment
+ dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
+ dnl "Portable Makefiles should refer to any library directories using
the 64 symbolic link."
+ dnl But we want to recognize the sparcv9 or amd64 subdirectory also if
the
+ dnl symlink is missing, so we set acl_libdirstem2 too.
+ AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
+ [AC_EGREP_CPP([sixtyfour bits], [
+#ifdef _LP64
+sixtyfour bits
+#endif
+ ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
+ ])
+ if test $gl_cv_solaris_64bit = yes; then
+ acl_libdirstem=lib/64
+ case "$host_cpu" in
+ sparc*) acl_libdirstem2=lib/sparcv9 ;;
+ i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
+ esac
+ fi
+ ;;
+ *)
searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e
's,^libraries: ,,p' | sed -e 's,^=,,'`
if test -n "$searchpath"; then
acl_save_IFS="${IFS= }"; IFS=":"
@@ -182,4 +215,7 @@
done
IFS="$acl_save_IFS"
fi
+ ;;
+ esac
+ test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
])
Index: lock.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/lock.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- lock.m4 22 Aug 2007 13:44:00 -0000 1.4
+++ lock.m4 15 Sep 2008 21:46:57 -0000 1.5
@@ -1,153 +1,15 @@
-# lock.m4 serial 6 (gettext-0.16)
-dnl Copyright (C) 2005-2006 Free Software Foundation, Inc.
+# lock.m4 serial 9 (gettext-0.18)
+dnl Copyright (C) 2005-2008 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 Tests for a multithreading library to be used.
-dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS,
-dnl USE_PTH_THREADS, USE_WIN32_THREADS
-dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use
-dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with
-dnl libtool).
-dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for
-dnl programs that really need multithread functionality. The difference
-dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak
-dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread".
-dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
-dnl multithread-safe programs.
-
-AC_DEFUN([gl_LOCK_EARLY],
-[
- AC_REQUIRE([gl_LOCK_EARLY_BODY])
-])
-
-dnl The guts of gl_LOCK_EARLY. Needs to be expanded only once.
-
-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
- dnl declarations, on AIX 5 at least. Therefore it must come early.
- AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl
- AC_BEFORE([$0], [gl_ARGP])dnl
-
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_GNU_SOURCE]) dnl needed for pthread_rwlock_t on glibc systems
- dnl Check for multithreading.
- AC_ARG_ENABLE(threads,
-AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify
multithreading API])
-AC_HELP_STRING([--disable-threads], [build without multithread safety]),
- [gl_use_threads=$enableval],
- [case "$host_os" in
- dnl Disable multithreading by default on OSF/1, because it interferes
- dnl with fork()/exec(): When msgexec is linked with -lpthread, its child
- dnl process gets an endless segmentation fault inside execvp().
- osf*) gl_use_threads=no ;;
- *) 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_DEFUN([gl_LOCK],
[
- AC_REQUIRE([gl_LOCK_EARLY_BODY])
- gl_threads_api=none
- LIBTHREAD=
- LTLIBTHREAD=
- LIBMULTITHREAD=
- LTLIBMULTITHREAD=
- if test "$gl_use_threads" != no; then
- dnl Check whether the compiler and linker support weak declarations.
- AC_MSG_CHECKING([whether imported symbols can be declared weak])
- gl_have_weak=no
- AC_TRY_LINK([extern void xyzzy ();
-#pragma weak xyzzy], [xyzzy();], [gl_have_weak=yes])
- 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>. It's added above, in gl_LOCK_EARLY_BODY.
- AC_CHECK_HEADER(pthread.h, gl_have_pthread_h=yes, gl_have_pthread_h=no)
- if test "$gl_have_pthread_h" = yes; then
- # Other possible tests:
- # -lpthreads (FSU threads, PCthreads)
- # -lgthreads
- 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
- # the second one only in libpthread, and lock.c needs it.
- AC_TRY_LINK([#include <pthread.h>],
- [pthread_mutex_lock((pthread_mutex_t*)0);
- pthread_mutexattr_init((pthread_mutexattr_t*)0);],
- [gl_have_pthread=yes])
- # Test for libpthread by looking for pthread_kill. (Not pthread_self,
- # since it is defined as a macro on OSF/1.)
- if test -n "$gl_have_pthread"; then
- # The program links fine without libpthread. But it may actually
- # need to link with libpthread in order to create multiple threads.
- AC_CHECK_LIB(pthread, pthread_kill,
- [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
- # On Solaris and HP-UX, most pthread functions exist also in libc.
- # Therefore pthread_in_use() needs to actually try to create a
- # thread: pthread_create from libc will fail, whereas
- # pthread_create will actually create a thread.
- case "$host_os" in
- solaris* | hpux*)
- AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], 1,
- [Define if the pthread_in_use() detection is hard.])
- esac
- ])
- else
- # Some library is needed. Try libpthread and libc_r.
- AC_CHECK_LIB(pthread, pthread_kill,
- [gl_have_pthread=yes
- LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
- LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread])
- if test -z "$gl_have_pthread"; then
- # For FreeBSD 4.
- AC_CHECK_LIB(c_r, pthread_kill,
- [gl_have_pthread=yes
- LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
- LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r])
- fi
- fi
- if test -n "$gl_have_pthread"; then
- gl_threads_api=posix
- AC_DEFINE([USE_POSIX_THREADS], 1,
- [Define if the POSIX multithreading library can be used.])
- if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
- if test $gl_have_weak = yes; then
- AC_DEFINE([USE_POSIX_THREADS_WEAK], 1,
- [Define if references to the POSIX multithreading library
should be made weak.])
- LIBTHREAD=
- LTLIBTHREAD=
- fi
- fi
+ AC_REQUIRE([gl_THREADLIB])
+ if test "$gl_threads_api" = posix; then
# OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the
# pthread_rwlock_* functions.
AC_CHECK_TYPE([pthread_rwlock_t],
@@ -166,89 +28,6 @@
[AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], 1,
[Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])])
fi
- fi
- fi
- if test -z "$gl_have_pthread"; then
- if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
- gl_have_solaristhread=
- gl_save_LIBS="$LIBS"
- LIBS="$LIBS -lthread"
- AC_TRY_LINK([#include <thread.h>
-#include <synch.h>],
- [thr_self();],
- [gl_have_solaristhread=yes])
- LIBS="$gl_save_LIBS"
- if test -n "$gl_have_solaristhread"; then
- gl_threads_api=solaris
- LIBTHREAD=-lthread
- LTLIBTHREAD=-lthread
- LIBMULTITHREAD="$LIBTHREAD"
- LTLIBMULTITHREAD="$LTLIBTHREAD"
- AC_DEFINE([USE_SOLARIS_THREADS], 1,
- [Define if the old Solaris multithreading library can be used.])
- if test $gl_have_weak = yes; then
- AC_DEFINE([USE_SOLARIS_THREADS_WEAK], 1,
- [Define if references to the old Solaris multithreading library
should be made weak.])
- LIBTHREAD=
- LTLIBTHREAD=
- fi
- fi
- fi
- fi
- if test "$gl_use_threads" = pth; then
- gl_save_CPPFLAGS="$CPPFLAGS"
- AC_LIB_LINKFLAGS(pth)
- gl_have_pth=
- gl_save_LIBS="$LIBS"
- LIBS="$LIBS -lpth"
- AC_TRY_LINK([#include <pth.h>], [pth_self();], gl_have_pth=yes)
- LIBS="$gl_save_LIBS"
- if test -n "$gl_have_pth"; then
- gl_threads_api=pth
- LIBTHREAD="$LIBPTH"
- LTLIBTHREAD="$LTLIBPTH"
- LIBMULTITHREAD="$LIBTHREAD"
- LTLIBMULTITHREAD="$LTLIBTHREAD"
- AC_DEFINE([USE_PTH_THREADS], 1,
- [Define if the GNU Pth multithreading library can be used.])
- if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
- if test $gl_have_weak = yes; then
- AC_DEFINE([USE_PTH_THREADS_WEAK], 1,
- [Define if references to the GNU Pth multithreading library
should be made weak.])
- LIBTHREAD=
- LTLIBTHREAD=
- fi
- fi
- else
- CPPFLAGS="$gl_save_CPPFLAGS"
- fi
- fi
- if test -z "$gl_have_pthread"; then
- if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then
- if { case "$host_os" in
- mingw*) true;;
- *) false;;
- esac
- }; then
- gl_threads_api=win32
- AC_DEFINE([USE_WIN32_THREADS], 1,
- [Define if the Win32 multithreading API can be used.])
- fi
- fi
- fi
- fi
- AC_MSG_CHECKING([for multithread API to use])
- AC_MSG_RESULT([$gl_threads_api])
- AC_SUBST(LIBTHREAD)
- AC_SUBST(LTLIBTHREAD)
- AC_SUBST(LIBMULTITHREAD)
- AC_SUBST(LTLIBMULTITHREAD)
-])
-
-AC_DEFUN([gl_LOCK],
-[
- AC_REQUIRE([gl_LOCK_EARLY])
- AC_REQUIRE([gl_LOCK_BODY])
gl_PREREQ_LOCK
])
@@ -256,56 +35,3 @@
AC_DEFUN([gl_PREREQ_LOCK], [
AC_REQUIRE([AC_C_INLINE])
])
-
-dnl Survey of platforms:
-dnl
-dnl Platform Available Compiler Supports test-lock
-dnl flavours option weak result
-dnl --------------- --------- --------- -------- ---------
-dnl Linux 2.4/glibc posix -lpthread Y OK
-dnl
-dnl GNU Hurd/glibc posix
-dnl
-dnl FreeBSD 5.3 posix -lc_r Y
-dnl posix -lkse ? Y
-dnl posix -lpthread ? Y
-dnl posix -lthr Y
-dnl
-dnl FreeBSD 5.2 posix -lc_r Y
-dnl posix -lkse Y
-dnl posix -lthr Y
-dnl
-dnl FreeBSD 4.0,4.10 posix -lc_r Y OK
-dnl
-dnl NetBSD 1.6 --
-dnl
-dnl OpenBSD 3.4 posix -lpthread Y OK
-dnl
-dnl MacOS X 10.[123] posix -lpthread Y OK
-dnl
-dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9:
OK
-dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9:
OK
-dnl
-dnl HP-UX 11 posix -lpthread N (cc) OK
-dnl Y (gcc)
-dnl
-dnl IRIX 6.5 posix -lpthread Y 0.5
-dnl
-dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK
-dnl
-dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK
-dnl -lpthread (gcc) Y
-dnl
-dnl Cygwin posix -lpthread Y OK
-dnl
-dnl Any of the above pth -lpth 0.0
-dnl
-dnl Mingw win32 N OK
-dnl
-dnl BeOS 5 --
-dnl
-dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is
-dnl turned off:
-dnl OK if all three tests terminate OK,
-dnl 0.5 if the first test terminates OK but the second one loops endlessly,
-dnl 0.0 if the first test already loops endlessly.
Index: longlong.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/longlong.m4,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- longlong.m4 22 Aug 2007 13:44:00 -0000 1.6
+++ longlong.m4 15 Sep 2008 21:46:57 -0000 1.7
@@ -1,5 +1,5 @@
-# longlong.m4 serial 10
-dnl Copyright (C) 1999-2006 Free Software Foundation, Inc.
+# longlong.m4 serial 13
+dnl Copyright (C) 1999-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,8 +7,8 @@
dnl From Paul Eggert.
# Define HAVE_LONG_LONG_INT if 'long long int' works.
-# This fixes a bug in Autoconf 2.60, but can be removed once we
-# assume 2.61 everywhere.
+# This fixes a bug in Autoconf 2.61, but can be removed once we
+# assume 2.62 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
@@ -18,16 +18,7 @@
[
AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
[AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[long long int ll = 9223372036854775807ll;
- long long int nll = -9223372036854775807LL;
- typedef int a[((-9223372036854775807LL < 0
- && 0 < 9223372036854775807ll)
- ? 1 : -1)];
- int i = 63;]],
- [[long long int llmax = 9223372036854775807ll;
- return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
- | (llmax / ll) | (llmax % ll));]])],
+ [_AC_TYPE_LONG_LONG_SNIPPET],
[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.
@@ -60,13 +51,56 @@
fi
])
-# This macro is obsolescent and should go away soon.
-AC_DEFUN([gl_AC_TYPE_LONG_LONG],
+# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
+# This fixes a bug in Autoconf 2.61, but can be removed once we
+# assume 2.62 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_REQUIRE([AC_TYPE_LONG_LONG_INT])
- ac_cv_type_long_long=$ac_cv_type_long_long_int
- if test $ac_cv_type_long_long = yes; then
- AC_DEFINE(HAVE_LONG_LONG, 1,
- [Define if you have the 'long long' type.])
+ AC_CACHE_CHECK([for unsigned long long int],
+ [ac_cv_type_unsigned_long_long_int],
+ [AC_LINK_IFELSE(
+ [_AC_TYPE_LONG_LONG_SNIPPET],
+ [ac_cv_type_unsigned_long_long_int=yes],
+ [ac_cv_type_unsigned_long_long_int=no])])
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+ AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], 1,
+ [Define to 1 if the system has the type `unsigned long long int'.])
fi
])
+
+# Expands to a C program that can be used to test for simultaneous support
+# of 'long long' and 'unsigned long long'. We don't want to say that
+# 'long long' is available if 'unsigned long long' is not, or vice versa,
+# because too many programs rely on the symmetry between signed and unsigned
+# integer types (excluding 'bool').
+AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
+[
+ AC_LANG_PROGRAM(
+ [[/* For now, do not test the preprocessor; as of 2007 there are too many
+ implementations with broken preprocessors. Perhaps this can
+ be revisited in 2012. In the meantime, code should not expect
+ #if to work with literals wider than 32 bits. */
+ /* Test literals. */
+ long long int ll = 9223372036854775807ll;
+ long long int nll = -9223372036854775807LL;
+ unsigned long long int ull = 18446744073709551615ULL;
+ /* Test constant expressions. */
+ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+ ? 1 : -1)];
+ typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+ ? 1 : -1)];
+ int i = 63;]],
+ [[/* Test availability of runtime routines for shift and division. */
+ long long int llmax = 9223372036854775807ll;
+ unsigned long long int ullmax = 18446744073709551615ull;
+ return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+ | (llmax / ll) | (llmax % ll)
+ | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+ | (ullmax / ull) | (ullmax % ull));]])
+])
Index: mbchar.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/mbchar.m4,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- mbchar.m4 22 Aug 2007 13:44:00 -0000 1.6
+++ mbchar.m4 15 Sep 2008 21:46:57 -0000 1.7
@@ -1,4 +1,4 @@
-# mbchar.m4 serial 6
+# mbchar.m4 serial 7
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,
@@ -9,5 +9,5 @@
AC_DEFUN([gl_MBCHAR],
[
- AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
])
Index: mbstate_t.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/mbstate_t.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- mbstate_t.m4 1 Mar 2005 18:15:07 -0000 1.2
+++ mbstate_t.m4 15 Sep 2008 21:46:57 -0000 1.3
@@ -1,5 +1,5 @@
-# mbstate_t.m4 serial 9
-dnl Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+# mbstate_t.m4 serial 10
+dnl Copyright (C) 2000-2002, 2008 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,9 +16,9 @@
[AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
- [AC_INCLUDES_DEFAULT
-# include <wchar.h>],
- [mbstate_t x; return sizeof x;])],
+ [AC_INCLUDES_DEFAULT[
+# include <wchar.h>]],
+ [[mbstate_t x; return sizeof x;]])],
[ac_cv_type_mbstate_t=yes],
[ac_cv_type_mbstate_t=no])])
if test $ac_cv_type_mbstate_t = yes; then
Index: md5.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/md5.m4,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- md5.m4 24 Aug 2006 01:24:14 -0000 1.5
+++ md5.m4 15 Sep 2008 21:46:57 -0000 1.6
@@ -1,5 +1,5 @@
-# md5.m4 serial 9
-dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# md5.m4 serial 10
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008 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,5 +10,6 @@
dnl Prerequisites of lib/md5.c.
AC_REQUIRE([AC_C_BIGENDIAN])
+ AC_REQUIRE([AC_C_INLINE])
:
])
Index: mempcpy.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/mempcpy.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- mempcpy.m4 22 Aug 2007 13:44:01 -0000 1.3
+++ mempcpy.m4 15 Sep 2008 21:46:57 -0000 1.4
@@ -1,4 +1,4 @@
-# mempcpy.m4 serial 7
+# mempcpy.m4 serial 9
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,
@@ -7,9 +7,9 @@
AC_DEFUN([gl_FUNC_MEMPCPY],
[
dnl Persuade glibc <string.h> to declare mempcpy().
- AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
- dnl The mempcpy() declaration in lib/string_.h uses 'restrict'.
+ dnl The mempcpy() declaration in lib/string.in.h uses 'restrict'.
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
Index: memrchr.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/memrchr.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- memrchr.m4 22 Aug 2007 13:44:01 -0000 1.4
+++ memrchr.m4 15 Sep 2008 21:46:57 -0000 1.5
@@ -1,4 +1,4 @@
-# memrchr.m4 serial 7
+# memrchr.m4 serial 8
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,
@@ -7,7 +7,7 @@
AC_DEFUN([gl_FUNC_MEMRCHR],
[
dnl Persuade glibc <string.h> to declare memrchr().
- AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_CHECK_DECLS_ONCE([memrchr])
Index: mkdir-slash.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/mkdir-slash.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- mkdir-slash.m4 25 Sep 2006 10:38:20 -0000 1.2
+++ mkdir-slash.m4 15 Sep 2008 21:46:57 -0000 1.3
@@ -1,6 +1,6 @@
-#serial 5
+#serial 6
-# Copyright (C) 2001, 2003, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004, 2006, 2008 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.
@@ -10,6 +10,7 @@
# trailing slashes.
AC_DEFUN([gl_FUNC_MKDIR_TRAILING_SLASH],
[dnl
+ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
AC_CHECK_HEADERS_ONCE(unistd.h)
AC_CACHE_CHECK([whether mkdir fails due to a trailing slash],
gl_cv_func_mkdir_trailing_slash_bug,
@@ -37,9 +38,8 @@
)
if test $gl_cv_func_mkdir_trailing_slash_bug = yes; then
+ REPLACE_MKDIR=1
AC_LIBOBJ(mkdir)
- AC_DEFINE(mkdir, rpl_mkdir,
- [Define to rpl_mkdir if the replacement function should be used.])
gl_PREREQ_MKDIR
fi
])
Index: nanosleep.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/nanosleep.m4,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- nanosleep.m4 22 Aug 2007 13:44:01 -0000 1.11
+++ nanosleep.m4 15 Sep 2008 21:46:57 -0000 1.12
@@ -1,12 +1,12 @@
-#serial 22
+#serial 25
dnl From Jim Meyering.
dnl Check for the nanosleep function.
dnl If not found, use the supplied replacement.
dnl
-# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 Free
-# Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008
+# Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -92,7 +92,7 @@
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.])
+ [Define to 1 if nanosleep mishandles large arguments.])
for ac_lib in $LIB_CLOCK_GETTIME; do
case " $LIB_NANOSLEEP " in
*" $ac_lib "*) ;;
@@ -111,6 +111,6 @@
# Prerequisites of lib/nanosleep.c.
AC_DEFUN([gl_PREREQ_NANOSLEEP],
[
- AC_CHECK_FUNCS_ONCE(siginterrupt)
AC_CHECK_HEADERS_ONCE(sys/select.h)
+ gl_PREREQ_SIG_HANDLER_H
])
Index: netinet_in_h.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/netinet_in_h.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- netinet_in_h.m4 22 Aug 2007 13:44:01 -0000 1.2
+++ netinet_in_h.m4 15 Sep 2008 21:46:57 -0000 1.3
@@ -1,5 +1,5 @@
-# netinet_in_h.m4 serial 3
-dnl Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# netinet_in_h.m4 serial 4
+dnl Copyright (C) 2006-2008 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,7 @@
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>], [])],
+ 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])
])
Index: openat.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/openat.m4,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- openat.m4 22 Aug 2007 13:44:01 -0000 1.6
+++ openat.m4 15 Sep 2008 21:46:58 -0000 1.7
@@ -1,7 +1,7 @@
-#serial 15
+#serial 16
# See if we need to use our replacement for Solaris' openat et al functions.
-dnl Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2005, 2006, 2007, 2008 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,7 @@
AC_CHECK_FUNCS_ONCE([lchmod])
AC_CHECK_FUNCS_ONCE([fdopendir])
AC_REPLACE_FUNCS([fchmodat mkdirat openat])
+ AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in
yes+yes) ;;
yes+*) AC_LIBOBJ([fstatat]);;
Index: po.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/po.m4,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- po.m4 16 Aug 2006 18:12:09 -0000 1.5
+++ po.m4 15 Sep 2008 21:46:58 -0000 1.6
@@ -1,5 +1,5 @@
-# po.m4 serial 13 (gettext-0.15)
-dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
+# po.m4 serial 15 (gettext-0.17)
+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.
@@ -27,6 +27,10 @@
AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
AC_REQUIRE([AM_NLS])dnl
+ dnl Release version of the gettext macros. This is used to ensure that
+ dnl the gettext macros and po/Makefile.in.in are in sync.
+ AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
+
dnl Perform the following tests also if --disable-nls has been given,
dnl because they are needed for "make dist" to work.
@@ -84,6 +88,10 @@
test -n "$localedir" || localedir='${datadir}/locale'
AC_SUBST([localedir])
+ dnl Support for AM_XGETTEXT_OPTION.
+ test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+ AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
+
AC_CONFIG_COMMANDS([po-directories], [[
for ac_file in $CONFIG_FILES; do
# Support "outfile[:infile[:infile...]]"
@@ -426,3 +434,16 @@
fi
mv "$ac_file.tmp" "$ac_file"
])
+
+dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
+AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
+[
+ XGETTEXT_EXTRA_OPTIONS=
+])
+
+dnl Registers an option to be passed to xgettext in the po subdirectory.
+AC_DEFUN([AM_XGETTEXT_OPTION],
+[
+ AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
+])
Index: printf-posix.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/printf-posix.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- printf-posix.m4 22 Aug 2007 13:44:01 -0000 1.3
+++ printf-posix.m4 15 Sep 2008 21:46:58 -0000 1.4
@@ -1,4 +1,4 @@
-# printf-posix.m4 serial 3 (gettext-0.16.2)
+# printf-posix.m4 serial 3 (gettext-0.17)
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,
Index: regex.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/regex.m4,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- regex.m4 22 Aug 2007 13:44:01 -0000 1.16
+++ regex.m4 15 Sep 2008 21:46:58 -0000 1.17
@@ -1,7 +1,7 @@
-#serial 47
+#serial 52
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007 Free Software Foundation, Inc.
+# 2006, 2007, 2008 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 @@
AC_CHECK_HEADERS_ONCE([locale.h])
AC_ARG_WITH([included-regex],
- [AC_HELP_STRING([--without-included-regex],
+ [AS_HELP_STRING([--without-included-regex],
[don't compile regex; this is the default on 32-bit
systems with recent-enough versions of the GNU C
Library (use with caution on other systems).
@@ -37,13 +37,13 @@
[gl_cv_func_re_compile_pattern_working],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
- [AC_INCLUDES_DEFAULT
+ [AC_INCLUDES_DEFAULT[
#if HAVE_LOCALE_H
#include <locale.h>
#endif
#include <limits.h>
#include <regex.h>
- ],
+ ]],
[[static struct re_pattern_buffer regex;
unsigned char folded_chars[UCHAR_MAX + 1];
int i;
@@ -215,8 +215,10 @@
# Prerequisites of lib/regex.c and lib/regex_internal.c.
AC_DEFUN([gl_PREREQ_REGEX],
[
- AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ AC_CHECK_HEADERS([libintl.h])
AC_CHECK_FUNCS_ONCE([isblank iswctype mbrtowc wcrtomb wcscoll])
AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
])
Index: rpmatch.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/rpmatch.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- rpmatch.m4 1 Mar 2005 18:15:07 -0000 1.4
+++ rpmatch.m4 15 Sep 2008 21:46:58 -0000 1.5
@@ -1,16 +1,32 @@
-# rpmatch.m4 serial 5
-dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# rpmatch.m4 serial 7
+dnl Copyright (C) 2002-2003, 2007-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_RPMATCH],
[
+ dnl Persuade glibc <stdlib.h> to declare rpmatch().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REPLACE_FUNCS(rpmatch)
if test $ac_cv_func_rpmatch = no; then
+ HAVE_RPMATCH=0
gl_PREREQ_RPMATCH
fi
])
# Prerequisites of lib/rpmatch.c.
-AC_DEFUN([gl_PREREQ_RPMATCH], [:])
+AC_DEFUN([gl_PREREQ_RPMATCH], [
+ AC_CACHE_CHECK([for nl_langinfo and YESEXPR], gl_cv_langinfo_yesexpr,
+ [AC_TRY_LINK([#include <langinfo.h>],
+ [char* cs = nl_langinfo(YESEXPR); return !cs;],
+ [gl_cv_langinfo_yesexpr=yes],
+ [gl_cv_langinfo_yesexpr=no])
+ ])
+ if test $gl_cv_langinfo_yesexpr = yes; then
+ AC_DEFINE([HAVE_LANGINFO_YESEXPR], 1,
+ [Define if you have <langinfo.h> and nl_langinfo(YESEXPR).])
+ fi
+])
Index: setenv.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/setenv.m4,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- setenv.m4 22 Aug 2007 13:44:01 -0000 1.5
+++ setenv.m4 15 Sep 2008 21:46:58 -0000 1.6
@@ -1,13 +1,15 @@
-# setenv.m4 serial 8
-dnl Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc.
+# setenv.m4 serial 10
+dnl Copyright (C) 2001-2004, 2006-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_SETENV],
[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_CHECK_FUNCS_ONCE([setenv])
if test $ac_cv_func_setenv = no; then
+ HAVE_SETENV=0
AC_LIBOBJ([setenv])
gl_PREREQ_SETENV
fi
@@ -16,14 +18,20 @@
# Like gl_FUNC_SETENV, except prepare for separate compilation (no AC_LIBOBJ).
AC_DEFUN([gl_FUNC_SETENV_SEPARATE],
[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_CHECK_FUNCS_ONCE([setenv])
+ if test $ac_cv_func_setenv = no; then
+ HAVE_SETENV=0
+ fi
gl_PREREQ_SETENV
])
AC_DEFUN([gl_FUNC_UNSETENV],
[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_CHECK_FUNCS([unsetenv])
if test $ac_cv_func_unsetenv = no; then
+ HAVE_UNSETENV=0
AC_LIBOBJ([unsetenv])
gl_PREREQ_UNSETENV
else
@@ -40,27 +48,8 @@
#endif
], , gt_cv_func_unsetenv_ret='int', gt_cv_func_unsetenv_ret='void')])
if test $gt_cv_func_unsetenv_ret = 'void'; then
- AC_DEFINE(VOID_UNSETENV, 1, [Define if unsetenv() returns void, not
int.])
- fi
+ VOID_UNSETENV=1
fi
-])
-
-# Check if a variable is properly declared.
-# gt_CHECK_VAR_DECL(includes,variable)
-AC_DEFUN([gt_CHECK_VAR_DECL],
-[
- define([gt_cv_var], [gt_cv_var_]$2[_declaration])
- AC_MSG_CHECKING([if $2 is properly declared])
- AC_CACHE_VAL(gt_cv_var, [
- AC_TRY_COMPILE([$1
- extern struct { int foo; } $2;],
- [$2.foo = 1;],
- gt_cv_var=no,
- gt_cv_var=yes)])
- AC_MSG_RESULT($gt_cv_var)
- if test $gt_cv_var = yes; then
- AC_DEFINE([HAVE_]translit($2, [a-z], [A-Z])[_DECL], 1,
- [Define if you have the declaration of $2.])
fi
])
@@ -68,15 +57,15 @@
AC_DEFUN([gl_PREREQ_SETENV],
[
AC_REQUIRE([AC_FUNC_ALLOCA])
+ AC_REQUIRE([gl_ENVIRON])
AC_CHECK_HEADERS_ONCE(unistd.h)
AC_CHECK_HEADERS(search.h)
AC_CHECK_FUNCS(tsearch)
- gt_CHECK_VAR_DECL([#include <unistd.h>], environ)
])
# Prerequisites of lib/unsetenv.c.
AC_DEFUN([gl_PREREQ_UNSETENV],
[
+ AC_REQUIRE([gl_ENVIRON])
AC_CHECK_HEADERS_ONCE(unistd.h)
- gt_CHECK_VAR_DECL([#include <unistd.h>], environ)
])
Index: snprintf.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/snprintf.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- snprintf.m4 22 Aug 2007 13:44:02 -0000 1.2
+++ snprintf.m4 15 Sep 2008 21:46:59 -0000 1.3
@@ -1,5 +1,5 @@
-# snprintf.m4 serial 4
-dnl Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+# snprintf.m4 serial 5
+dnl Copyright (C) 2002-2004, 2007-2008 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,8 +7,17 @@
AC_DEFUN([gl_FUNC_SNPRINTF],
[
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ gl_cv_func_snprintf_usable=no
AC_CHECK_FUNCS([snprintf])
- if test $ac_cv_func_snprintf = no; then
+ if test $ac_cv_func_snprintf = yes; then
+ gl_SNPRINTF_SIZE1
+ case "$gl_cv_func_snprintf_size1" in
+ *yes)
+ gl_cv_func_snprintf_usable=yes
+ ;;
+ esac
+ fi
+ if test $gl_cv_func_snprintf_usable = no; then
gl_REPLACE_SNPRINTF
fi
AC_CHECK_DECLS_ONCE([snprintf])
Index: socklen.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/socklen.m4,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- socklen.m4 22 Aug 2007 13:44:02 -0000 1.5
+++ socklen.m4 15 Sep 2008 21:46:59 -0000 1.6
@@ -1,4 +1,4 @@
-# socklen.m4 serial 5
+# socklen.m4 serial 6
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,
@@ -12,7 +12,7 @@
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 sys_socket_.h, which
+dnl it there first. That file is included by gnulib's sys_socket.in.h, which
dnl all users of this module should include. Cygwin must not include
dnl ws2tcpip.h.
AC_DEFUN([gl_TYPE_SOCKLEN_T],
Index: stdint.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/stdint.m4,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- stdint.m4 22 Aug 2007 13:44:02 -0000 1.16
+++ stdint.m4 15 Sep 2008 21:46:59 -0000 1.17
@@ -1,5 +1,5 @@
-# stdint.m4 serial 28
-dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
+# stdint.m4 serial 31
+dnl Copyright (C) 2001-2008 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.
@@ -240,7 +240,7 @@
dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
dnl config.h.in,
dnl - extra AC_SUBST calls, so that the right substitutions are made.
- AC_FOREACH([gltype], [$1],
+ m4_foreach_w([gltype], [$1],
[AH_TEMPLATE([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz
],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
[Define to the number of bits in type ']gltype['.])])
for gltype in $1 ; do
@@ -265,7 +265,7 @@
AC_DEFINE_UNQUOTED([BITSIZEOF_${GLTYPE}], [$result])
eval BITSIZEOF_${GLTYPE}=\$result
done
- AC_FOREACH([gltype], [$1],
+ m4_foreach_w([gltype], [$1],
[AC_SUBST([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz
],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
])
@@ -278,7 +278,7 @@
dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
dnl config.h.in,
dnl - extra AC_SUBST calls, so that the right substitutions are made.
- AC_FOREACH([gltype], [$1],
+ m4_foreach_w([gltype], [$1],
[AH_TEMPLATE([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz
],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
[Define to 1 if ']gltype[' is a signed integer type.])])
for gltype in $1 ; do
@@ -298,7 +298,7 @@
eval HAVE_SIGNED_${GLTYPE}=0
fi
done
- AC_FOREACH([gltype], [$1],
+ m4_foreach_w([gltype], [$1],
[AC_SUBST([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz
],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
])
@@ -311,7 +311,7 @@
dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
dnl config.h.in,
dnl - extra AC_SUBST calls, so that the right substitutions are made.
- AC_FOREACH([gltype], [$1],
+ m4_foreach_w([gltype], [$1],
[AH_TEMPLATE(translit(gltype,[abcdefghijklmnopqrstuvwxyz
],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX],
[Define to l, ll, u, ul, ull, etc., as suitable for
constants of type ']gltype['.])])
@@ -337,9 +337,9 @@
ui64)gltype1='unsigned __int64';;
esac
AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([$2
+ [AC_LANG_PROGRAM([$2[
extern $gltype foo;
- extern $gltype1 foo;])],
+ extern $gltype1 foo;]])],
[eval gl_cv_type_${gltype}_suffix=\$glsuf])
eval result=\$gl_cv_type_${gltype}_suffix
test "$result" != no && break
@@ -350,7 +350,7 @@
eval ${GLTYPE}_SUFFIX=\$result
AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], $result)
done
- AC_FOREACH([gltype], [$1],
+ m4_foreach_w([gltype], [$1],
[AC_SUBST(translit(gltype,[abcdefghijklmnopqrstuvwxyz
],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])])
])
@@ -370,7 +370,7 @@
dnl gl_STDINT_TYPE_PROPERTIES
dnl Compute HAVE_SIGNED_t, BITSIZEOF_t and t_SUFFIX, for all the types t
-dnl of interest to stdint_.h.
+dnl of interest to stdint.in.h.
AC_DEFUN([gl_STDINT_TYPE_PROPERTIES],
[
gl_STDINT_BITSIZEOF([ptrdiff_t sig_atomic_t size_t wchar_t wint_t],
Index: stdio_h.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/stdio_h.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- stdio_h.m4 27 Aug 2007 02:12:26 -0000 1.2
+++ stdio_h.m4 15 Sep 2008 21:46:59 -0000 1.3
@@ -1,5 +1,5 @@
-# stdio_h.m4 serial 7
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+# stdio_h.m4 serial 12
+dnl Copyright (C) 2007-2008 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,6 +28,10 @@
GNULIB_VSNPRINTF=0; AC_SUBST([GNULIB_VSNPRINTF])
GNULIB_VSPRINTF_POSIX=0; AC_SUBST([GNULIB_VSPRINTF_POSIX])
GNULIB_VASPRINTF=0; AC_SUBST([GNULIB_VASPRINTF])
+ GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF])
+ GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
+ GNULIB_FOPEN=0; AC_SUBST([GNULIB_FOPEN])
+ GNULIB_FREOPEN=0; AC_SUBST([GNULIB_FREOPEN])
GNULIB_FSEEK=0; AC_SUBST([GNULIB_FSEEK])
GNULIB_FSEEKO=0; AC_SUBST([GNULIB_FSEEKO])
GNULIB_FTELL=0; AC_SUBST([GNULIB_FTELL])
@@ -35,6 +39,7 @@
GNULIB_FFLUSH=0; AC_SUBST([GNULIB_FFLUSH])
GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM])
GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE])
+ GNULIB_PERROR=0; AC_SUBST([GNULIB_PERROR])
dnl Assume proper GNU behavior unless another module says otherwise.
REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF])
REPLACE_VFPRINTF=0; AC_SUBST([REPLACE_VFPRINTF])
@@ -48,6 +53,10 @@
REPLACE_VSPRINTF=0; AC_SUBST([REPLACE_VSPRINTF])
HAVE_VASPRINTF=1; AC_SUBST([HAVE_VASPRINTF])
REPLACE_VASPRINTF=0; AC_SUBST([REPLACE_VASPRINTF])
+ HAVE_DECL_OBSTACK_PRINTF=1; AC_SUBST([HAVE_DECL_OBSTACK_PRINTF])
+ REPLACE_OBSTACK_PRINTF=0; AC_SUBST([REPLACE_OBSTACK_PRINTF])
+ REPLACE_FOPEN=0; AC_SUBST([REPLACE_FOPEN])
+ REPLACE_FREOPEN=0; AC_SUBST([REPLACE_FREOPEN])
HAVE_FSEEKO=1; AC_SUBST([HAVE_FSEEKO])
REPLACE_FSEEKO=0; AC_SUBST([REPLACE_FSEEKO])
REPLACE_FSEEK=0; AC_SUBST([REPLACE_FSEEK])
@@ -58,6 +67,7 @@
HAVE_DECL_GETDELIM=1; AC_SUBST([HAVE_DECL_GETDELIM])
HAVE_DECL_GETLINE=1; AC_SUBST([HAVE_DECL_GETLINE])
REPLACE_GETLINE=0; AC_SUBST([REPLACE_GETLINE])
+ REPLACE_PERROR=0; AC_SUBST([REPLACE_PERROR])
])
dnl Code shared by fseeko and ftello. Determine if large files are supported,
@@ -66,17 +76,16 @@
[
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 */
+ [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])],
+ fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
+ it is easier to do a version check than building a runtime test. */
+# include <cygwin/version.h>
+# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
+ choke me
+# endif
+#endif]])],
[gl_cv_var_stdin_large_offset=yes],
[gl_cv_var_stdin_large_offset=no])])
])
Index: stdlib_h.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/stdlib_h.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- stdlib_h.m4 22 Aug 2007 13:44:02 -0000 1.1
+++ stdlib_h.m4 15 Sep 2008 21:46:59 -0000 1.2
@@ -1,5 +1,5 @@
-# stdlib_h.m4 serial 2
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+# stdlib_h.m4 serial 7
+dnl Copyright (C) 2007, 2008 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.
@@ -19,11 +19,29 @@
AC_DEFUN([gl_STDLIB_H_DEFAULTS],
[
+ GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX])
+ GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
+ GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX])
GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT])
GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP])
GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP])
+ GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV])
+ GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH])
+ GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV])
+ GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD])
+ GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV])
dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_CALLOC_POSIX=1; AC_SUBST([HAVE_CALLOC_POSIX])
HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT])
+ HAVE_MALLOC_POSIX=1; AC_SUBST([HAVE_MALLOC_POSIX])
HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP])
+ HAVE_REALLOC_POSIX=1; AC_SUBST([HAVE_REALLOC_POSIX])
+ HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH])
+ HAVE_SETENV=1; AC_SUBST([HAVE_SETENV])
+ HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD])
+ HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV])
REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
+ REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
+ REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD])
+ VOID_UNSETENV=0; AC_SUBST([VOID_UNSETENV])
])
Index: strcase.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/strcase.m4,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- strcase.m4 22 Aug 2007 13:44:02 -0000 1.5
+++ strcase.m4 15 Sep 2008 21:46:59 -0000 1.6
@@ -1,5 +1,5 @@
-# strcase.m4 serial 8
-dnl Copyright (C) 2002, 2005-2007 Free Software Foundation, Inc.
+# strcase.m4 serial 9
+dnl Copyright (C) 2002, 2005-2008 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,7 +12,7 @@
AC_DEFUN([gl_FUNC_STRCASECMP],
[
- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
AC_REPLACE_FUNCS(strcasecmp)
if test $ac_cv_func_strcasecmp = no; then
HAVE_STRCASECMP=0
@@ -22,7 +22,7 @@
AC_DEFUN([gl_FUNC_STRNCASECMP],
[
- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
AC_REPLACE_FUNCS(strncasecmp)
if test $ac_cv_func_strncasecmp = no; then
gl_PREREQ_STRNCASECMP
Index: strerror.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/strerror.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- strerror.m4 22 Aug 2007 13:44:03 -0000 1.3
+++ strerror.m4 15 Sep 2008 21:46:59 -0000 1.4
@@ -1,26 +1,68 @@
-# strerror.m4 serial 3
-dnl Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+# strerror.m4 serial 9
+dnl Copyright (C) 2002, 2007-2008 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_CHECK_FUNCS_ONCE([strerror])
- if test $ac_cv_func_strerror = no; then
+ AC_REQUIRE([gl_FUNC_STRERROR_SEPARATE])
+ if test $REPLACE_STRERROR = 1; then
AC_LIBOBJ([strerror])
- gl_PREREQ_STRERROR
+ AC_DEFINE_UNQUOTED([REPLACE_STRERROR], [$REPLACE_STRERROR],
+ [Define this to 1 if strerror is broken.])
fi
])
# Like gl_FUNC_STRERROR, except prepare for separate compilation (no
AC_LIBOBJ).
AC_DEFUN([gl_FUNC_STRERROR_SEPARATE],
[
- AC_CHECK_FUNCS_ONCE([strerror])
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REQUIRE([gl_HEADER_ERRNO_H])
+ if test -z "$ERRNO_H"; then
+ AC_CACHE_CHECK([for working strerror function],
+ [gl_cv_func_working_strerror],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <string.h>
+ ]],
+ [[return !*strerror (-2);]])],
+ [gl_cv_func_working_strerror=yes],
+ [gl_cv_func_working_strerror=no],
+ [dnl Assume crossbuild works if it compiles.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <string.h>
+ ]],
+ [[return !*strerror (-2);]])],
+ [gl_cv_func_working_strerror=yes],
+ [gl_cv_func_working_strerror=no])
+ ])
+ ])
+ if test $gl_cv_func_working_strerror = no; then
+ dnl The system's strerror() fails to return a string for out-of-range
+ dnl integers. Replace it.
+ REPLACE_STRERROR=1
+ fi
+ else
+ dnl The system's strerror() cannot know about the new errno values we add
+ dnl to <errno.h>. Replace it.
+ REPLACE_STRERROR=1
+ fi
+ if test $REPLACE_STRERROR = 1; then
gl_PREREQ_STRERROR
+ fi
])
# Prerequisites of lib/strerror.c.
AC_DEFUN([gl_PREREQ_STRERROR], [
- :
+ AC_CHECK_DECLS([strerror])
+ AC_CHECK_HEADERS_ONCE([sys/socket.h])
+ if test $ac_cv_header_sys_socket_h != yes; then
+ 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])
+ fi
])
Index: string_h.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/string_h.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- string_h.m4 22 Aug 2007 13:44:03 -0000 1.1
+++ string_h.m4 15 Sep 2008 21:46:59 -0000 1.2
@@ -1,10 +1,12 @@
# Configure a GNU-like replacement for <string.h>.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008 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.
+# serial 5
+
# Written by Paul Eggert.
AC_DEFUN([gl_HEADER_STRING_H],
@@ -33,6 +35,7 @@
GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM])
GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY])
GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR])
+ GNULIB_RAWMEMCHR=0; AC_SUBST([GNULIB_RAWMEMCHR])
GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY])
GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY])
GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL])
@@ -41,6 +44,7 @@
GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN])
GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK])
GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP])
+ GNULIB_STRSTR=0; AC_SUBST([GNULIB_STRSTR])
GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR])
GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R])
GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN])
@@ -57,14 +61,16 @@
GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN])
GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP])
GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R])
+ GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR])
+ GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL])
+ GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP])
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_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR])
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])
@@ -74,4 +80,12 @@
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])
+ HAVE_DECL_STRERROR=1; AC_SUBST([HAVE_DECL_STRERROR])
+ HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL])
+ HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP])
+ REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR])
+ REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL])
+ REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM])
+ REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR])
+ REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR])
])
Index: strndup.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/strndup.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- strndup.m4 22 Aug 2007 13:44:03 -0000 1.4
+++ strndup.m4 15 Sep 2008 21:47:00 -0000 1.5
@@ -1,5 +1,5 @@
-# strndup.m4 serial 13
-dnl Copyright (C) 2002-2003, 2005-2007 Free Software Foundation, Inc.
+# strndup.m4 serial 15
+dnl Copyright (C) 2002-2003, 2005-2008 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,7 +7,7 @@
AC_DEFUN([gl_FUNC_STRNDUP],
[
dnl Persuade glibc <string.h> to declare strndup().
- AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_CHECK_DECLS_ONCE([strndup])
@@ -18,8 +18,8 @@
# AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
AC_CACHE_CHECK([for working strndup], gl_cv_func_strndup,
[AC_RUN_IFELSE([
- AC_LANG_PROGRAM([#include <string.h>
- #include <stdlib.h>], [[
+ AC_LANG_PROGRAM([[#include <string.h>
+ #include <stdlib.h>]], [[
#ifndef HAVE_DECL_STRNDUP
extern char *strndup (const char *, size_t);
#endif
Index: strnlen.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/strnlen.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- strnlen.m4 22 Aug 2007 13:44:03 -0000 1.3
+++ strnlen.m4 15 Sep 2008 21:47:00 -0000 1.4
@@ -1,4 +1,4 @@
-# strnlen.m4 serial 8
+# strnlen.m4 serial 9
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,
@@ -7,7 +7,7 @@
AC_DEFUN([gl_FUNC_STRNLEN],
[
dnl Persuade glibc <string.h> to declare strnlen().
- AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_CHECK_DECLS_ONCE([strnlen])
@@ -17,7 +17,7 @@
AC_FUNC_STRNLEN
if test $ac_cv_func_strnlen_working = no; then
- # This is necessary because automake-1.6.1 doens't understand
+ # This is necessary because automake-1.6.1 doesn't understand
# that the above use of AC_FUNC_STRNLEN means we may have to use
# lib/strnlen.c.
#AC_LIBOBJ(strnlen)
Index: strtoimax.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/strtoimax.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- strtoimax.m4 21 Aug 2006 19:22:22 -0000 1.2
+++ strtoimax.m4 15 Sep 2008 21:47:00 -0000 1.3
@@ -11,15 +11,15 @@
AC_REQUIRE([AC_PROG_EGREP])
AC_CACHE_CHECK([whether <inttypes.h> defines strtoimax as a macro],
- jm_cv_func_strtoimax_macro,
+ gl_cv_func_strtoimax_macro,
[AC_EGREP_CPP([inttypes_h_defines_strtoimax], [#include <inttypes.h>
#ifdef strtoimax
inttypes_h_defines_strtoimax
#endif],
- jm_cv_func_strtoimax_macro=yes,
- jm_cv_func_strtoimax_macro=no)])
+ gl_cv_func_strtoimax_macro=yes,
+ gl_cv_func_strtoimax_macro=no)])
- if test "$jm_cv_func_strtoimax_macro" != yes; then
+ if test "$gl_cv_func_strtoimax_macro" != yes; then
AC_REPLACE_FUNCS(strtoimax)
if test $ac_cv_func_strtoimax = no; then
gl_PREREQ_STRTOIMAX
Index: strtoumax.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/strtoumax.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- strtoumax.m4 21 Aug 2006 19:22:22 -0000 1.2
+++ strtoumax.m4 15 Sep 2008 21:47:00 -0000 1.3
@@ -11,15 +11,15 @@
AC_REQUIRE([AC_PROG_EGREP])
AC_CACHE_CHECK([whether <inttypes.h> defines strtoumax as a macro],
- jm_cv_func_strtoumax_macro,
+ gl_cv_func_strtoumax_macro,
[AC_EGREP_CPP([inttypes_h_defines_strtoumax], [#include <inttypes.h>
#ifdef strtoumax
inttypes_h_defines_strtoumax
#endif],
- jm_cv_func_strtoumax_macro=yes,
- jm_cv_func_strtoumax_macro=no)])
+ gl_cv_func_strtoumax_macro=yes,
+ gl_cv_func_strtoumax_macro=no)])
- if test "$jm_cv_func_strtoumax_macro" != yes; then
+ if test "$gl_cv_func_strtoumax_macro" != yes; then
AC_REPLACE_FUNCS(strtoumax)
if test $ac_cv_func_strtoumax = no; then
gl_PREREQ_STRTOUMAX
Index: sys_socket_h.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/sys_socket_h.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- sys_socket_h.m4 22 Aug 2007 13:44:03 -0000 1.3
+++ sys_socket_h.m4 15 Sep 2008 21:47:00 -0000 1.4
@@ -1,5 +1,5 @@
-# sys_socket_h.m4 serial 4
-dnl Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+# sys_socket_h.m4 serial 6
+dnl Copyright (C) 2005-2008 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,18 +8,39 @@
AC_DEFUN([gl_HEADER_SYS_SOCKET],
[
+ AC_REQUIRE([AC_C_INLINE])
+
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>], [])],
+ 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=''
+ dnl If the shutdown function exists, <sys/socket.h> should define
+ dnl SHUT_RD, SHUT_WR, SHUT_RDWR.
+ AC_CHECK_FUNCS([shutdown])
+ if test $ac_cv_func_shutdown = yes; then
+ AC_CACHE_CHECK([whether <sys/socket.h> defines the SHUT_* macros],
+ [gl_cv_header_sys_socket_h_shut],
+ [
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <sys/socket.h>]],
+ [[int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };]])],
+ [gl_cv_header_sys_socket_h_shut=yes],
+ [gl_cv_header_sys_socket_h_shut=no])
+ ])
+ if test $gl_cv_header_sys_socket_h_shut = no; then
+ SYS_SOCKET_H='sys/socket.h'
+ fi
+ fi
else
SYS_SOCKET_H='sys/socket.h'
-
+ fi
+ if test -n "$SYS_SOCKET_H"; then
+ dnl Check prerequisites of the <sys/socket.h> replacement.
gl_CHECK_NEXT_HEADERS([sys/socket.h])
if test $ac_cv_header_sys_socket_h = yes; then
HAVE_SYS_SOCKET_H=1
Index: sys_stat_h.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/sys_stat_h.m4,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- sys_stat_h.m4 22 Aug 2007 13:44:03 -0000 1.5
+++ sys_stat_h.m4 15 Sep 2008 21:47:00 -0000 1.6
@@ -1,5 +1,5 @@
-# sys_stat_h.m4 serial 6 -*- Autoconf -*-
-dnl Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# sys_stat_h.m4 serial 8 -*- Autoconf -*-
+dnl Copyright (C) 2006-2008 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,8 @@
AC_DEFUN([gl_HEADER_SYS_STAT_H],
[
+ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+
dnl Check for lstat. Systems that lack it (mingw) also lack symlinks, so
dnl stat is a good replacement.
AC_CHECK_FUNCS_ONCE([lstat])
@@ -19,24 +21,7 @@
fi
AC_SUBST([HAVE_LSTAT])
- dnl Check for mkdir. Mingw has _mkdir(name) in the nonstandard <io.h>
- dnl instead.
- AC_CHECK_DECLS([mkdir],
- [],
- [AC_CHECK_HEADERS([io.h])],
- [#include <sys/stat.h>])
- if test $ac_cv_have_decl_mkdir = yes; then
- HAVE_DECL_MKDIR=1
- else
- HAVE_DECL_MKDIR=0
- fi
- 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])
+ dnl For the mkdir substitute.
AC_REQUIRE([AC_C_INLINE])
dnl Check for broken stat macros.
@@ -45,4 +30,26 @@
gl_CHECK_NEXT_HEADERS([sys/stat.h])
SYS_STAT_H='sys/stat.h'
AC_SUBST([SYS_STAT_H])
+
+ dnl Define types that are supposed to be defined in <sys/types.h> or
+ dnl <sys/stat.h>.
+ AC_CHECK_TYPE([nlink_t], [],
+ [AC_DEFINE([nlink_t], [int],
+ [Define to the type of st_nlink in struct stat, or a supertype.])],
+ [#include <sys/types.h>
+ #include <sys/stat.h>])
+
]) # gl_HEADER_SYS_STAT_H
+
+AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
+[
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ REPLACE_MKDIR=0; AC_SUBST([REPLACE_MKDIR])
+])
Index: time_h.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/time_h.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- time_h.m4 22 Aug 2007 13:44:03 -0000 1.1
+++ time_h.m4 15 Sep 2008 21:47:00 -0000 1.2
@@ -65,7 +65,7 @@
[[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
+ if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
fi
fi
Index: time_r.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/time_r.m4,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- time_r.m4 22 Aug 2007 13:44:03 -0000 1.7
+++ time_r.m4 15 Sep 2008 21:47:00 -0000 1.8
@@ -1,6 +1,6 @@
dnl Reentrant time functions like localtime_r.
-dnl Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2006, 2007, 2008 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.
@@ -23,7 +23,9 @@
even though the POSIX signature has the 'restrict's,
since C99 says they can't affect type compatibility. */
struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
- if (ptr) return 0;],
+ if (ptr) return 0;
+ /* Check the return type is a pointer. On HP-UX 10 it is 'int'. */
+ *localtime_r (0, 0);],
[gl_cv_time_r_posix=yes],
[gl_cv_time_r_posix=no])])
if test $gl_cv_time_r_posix = yes; then
Index: uintmax_t.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/uintmax_t.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- uintmax_t.m4 1 Mar 2005 18:15:07 -0000 1.3
+++ uintmax_t.m4 15 Sep 2008 21:47:00 -0000 1.4
@@ -1,5 +1,5 @@
-# uintmax_t.m4 serial 9
-dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
+# uintmax_t.m4 serial 10
+dnl Copyright (C) 1997-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.
@@ -16,8 +16,8 @@
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
AC_REQUIRE([gl_AC_HEADER_STDINT_H])
if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no;
then
- AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG])
- test $ac_cv_type_unsigned_long_long = yes \
+ AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+ test $ac_cv_type_unsigned_long_long_int = yes \
&& ac_type='unsigned long long' \
|| ac_type='unsigned long'
AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
Index: unistd_h.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/unistd_h.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- unistd_h.m4 22 Aug 2007 13:44:04 -0000 1.2
+++ unistd_h.m4 15 Sep 2008 21:47:01 -0000 1.3
@@ -1,5 +1,5 @@
-# unistd_h.m4 serial 9
-dnl Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# unistd_h.m4 serial 11
+dnl Copyright (C) 2006-2008 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.
@@ -34,10 +34,12 @@
[
GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN])
GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2])
+ GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON])
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_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE])
GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN])
GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK])
GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK])
@@ -45,12 +47,17 @@
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_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE])
HAVE_READLINK=1; AC_SUBST([HAVE_READLINK])
HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP])
+ HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON])
HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
+ HAVE_OS_H=0; AC_SUBST([HAVE_OS_H])
+ HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H])
REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN])
REPLACE_FCHDIR=0; AC_SUBST([REPLACE_FCHDIR])
REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
+ REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE])
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.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- vasnprintf.m4 22 Aug 2007 13:44:04 -0000 1.4
+++ vasnprintf.m4 15 Sep 2008 21:47:01 -0000 1.5
@@ -1,12 +1,11 @@
-# vasnprintf.m4 serial 20
-dnl Copyright (C) 2002-2004, 2006-2007 Free Software Foundation, Inc.
+# vasnprintf.m4 serial 25
+dnl Copyright (C) 2002-2004, 2006-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_VASNPRINTF],
[
- AC_REQUIRE([gl_EOVERFLOW])
AC_CHECK_FUNCS_ONCE([vasnprintf])
if test $ac_cv_func_vasnprintf = no; then
gl_REPLACE_VASNPRINTF
@@ -45,7 +44,10 @@
AC_REQUIRE([gt_TYPE_WCHAR_T])
AC_REQUIRE([gt_TYPE_WINT_T])
AC_REQUIRE([AC_TYPE_SIZE_T])
- AC_CHECK_TYPES(ptrdiff_t)
+ 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_REQUIRE([gt_AC_TYPE_INTMAX_T])
])
@@ -163,6 +165,21 @@
esac
])
+# Extra prerequisites of lib/vasnprintf.c for supporting the '-' flag.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST],
+[
+ AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST])
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_FLAG_LEFTADJUST], 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],
[
@@ -178,6 +195,49 @@
esac
])
+# Extra prerequisites of lib/vasnprintf.c for supporting large precisions.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_PRECISION],
+[
+ AC_REQUIRE([gl_PRINTF_PRECISION])
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_UNBOUNDED_PRECISION], 1,
+ [Define if the vasnprintf implementation needs special code for
+ supporting large precisions without arbitrary bounds.])
+ AC_DEFINE([NEED_PRINTF_DOUBLE], 1,
+ [Define if the vasnprintf implementation needs special code for
+ 'double' arguments.])
+ 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 surviving out-of-memory
+# conditions.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_ENOMEM],
+[
+ AC_REQUIRE([gl_PRINTF_ENOMEM])
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_ENOMEM], 1,
+ [Define if the vasnprintf implementation needs special code for
+ surviving out-of-memory conditions.])
+ AC_DEFINE([NEED_PRINTF_DOUBLE], 1,
+ [Define if the vasnprintf implementation needs special code for
+ 'double' arguments.])
+ AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], 1,
+ [Define if the vasnprintf implementation needs special code for
+ 'long double' arguments.])
+ ;;
+ esac
+])
+
# Prerequisites of lib/vasnprintf.c including all extras for POSIX compliance.
AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_EXTRAS],
[
@@ -188,7 +248,10 @@
gl_PREREQ_VASNPRINTF_DIRECTIVE_A
gl_PREREQ_VASNPRINTF_DIRECTIVE_F
gl_PREREQ_VASNPRINTF_FLAG_GROUPING
+ gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
gl_PREREQ_VASNPRINTF_FLAG_ZERO
+ gl_PREREQ_VASNPRINTF_PRECISION
+ gl_PREREQ_VASNPRINTF_ENOMEM
])
# Prerequisites of lib/asnprintf.c.
Index: vasprintf.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/vasprintf.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- vasprintf.m4 22 Aug 2007 13:44:04 -0000 1.4
+++ vasprintf.m4 15 Sep 2008 21:47:01 -0000 1.5
@@ -1,4 +1,4 @@
-# vasprintf.m4 serial 5
+# vasprintf.m4 serial 6
dnl Copyright (C) 2002-2003, 2006-2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -31,7 +31,7 @@
AC_DEFUN([gl_PREREQ_VASPRINTF_H],
[
dnl Persuade glibc <stdio.h> to declare asprintf() and vasprintf().
- AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
])
# Prerequisites of lib/vasprintf.c.
Index: wctype.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/wctype.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- wctype.m4 22 Aug 2007 13:44:04 -0000 1.1
+++ wctype.m4 15 Sep 2008 21:47:01 -0000 1.2
@@ -1,6 +1,8 @@
+# wctype.m4 serial 2
+
dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
-dnl Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2008 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 +11,7 @@
AC_DEFUN([gl_WCTYPE_H],
[
+ AC_REQUIRE([AC_PROG_CC])
AC_CHECK_FUNCS_ONCE([iswcntrl])
if test $ac_cv_func_iswcntrl = yes; then
HAVE_ISWCNTRL=1
@@ -30,8 +33,28 @@
WCTYPE_H=wctype.h
if test $ac_cv_header_wctype_h = yes; then
if test $ac_cv_func_iswcntrl = yes; then
+ dnl Linux libc5 has an iswprint function that returns 0 for all
arguments.
+ dnl The other functions are likely broken in the same way.
+ AC_CACHE_CHECK([whether iswcntrl works], [gl_cv_func_iswcntrl_works],
+ [
+ AC_TRY_RUN([#include <stddef.h>
+ #include <stdio.h>
+ #include <time.h>
+ #include <wchar.h>
+ #include <wctype.h>
+ int main () { return iswprint ('x') == 0; }],
+ [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no],
+ [AC_TRY_COMPILE([#include <stdlib.h>
+ #if __GNU_LIBRARY__ == 1
+ Linux libc5 i18n is broken.
+ #endif], [],
+ [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no])
+ ])
+ ])
+ if test $gl_cv_func_iswcntrl_works = yes; then
WCTYPE_H=
fi
+ 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])
@@ -41,4 +64,11 @@
fi
AC_SUBST([HAVE_WCTYPE_H])
AC_SUBST([WCTYPE_H])
+
+ if test "$gl_cv_func_iswcntrl_works" = no; then
+ REPLACE_ISWCNTRL=1
+ else
+ REPLACE_ISWCNTRL=0
+ fi
+ AC_SUBST([REPLACE_ISWCNTRL])
])
Index: wcwidth.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/wcwidth.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- wcwidth.m4 22 Aug 2007 13:44:04 -0000 1.4
+++ wcwidth.m4 15 Sep 2008 21:47:01 -0000 1.5
@@ -1,4 +1,4 @@
-# wcwidth.m4 serial 11
+# wcwidth.m4 serial 13
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,
@@ -9,7 +9,7 @@
AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
dnl Persuade glibc <wchar.h> to declare wcwidth().
- AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gt_TYPE_WCHAR_T])
AC_REQUIRE([gt_TYPE_WINT_T])
@@ -37,6 +37,7 @@
REPLACE_WCWIDTH=1
else
dnl On MacOS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1.
+ dnl On OSF/1 5.1, wcwidth(0x200B) (ZERO WIDTH SPACE) 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],
@@ -63,7 +64,7 @@
int main ()
{
if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
- if (wcwidth (0x0301) > 0)
+ if (wcwidth (0x0301) > 0 || wcwidth (0x200B) > 0)
return 1;
return 0;
}], [gl_cv_func_wcwidth_works=yes], [gl_cv_func_wcwidth_works=no],
Index: wint_t.m4
===================================================================
RCS file: /cvsroot/cvs/ccvs/m4/wint_t.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- wint_t.m4 22 Aug 2007 13:44:04 -0000 1.3
+++ wint_t.m4 15 Sep 2008 21:47:01 -0000 1.4
@@ -1,4 +1,4 @@
-# wint_t.m4 serial 2 (gettext-0.16.2)
+# wint_t.m4 serial 2 (gettext-0.17)
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,
Index: environ.m4
===================================================================
RCS file: environ.m4
diff -N environ.m4
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ environ.m4 15 Sep 2008 21:46:54 -0000 1.1
@@ -0,0 +1,36 @@
+# environ.m4 serial 1
+dnl Copyright (C) 2001-2004, 2006-2008 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_ENVIRON],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ dnl Persuade glibc <unistd.h> to declare environ.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ gt_CHECK_VAR_DECL([#include <unistd.h>], environ)
+ if test $gt_cv_var_environ_declaration != yes; then
+ HAVE_DECL_ENVIRON=0
+ fi
+])
+
+# Check if a variable is properly declared.
+# gt_CHECK_VAR_DECL(includes,variable)
+AC_DEFUN([gt_CHECK_VAR_DECL],
+[
+ define([gt_cv_var], [gt_cv_var_]$2[_declaration])
+ AC_MSG_CHECKING([if $2 is properly declared])
+ AC_CACHE_VAL(gt_cv_var, [
+ AC_TRY_COMPILE([$1
+ extern struct { int foo; } $2;],
+ [$2.foo = 1;],
+ gt_cv_var=no,
+ gt_cv_var=yes)])
+ AC_MSG_RESULT($gt_cv_var)
+ if test $gt_cv_var = yes; then
+ AC_DEFINE([HAVE_]translit($2, [a-z], [A-Z])[_DECL], 1,
+ [Define if you have the declaration of $2.])
+ fi
+ undefine([gt_cv_var])
+])
Index: errno_h.m4
===================================================================
RCS file: errno_h.m4
diff -N errno_h.m4
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ errno_h.m4 15 Sep 2008 21:46:54 -0000 1.1
@@ -0,0 +1,113 @@
+# errno_h.m4 serial 1
+dnl Copyright (C) 2004, 2006, 2008 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_HEADER_ERRNO_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_ERRNO_H_BODY])
+])
+
+AC_DEFUN([gl_HEADER_ERRNO_H_BODY],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_CACHE_CHECK([for complete errno.h], gl_cv_header_errno_h_complete, [
+ AC_EGREP_CPP(booboo,[
+#include <errno.h>
+#if !defined ENOMSG
+booboo
+#endif
+#if !defined EIDRM
+booboo
+#endif
+#if !defined ENOLINK
+booboo
+#endif
+#if !defined EPROTO
+booboo
+#endif
+#if !defined EMULTIHOP
+booboo
+#endif
+#if !defined EBADMSG
+booboo
+#endif
+#if !defined EOVERFLOW
+booboo
+#endif
+#if !defined ENOTSUP
+booboo
+#endif
+#if !defined ECANCELED
+booboo
+#endif
+ ],
+ [gl_cv_header_errno_h_complete=no],
+ [gl_cv_header_errno_h_complete=yes])
+ ])
+ if test $gl_cv_header_errno_h_complete = yes; then
+ ERRNO_H=''
+ else
+ gl_CHECK_NEXT_HEADERS([errno.h])
+ ERRNO_H='errno.h'
+ fi
+ AC_SUBST([ERRNO_H])
+ gl_REPLACE_ERRNO_VALUE([EMULTIHOP])
+ gl_REPLACE_ERRNO_VALUE([ENOLINK])
+ gl_REPLACE_ERRNO_VALUE([EOVERFLOW])
+])
+
+# Assuming $1 = EOVERFLOW.
+# The EOVERFLOW errno value ought to be defined in <errno.h>, according to
+# POSIX. But some systems (like OpenBSD 4.0 or AIX 3) don't define it, and
+# some systems (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined.
+# Check for the value of EOVERFLOW.
+# Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE.
+AC_DEFUN([gl_REPLACE_ERRNO_VALUE],
+[
+ if test -n "$ERRNO_H"; then
+ AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [
+ AC_EGREP_CPP(yes,[
+#include <errno.h>
+#ifdef ]$1[
+yes
+#endif
+ ],
+ [gl_cv_header_errno_h_]$1[=yes],
+ [gl_cv_header_errno_h_]$1[=no])
+ if test $gl_cv_header_errno_h_]$1[ = no; then
+ AC_EGREP_CPP(yes,[
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef ]$1[
+yes
+#endif
+ ], [gl_cv_header_errno_h_]$1[=hidden])
+ if test $gl_cv_header_errno_h_]$1[ = hidden; then
+ dnl The macro exists but is hidden.
+ dnl Define it to the same value.
+ AC_COMPUTE_INT([gl_cv_header_errno_h_]$1, $1, [
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+])
+ fi
+ fi
+ ])
+ case $gl_cv_header_errno_h_]$1[ in
+ yes | no)
+ ]$1[_HIDDEN=0; ]$1[_VALUE=
+ ;;
+ *)
+ ]$1[_HIDDEN=1; ]$1[_VALUE="$gl_cv_header_errno_h_]$1["
+ ;;
+ esac
+ AC_SUBST($1[_HIDDEN])
+ AC_SUBST($1[_VALUE])
+ fi
+])
Index: hash.m4
===================================================================
RCS file: hash.m4
diff -N hash.m4
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ hash.m4 15 Sep 2008 21:46:56 -0000 1.1
@@ -0,0 +1,13 @@
+# hash.m4 serial 6
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_HASH],
+[
+ AC_LIBOBJ([hash])
+
+ dnl Prerequisites of lib/hash.c.
+ AC_REQUIRE([AM_STDBOOL_H])
+])
Index: malloc.m4
===================================================================
RCS file: malloc.m4
diff -N malloc.m4
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ malloc.m4 15 Sep 2008 21:46:57 -0000 1.3
@@ -0,0 +1,41 @@
+# malloc.m4 serial 8
+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_FUNC_MALLOC_POSIX
+# --------------------
+# Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it
+# fails), and replace malloc if it is not.
+AC_DEFUN([gl_FUNC_MALLOC_POSIX],
+[
+ AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
+ if test $gl_cv_func_malloc_posix = yes; then
+ HAVE_MALLOC_POSIX=1
+ AC_DEFINE([HAVE_MALLOC_POSIX], 1,
+ [Define if the 'malloc' function is POSIX compliant.])
+ else
+ AC_LIBOBJ([malloc])
+ HAVE_MALLOC_POSIX=0
+ fi
+ AC_SUBST([HAVE_MALLOC_POSIX])
+])
+
+# Test whether malloc, realloc, calloc are POSIX compliant,
+# Set gl_cv_func_malloc_posix to yes or no accordingly.
+AC_DEFUN([gl_CHECK_MALLOC_POSIX],
+[
+ AC_CACHE_CHECK([whether malloc, realloc, calloc are POSIX compliant],
+ [gl_cv_func_malloc_posix],
+ [
+ dnl It is too dangerous to try to allocate a large amount of memory:
+ dnl some systems go to their knees when you do that. So assume that
+ dnl all Unix implementations of the function are POSIX compliant.
+ AC_TRY_COMPILE([],
+ [#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ choke me
+ #endif
+ ], [gl_cv_func_malloc_posix=yes], [gl_cv_func_malloc_posix=no])
+ ])
+])
Index: open.m4
===================================================================
RCS file: open.m4
diff -N open.m4
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ open.m4 15 Sep 2008 21:46:57 -0000 1.1
@@ -0,0 +1,52 @@
+# open.m4 serial 2
+dnl Copyright (C) 2007-2008 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_OPEN],
+[
+ AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ case "$host_os" in
+ mingw* | pw*)
+ REPLACE_OPEN=1
+ AC_LIBOBJ([open])
+ ;;
+ *)
+ dnl open("foo/") should not create a file when the file name has a
+ dnl trailing slash.
+ AC_CACHE_CHECK([whether open recognizes a trailing slash],
+ [gl_cv_func_open_slash],
+ [
+ AC_TRY_RUN([
+#include <fcntl.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+int main ()
+{
+ return open ("conftest.sl/", O_CREAT, 0600) >= 0;
+}], [gl_cv_func_open_slash=yes], [gl_cv_func_open_slash=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ solaris2.[0-9]*) gl_cv_func_open_slash="guessing no" ;;
+ hpux*) gl_cv_func_open_slash="guessing no" ;;
+ *) gl_cv_func_open_slash="guessing yes" ;;
+ esac
+changequote([,])dnl
+ ])
+ rm -f conftest.sl
+ ])
+ case "$gl_cv_func_open_slash" in
+ *no)
+ AC_DEFINE([OPEN_TRAILING_SLASH_BUG], 1,
+ [Define to 1 if open() fails to recognize a trailing slash.])
+ REPLACE_OPEN=1
+ AC_LIBOBJ([open])
+ ;;
+ esac
+ ;;
+ esac
+])
Index: printf.m4
===================================================================
RCS file: printf.m4
diff -N printf.m4
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ printf.m4 15 Sep 2008 21:46:58 -0000 1.1
@@ -0,0 +1,1309 @@
+# printf.m4 serial 23
+dnl Copyright (C) 2003, 2007-2008 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 whether the *printf family of functions supports the 'j', 'z', 't',
+dnl 'L' size specifiers. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_printf_sizes_c99.
+
+AC_DEFUN([gl_PRINTF_SIZES_C99],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports size specifiers as in C99],
+ [gl_cv_func_printf_sizes_c99],
+ [
+ AC_TRY_RUN([
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+# include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+# include <inttypes.h>
+#endif
+static char buf[100];
+int main ()
+{
+#if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
+ buf[0] = '\0';
+ if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
+ || strcmp (buf, "12345671 33") != 0)
+ return 1;
+#endif
+ buf[0] = '\0';
+ if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
+ || strcmp (buf, "12345672 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
+ || strcmp (buf, "12345673 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
+ || strcmp (buf, "1.5 33") != 0)
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_sizes_c99=yes], [gl_cv_func_printf_sizes_c99=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
+ darwin*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on OpenBSD >= 3.9.
+ openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+ gl_cv_func_printf_sizes_c99="guessing no";;
+ openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on Solaris >= 2.10.
+ solaris2.[0-9]*) gl_cv_func_printf_sizes_c99="guessing no";;
+ solaris*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_printf_sizes_c99="guessing no";;
+ netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_sizes_c99="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports 'long double'
+dnl arguments together with the 'L' size specifier. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_printf_long_double.
+
+AC_DEFUN([gl_PRINTF_LONG_DOUBLE],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports 'long double' arguments],
+ [gl_cv_func_printf_long_double],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[10000];
+int main ()
+{
+ buf[0] = '\0';
+ if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
+ || strcmp (buf, "1.750000 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
+ || strcmp (buf, "1.750000e+00 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
+ || strcmp (buf, "1.75 33") != 0)
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_long_double=yes], [gl_cv_func_printf_long_double=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ beos*) gl_cv_func_printf_long_double="guessing no";;
+ mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
+ *) gl_cv_func_printf_long_double="guessing yes";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports infinite and NaN
+dnl 'double' arguments in the %f, %e, %g directives. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_printf_infinite.
+
+AC_DEFUN([gl_PRINTF_INFINITE],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports infinite 'double' arguments],
+ [gl_cv_func_printf_infinite],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static int
+strisnan (const char *string, size_t start_index, size_t end_index)
+{
+ if (start_index < end_index)
+ {
+ if (string[start_index] == '-')
+ start_index++;
+ if (start_index + 3 <= end_index
+ && memcmp (string + start_index, "nan", 3) == 0)
+ {
+ start_index += 3;
+ if (start_index == end_index
+ || (string[start_index] == '(' && string[end_index - 1] == ')'))
+ return 1;
+ }
+ }
+ return 0;
+}
+static char buf[10000];
+static double zero = 0.0;
+int main ()
+{
+ if (sprintf (buf, "%f", 1.0 / 0.0) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%f", -1.0 / 0.0) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%f", zero / zero) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%e", 1.0 / 0.0) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%e", -1.0 / 0.0) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%e", zero / zero) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%g", 1.0 / 0.0) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%g", -1.0 / 0.0) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%g", zero / zero) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_infinite=yes], [gl_cv_func_printf_infinite=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on FreeBSD >= 6.
+ freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";;
+ darwin*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on HP-UX >= 11.
+ hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
+ hpux*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_printf_infinite="guessing no";;
+ netbsd*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_printf_infinite="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_infinite="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports infinite and NaN
+dnl 'long double' arguments in the %f, %e, %g directives. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_printf_infinite_long_double.
+
+AC_DEFUN([gl_PRINTF_INFINITE_LONG_DOUBLE],
+[
+ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_C_BIGENDIAN])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ dnl The user can set or unset the variable gl_printf_safe to indicate
+ dnl that he wishes a safe handling of non-IEEE-754 'long double' values.
+ if test -n "$gl_printf_safe"; then
+ AC_DEFINE([CHECK_PRINTF_SAFE], 1,
+ [Define if you wish *printf() functions that have a safe handling of
+ non-IEEE-754 'long double' values.])
+ fi
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ AC_CACHE_CHECK([whether printf supports infinite 'long double'
arguments],
+ [gl_cv_func_printf_infinite_long_double],
+ [
+ AC_TRY_RUN([
+]GL_NOCRASH[
+#include <float.h>
+#include <stdio.h>
+#include <string.h>
+static int
+strisnan (const char *string, size_t start_index, size_t end_index)
+{
+ if (start_index < end_index)
+ {
+ if (string[start_index] == '-')
+ start_index++;
+ if (start_index + 3 <= end_index
+ && memcmp (string + start_index, "nan", 3) == 0)
+ {
+ start_index += 3;
+ if (start_index == end_index
+ || (string[start_index] == '(' && string[end_index - 1] == ')'))
+ return 1;
+ }
+ }
+ return 0;
+}
+static char buf[10000];
+static long double zeroL = 0.0L;
+int main ()
+{
+ nocrash_init();
+ if (sprintf (buf, "%Lf", 1.0L / 0.0L) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lf", -1.0L / 0.0L) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", 1.0L / 0.0L) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Le", -1.0L / 0.0L) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Le", zeroL / zeroL) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", 1.0L / 0.0L) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lg", -1.0L / 0.0L) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined
__x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ ||
defined _I386 || defined _M_IX86 || defined _X86_))
+/* Representation of an 80-bit 'long double' as an initializer for a sequence
+ of 'unsigned int' words. */
+# ifdef WORDS_BIGENDIAN
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
+ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ (unsigned int) (mantlo) << 16 \
+ }
+# else
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { mantlo, manthi, exponent }
+# endif
+ { /* Quiet NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ {
+ /* Signalling NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-Infinity. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-Zero. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Unnormalized number. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-Denormal. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+#endif
+ return 0;
+}],
+ [gl_cv_func_printf_infinite_long_double=yes],
+ [gl_cv_func_printf_infinite_long_double=no],
+ [
+changequote(,)dnl
+ case "$host_cpu" in
+ # Guess no on ia64, x86_64, i386.
+ ia64 | x86_64 | i*86)
gl_cv_func_printf_infinite_long_double="guessing no";;
+ *)
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*)
gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on FreeBSD >= 6.
+ freebsd[1-5]*)
gl_cv_func_printf_infinite_long_double="guessing no";;
+ freebsd* | kfreebsd*)
gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*)
gl_cv_func_printf_infinite_long_double="guessing no";;
+ darwin*)
gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on HP-UX >= 11.
+ hpux[7-9]* | hpux10*)
gl_cv_func_printf_infinite_long_double="guessing no";;
+ hpux*)
gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* |
netbsdcoff[1-2]*)
+
gl_cv_func_printf_infinite_long_double="guessing no";;
+ netbsd*)
gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # If we don't know, assume the worst.
+ *)
gl_cv_func_printf_infinite_long_double="guessing no";;
+ esac
+ ;;
+ esac
+changequote([,])dnl
+ ])
+ ])
+ ;;
+ *)
+ gl_cv_func_printf_infinite_long_double="irrelevant"
+ ;;
+ esac
+])
+
+dnl Test whether the *printf family of functions supports the 'a' and 'A'
+dnl conversion specifier for hexadecimal output of floating-point numbers.
+dnl (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_printf_directive_a.
+
+AC_DEFUN([gl_PRINTF_DIRECTIVE_A],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the 'a' and 'A' directives],
+ [gl_cv_func_printf_directive_a],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
+ || (strcmp (buf, "0x1.922p+1 33") != 0
+ && strcmp (buf, "0x3.244p+0 33") != 0
+ && strcmp (buf, "0x6.488p-1 33") != 0
+ && strcmp (buf, "0xc.91p-2 33") != 0))
+ return 1;
+ if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
+ || (strcmp (buf, "-0X1.922P+1 33") != 0
+ && strcmp (buf, "-0X3.244P+0 33") != 0
+ && strcmp (buf, "-0X6.488P-1 33") != 0
+ && strcmp (buf, "-0XC.91P-2 33") != 0))
+ return 1;
+ /* This catches a FreeBSD 6.1 bug: it doesn't round. */
+ if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
+ || (strcmp (buf, "0x1.83p+0 33") != 0
+ && strcmp (buf, "0x3.05p-1 33") != 0
+ && strcmp (buf, "0x6.0ap-2 33") != 0
+ && strcmp (buf, "0xc.14p-3 33") != 0))
+ return 1;
+ /* This catches a FreeBSD 6.1 bug. See
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0
+ || buf[0] == '0')
+ return 1;
+ /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug. */
+ if (sprintf (buf, "%.1a", 1.999) < 0
+ || (strcmp (buf, "0x1.0p+1") != 0
+ && strcmp (buf, "0x2.0p+0") != 0
+ && strcmp (buf, "0x4.0p-1") != 0
+ && strcmp (buf, "0x8.0p-2") != 0))
+ return 1;
+ /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a
+ glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
+ if (sprintf (buf, "%.1La", 1.999L) < 0
+ || (strcmp (buf, "0x1.0p+1") != 0
+ && strcmp (buf, "0x2.0p+0") != 0
+ && strcmp (buf, "0x4.0p-1") != 0
+ && strcmp (buf, "0x8.0p-2") != 0))
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_directive_a=yes], [gl_cv_func_printf_directive_a=no],
+ [
+ case "$host_os" in
+ # Guess yes on glibc >= 2.5 systems.
+ *-gnu*)
+ AC_EGREP_CPP([BZ2908], [
+ #include <features.h>
+ #ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)
+ BZ2908
+ #endif
+ #endif
+ ],
+ [gl_cv_func_printf_directive_a="guessing yes"],
+ [gl_cv_func_printf_directive_a="guessing no"])
+ ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_directive_a="guessing no";;
+ esac
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports the %F format
+dnl directive. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_printf_directive_f.
+
+AC_DEFUN([gl_PRINTF_DIRECTIVE_F],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the 'F' directive],
+ [gl_cv_func_printf_directive_f],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
+ || strcmp (buf, "1234567.000000 33") != 0)
+ return 1;
+ if (sprintf (buf, "%F", 1.0 / 0.0) < 0
+ || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
+ return 1;
+ /* This catches a Cygwin 2007 bug. */
+ if (sprintf (buf, "%.F", 1234.0) < 0
+ || strcmp (buf, "1234") != 0)
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_directive_f=yes], [gl_cv_func_printf_directive_f=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_directive_f="guessing yes";;
+ # Guess yes on FreeBSD >= 6.
+ freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
+ darwin*) gl_cv_func_printf_directive_f="guessing yes";;
+ # Guess yes on Solaris >= 2.10.
+ solaris2.[0-9]*) gl_cv_func_printf_directive_f="guessing no";;
+ solaris*) gl_cv_func_printf_directive_f="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_directive_f="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports the %n format
+dnl directive. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_printf_directive_n.
+
+AC_DEFUN([gl_PRINTF_DIRECTIVE_N],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the 'n' directive],
+ [gl_cv_func_printf_directive_n],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char fmtstring[10];
+static char buf[100];
+int main ()
+{
+ int count = -1;
+ /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
+ support %n in format strings in read-only memory but not in writable
+ memory. */
+ strcpy (fmtstring, "%d %n");
+ if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
+ || strcmp (buf, "123 ") != 0
+ || count != 4)
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_directive_n=yes], [gl_cv_func_printf_directive_n=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ *) gl_cv_func_printf_directive_n="guessing yes";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports POSIX/XSI format
+dnl strings with positions. (POSIX:2001)
+dnl Result is gl_cv_func_printf_positions.
+
+AC_DEFUN([gl_PRINTF_POSITIONS],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports POSIX/XSI format strings with
positions],
+ [gl_cv_func_printf_positions],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+/* The string "%2$d %1$d", with dollar characters protected from the shell's
+ dollar expansion (possibly an autoconf bug). */
+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
+static char buf[100];
+int main ()
+{
+ sprintf (buf, format, 33, 55);
+ return (strcmp (buf, "55 33") != 0);
+}], [gl_cv_func_printf_positions=yes], [gl_cv_func_printf_positions=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
+ gl_cv_func_printf_positions="guessing no";;
+ beos*) gl_cv_func_printf_positions="guessing no";;
+ mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
+ *) gl_cv_func_printf_positions="guessing yes";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports POSIX/XSI format
+dnl strings with the ' flag for grouping of decimal digits. (POSIX:2001)
+dnl Result is gl_cv_func_printf_flag_grouping.
+
+AC_DEFUN([gl_PRINTF_FLAG_GROUPING],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the grouping flag],
+ [gl_cv_func_printf_flag_grouping],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%'d %d", 1234567, 99) < 0
+ || buf[strlen (buf) - 1] != '9')
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_flag_grouping=yes],
[gl_cv_func_printf_flag_grouping=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ cygwin*) gl_cv_func_printf_flag_grouping="guessing no";;
+ netbsd*) gl_cv_func_printf_flag_grouping="guessing no";;
+ mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
+ *) gl_cv_func_printf_flag_grouping="guessing yes";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports the - flag correctly.
+dnl (ISO C99.) See
+dnl <http://lists.gnu.org/archive/html/bug-coreutils/2008-02/msg00035.html>
+dnl Result is gl_cv_func_printf_flag_leftadjust.
+
+AC_DEFUN([gl_PRINTF_FLAG_LEFTADJUST],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the left-adjust flag correctly],
+ [gl_cv_func_printf_flag_leftadjust],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ /* Check that a '-' flag is not annihilated by a negative width. */
+ if (sprintf (buf, "a%-*sc", -3, "b") < 0
+ || strcmp (buf, "ab c") != 0)
+ return 1;
+ return 0;
+}],
+ [gl_cv_func_printf_flag_leftadjust=yes],
+ [gl_cv_func_printf_flag_leftadjust=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on HP-UX 11.
+ hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
+ # Guess no on HP-UX 10 and older.
+ hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";;
+ # Guess yes otherwise.
+ *) gl_cv_func_printf_flag_leftadjust="guessing yes";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports padding of non-finite
+dnl values with the 0 flag correctly. (ISO C99 + TC1 + TC2.) See
+dnl <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html>
+dnl Result is gl_cv_func_printf_flag_zero.
+
+AC_DEFUN([gl_PRINTF_FLAG_ZERO],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the zero flag correctly],
+ [gl_cv_func_printf_flag_zero],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%010f", 1.0 / 0.0, 33, 44, 55) < 0
+ || (strcmp (buf, " inf") != 0
+ && strcmp (buf, " infinity") != 0))
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_flag_zero=yes], [gl_cv_func_printf_flag_zero=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_printf_flag_zero="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_flag_zero="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports large precisions.
+dnl On mingw, precisions larger than 512 are treated like 512, in integer,
+dnl floating-point or pointer output. On BeOS, precisions larger than 1044
+dnl crash the program.
+dnl Result is gl_cv_func_printf_precision.
+
+AC_DEFUN([gl_PRINTF_PRECISION],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports large precisions],
+ [gl_cv_func_printf_precision],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[5000];
+int main ()
+{
+#ifdef __BEOS__
+ /* On BeOS, this would crash and show a dialog box. Avoid the crash. */
+ return 1;
+#endif
+ if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_precision=yes], [gl_cv_func_printf_precision=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no only on native Win32 and BeOS systems.
+ mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
+ beos*) gl_cv_func_printf_precision="guessing no" ;;
+ *) gl_cv_func_printf_precision="guessing yes" ;;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions recovers gracefully in case
+dnl of an out-of-memory condition, or whether it crashes the entire program.
+dnl Result is gl_cv_func_printf_enomem.
+
+AC_DEFUN([gl_PRINTF_ENOMEM],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf survives out-of-memory conditions],
+ [gl_cv_func_printf_enomem],
+ [
+ if test "$cross_compiling" = no; then
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([
+]GL_NOCRASH[
+changequote(,)dnl
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <errno.h>
+int main()
+{
+ struct rlimit limit;
+ int ret;
+ nocrash_init ();
+ /* Some printf implementations allocate temporary space with malloc. */
+ /* On BSD systems, malloc() is limited by RLIMIT_DATA. */
+#ifdef RLIMIT_DATA
+ if (getrlimit (RLIMIT_DATA, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+ limit.rlim_max = 5000000;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_DATA, &limit) < 0)
+ return 77;
+#endif
+ /* On Linux systems, malloc() is limited by RLIMIT_AS. */
+#ifdef RLIMIT_AS
+ if (getrlimit (RLIMIT_AS, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+ limit.rlim_max = 5000000;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_AS, &limit) < 0)
+ return 77;
+#endif
+ /* Some printf implementations allocate temporary space on the stack. */
+#ifdef RLIMIT_STACK
+ if (getrlimit (RLIMIT_STACK, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+ limit.rlim_max = 5000000;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_STACK, &limit) < 0)
+ return 77;
+#endif
+ ret = printf ("%.5000000f", 1.0);
+ return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
+}
+changequote([,])dnl
+ ])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ (./conftest
+ result=$?
+ if test $result != 0 && test $result != 77; then result=1; fi
+ exit $result
+ ) >/dev/null 2>/dev/null
+ case $? in
+ 0) gl_cv_func_printf_enomem="yes" ;;
+ 77) gl_cv_func_printf_enomem="guessing no" ;;
+ *) gl_cv_func_printf_enomem="no" ;;
+ esac
+ else
+ gl_cv_func_printf_enomem="guessing no"
+ fi
+ rm -fr conftest*
+ else
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on Solaris.
+ solaris*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on AIX.
+ aix*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on HP-UX/hppa.
+ hpux*) case "$host_cpu" in
+ hppa*) gl_cv_func_printf_enomem="guessing yes";;
+ *) gl_cv_func_printf_enomem="guessing no";;
+ esac
+ ;;
+ # Guess yes on IRIX.
+ irix*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on OSF/1.
+ osf*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_printf_enomem="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_enomem="guessing no";;
+ esac
+changequote([,])dnl
+ fi
+ ])
+])
+
+dnl Test whether the snprintf function exists. (ISO C99, POSIX:2001)
+dnl Result is ac_cv_func_snprintf.
+
+AC_DEFUN([gl_SNPRINTF_PRESENCE],
+[
+ AC_CHECK_FUNCS_ONCE([snprintf])
+])
+
+dnl Test whether the string produced by the snprintf function is always NUL
+dnl terminated. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_snprintf_truncation_c99.
+
+AC_DEFUN([gl_SNPRINTF_TRUNCATION_C99],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether snprintf truncates the result as in C99],
+ [gl_cv_func_snprintf_truncation_c99],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ strcpy (buf, "ABCDEF");
+ snprintf (buf, 3, "%d %d", 4567, 89);
+ if (memcmp (buf, "45\0DEF", 6) != 0)
+ return 1;
+ return 0;
+}], [gl_cv_func_snprintf_truncation_c99=yes],
[gl_cv_func_snprintf_truncation_c99=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_snprintf_truncation_c99="guessing
yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_snprintf_truncation_c99="guessing
no";;
+ freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing
yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing
no";;
+ darwin*) gl_cv_func_snprintf_truncation_c99="guessing
yes";;
+ # Guess yes on OpenBSD >= 3.9.
+ openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+ gl_cv_func_snprintf_truncation_c99="guessing
no";;
+ openbsd*) gl_cv_func_snprintf_truncation_c99="guessing
yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_snprintf_truncation_c99="guessing
no";;
+ solaris*) gl_cv_func_snprintf_truncation_c99="guessing
yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing
no";;
+ aix*) gl_cv_func_snprintf_truncation_c99="guessing
yes";;
+ # Guess yes on HP-UX >= 11.
+ hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing
no";;
+ hpux*) gl_cv_func_snprintf_truncation_c99="guessing
yes";;
+ # Guess yes on IRIX >= 6.5.
+ irix6.5) gl_cv_func_snprintf_truncation_c99="guessing
yes";;
+ # Guess yes on OSF/1 >= 5.
+ osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing
no";;
+ osf*) gl_cv_func_snprintf_truncation_c99="guessing
yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_snprintf_truncation_c99="guessing
no";;
+ netbsd*) gl_cv_func_snprintf_truncation_c99="guessing
yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_snprintf_truncation_c99="guessing
yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_snprintf_truncation_c99="guessing
no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the return value of the snprintf function is the number
+dnl of bytes (excluding the terminating NUL) that would have been produced
+dnl if the buffer had been large enough. (ISO C99, POSIX:2001)
+dnl For example, this test program fails on IRIX 6.5:
+dnl ---------------------------------------------------------------------
+dnl #include <stdio.h>
+dnl int main()
+dnl {
+dnl static char buf[8];
+dnl int retval = snprintf (buf, 3, "%d", 12345);
+dnl return retval >= 0 && retval < 3;
+dnl }
+dnl ---------------------------------------------------------------------
+dnl Result is gl_cv_func_snprintf_retval_c99.
+
+AC_DEFUN([gl_SNPRINTF_RETVAL_C99],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether snprintf returns a byte count as in C99],
+ [gl_cv_func_snprintf_retval_c99],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ strcpy (buf, "ABCDEF");
+ if (snprintf (buf, 3, "%d %d", 4567, 89) != 7)
+ return 1;
+ return 0;
+}], [gl_cv_func_snprintf_retval_c99=yes], [gl_cv_func_snprintf_retval_c99=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on OpenBSD >= 3.9.
+ openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+ gl_cv_func_snprintf_retval_c99="guessing no";;
+ openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ solaris*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_snprintf_retval_c99="guessing no";;
+ netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_snprintf_retval_c99="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the snprintf function supports the %n format directive
+dnl also in truncated portions of the format string. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_snprintf_directive_n.
+
+AC_DEFUN([gl_SNPRINTF_DIRECTIVE_N],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether snprintf fully supports the 'n' directive],
+ [gl_cv_func_snprintf_directive_n],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char fmtstring[10];
+static char buf[100];
+int main ()
+{
+ int count = -1;
+ /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
+ support %n in format strings in read-only memory but not in writable
+ memory. */
+ strcpy (fmtstring, "%d %n");
+ snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55);
+ if (count != 6)
+ return 1;
+ return 0;
+}], [gl_cv_func_snprintf_directive_n=yes],
[gl_cv_func_snprintf_directive_n=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";;
+ darwin*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ solaris*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ aix*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on IRIX >= 6.5.
+ irix6.5) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on OSF/1 >= 5.
+ osf[3-4]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ osf*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_snprintf_directive_n="guessing no";;
+ netbsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_snprintf_directive_n="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the snprintf function, when passed a size = 1, writes any
+dnl output without bounds in this case, behaving like sprintf. This is the
+dnl case on Linux libc5.
+dnl Result is gl_cv_func_snprintf_size1.
+
+AC_DEFUN([gl_SNPRINTF_SIZE1],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_CACHE_CHECK([whether snprintf respects a size of 1],
+ [gl_cv_func_snprintf_size1],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+int main()
+{
+ static char buf[8] = "DEADBEEF";
+ snprintf (buf, 1, "%d", 12345);
+ return buf[1] != 'E';
+}],
+ [gl_cv_func_snprintf_size1=yes],
+ [gl_cv_func_snprintf_size1=no],
+ [gl_cv_func_snprintf_size1="guessing yes"])
+ ])
+])
+
+dnl Test whether the vsnprintf function, when passed a zero size, produces no
+dnl output. (ISO C99, POSIX:2001)
+dnl For example, snprintf nevertheless writes a NUL byte in this case
+dnl on OSF/1 5.1:
+dnl ---------------------------------------------------------------------
+dnl #include <stdio.h>
+dnl int main()
+dnl {
+dnl static char buf[8] = "DEADBEEF";
+dnl snprintf (buf, 0, "%d", 12345);
+dnl return buf[0] != 'D';
+dnl }
+dnl ---------------------------------------------------------------------
+dnl And vsnprintf writes any output without bounds in this case, behaving like
+dnl vsprintf, on HP-UX 11 and OSF/1 5.1:
+dnl ---------------------------------------------------------------------
+dnl #include <stdarg.h>
+dnl #include <stdio.h>
+dnl static int my_snprintf (char *buf, int size, const char *format, ...)
+dnl {
+dnl va_list args;
+dnl int ret;
+dnl va_start (args, format);
+dnl ret = vsnprintf (buf, size, format, args);
+dnl va_end (args);
+dnl return ret;
+dnl }
+dnl int main()
+dnl {
+dnl static char buf[8] = "DEADBEEF";
+dnl my_snprintf (buf, 0, "%d", 12345);
+dnl return buf[0] != 'D';
+dnl }
+dnl ---------------------------------------------------------------------
+dnl Result is gl_cv_func_vsnprintf_zerosize_c99.
+
+AC_DEFUN([gl_VSNPRINTF_ZEROSIZE_C99],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether vsnprintf respects a zero size as in C99],
+ [gl_cv_func_vsnprintf_zerosize_c99],
+ [
+ AC_TRY_RUN([
+#include <stdarg.h>
+#include <stdio.h>
+static int my_snprintf (char *buf, int size, const char *format, ...)
+{
+ va_list args;
+ int ret;
+ va_start (args, format);
+ ret = vsnprintf (buf, size, format, args);
+ va_end (args);
+ return ret;
+}
+int main()
+{
+ static char buf[8] = "DEADBEEF";
+ my_snprintf (buf, 0, "%d", 12345);
+ return buf[0] != 'D';
+}],
+ [gl_cv_func_vsnprintf_zerosize_c99=yes],
+ [gl_cv_func_vsnprintf_zerosize_c99=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing
yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_vsnprintf_zerosize_c99="guessing
no";;
+ freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing
yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing
no";;
+ darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing
yes";;
+ # Guess yes on Cygwin.
+ cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing
yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_vsnprintf_zerosize_c99="guessing
no";;
+ solaris*) gl_cv_func_vsnprintf_zerosize_c99="guessing
yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_vsnprintf_zerosize_c99="guessing
no";;
+ aix*) gl_cv_func_vsnprintf_zerosize_c99="guessing
yes";;
+ # Guess yes on IRIX >= 6.5.
+ irix6.5) gl_cv_func_vsnprintf_zerosize_c99="guessing
yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_vsnprintf_zerosize_c99="guessing
no";;
+ netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing
yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing
yes";;
+ # Guess yes on mingw.
+ mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing
yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_vsnprintf_zerosize_c99="guessing
no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl The results of these tests on various platforms are:
+dnl
+dnl 1 = gl_PRINTF_SIZES_C99
+dnl 2 = gl_PRINTF_LONG_DOUBLE
+dnl 3 = gl_PRINTF_INFINITE
+dnl 4 = gl_PRINTF_INFINITE_LONG_DOUBLE
+dnl 5 = gl_PRINTF_DIRECTIVE_A
+dnl 6 = gl_PRINTF_DIRECTIVE_F
+dnl 7 = gl_PRINTF_DIRECTIVE_N
+dnl 8 = gl_PRINTF_POSITIONS
+dnl 9 = gl_PRINTF_FLAG_GROUPING
+dnl 10 = gl_PRINTF_FLAG_LEFTADJUST
+dnl 11 = gl_PRINTF_FLAG_ZERO
+dnl 12 = gl_PRINTF_PRECISION
+dnl 13 = gl_PRINTF_ENOMEM
+dnl 14 = gl_SNPRINTF_PRESENCE
+dnl 15 = gl_SNPRINTF_TRUNCATION_C99
+dnl 16 = gl_SNPRINTF_RETVAL_C99
+dnl 17 = gl_SNPRINTF_DIRECTIVE_N
+dnl 18 = gl_SNPRINTF_SIZE1
+dnl 19 = gl_VSNPRINTF_ZEROSIZE_C99
+dnl
+dnl 1 = checking whether printf supports size specifiers as in C99...
+dnl 2 = checking whether printf supports 'long double' arguments...
+dnl 3 = checking whether printf supports infinite 'double' arguments...
+dnl 4 = checking whether printf supports infinite 'long double' arguments...
+dnl 5 = checking whether printf supports the 'a' and 'A' directives...
+dnl 6 = checking whether printf supports the 'F' directive...
+dnl 7 = checking whether printf supports the 'n' directive...
+dnl 8 = checking whether printf supports POSIX/XSI format strings with
positions...
+dnl 9 = checking whether printf supports the grouping flag...
+dnl 10 = checking whether printf supports the left-adjust flag correctly...
+dnl 11 = checking whether printf supports the zero flag correctly...
+dnl 12 = checking whether printf supports large precisions...
+dnl 13 = checking whether printf survives out-of-memory conditions...
+dnl 14 = checking for snprintf...
+dnl 15 = checking whether snprintf truncates the result as in C99...
+dnl 16 = checking whether snprintf returns a byte count as in C99...
+dnl 17 = checking whether snprintf fully supports the 'n' directive...
+dnl 18 = checking whether snprintf respects a size of 1...
+dnl 19 = checking whether vsnprintf respects a zero size as in C99...
+dnl
+dnl . = yes, # = no.
+dnl
+dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14
15 16 17 18 19
+dnl glibc 2.5 . . . . . . . . . . . . . .
. . . . .
+dnl glibc 2.3.6 . . . . # . . . . . . . . .
. . . . .
+dnl FreeBSD 5.4, 6.1 . . . . # . . . . . # . # .
. . . . .
+dnl MacOS X 10.3.9 . . . . # . . . . . # . # .
. . . . .
+dnl OpenBSD 3.9, 4.0 . . # # # # . . # . # . # .
. . . . .
+dnl Cygwin 2007 (= Cygwin 1.5.24) . . . . # # . . . ? # ? ? .
. . . . .
+dnl Cygwin 2006 (= Cygwin 1.5.19) # . . . # # . . # ? # ? ? .
. . . . .
+dnl Solaris 10 . . # # # . . . . . # . . .
. . . . .
+dnl Solaris 2.6 ... 9 # . # # # # . . . . # . . .
. . . . .
+dnl Solaris 2.5.1 # . # # # # . . . . # . . #
# # # # #
+dnl AIX 5.2 . . # # # . . . . . # . . .
. . . . .
+dnl AIX 4.3.2, 5.1 # . # # # # . . . . # . . .
. . . . .
+dnl HP-UX 11.31 . . . . # . . . . . # . . .
. # # . .
+dnl HP-UX 11.{00,11,23} # . . . # # . . . . # . . .
. # # . #
+dnl HP-UX 10.20 # . . . # # . . . # # . . .
. # # ? #
+dnl IRIX 6.5 # . # # # # . . . . # . . .
. # . . .
+dnl OSF/1 5.1 # . # # # # . . . . # . . .
. # . . #
+dnl OSF/1 4.0d # . # # # # . . . . # . . #
# # # # #
+dnl NetBSD 4.0 . ? ? ? ? ? . . ? ? ? ? ? .
. . ? ? ?
+dnl NetBSD 3.0 . . . . # # . # # ? # . # .
. . . . .
+dnl BeOS # # . # # # . # . ? . # ? .
. . . . .
+dnl mingw # # # # # # . # # . # # ? .
# # # . .
Index: realloc.m4
===================================================================
RCS file: realloc.m4
diff -N realloc.m4
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ realloc.m4 15 Sep 2008 21:46:58 -0000 1.3
@@ -0,0 +1,23 @@
+# realloc.m4 serial 8
+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_FUNC_REALLOC_POSIX
+# ---------------------
+# Test whether 'realloc' is POSIX compliant (sets errno to ENOMEM when it
+# fails), and replace realloc if it is not.
+AC_DEFUN([gl_FUNC_REALLOC_POSIX],
+[
+ AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
+ if test $gl_cv_func_malloc_posix = yes; then
+ HAVE_REALLOC_POSIX=1
+ AC_DEFINE([HAVE_REALLOC_POSIX], 1,
+ [Define if the 'realloc' function is POSIX compliant.])
+ else
+ AC_LIBOBJ([realloc])
+ HAVE_REALLOC_POSIX=0
+ fi
+ AC_SUBST([HAVE_REALLOC_POSIX])
+])
Index: same.m4
===================================================================
RCS file: same.m4
diff -N same.m4
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ same.m4 15 Sep 2008 21:46:58 -0000 1.1
@@ -0,0 +1,14 @@
+#serial 8
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SAME],
+[
+ AC_LIBOBJ([same])
+
+ dnl Prerequisites of lib/same.c.
+ AC_REQUIRE([AC_SYS_LONG_FILE_NAMES])
+ AC_CHECK_FUNCS_ONCE([pathconf])
+])
Index: sigaction.m4
===================================================================
RCS file: sigaction.m4
diff -N sigaction.m4
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ sigaction.m4 15 Sep 2008 21:46:59 -0000 1.1
@@ -0,0 +1,46 @@
+# sigaction.m4 serial 4
+dnl Copyright (C) 2008 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.
+
+# Determine if sigaction interface is present.
+AC_DEFUN([gl_SIGACTION],
+[
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ AC_REPLACE_FUNCS([sigaction])
+ if test $ac_cv_func_sigaction = no ; then
+ HAVE_SIGACTION=0
+ AC_SUBST([HAVE_SIGACTION])
+ gl_PREREQ_SIGACTION
+ fi
+])
+
+# Prerequisites of the part of lib/signal.in.h and of lib/sigaction.c.
+AC_DEFUN([gl_PREREQ_SIGACTION],
+[
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([AC_TYPE_UID_T])
+ AC_REQUIRE([gl_PREREQ_SIG_HANDLER_H])
+ AC_CHECK_FUNCS_ONCE([sigaltstack siginterrupt])
+ AC_CHECK_TYPES([siginfo_t], [], [], [[
+#include <signal.h>
+ ]])
+ if test $ac_cv_type_siginfo_t = no; then
+ HAVE_SIGINFO_T=0
+ AC_SUBST([HAVE_SIGINFO_T])
+ fi
+])
+
+# Prerequisites of lib/sig-handler.h.
+AC_DEFUN([gl_PREREQ_SIG_HANDLER_H],
+[
+ AC_REQUIRE([AC_C_INLINE])
+ AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], , ,
+ [[#include <signal.h>]])
+ if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
+ HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
+ AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION])
+ fi
+])
Index: signal_h.m4
===================================================================
RCS file: signal_h.m4
diff -N signal_h.m4
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ signal_h.m4 15 Sep 2008 21:46:59 -0000 1.1
@@ -0,0 +1,31 @@
+# signal_h.m4 serial 5
+dnl Copyright (C) 2007, 2008 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_SIGNAL_H],
+[
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ gl_CHECK_NEXT_HEADERS([signal.h])
+])
+
+AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_SIGNAL_H_DEFAULTS],
+[
+ GNULIB_SIGPROCMASK=0; AC_SUBST([GNULIB_SIGPROCMASK])
+ GNULIB_SIGACTION=0; AC_SUBST([GNULIB_SIGACTION])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING])
+ HAVE_SIGSET_T=1; AC_SUBST([HAVE_SIGSET_T])
+ HAVE_SIGINFO_T=1; AC_SUBST([HAVE_SIGINFO_T])
+ HAVE_SIGACTION=1; AC_SUBST([HAVE_SIGACTION])
+ HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
+ AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION])
+])
Index: signalblocking.m4
===================================================================
RCS file: signalblocking.m4
diff -N signalblocking.m4
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ signalblocking.m4 15 Sep 2008 21:46:59 -0000 1.1
@@ -0,0 +1,42 @@
+# signalblocking.m4 serial 9
+dnl Copyright (C) 2001-2002, 2006-2008 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.
+
+# Determine available signal blocking primitives. Three different APIs exist:
+# 1) POSIX: sigemptyset, sigaddset, sigprocmask
+# 2) SYSV: sighold, sigrelse
+# 3) BSD: sigblock, sigsetmask
+# For simplicity, here we check only for the POSIX signal blocking.
+AC_DEFUN([gl_SIGNALBLOCKING],
+[
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ signals_not_posix=
+ AC_EGREP_HEADER(sigset_t, signal.h, , signals_not_posix=1)
+ if test -z "$signals_not_posix"; then
+ AC_CHECK_FUNC(sigprocmask, [gl_cv_func_sigprocmask=1])
+ fi
+ if test -z "$gl_cv_func_sigprocmask"; then
+ HAVE_POSIX_SIGNALBLOCKING=0
+ AC_LIBOBJ([sigprocmask])
+ gl_PREREQ_SIGPROCMASK
+ fi
+])
+
+# Prerequisites of the part of lib/signal.in.h and of lib/sigprocmask.c.
+AC_DEFUN([gl_PREREQ_SIGPROCMASK],
+[
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ AC_CHECK_TYPES([sigset_t],
+ [gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no],
+ [#include <signal.h>
+/* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
+#include <sys/types.h>])
+ if test $gl_cv_type_sigset_t != yes; then
+ HAVE_SIGSET_T=0
+ fi
+ dnl HAVE_SIGSET_T is 1 if the system lacks the sigprocmask function but has
+ dnl the sigset_t type.
+ AC_SUBST([HAVE_SIGSET_T])
+])
Index: strings_h.m4
===================================================================
RCS file: strings_h.m4
diff -N strings_h.m4
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ strings_h.m4 15 Sep 2008 21:46:59 -0000 1.1
@@ -0,0 +1,33 @@
+# Configure a 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.
+
+AC_DEFUN([gl_HEADER_STRINGS_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_STRINGS_H_BODY])
+])
+
+AC_DEFUN([gl_HEADER_STRINGS_H_BODY],
+[
+ AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
+ gl_CHECK_NEXT_HEADERS([strings.h])
+])
+
+AC_DEFUN([gl_STRINGS_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
+
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_HEADER_STRINGS_H_DEFAULTS],
+[
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_STRCASECMP=1; AC_SUBST([HAVE_STRCASECMP])
+ HAVE_DECL_STRNCASECMP=1; AC_SUBST([HAVE_DECL_STRNCASECMP])
+])
Index: sys_select_h.m4
===================================================================
RCS file: sys_select_h.m4
diff -N sys_select_h.m4
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ sys_select_h.m4 15 Sep 2008 21:47:00 -0000 1.1
@@ -0,0 +1,29 @@
+# sys_select_h.m4 serial 4
+dnl Copyright (C) 2006-2008 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_HEADER_SYS_SELECT],
+[
+ AC_CACHE_CHECK([whether <sys/select.h> is self-contained],
+ [gl_cv_header_sys_select_h_selfcontained],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/select.h>]], [[]])],
+ [gl_cv_header_sys_select_h_selfcontained=yes],
+ [gl_cv_header_sys_select_h_selfcontained=no])
+ ])
+ if test $gl_cv_header_sys_select_h_selfcontained = yes; then
+ SYS_SELECT_H=''
+ else
+ SYS_SELECT_H='sys/select.h'
+ gl_CHECK_NEXT_HEADERS([sys/select.h])
+ if test $ac_cv_header_sys_select_h = yes; then
+ HAVE_SYS_SELECT_H=1
+ else
+ HAVE_SYS_SELECT_H=0
+ fi
+ AC_SUBST([HAVE_SYS_SELECT_H])
+ fi
+ AC_SUBST([SYS_SELECT_H])
+])
Index: threadlib.m4
===================================================================
RCS file: threadlib.m4
diff -N threadlib.m4
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ threadlib.m4 15 Sep 2008 21:47:00 -0000 1.1
@@ -0,0 +1,312 @@
+# threadlib.m4 serial 1 (gettext-0.18)
+dnl Copyright (C) 2005-2008 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 gl_THREADLIB
+dnl ------------
+dnl Tests for a multithreading library to be used.
+dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS,
+dnl USE_PTH_THREADS, USE_WIN32_THREADS
+dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use
+dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with
+dnl libtool).
+dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for
+dnl programs that really need multithread functionality. The difference
+dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak
+dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread".
+dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
+dnl multithread-safe programs.
+
+AC_DEFUN([gl_THREADLIB_EARLY],
+[
+ AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
+])
+
+dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once.
+
+AC_DEFUN([gl_THREADLIB_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
+ dnl declarations, on AIX 5 at least. Therefore it must come early.
+ AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl
+ AC_BEFORE([$0], [gl_ARGP])dnl
+
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems.
+ dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes
+ dnl AC_GNU_SOURCE.
+ m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
+ [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
+ [AC_REQUIRE([AC_GNU_SOURCE])])
+ dnl Check for multithreading.
+ m4_divert_text([DEFAULTS], [gl_use_threads_default=])
+ AC_ARG_ENABLE(threads,
+AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify
multithreading API])
+AC_HELP_STRING([--disable-threads], [build without multithread safety]),
+ [gl_use_threads=$enableval],
+ [if test -n "$gl_use_threads_default"; then
+ gl_use_threads="$gl_use_threads_default"
+ else
+ case "$host_os" in
+ dnl Disable multithreading by default on OSF/1, because it interferes
+ dnl with fork()/exec(): When msgexec is linked with -lpthread, its
+ dnl child process gets an endless segmentation fault inside execvp().
+ osf*) gl_use_threads=no ;;
+ *) gl_use_threads=yes ;;
+ esac
+ fi
+ ])
+ 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_THREADLIB. Needs to be expanded only once.
+
+AC_DEFUN([gl_THREADLIB_BODY],
+[
+ AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
+ gl_threads_api=none
+ LIBTHREAD=
+ LTLIBTHREAD=
+ LIBMULTITHREAD=
+ LTLIBMULTITHREAD=
+ if test "$gl_use_threads" != no; then
+ dnl Check whether the compiler and linker support weak declarations.
+ AC_MSG_CHECKING([whether imported symbols can be declared weak])
+ gl_have_weak=no
+ AC_TRY_LINK([extern void xyzzy ();
+#pragma weak xyzzy], [xyzzy();], [gl_have_weak=yes])
+ 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>. It's added above, in gl_THREADLIB_EARLY_BODY.
+ AC_CHECK_HEADER(pthread.h, gl_have_pthread_h=yes, gl_have_pthread_h=no)
+ if test "$gl_have_pthread_h" = yes; then
+ # Other possible tests:
+ # -lpthreads (FSU threads, PCthreads)
+ # -lgthreads
+ 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
+ # the second one only in libpthread, and lock.c needs it.
+ AC_TRY_LINK([#include <pthread.h>],
+ [pthread_mutex_lock((pthread_mutex_t*)0);
+ pthread_mutexattr_init((pthread_mutexattr_t*)0);],
+ [gl_have_pthread=yes])
+ # Test for libpthread by looking for pthread_kill. (Not pthread_self,
+ # since it is defined as a macro on OSF/1.)
+ if test -n "$gl_have_pthread"; then
+ # The program links fine without libpthread. But it may actually
+ # need to link with libpthread in order to create multiple threads.
+ AC_CHECK_LIB(pthread, pthread_kill,
+ [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
+ # On Solaris and HP-UX, most pthread functions exist also in libc.
+ # Therefore pthread_in_use() needs to actually try to create a
+ # thread: pthread_create from libc will fail, whereas
+ # pthread_create will actually create a thread.
+ case "$host_os" in
+ solaris* | hpux*)
+ AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], 1,
+ [Define if the pthread_in_use() detection is hard.])
+ esac
+ ])
+ else
+ # Some library is needed. Try libpthread and libc_r.
+ AC_CHECK_LIB(pthread, pthread_kill,
+ [gl_have_pthread=yes
+ LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
+ LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread])
+ if test -z "$gl_have_pthread"; then
+ # For FreeBSD 4.
+ AC_CHECK_LIB(c_r, pthread_kill,
+ [gl_have_pthread=yes
+ LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
+ LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r])
+ fi
+ fi
+ if test -n "$gl_have_pthread"; then
+ gl_threads_api=posix
+ AC_DEFINE([USE_POSIX_THREADS], 1,
+ [Define if the POSIX multithreading library can be used.])
+ if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+ if test $gl_have_weak = yes; then
+ AC_DEFINE([USE_POSIX_THREADS_WEAK], 1,
+ [Define if references to the POSIX multithreading library
should be made weak.])
+ LIBTHREAD=
+ LTLIBTHREAD=
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -z "$gl_have_pthread"; then
+ if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
+ gl_have_solaristhread=
+ gl_save_LIBS="$LIBS"
+ LIBS="$LIBS -lthread"
+ AC_TRY_LINK([#include <thread.h>
+#include <synch.h>],
+ [thr_self();],
+ [gl_have_solaristhread=yes])
+ LIBS="$gl_save_LIBS"
+ if test -n "$gl_have_solaristhread"; then
+ gl_threads_api=solaris
+ LIBTHREAD=-lthread
+ LTLIBTHREAD=-lthread
+ LIBMULTITHREAD="$LIBTHREAD"
+ LTLIBMULTITHREAD="$LTLIBTHREAD"
+ AC_DEFINE([USE_SOLARIS_THREADS], 1,
+ [Define if the old Solaris multithreading library can be used.])
+ if test $gl_have_weak = yes; then
+ AC_DEFINE([USE_SOLARIS_THREADS_WEAK], 1,
+ [Define if references to the old Solaris multithreading library
should be made weak.])
+ LIBTHREAD=
+ LTLIBTHREAD=
+ fi
+ fi
+ fi
+ fi
+ if test "$gl_use_threads" = pth; then
+ gl_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_LINKFLAGS(pth)
+ gl_have_pth=
+ gl_save_LIBS="$LIBS"
+ LIBS="$LIBS -lpth"
+ AC_TRY_LINK([#include <pth.h>], [pth_self();], gl_have_pth=yes)
+ LIBS="$gl_save_LIBS"
+ if test -n "$gl_have_pth"; then
+ gl_threads_api=pth
+ LIBTHREAD="$LIBPTH"
+ LTLIBTHREAD="$LTLIBPTH"
+ LIBMULTITHREAD="$LIBTHREAD"
+ LTLIBMULTITHREAD="$LTLIBTHREAD"
+ AC_DEFINE([USE_PTH_THREADS], 1,
+ [Define if the GNU Pth multithreading library can be used.])
+ if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+ if test $gl_have_weak = yes; then
+ AC_DEFINE([USE_PTH_THREADS_WEAK], 1,
+ [Define if references to the GNU Pth multithreading library
should be made weak.])
+ LIBTHREAD=
+ LTLIBTHREAD=
+ fi
+ fi
+ else
+ CPPFLAGS="$gl_save_CPPFLAGS"
+ fi
+ fi
+ if test -z "$gl_have_pthread"; then
+ if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then
+ if { case "$host_os" in
+ mingw*) true;;
+ *) false;;
+ esac
+ }; then
+ gl_threads_api=win32
+ AC_DEFINE([USE_WIN32_THREADS], 1,
+ [Define if the Win32 multithreading API can be used.])
+ fi
+ fi
+ fi
+ fi
+ AC_MSG_CHECKING([for multithread API to use])
+ AC_MSG_RESULT([$gl_threads_api])
+ AC_SUBST(LIBTHREAD)
+ AC_SUBST(LTLIBTHREAD)
+ AC_SUBST(LIBMULTITHREAD)
+ AC_SUBST(LTLIBMULTITHREAD)
+])
+
+AC_DEFUN([gl_THREADLIB],
+[
+ AC_REQUIRE([gl_THREADLIB_EARLY])
+ AC_REQUIRE([gl_THREADLIB_BODY])
+])
+
+
+dnl gl_DISABLE_THREADS
+dnl ------------------
+dnl Sets the gl_THREADLIB default so that threads are not used by default.
+dnl The user can still override it at installation time, by using the
+dnl configure option '--enable-threads'.
+
+AC_DEFUN([gl_DISABLE_THREADS], [
+ m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no])
+])
+
+
+dnl Survey of platforms:
+dnl
+dnl Platform Available Compiler Supports test-lock
+dnl flavours option weak result
+dnl --------------- --------- --------- -------- ---------
+dnl Linux 2.4/glibc posix -lpthread Y OK
+dnl
+dnl GNU Hurd/glibc posix
+dnl
+dnl FreeBSD 5.3 posix -lc_r Y
+dnl posix -lkse ? Y
+dnl posix -lpthread ? Y
+dnl posix -lthr Y
+dnl
+dnl FreeBSD 5.2 posix -lc_r Y
+dnl posix -lkse Y
+dnl posix -lthr Y
+dnl
+dnl FreeBSD 4.0,4.10 posix -lc_r Y OK
+dnl
+dnl NetBSD 1.6 --
+dnl
+dnl OpenBSD 3.4 posix -lpthread Y OK
+dnl
+dnl MacOS X 10.[123] posix -lpthread Y OK
+dnl
+dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9:
OK
+dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9:
OK
+dnl
+dnl HP-UX 11 posix -lpthread N (cc) OK
+dnl Y (gcc)
+dnl
+dnl IRIX 6.5 posix -lpthread Y 0.5
+dnl
+dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK
+dnl
+dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK
+dnl -lpthread (gcc) Y
+dnl
+dnl Cygwin posix -lpthread Y OK
+dnl
+dnl Any of the above pth -lpth 0.0
+dnl
+dnl Mingw win32 N OK
+dnl
+dnl BeOS 5 --
+dnl
+dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is
+dnl turned off:
+dnl OK if all three tests terminate OK,
+dnl 0.5 if the first test terminates OK but the second one loops endlessly,
+dnl 0.0 if the first test already loops endlessly.
Index: absolute-header.m4
===================================================================
RCS file: absolute-header.m4
diff -N absolute-header.m4
--- absolute-header.m4 22 Aug 2007 13:43:55 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,49 +0,0 @@
-# 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.
-
-dnl From Derek Price.
-
-# gl_ABSOLUTE_HEADER(HEADER1 HEADER2 ...)
-# ---------------------------------------
-# Find the absolute name of a header file, assuming the header exists.
-# If the header were sys/inttypes.h, this macro would define
-# ABSOLUTE_SYS_INTTYPES_H to the `""' quoted absolute name of sys/inttypes.h
-# in config.h
-# (e.g. `#define ABSOLUTE_SYS_INTTYPES_H "///usr/include/sys/inttypes.h"').
-# The three "///" are to pacify Sun C 5.8, which otherwise would say
-# "warning: #include of /usr/include/... may be non-portable".
-# Use `""', not `<>', so that the /// cannot be confused with a C99 comment.
-AC_DEFUN([gl_ABSOLUTE_HEADER],
-[AC_LANG_PREPROC_REQUIRE()dnl
-AC_FOREACH([gl_HEADER_NAME], [$1],
- [AS_VAR_PUSHDEF([gl_absolute_header],
- [gl_cv_absolute_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl
- AC_CACHE_CHECK([absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>],
- m4_quote(m4_defn([gl_absolute_header])),
- [AS_VAR_PUSHDEF([ac_header_exists],
- [ac_cv_header_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl
- AC_CHECK_HEADERS_ONCE(m4_quote(m4_defn([gl_HEADER_NAME])))dnl
- if test AS_VAR_GET(ac_header_exists) = yes; then
- AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include
<]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]])])
-dnl eval is necessary to expand ac_cpp.
-dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
- AS_VAR_SET(gl_absolute_header,
-[`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
-sed -n '\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{
- s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1#
- s#^/[^/]#//&#
- p
- q
-}'`])
- fi
- AS_VAR_POPDEF([ac_header_exists])dnl
- ])dnl
- AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_quote(m4_defn([gl_HEADER_NAME]))),
- ["AS_VAR_GET(gl_absolute_header)"],
- [Define this to an absolute name of
<]m4_quote(m4_defn([gl_HEADER_NAME]))[>.])
- AS_VAR_POPDEF([gl_absolute_header])dnl
-])dnl
-])# gl_ABSOLUTE_HEADER
Index: cycle-check.m4
===================================================================
RCS file: cycle-check.m4
diff -N cycle-check.m4
--- cycle-check.m4 22 Aug 2007 13:43:56 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-#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: eoverflow.m4
===================================================================
RCS file: eoverflow.m4
diff -N eoverflow.m4
--- eoverflow.m4 22 Aug 2007 13:43:57 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,70 +0,0 @@
-# eoverflow.m4 serial 2
-dnl Copyright (C) 2004, 2006 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-# The EOVERFLOW errno value ought to be defined in <errno.h>, according to
-# POSIX. But some systems (like AIX 3) don't define it, and some systems
-# (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined.
-
-# Define EOVERFLOW as a C macro and as a substituted macro in such a way that
-# 1. on all systems, after inclusion of <errno.h>, EOVERFLOW is usable,
-# 2. on systems where EOVERFLOW is defined elsewhere, we use the same numeric
-# value.
-
-AC_DEFUN([gl_EOVERFLOW],
-[
- AC_REQUIRE([AC_PROG_CC])dnl
-
- AC_CACHE_CHECK([for EOVERFLOW], ac_cv_decl_EOVERFLOW, [
- AC_EGREP_CPP(yes,[
-#include <errno.h>
-#ifdef EOVERFLOW
-yes
-#endif
- ], have_eoverflow=1)
- if test -n "$have_eoverflow"; then
- dnl EOVERFLOW exists in <errno.h>. Don't need to define EOVERFLOW
ourselves.
- ac_cv_decl_EOVERFLOW=yes
- else
- AC_EGREP_CPP(yes,[
-#define _XOPEN_SOURCE_EXTENDED 1
-#include <errno.h>
-#ifdef EOVERFLOW
-yes
-#endif
- ], have_eoverflow=1)
- if test -n "$have_eoverflow"; then
- dnl EOVERFLOW exists but is hidden.
- dnl Define it to the same value.
- AC_COMPUTE_INT([ac_cv_decl_EOVERFLOW], [EOVERFLOW], [
-#define _XOPEN_SOURCE_EXTENDED 1
-#include <errno.h>
-/* The following two lines are a workaround against an autoconf-2.52 bug. */
-#include <stdio.h>
-#include <stdlib.h>
-])
- else
- dnl EOVERFLOW isn't defined by the system. Define EOVERFLOW ourselves,
but
- dnl don't define it as EINVAL, because snprintf() callers want to
- dnl distinguish EINVAL and EOVERFLOW.
- ac_cv_decl_EOVERFLOW=E2BIG
- fi
- fi
- ])
- if test "$ac_cv_decl_EOVERFLOW" != yes; then
- AC_DEFINE_UNQUOTED([EOVERFLOW], [$ac_cv_decl_EOVERFLOW],
- [Define as good substitute value for EOVERFLOW.])
- EOVERFLOW="$ac_cv_decl_EOVERFLOW"
- AC_SUBST(EOVERFLOW)
- fi
-])
-
-dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
-dnl Remove this when we can assume autoconf >= 2.61.
-m4_ifdef([AC_COMPUTE_INT], [], [
- AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
-])
Index: ulonglong.m4
===================================================================
RCS file: ulonglong.m4
diff -N ulonglong.m4
--- ulonglong.m4 22 Aug 2007 13:44:04 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,48 +0,0 @@
-# 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,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Paul Eggert.
-
-# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
-# This fixes a bug in Autoconf 2.60, but can be removed once we
-# assume 2.61 everywhere.
-
-# Note: If the type '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],
- [ac_cv_type_unsigned_long_long_int],
- [AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[unsigned long long int ull = 18446744073709551615ULL;
- typedef int a[(18446744073709551615ULL <= (unsigned long long int)
-1
- ? 1 : -1)];
- int i = 63;]],
- [[unsigned long long int ullmax = 18446744073709551615ull;
- return (ull << 63 | ull >> 63 | ull << i | ull >> i
- | ullmax / ull | ullmax % ull);]])],
- [ac_cv_type_unsigned_long_long_int=yes],
- [ac_cv_type_unsigned_long_long_int=no])])
- if test $ac_cv_type_unsigned_long_long_int = yes; then
- AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], 1,
- [Define to 1 if the system has the type `unsigned long long int'.])
- fi
-])
-
-# This macro is obsolescent and should go away soon.
-AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG],
-[
- AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
- ac_cv_type_unsigned_long_long=$ac_cv_type_unsigned_long_long_int
- if test $ac_cv_type_unsigned_long_long = yes; then
- AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
- [Define if you have the 'unsigned long long' type.])
- fi
-])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Cvs-cvs] ccvs/m4 ChangeLog alloca.m4 arpa_inet_h.m4 d-ty...,
Derek Robert Price <=