]>
Commit | Line | Data |
---|---|---|
80483e8e | 1 | #serial 8 |
c0acc0f5 PE |
2 | |
3 | dnl autoconf tests required for use of mbswidth.c | |
4 | dnl From Bruno Haible. | |
5 | ||
6 | AC_DEFUN([jm_PREREQ_MBSWIDTH], | |
7 | [ | |
80483e8e | 8 | AC_CHECK_HEADERS(wchar.h wctype.h) |
c0acc0f5 PE |
9 | AC_CHECK_FUNCS(isascii iswcntrl iswprint mbsinit wcwidth) |
10 | jm_FUNC_MBRTOWC | |
11 | ||
12 | AC_CACHE_CHECK([whether wcwidth is declared], ac_cv_have_decl_wcwidth, | |
13 | [AC_TRY_COMPILE([ | |
14 | /* AIX 3.2.5 declares wcwidth in <string.h>. */ | |
15 | #if HAVE_STRING_H | |
16 | # include <string.h> | |
17 | #endif | |
18 | #if HAVE_WCHAR_H | |
19 | # include <wchar.h> | |
20 | #endif | |
21 | ], [ | |
22 | #ifndef wcwidth | |
23 | char *p = (char *) wcwidth; | |
24 | #endif | |
25 | ], ac_cv_have_decl_wcwidth=yes, ac_cv_have_decl_wcwidth=no)]) | |
26 | if test $ac_cv_have_decl_wcwidth = yes; then | |
27 | ac_val=1 | |
28 | else | |
29 | ac_val=0 | |
30 | fi | |
31 | AC_DEFINE_UNQUOTED(HAVE_DECL_WCWIDTH, $ac_val, | |
32 | [Define to 1 if you have the declaration of wcwidth(), and to 0 otherwise.]) | |
33 | ||
34 | AC_TYPE_MBSTATE_T | |
35 | ]) |