Hash :
cbe8a0a3
Author :
Date :
2011-02-06T15:51:55
New module 'wcswidth'. * modules/wcswidth: New file. * lib/wchar.in.h (wcswidth): New declaration. * lib/wcswidth.c: New file. * lib/wcswidth-impl.h: New file, from libutf8 with modifications. * m4/wcswidth.m4: New file. * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcswidth is declared. (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSWIDTH, HAVE_WCSWIDTH, REPLACE_WCSWIDTH. * modules/wchar (Makefile.am): Substitute GNULIB_WCSWIDTH, HAVE_WCSWIDTH, REPLACE_WCSWIDTH. * tests/test-wchar-c++.cc: Test the declaration of wcswidth. * doc/posix-functions/wcswidth.texi: Mention the new module.
# wcswidth.m4 serial 1
dnl Copyright (C) 2011 Free Software Foundation, Inc.
dnl This file is free software; the Free 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_WCSWIDTH],
[
AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
AC_REQUIRE([gl_FUNC_WCWIDTH])
AC_CHECK_FUNCS_ONCE([wcswidth])
if test $ac_cv_func_wcswidth = no; then
HAVE_WCSWIDTH=0
else
if test $REPLACE_WCWIDTH = 1; then
dnl If wcwidth needed to be replaced, wcswidth needs to be replaced
dnl as well.
REPLACE_WCSWIDTH=1
fi
fi
if test $HAVE_WCSWIDTH = 0 || test $REPLACE_WCSWIDTH = 1; then
AC_LIBOBJ([wcswidth])
fi
])