1
1
dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
3
dnl Copyright (C) 2007 Free Software Foundation, Inc.
3
dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
4
4
dnl This file is free software; the Free Software Foundation
5
5
dnl gives unlimited permission to copy and/or distribute it,
6
6
dnl with or without modifications, as long as this notice is preserved.
8
8
dnl Written by Eric Blake.
12
12
AC_DEFUN([gl_WCHAR_H],
19
19
[gl_cv_header_wchar_h_standalone=yes],
20
20
[gl_cv_header_wchar_h_standalone=no])])
21
if test $gl_cv_header_wchar_h_standalone != yes; then
22
AC_REQUIRE([gt_TYPE_WINT_T])
23
if test $gt_cv_c_wint_t = yes; then
28
AC_SUBST([HAVE_WINT_T])
30
if test $gl_cv_header_wchar_h_standalone != yes || test $gt_cv_c_wint_t != yes; then
36
45
gl_CHECK_NEXT_HEADERS([wchar.h])
48
dnl Unconditionally enables the replacement of <wchar.h>.
49
AC_DEFUN([gl_REPLACE_WCHAR_H],
51
AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
39
55
AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
41
57
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
46
62
AC_DEFUN([gl_WCHAR_H_DEFAULTS],
48
GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH])
64
GNULIB_BTOWC=0; AC_SUBST([GNULIB_BTOWC])
65
GNULIB_WCTOB=0; AC_SUBST([GNULIB_WCTOB])
66
GNULIB_MBSINIT=0; AC_SUBST([GNULIB_MBSINIT])
67
GNULIB_MBRTOWC=0; AC_SUBST([GNULIB_MBRTOWC])
68
GNULIB_MBRLEN=0; AC_SUBST([GNULIB_MBRLEN])
69
GNULIB_MBSRTOWCS=0; AC_SUBST([GNULIB_MBSRTOWCS])
70
GNULIB_MBSNRTOWCS=0; AC_SUBST([GNULIB_MBSNRTOWCS])
71
GNULIB_WCRTOMB=0; AC_SUBST([GNULIB_WCRTOMB])
72
GNULIB_WCSRTOMBS=0; AC_SUBST([GNULIB_WCSRTOMBS])
73
GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS])
74
GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH])
49
75
dnl Assume proper GNU behavior unless another module says otherwise.
76
HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC])
77
HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT])
78
HAVE_MBRTOWC=1; AC_SUBST([HAVE_MBRTOWC])
79
HAVE_MBRLEN=1; AC_SUBST([HAVE_MBRLEN])
80
HAVE_MBSRTOWCS=1; AC_SUBST([HAVE_MBSRTOWCS])
81
HAVE_MBSNRTOWCS=1; AC_SUBST([HAVE_MBSNRTOWCS])
82
HAVE_WCRTOMB=1; AC_SUBST([HAVE_WCRTOMB])
83
HAVE_WCSRTOMBS=1; AC_SUBST([HAVE_WCSRTOMBS])
84
HAVE_WCSNRTOMBS=1; AC_SUBST([HAVE_WCSNRTOMBS])
85
HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB])
50
86
HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH])
87
REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T])
88
REPLACE_BTOWC=0; AC_SUBST([REPLACE_BTOWC])
89
REPLACE_WCTOB=0; AC_SUBST([REPLACE_WCTOB])
90
REPLACE_MBSINIT=0; AC_SUBST([REPLACE_MBSINIT])
91
REPLACE_MBRTOWC=0; AC_SUBST([REPLACE_MBRTOWC])
92
REPLACE_MBRLEN=0; AC_SUBST([REPLACE_MBRLEN])
93
REPLACE_MBSRTOWCS=0; AC_SUBST([REPLACE_MBSRTOWCS])
94
REPLACE_MBSNRTOWCS=0;AC_SUBST([REPLACE_MBSNRTOWCS])
95
REPLACE_WCRTOMB=0; AC_SUBST([REPLACE_WCRTOMB])
96
REPLACE_WCSRTOMBS=0; AC_SUBST([REPLACE_WCSRTOMBS])
51
97
REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH])
98
WCHAR_H=''; AC_SUBST([WCHAR_H])