diff options
Diffstat (limited to 'gl/m4/wctype.m4')
-rw-r--r-- | gl/m4/wctype.m4 | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/gl/m4/wctype.m4 b/gl/m4/wctype.m4 new file mode 100644 index 0000000..62994c6 --- /dev/null +++ b/gl/m4/wctype.m4 | |||
@@ -0,0 +1,41 @@ | |||
1 | dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it. | ||
2 | |||
3 | dnl Copyright (C) 2006, 2007 Free Software Foundation, Inc. | ||
4 | dnl This file is free software; the Free Software Foundation | ||
5 | dnl gives unlimited permission to copy and/or distribute it, | ||
6 | dnl with or without modifications, as long as this notice is preserved. | ||
7 | |||
8 | dnl Written by Paul Eggert. | ||
9 | |||
10 | AC_DEFUN([gl_WCTYPE_H], | ||
11 | [ | ||
12 | AC_CHECK_FUNCS_ONCE([iswcntrl]) | ||
13 | AC_CHECK_HEADERS_ONCE([wctype.h]) | ||
14 | AC_REQUIRE([AC_C_INLINE]) | ||
15 | |||
16 | AC_REQUIRE([gt_TYPE_WINT_T]) | ||
17 | if test $gt_cv_c_wint_t = yes; then | ||
18 | HAVE_WINT_T=1 | ||
19 | else | ||
20 | HAVE_WINT_T=0 | ||
21 | fi | ||
22 | AC_SUBST([HAVE_WINT_T]) | ||
23 | |||
24 | WCTYPE_H=wctype.h | ||
25 | if test $ac_cv_header_wctype_h = yes; then | ||
26 | if test "$ac_cv_func_iswcntrl" = yes; then | ||
27 | WCTYPE_H= | ||
28 | fi | ||
29 | dnl Compute ABSOLUTE_WCTYPE_H even if WCTYPE_H is empty, | ||
30 | dnl for the benefit of builds from non-distclean directories. | ||
31 | gl_ABSOLUTE_HEADER([wctype.h]) | ||
32 | ABSOLUTE_WCTYPE_H=\"$gl_cv_absolute_wctype_h\" | ||
33 | HAVE_WCTYPE_H=1 | ||
34 | else | ||
35 | ABSOLUTE_WCTYPE_H=\"no/such/file/wctype.h\" | ||
36 | HAVE_WCTYPE_H=0 | ||
37 | fi | ||
38 | AC_SUBST([ABSOLUTE_WCTYPE_H]) | ||
39 | AC_SUBST([HAVE_WCTYPE_H]) | ||
40 | AC_SUBST([WCTYPE_H]) | ||
41 | ]) | ||