summaryrefslogtreecommitdiff
path: root/m4/mbchar.m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2005-09-26 13:58:51 +0000
committerBruno Haible <bruno@clisp.org>2005-09-26 13:58:51 +0000
commitbe4b03ff802ce76ee841d09d7546039d5e991127 (patch)
treeb855fd546c6cad1e001d2e97ccfe7f3645f8f998 /m4/mbchar.m4
parentfbf26a89d86387bcf6f801dcd4455e2751c3867e (diff)
downloadgnulib-be4b03ff802ce76ee841d09d7546039d5e991127.tar.gz
Deal with the fact that mbchar.h, mbfile.h, mbiter.h, mbuiter.h can
only be #included conditionally.
Diffstat (limited to 'm4/mbchar.m4')
-rw-r--r--m4/mbchar.m410
1 files changed, 8 insertions, 2 deletions
diff --git a/m4/mbchar.m4 b/m4/mbchar.m4
index dd613cbc69..df351a6eb2 100644
--- a/m4/mbchar.m4
+++ b/m4/mbchar.m4
@@ -1,4 +1,4 @@
-# mbchar.m4 serial 1
+# mbchar.m4 serial 2
dnl Copyright (C) 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -10,5 +10,11 @@ dnl From Bruno Haible.
AC_DEFUN([gl_MBCHAR],
[
AC_REQUIRE([AC_GNU_SOURCE])
- :
+ dnl The following line is that so the user can test
+ dnl HAVE_WCHAR_H && HAVE_WCTYPE_H before #include "mbchar.h".
+ AC_CHECK_HEADERS_ONCE(wchar.h wctype.h)
+ dnl Compile mbchar.c only if HAVE_WCHAR_H && HAVE_WCTYPE_H.
+ if test $ac_cv_header_wchar_h = yes && test $ac_cv_header_wctype_h = yes; then
+ AC_LIBOBJ([mbchar])
+ fi
])