From: Bruno Haible Date: Sat, 22 Jul 2006 15:33:12 +0000 (+0000) Subject: gnulib module 'wcwidth'. X-Git-Tag: 0.16.x-branchpoint~345 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba5a80ff3a54c53d076edd78f4a9be795eedab05;p=thirdparty%2Fgettext.git gnulib module 'wcwidth'. --- diff --git a/gettext-tools/m4/ChangeLog b/gettext-tools/m4/ChangeLog index b0c025bb2..f26735bd4 100644 --- a/gettext-tools/m4/ChangeLog +++ b/gettext-tools/m4/ChangeLog @@ -1,5 +1,8 @@ 2006-07-22 Bruno Haible + * wcwidth.m4: New file, from gnulib. + * Makefile.am (EXTRA_DIST): Add it. + * fnmatch.m4: Update from gnulib. * error.m4: Update from gnulib. diff --git a/gettext-tools/m4/Makefile.am b/gettext-tools/m4/Makefile.am index f58953581..2127047f5 100644 --- a/gettext-tools/m4/Makefile.am +++ b/gettext-tools/m4/Makefile.am @@ -101,4 +101,5 @@ tmpdir.m4 \ unionwait.m4 \ unistd_h.m4 \ unlocked-io.m4 \ +wcwidth.m4 \ xreadlink.m4 diff --git a/gettext-tools/m4/wcwidth.m4 b/gettext-tools/m4/wcwidth.m4 new file mode 100644 index 000000000..09cf55a0e --- /dev/null +++ b/gettext-tools/m4/wcwidth.m4 @@ -0,0 +1,26 @@ +# wcwidth.m4 serial 3 +dnl Copyright (C) 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_WCWIDTH], +[ + dnl Persuade glibc to declare wcwidth(). + AC_REQUIRE([AC_GNU_SOURCE]) + + AC_REQUIRE([AC_C_INLINE]) + AC_REQUIRE([gt_TYPE_WCHAR_T]) + + AC_CHECK_HEADERS_ONCE([wchar.h wctype.h]) + AC_CHECK_FUNCS_ONCE([iswprint wcwidth]) + + AC_CHECK_DECLS([wcwidth], [], [], [ +/* AIX 3.2.5 declares wcwidth in . */ +#if HAVE_STRING_H +# include +#endif +#if HAVE_WCHAR_H +# include +#endif +])])