Portability to BeOS.
[gnulib.git] / m4 / mbchar.m4
1 # mbchar.m4 serial 4
2 dnl Copyright (C) 2005-2006 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
6
7 dnl autoconf tests required for use of mbchar.m4
8 dnl From Bruno Haible.
9
10 AC_DEFUN([gl_MBCHAR],
11 [
12   AC_REQUIRE([AC_GNU_SOURCE])
13   dnl The following line is that so the user can test HAVE_WCHAR_H
14   dnl before #include "mbchar.h".
15   AC_CHECK_HEADERS_ONCE([wchar.h])
16   dnl Compile mbchar.c only if HAVE_WCHAR_H.
17   if test $ac_cv_header_wchar_h = yes; then
18     AC_LIBOBJ([mbchar])
19     dnl Prerequisites of mbchar.h and mbchar.c.
20     AC_CHECK_HEADERS_ONCE([wctype.h])
21     AC_CHECK_FUNCS([iswcntrl])
22   fi
23 ])