[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo update (Sun Jul 15 18:53:01 EDT 2007)
From: |
Karl Berry |
Subject: |
texinfo update (Sun Jul 15 18:53:01 EDT 2007) |
Date: |
Sun, 15 Jul 2007 18:53:03 -0400 |
Index: gnulib/lib/.cvsignore
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/lib/.cvsignore,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- gnulib/lib/.cvsignore 25 Jun 2007 21:16:31 -0000 1.5
+++ gnulib/lib/.cvsignore 15 Jul 2007 22:30:25 -0000 1.6
@@ -16,3 +16,12 @@
malloca.c
malloca.h
malloca.valgrind
+config.charset
+localcharset.c
+localcharset.h
+ref-add.sin
+ref-del.sin
+streq.h
+unitypes.h
+uniwidth.h
+wcwidth.c
Index: gnulib/lib/Makefile.am
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/lib/Makefile.am,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- gnulib/lib/Makefile.am 25 Jun 2007 21:16:31 -0000 1.15
+++ gnulib/lib/Makefile.am 15 Jul 2007 22:30:26 -0000 1.16
@@ -11,7 +11,7 @@
# Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu
--source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --aux-dir=build-aux
--no-libtool --macro-prefix=gl getopt gettext mbswidth memcpy memmove mkstemp
strcase strdup strerror xalloc xsetenv
-AUTOMAKE_OPTIONS = 1.5 gnits
+AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects
noinst_HEADERS =
noinst_LIBRARIES =
@@ -60,6 +60,62 @@
## end gnulib module alloca-opt
+## begin gnulib module configmake
+
+# Retrieve values of the variables through 'configure' followed by
+# 'make', not directly through 'configure', so that a user who
+# sets some of these variables consistently on the 'make' command
+# line gets correct results.
+#
+# One advantage of this approach, compared to the classical
+# approach of adding -DLIBDIR=\"$(libdir)\" etc. to AM_CPPFLAGS,
+# is that it protects against the use of undefined variables.
+# If, say, $(libdir) is not set in the Makefile, LIBDIR is not
+# defined by this module, and code using LIBDIR gives a
+# compilation error.
+#
+# Another advantage is that 'make' output is shorter.
+#
+# Listed in the same order as the GNU makefile conventions.
+# The Automake-defined pkg* macros are appended, in the order
+# listed in the Automake 1.10a+ documentation.
+configmake.h: Makefile
+ rm -f address@hidden $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ echo '#define PREFIX "$(prefix)"'; \
+ echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
+ echo '#define BINDIR "$(bindir)"'; \
+ echo '#define SBINDIR "$(sbindir)"'; \
+ echo '#define LIBEXECDIR "$(libexecdir)"'; \
+ echo '#define DATAROOTDIR "$(datarootdir)"'; \
+ echo '#define DATADIR "$(datadir)"'; \
+ echo '#define SYSCONFDIR "$(sysconfdir)"'; \
+ echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
+ echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
+ echo '#define INCLUDEDIR "$(includedir)"'; \
+ echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
+ echo '#define DOCDIR "$(docdir)"'; \
+ echo '#define INFODIR "$(infodir)"'; \
+ echo '#define HTMLDIR "$(htmldir)"'; \
+ echo '#define DVIDIR "$(dvidir)"'; \
+ echo '#define PDFDIR "$(pdfdir)"'; \
+ echo '#define PSDIR "$(psdir)"'; \
+ echo '#define LIBDIR "$(libdir)"'; \
+ echo '#define LISPDIR "$(lispdir)"'; \
+ echo '#define LOCALEDIR "$(localedir)"'; \
+ echo '#define MANDIR "$(mandir)"'; \
+ echo '#define MANEXT "$(manext)"'; \
+ echo '#define PKGDATADIR "$(pkgdatadir)"'; \
+ echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
+ echo '#define PKGLIBDIR "$(pkglibdir)"'; \
+ echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
+ } | sed '/""/d' > address@hidden
+ mv address@hidden $@
+BUILT_SOURCES += configmake.h
+CLEANFILES += configmake.h configmake.h-t
+
+## end gnulib module configmake
+
## begin gnulib module error
@@ -132,6 +188,64 @@
## end gnulib module link-warning
+## begin gnulib module localcharset
+
+libgnu_a_SOURCES += localcharset.h localcharset.c
+
+# We need the following in order to install a simple file in $(libdir)
+# which is shared with other installed packages. We use a list of referencing
+# packages so that "make uninstall" will remove the file if and only if it
+# is not used by another installed package.
+# On systems with glibc-2.1 or newer, the file is redundant, therefore we
+# avoid installing it.
+
+all-local: charset.alias ref-add.sed ref-del.sed
+
+charset_alias = $(DESTDIR)$(libdir)/charset.alias
+charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
+install-exec-local: all-local
+ test $(GLIBC21) != no || $(mkinstalldirs) $(DESTDIR)$(libdir)
+ if test -f $(charset_alias); then \
+ sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+ rm -f $(charset_tmp) ; \
+ else \
+ if test $(GLIBC21) = no; then \
+ sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+ rm -f $(charset_tmp) ; \
+ fi ; \
+ fi
+
+uninstall-local: all-local
+ if test -f $(charset_alias); then \
+ sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
+ if grep '^# Packages using this file: $$' $(charset_tmp) \
+ > /dev/null; then \
+ rm -f $(charset_alias); \
+ else \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
+ fi; \
+ rm -f $(charset_tmp); \
+ fi
+
+charset.alias: config.charset
+ rm -f t-$@ $@
+ $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@
+ mv t-$@ $@
+
+SUFFIXES += .sed .sin
+.sin.sed:
+ rm -f t-$@ $@
+ sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@
+ mv t-$@ $@
+
+CLEANFILES += charset.alias ref-add.sed ref-del.sed
+
+EXTRA_DIST += config.charset ref-add.sin ref-del.sin
+
+## end gnulib module localcharset
+
## begin gnulib module malloca
libgnu_a_SOURCES += malloca.c
@@ -267,6 +381,13 @@
## end gnulib module strdup
+## begin gnulib module streq
+
+
+EXTRA_DIST += streq.h
+
+## end gnulib module streq
+
## begin gnulib module strerror
@@ -439,6 +560,28 @@
## end gnulib module unistd
+## begin gnulib module unitypes
+
+
+EXTRA_DIST += unitypes.h
+
+## end gnulib module unitypes
+
+## begin gnulib module uniwidth/base
+
+
+EXTRA_DIST += localcharset.h uniwidth.h
+
+## end gnulib module uniwidth/base
+
+## begin gnulib module uniwidth/width
+
+libgnu_a_SOURCES += uniwidth/width.c
+
+EXTRA_DIST += uniwidth/cjk.h
+
+## end gnulib module uniwidth/width
+
## begin gnulib module wchar
BUILT_SOURCES += $(WCHAR_H)
@@ -451,6 +594,10 @@
sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
-e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
-e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
+ -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \
+ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
+ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
+ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
< $(srcdir)/wchar_.h; \
} > address@hidden
mv address@hidden $@
@@ -485,7 +632,10 @@
## begin gnulib module wcwidth
-libgnu_a_SOURCES += wcwidth.h
+
+EXTRA_DIST += wcwidth.c
+
+EXTRA_libgnu_a_SOURCES += wcwidth.c
## end gnulib module wcwidth
Index: gnulib/lib/mbswidth.c
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/lib/mbswidth.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gnulib/lib/mbswidth.c 7 Feb 2007 17:00:38 -0000 1.1
+++ gnulib/lib/mbswidth.c 15 Jul 2007 22:30:26 -0000 1.2
@@ -30,12 +30,9 @@
/* Get isprint(). */
#include <ctype.h>
-/* Get mbstate_t, mbrtowc(), mbsinit(). */
+/* Get mbstate_t, mbrtowc(), mbsinit(), wcwidth(). */
#include <wchar.h>
-/* Get wcwidth(). */
-#include "wcwidth.h"
-
/* Get iswcntrl(). */
#include <wctype.h>
Index: gnulib/lib/stdint_.h
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/lib/stdint_.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- gnulib/lib/stdint_.h 25 Jun 2007 21:16:32 -0000 1.6
+++ gnulib/lib/stdint_.h 15 Jul 2007 22:30:26 -0000 1.7
@@ -66,9 +66,9 @@
/* In OpenBSD 3.8, <inttypes.h> includes <machine/types.h>, which defines
int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__.
<inttypes.h> also defines intptr_t and uintptr_t. */
-# define _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H
+# define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
# include <inttypes.h>
-# undef _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H
+# undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
#elif @HAVE_SYS_INTTYPES_H@
/* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */
Index: gnulib/lib/sys_time_.h
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/lib/sys_time_.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gnulib/lib/sys_time_.h 25 Jun 2007 21:16:32 -0000 1.2
+++ gnulib/lib/sys_time_.h 15 Jul 2007 22:30:27 -0000 1.3
@@ -18,31 +18,35 @@
/* Written by Paul Eggert. */
-#ifndef _GL_SYS_TIME_H
+#if defined _GL_SYS_TIME_H
+
+/* Simply delegate to the system's header, without adding anything. */
+# if @HAVE_SYS_TIME_H@
+# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
+# endif
-/* The include_next requires a split double-inclusion guard. */
-#if @HAVE_SYS_TIME_H@
-# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
#else
-# include <time.h>
-#endif
-#ifndef _GL_SYS_TIME_H
-#define _GL_SYS_TIME_H
+# define _GL_SYS_TIME_H
+
+# if @HAVE_SYS_TIME_H@
+# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
+# else
+# include <time.h>
+# endif
-#if ! @HAVE_STRUCT_TIMEVAL@
+# if ! @HAVE_STRUCT_TIMEVAL@
struct timeval
{
time_t tv_sec;
long int tv_usec;
};
-#endif
+# endif
-#if @REPLACE_GETTIMEOFDAY@
-# undef gettimeofday
-# define gettimeofday rpl_gettimeofday
+# if @REPLACE_GETTIMEOFDAY@
+# undef gettimeofday
+# define gettimeofday rpl_gettimeofday
int gettimeofday (struct timeval *restrict, void *restrict);
-#endif
+# endif
#endif /* _GL_SYS_TIME_H */
-#endif /* _GL_SYS_TIME_H */
Index: gnulib/lib/wchar_.h
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/lib/wchar_.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gnulib/lib/wchar_.h 25 Jun 2007 21:16:32 -0000 1.2
+++ gnulib/lib/wchar_.h 15 Jul 2007 22:30:27 -0000 1.3
@@ -22,7 +22,8 @@
* ISO C 99 <wchar.h> for platforms that have issues.
* <http://www.opengroup.org/susv3xbd/wchar.h.html>
*
- * For now, this just ensures proper prerequisite inclusion order.
+ * For now, this just ensures proper prerequisite inclusion order and
+ * the declaration of wcwidth().
*/
#ifndef _GL_WCHAR_H
@@ -45,5 +46,37 @@
#ifndef _GL_WCHAR_H
#define _GL_WCHAR_H
+/* The definition of GL_LINK_WARNING is copied here. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Return the number of screen columns needed for WC. */
+#if @GNULIB_WCWIDTH@
+# if @REPLACE_WCWIDTH@
+# undef wcwidth
+# define wcwidth rpl_wcwidth
+extern int wcwidth (wchar_t);
+# else
+# if !defined wcwidth && address@hidden@
+/* wcwidth exists but is not declared. */
+extern int wcwidth (int /* actually wchar_t */);
+# endif
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef wcwidth
+# define wcwidth(w) \
+ (GL_LINK_WARNING ("wcwidth is unportable - " \
+ "use gnulib module wcwidth for portability"), \
+ wcwidth (w))
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _GL_WCHAR_H */
#endif /* _GL_WCHAR_H */
Index: gnulib/lib/sys/time.h
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/lib/sys/time.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gnulib/lib/sys/time.h 5 Feb 2007 16:26:09 -0000 1.1
+++ gnulib/lib/sys/time.h 15 Jul 2007 22:30:27 -0000 1.2
@@ -19,27 +19,35 @@
/* Written by Paul Eggert. */
-#ifndef _gl_SYS_TIME_H
-#define _gl_SYS_TIME_H
+#if defined _GL_SYS_TIME_H
+
+/* Simply delegate to the system's header, without adding anything. */
+# if 1
+# include_next <sys/time.h>
+# endif
-#if 1
-# include "///usr/include/sys/time.h"
#else
-# include <time.h>
-#endif
-#if ! 1
+# define _GL_SYS_TIME_H
+
+# if 1
+# include_next <sys/time.h>
+# else
+# include <time.h>
+# endif
+
+# if ! 1
struct timeval
{
time_t tv_sec;
long int tv_usec;
};
-#endif
+# endif
-#if 0
-# undef gettimeofday
-# define gettimeofday rpl_gettimeofday
+# if 0
+# undef gettimeofday
+# define gettimeofday rpl_gettimeofday
int gettimeofday (struct timeval *restrict, void *restrict);
-#endif
+# endif
-#endif /* _gl_SYS_TIME_H */
+#endif /* _GL_SYS_TIME_H */
Index: gnulib/m4/.cvsignore
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/m4/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gnulib/m4/.cvsignore 25 Jun 2007 21:16:32 -0000 1.1
+++ gnulib/m4/.cvsignore 15 Jul 2007 22:30:27 -0000 1.2
@@ -1,3 +1,4 @@
intlmacosx.m4
malloca.m4
include_next.m4
+localcharset.m4
Index: gnulib/m4/gnulib-comp.m4
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/m4/gnulib-comp.m4,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- gnulib/m4/gnulib-comp.m4 25 Jun 2007 21:16:33 -0000 1.14
+++ gnulib/m4/gnulib-comp.m4 15 Jul 2007 22:30:27 -0000 1.15
@@ -25,6 +25,7 @@
m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
AC_REQUIRE([AC_PROG_RANLIB])
+ AC_REQUIRE([AM_PROG_CC_C_O])
AC_REQUIRE([AC_GNU_SOURCE])
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
])
@@ -51,6 +52,7 @@
AC_SUBST([LTLIBINTL])
gl_FUNC_GETTIMEOFDAY
gl_INLINE
+ gl_LOCALCHARSET
gl_MALLOCA
gl_MBSWIDTH
gl_FUNC_MEMCPY
@@ -75,6 +77,7 @@
gl_WCHAR_H
gl_WCTYPE_H
gl_FUNC_WCWIDTH
+ gl_WCHAR_MODULE_INDICATOR([wcwidth])
gl_XALLOC
LIBGNU_LIBDEPS="$gl_libdeps"
AC_SUBST([LIBGNU_LIBDEPS])
@@ -120,6 +123,7 @@
build-aux/config.rpath
build-aux/link-warning.h
lib/alloca_.h
+ lib/config.charset
lib/error.c
lib/error.h
lib/exitfail.c
@@ -130,6 +134,8 @@
lib/getopt_int.h
lib/gettext.h
lib/gettimeofday.c
+ lib/localcharset.c
+ lib/localcharset.h
lib/malloca.c
lib/malloca.h
lib/malloca.valgrind
@@ -138,12 +144,15 @@
lib/memcpy.c
lib/memmove.c
lib/mkstemp.c
+ lib/ref-add.sin
+ lib/ref-del.sin
lib/setenv.c
lib/setenv.h
lib/stdint_.h
lib/stdlib_.h
lib/strcasecmp.c
lib/strdup.c
+ lib/streq.h
lib/strerror.c
lib/string_.h
lib/strncasecmp.c
@@ -152,10 +161,14 @@
lib/tempname.c
lib/tempname.h
lib/unistd_.h
+ lib/unitypes.h
+ lib/uniwidth.h
+ lib/uniwidth/cjk.h
+ lib/uniwidth/width.c
lib/unsetenv.c
lib/wchar_.h
lib/wctype_.h
- lib/wcwidth.h
+ lib/wcwidth.c
lib/xalloc-die.c
lib/xalloc.h
lib/xmalloc.c
@@ -188,6 +201,7 @@
m4/lib-ld.m4
m4/lib-link.m4
m4/lib-prefix.m4
+ m4/localcharset.m4
m4/lock.m4
m4/longlong.m4
m4/malloca.m4
Index: gnulib/m4/wchar.m4
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/m4/wchar.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gnulib/m4/wchar.m4 25 Jun 2007 21:16:33 -0000 1.2
+++ gnulib/m4/wchar.m4 15 Jul 2007 22:30:27 -0000 1.3
@@ -7,30 +7,48 @@
dnl Written by Eric Blake.
-# wchar.m4 serial 3
+# wchar.m4 serial 4
AC_DEFUN([gl_WCHAR_H],
[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
AC_CACHE_CHECK([whether <wchar.h> is standalone],
[gl_cv_header_wchar_h_standalone],
[AC_COMPILE_IFELSE([[#include <wchar.h>
wchar_t w;]],
[gl_cv_header_wchar_h_standalone=yes],
[gl_cv_header_wchar_h_standalone=no])])
- if test $gl_cv_header_wchar_h_standalone = yes; then
- WCHAR_H=
- else
- dnl Check for <wchar.h> (missing in Linux uClibc when built without wide
- dnl character support).
- AC_CHECK_HEADERS_ONCE([wchar.h])
- if test $ac_cv_header_wchar_h = yes; then
- HAVE_WCHAR_H=1
- else
- HAVE_WCHAR_H=0
- fi
- AC_SUBST([HAVE_WCHAR_H])
- gl_CHECK_NEXT_HEADERS([wchar.h])
+ if test $gl_cv_header_wchar_h_standalone != yes; then
WCHAR_H=wchar.h
fi
+
+ dnl Prepare for creating substitute <wchar.h>.
+ dnl Do it always: WCHAR_H may be empty here but can be set later.
+ dnl Check for <wchar.h> (missing in Linux uClibc when built without wide
+ dnl character support).
+ AC_CHECK_HEADERS_ONCE([wchar.h])
+ if test $ac_cv_header_wchar_h = yes; then
+ HAVE_WCHAR_H=1
+ else
+ HAVE_WCHAR_H=0
+ fi
+ AC_SUBST([HAVE_WCHAR_H])
+ gl_CHECK_NEXT_HEADERS([wchar.h])
+])
+
+AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_WCHAR_H_DEFAULTS],
+[
+ GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH])
+ REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH])
+ WCHAR_H=
AC_SUBST([WCHAR_H])
])
Index: gnulib/m4/wcwidth.m4
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/m4/wcwidth.m4,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- gnulib/m4/wcwidth.m4 7 Feb 2007 17:00:38 -0000 1.6
+++ gnulib/m4/wcwidth.m4 15 Jul 2007 22:30:27 -0000 1.7
@@ -1,4 +1,4 @@
-# wcwidth.m4 serial 8
+# wcwidth.m4 serial 11
dnl Copyright (C) 2006, 2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -6,10 +6,11 @@
AC_DEFUN([gl_FUNC_WCWIDTH],
[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
dnl Persuade glibc <wchar.h> to declare wcwidth().
AC_REQUIRE([AC_GNU_SOURCE])
- AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([gt_TYPE_WCHAR_T])
AC_REQUIRE([gt_TYPE_WINT_T])
@@ -27,4 +28,57 @@
#include <stdio.h>
#include <time.h>
#include <wchar.h>
-])])
+])
+ if test $ac_cv_have_decl_wcwidth != yes; then
+ HAVE_DECL_WCWIDTH=0
+ fi
+
+ if test $ac_cv_func_wcwidth = no; then
+ REPLACE_WCWIDTH=1
+ else
+ dnl On MacOS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1.
+ dnl This leads to bugs in 'ls' (coreutils).
+ AC_CACHE_CHECK([whether wcwidth works reasonably in UTF-8 locales],
+ [gl_cv_func_wcwidth_works],
+ [
+ AC_TRY_RUN([
+#include <locale.h>
+/* AIX 3.2.5 declares wcwidth in <string.h>. */
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+#if !HAVE_DECL_WCWIDTH
+extern
+# ifdef __cplusplus
+"C"
+# endif
+int wcwidth (int);
+#endif
+int main ()
+{
+ if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
+ if (wcwidth (0x0301) > 0)
+ return 1;
+ return 0;
+}], [gl_cv_func_wcwidth_works=yes], [gl_cv_func_wcwidth_works=no],
+ [gl_cv_func_wcwidth_works="guessing no"])
+ ])
+ case "$gl_cv_func_wcwidth_works" in
+ *yes) ;;
+ *no) REPLACE_WCWIDTH=1 ;;
+ esac
+ fi
+ if test $REPLACE_WCWIDTH = 1; then
+ AC_LIBOBJ([wcwidth])
+ fi
+
+ if test $REPLACE_WCWIDTH = 1 || test $HAVE_DECL_WCWIDTH = 0; then
+ WCHAR_H=wchar.h
+ fi
+])
P gnulib/lib/.cvsignore
P gnulib/lib/Makefile.am
U gnulib/lib/charset.alias
U gnulib/lib/configmake.h
P gnulib/lib/mbswidth.c
U gnulib/lib/ref-add.sed
U gnulib/lib/ref-del.sed
P gnulib/lib/stdint_.h
P gnulib/lib/sys_time_.h
P gnulib/lib/wchar_.h
P gnulib/lib/sys/time.h
P gnulib/m4/.cvsignore
P gnulib/m4/gnulib-comp.m4
P gnulib/m4/wchar.m4
P gnulib/m4/wcwidth.m4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo update (Sun Jul 15 18:53:01 EDT 2007),
Karl Berry <=