summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-09-24 23:13:19 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-09-24 23:13:19 +0000
commita9d12230c84006dd28adf9c483b203cd68bc743d (patch)
treef2caad25249696f49fab38acf9029420b6fa9e15 /m4
parentfd02208ad26789aab6c727992fcf7dc95a210779 (diff)
downloadcoreutils-a9d12230c84006dd28adf9c483b203cd68bc743d.tar.xz
(gl_MBCHAR): Check for wchar.h and wctype.h, and
don't compile mbchar.c unless both headers exist. See <http://lists.gnu.org/archive/html/bug-gnulib/2005-09/msg00242.html>.
Diffstat (limited to 'm4')
-rw-r--r--m4/mbchar.m49
1 files changed, 8 insertions, 1 deletions
diff --git a/m4/mbchar.m4 b/m4/mbchar.m4
index dd613cbc6..7657b6974 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,
@@ -9,6 +9,13 @@ dnl From Bruno Haible.
AC_DEFUN([gl_MBCHAR],
[
+ AC_CHECK_HEADERS_ONCE(wchar.h wctype.h)
+
+ case $ac_cv_header_wchar_h,$ac_cv_header_wctype_h in
+ yes,yes)
+ AC_LIBOBJ([mbchar]);;
+ esac
+
AC_REQUIRE([AC_GNU_SOURCE])
:
])