summaryrefslogtreecommitdiff
path: root/m4/mbswidth.m4
blob: 085c8849c8c28634d636d6a982c757cc550a70ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#serial 4

dnl autoconf tests required for use of mbswidth.c
dnl From Bruno Haible.

AC_DEFUN(jm_PREREQ_MBSWIDTH,
[
  AC_REQUIRE([AC_HEADER_STDC])
  AC_REQUIRE([AM_C_PROTOTYPES])
  AC_CHECK_HEADERS(limits.h stdlib.h string.h wchar.h wctype.h)
  AC_CHECK_FUNCS(isascii iswprint wcwidth)
  jm_FUNC_MBRTOWC
  headers='
#     if HAVE_WCHAR_H
#      include <wchar.h>
#     endif
'
  AC_CHECK_DECLS([wcwidth], , , $headers)
  AC_MBSTATE_T
])