2000-08-07 15:15:25 +08:00
|
|
|
# serial 8
|
2000-06-24 05:00:53 +08:00
|
|
|
|
|
|
|
# From Paul Eggert.
|
|
|
|
|
2000-07-14 23:56:42 +08:00
|
|
|
# BeOS 5 has <wchar.h> but does not define mbstate_t,
|
2000-06-24 05:00:53 +08:00
|
|
|
# so you can't declare an object of that type.
|
|
|
|
# Check for this incompatibility with Standard C.
|
|
|
|
|
2000-06-29 04:29:27 +08:00
|
|
|
# Include stdlib.h first, because otherwise this test would fail on Linux
|
2000-07-14 23:56:42 +08:00
|
|
|
# (at least glibc-2.1.3) because the "_XOPEN_SOURCE 500" definition elicits
|
2000-06-25 16:48:58 +08:00
|
|
|
# a syntax error in wchar.h due to the use of undefined __int32_t.
|
|
|
|
|
2000-07-14 23:56:42 +08:00
|
|
|
AC_DEFUN(AC_MBSTATE_T,
|
2000-07-03 04:21:30 +08:00
|
|
|
[
|
2000-07-04 15:11:28 +08:00
|
|
|
AC_CHECK_HEADERS(stdlib.h)
|
|
|
|
|
2000-07-14 23:56:42 +08:00
|
|
|
AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
|
2000-06-29 04:29:27 +08:00
|
|
|
[AC_TRY_COMPILE([
|
|
|
|
#if HAVE_STDLIB_H
|
|
|
|
# include <stdlib.h>
|
|
|
|
#endif
|
2000-06-25 16:48:58 +08:00
|
|
|
#include <wchar.h>],
|
2000-06-24 05:00:53 +08:00
|
|
|
[mbstate_t x; return sizeof x;],
|
2000-07-14 23:56:42 +08:00
|
|
|
ac_cv_type_mbstate_t=yes,
|
|
|
|
ac_cv_type_mbstate_t=no)])
|
|
|
|
if test $ac_cv_type_mbstate_t = no; then
|
2000-08-07 15:15:25 +08:00
|
|
|
AC_DEFINE(mbstate_t, int,
|
2000-07-14 23:56:42 +08:00
|
|
|
[Define to a type if <wchar.h> does not define.])
|
2000-06-24 05:00:53 +08:00
|
|
|
fi])
|