don't compile mbchar.c unless both headers exist. See
<http://lists.gnu.org/archive/html/bug-gnulib/2005-09/msg00242.html>.
-# 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,
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])
:
])