summaryrefslogtreecommitdiffstats
path: root/gl/m4/wchar.m4
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2008-02-12 11:07:18 (GMT)
committerThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2008-02-12 11:07:18 (GMT)
commitbd7029a99b0c2974265c6665638ef14a052f42ab (patch)
treef5661ba73366d81ef6e91f889ea7fec5ebe07b6b /gl/m4/wchar.m4
parentf99612320d6eda67644c07be04bb21aa4d7789db (diff)
downloadmonitoring-plugins-bd7029a99b0c2974265c6665638ef14a052f42ab.tar.gz
Sync to latest Gnulib
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1925 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'gl/m4/wchar.m4')
-rw-r--r--gl/m4/wchar.m439
1 files changed, 32 insertions, 7 deletions
diff --git a/gl/m4/wchar.m4 b/gl/m4/wchar.m4
index 068f22d..70b1248 100644
--- a/gl/m4/wchar.m4
+++ b/gl/m4/wchar.m4
@@ -7,23 +7,48 @@ dnl with or without modifications, as long as this notice is preserved.
7 7
8dnl Written by Eric Blake. 8dnl Written by Eric Blake.
9 9
10# wchar.m4 serial 1 10# wchar.m4 serial 4
11 11
12AC_DEFUN([gl_WCHAR_H], 12AC_DEFUN([gl_WCHAR_H],
13[ 13[
14 AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
14 AC_CACHE_CHECK([whether <wchar.h> is standalone], 15 AC_CACHE_CHECK([whether <wchar.h> is standalone],
15 [gl_cv_header_wchar_h_standalone], 16 [gl_cv_header_wchar_h_standalone],
16 [AC_COMPILE_IFELSE([[#include <wchar.h> 17 [AC_COMPILE_IFELSE([[#include <wchar.h>
17wchar_t w;]], 18wchar_t w;]],
18 [gl_cv_header_wchar_h_standalone=yes], 19 [gl_cv_header_wchar_h_standalone=yes],
19 [gl_cv_header_wchar_h_standalone=no])]) 20 [gl_cv_header_wchar_h_standalone=no])])
20 if test $gl_cv_header_wchar_h_standalone = yes; then 21 if test $gl_cv_header_wchar_h_standalone != yes; then
21 WCHAR_H=
22 else
23 gl_ABSOLUTE_HEADER([wchar.h])
24 ABSOLUTE_WCHAR_H=\"$gl_cv_absolute_wchar_h\"
25 WCHAR_H=wchar.h 22 WCHAR_H=wchar.h
26 fi 23 fi
27 AC_SUBST([ABSOLUTE_WCHAR_H]) 24
25 dnl Prepare for creating substitute <wchar.h>.
26 dnl Do it always: WCHAR_H may be empty here but can be set later.
27 dnl Check for <wchar.h> (missing in Linux uClibc when built without wide
28 dnl character support).
29 AC_CHECK_HEADERS_ONCE([wchar.h])
30 if test $ac_cv_header_wchar_h = yes; then
31 HAVE_WCHAR_H=1
32 else
33 HAVE_WCHAR_H=0
34 fi
35 AC_SUBST([HAVE_WCHAR_H])
36 gl_CHECK_NEXT_HEADERS([wchar.h])
37])
38
39AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
40[
41 dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
42 AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
43 GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
44])
45
46AC_DEFUN([gl_WCHAR_H_DEFAULTS],
47[
48 GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH])
49 dnl Assume proper GNU behavior unless another module says otherwise.
50 HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH])
51 REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH])
52 WCHAR_H=
28 AC_SUBST([WCHAR_H]) 53 AC_SUBST([WCHAR_H])
29]) 54])