annotate m4/wchar.m4 @ 276:23034db7dd8a 2.5

fixed expression 'slots' to not store null on a pass 1 store
author lost
date Mon, 31 Aug 2009 08:39:36 +0000
parents d5392bb5da3c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
272
d5392bb5da3c Added generated files
lost
parents:
diff changeset
1 dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
d5392bb5da3c Added generated files
lost
parents:
diff changeset
2
d5392bb5da3c Added generated files
lost
parents:
diff changeset
3 dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
d5392bb5da3c Added generated files
lost
parents:
diff changeset
4 dnl This file is free software; the Free Software Foundation
d5392bb5da3c Added generated files
lost
parents:
diff changeset
5 dnl gives unlimited permission to copy and/or distribute it,
d5392bb5da3c Added generated files
lost
parents:
diff changeset
6 dnl with or without modifications, as long as this notice is preserved.
d5392bb5da3c Added generated files
lost
parents:
diff changeset
7
d5392bb5da3c Added generated files
lost
parents:
diff changeset
8 dnl Written by Eric Blake.
d5392bb5da3c Added generated files
lost
parents:
diff changeset
9
d5392bb5da3c Added generated files
lost
parents:
diff changeset
10 # wchar.m4 serial 22
d5392bb5da3c Added generated files
lost
parents:
diff changeset
11
d5392bb5da3c Added generated files
lost
parents:
diff changeset
12 AC_DEFUN([gl_WCHAR_H],
d5392bb5da3c Added generated files
lost
parents:
diff changeset
13 [
d5392bb5da3c Added generated files
lost
parents:
diff changeset
14 AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
15 AC_CACHE_CHECK([whether <wchar.h> is standalone],
d5392bb5da3c Added generated files
lost
parents:
diff changeset
16 [gl_cv_header_wchar_h_standalone],
d5392bb5da3c Added generated files
lost
parents:
diff changeset
17 [AC_COMPILE_IFELSE([[#include <wchar.h>
d5392bb5da3c Added generated files
lost
parents:
diff changeset
18 wchar_t w;]],
d5392bb5da3c Added generated files
lost
parents:
diff changeset
19 [gl_cv_header_wchar_h_standalone=yes],
d5392bb5da3c Added generated files
lost
parents:
diff changeset
20 [gl_cv_header_wchar_h_standalone=no])])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
21
d5392bb5da3c Added generated files
lost
parents:
diff changeset
22 AC_REQUIRE([gt_TYPE_WINT_T])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
23 if test $gt_cv_c_wint_t = yes; then
d5392bb5da3c Added generated files
lost
parents:
diff changeset
24 HAVE_WINT_T=1
d5392bb5da3c Added generated files
lost
parents:
diff changeset
25 else
d5392bb5da3c Added generated files
lost
parents:
diff changeset
26 HAVE_WINT_T=0
d5392bb5da3c Added generated files
lost
parents:
diff changeset
27 fi
d5392bb5da3c Added generated files
lost
parents:
diff changeset
28 AC_SUBST([HAVE_WINT_T])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
29
d5392bb5da3c Added generated files
lost
parents:
diff changeset
30 if test $gl_cv_header_wchar_h_standalone != yes || test $gt_cv_c_wint_t != yes; then
d5392bb5da3c Added generated files
lost
parents:
diff changeset
31 WCHAR_H=wchar.h
d5392bb5da3c Added generated files
lost
parents:
diff changeset
32 fi
d5392bb5da3c Added generated files
lost
parents:
diff changeset
33
d5392bb5da3c Added generated files
lost
parents:
diff changeset
34 dnl Prepare for creating substitute <wchar.h>.
d5392bb5da3c Added generated files
lost
parents:
diff changeset
35 dnl Do it always: WCHAR_H may be empty here but can be set later.
d5392bb5da3c Added generated files
lost
parents:
diff changeset
36 dnl Check for <wchar.h> (missing in Linux uClibc when built without wide
d5392bb5da3c Added generated files
lost
parents:
diff changeset
37 dnl character support).
d5392bb5da3c Added generated files
lost
parents:
diff changeset
38 AC_CHECK_HEADERS_ONCE([wchar.h])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
39 if test $ac_cv_header_wchar_h = yes; then
d5392bb5da3c Added generated files
lost
parents:
diff changeset
40 HAVE_WCHAR_H=1
d5392bb5da3c Added generated files
lost
parents:
diff changeset
41 else
d5392bb5da3c Added generated files
lost
parents:
diff changeset
42 HAVE_WCHAR_H=0
d5392bb5da3c Added generated files
lost
parents:
diff changeset
43 fi
d5392bb5da3c Added generated files
lost
parents:
diff changeset
44 AC_SUBST([HAVE_WCHAR_H])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
45 gl_CHECK_NEXT_HEADERS([wchar.h])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
46 ])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
47
d5392bb5da3c Added generated files
lost
parents:
diff changeset
48 dnl Unconditionally enables the replacement of <wchar.h>.
d5392bb5da3c Added generated files
lost
parents:
diff changeset
49 AC_DEFUN([gl_REPLACE_WCHAR_H],
d5392bb5da3c Added generated files
lost
parents:
diff changeset
50 [
d5392bb5da3c Added generated files
lost
parents:
diff changeset
51 AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
52 WCHAR_H=wchar.h
d5392bb5da3c Added generated files
lost
parents:
diff changeset
53 ])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
54
d5392bb5da3c Added generated files
lost
parents:
diff changeset
55 AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
d5392bb5da3c Added generated files
lost
parents:
diff changeset
56 [
d5392bb5da3c Added generated files
lost
parents:
diff changeset
57 dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
d5392bb5da3c Added generated files
lost
parents:
diff changeset
58 AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
59 GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
d5392bb5da3c Added generated files
lost
parents:
diff changeset
60 ])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
61
d5392bb5da3c Added generated files
lost
parents:
diff changeset
62 AC_DEFUN([gl_WCHAR_H_DEFAULTS],
d5392bb5da3c Added generated files
lost
parents:
diff changeset
63 [
d5392bb5da3c Added generated files
lost
parents:
diff changeset
64 GNULIB_BTOWC=0; AC_SUBST([GNULIB_BTOWC])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
65 GNULIB_WCTOB=0; AC_SUBST([GNULIB_WCTOB])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
66 GNULIB_MBSINIT=0; AC_SUBST([GNULIB_MBSINIT])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
67 GNULIB_MBRTOWC=0; AC_SUBST([GNULIB_MBRTOWC])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
68 GNULIB_MBRLEN=0; AC_SUBST([GNULIB_MBRLEN])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
69 GNULIB_MBSRTOWCS=0; AC_SUBST([GNULIB_MBSRTOWCS])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
70 GNULIB_MBSNRTOWCS=0; AC_SUBST([GNULIB_MBSNRTOWCS])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
71 GNULIB_WCRTOMB=0; AC_SUBST([GNULIB_WCRTOMB])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
72 GNULIB_WCSRTOMBS=0; AC_SUBST([GNULIB_WCSRTOMBS])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
73 GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
74 GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
75 dnl Assume proper GNU behavior unless another module says otherwise.
d5392bb5da3c Added generated files
lost
parents:
diff changeset
76 HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
77 HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
78 HAVE_MBRTOWC=1; AC_SUBST([HAVE_MBRTOWC])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
79 HAVE_MBRLEN=1; AC_SUBST([HAVE_MBRLEN])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
80 HAVE_MBSRTOWCS=1; AC_SUBST([HAVE_MBSRTOWCS])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
81 HAVE_MBSNRTOWCS=1; AC_SUBST([HAVE_MBSNRTOWCS])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
82 HAVE_WCRTOMB=1; AC_SUBST([HAVE_WCRTOMB])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
83 HAVE_WCSRTOMBS=1; AC_SUBST([HAVE_WCSRTOMBS])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
84 HAVE_WCSNRTOMBS=1; AC_SUBST([HAVE_WCSNRTOMBS])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
85 HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
86 HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
87 REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
88 REPLACE_BTOWC=0; AC_SUBST([REPLACE_BTOWC])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
89 REPLACE_WCTOB=0; AC_SUBST([REPLACE_WCTOB])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
90 REPLACE_MBSINIT=0; AC_SUBST([REPLACE_MBSINIT])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
91 REPLACE_MBRTOWC=0; AC_SUBST([REPLACE_MBRTOWC])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
92 REPLACE_MBRLEN=0; AC_SUBST([REPLACE_MBRLEN])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
93 REPLACE_MBSRTOWCS=0; AC_SUBST([REPLACE_MBSRTOWCS])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
94 REPLACE_MBSNRTOWCS=0;AC_SUBST([REPLACE_MBSNRTOWCS])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
95 REPLACE_WCRTOMB=0; AC_SUBST([REPLACE_WCRTOMB])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
96 REPLACE_WCSRTOMBS=0; AC_SUBST([REPLACE_WCSRTOMBS])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
97 REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
98 WCHAR_H=''; AC_SUBST([WCHAR_H])
d5392bb5da3c Added generated files
lost
parents:
diff changeset
99 ])