3 dnl autoconf tests required for use of mbswidth.c
6 AC_DEFUN([gl_MBSWIDTH],
8 AC_CHECK_HEADERS_ONCE(wchar.h wctype.h)
9 AC_CHECK_FUNCS_ONCE(isascii iswprint mbsinit)
10 AC_CHECK_FUNCS(iswcntrl wcwidth)
13 AC_CACHE_CHECK([whether wcwidth is declared], ac_cv_have_decl_wcwidth,
15 /* AIX 3.2.5 declares wcwidth in <string.h>. */
24 char *p = (char *) wcwidth;
26 ], ac_cv_have_decl_wcwidth=yes, ac_cv_have_decl_wcwidth=no)])
27 if test $ac_cv_have_decl_wcwidth = yes; then
32 AC_DEFINE_UNQUOTED(HAVE_DECL_WCWIDTH, $ac_val,
33 [Define to 1 if you have the declaration of wcwidth(), and to 0 otherwise.])