+2007-05-01 Bruno Haible <bruno@clisp.org>
+
+ * lib/wctype_.h: Test HAVE_ISWCNTRL at configure time.
+ * m4/wctype.m4 (gl_WCTYPE_H): Substitute HAVE_ISWCNTRL.
+ * modules/wctype (Makefile.am): Substitute HAVE_ISWCNTRL instead of
+ HAVE_WCTYPE_CTMP_BUG into wctype.h.
+
2007-05-01 Bruno Haible <bruno@clisp.org>
* lib/sys_stat_.h: Test HAVE_LSTAT, HAVE_DECL_MKDIR, HAVE_IO_H at
* m4/isc-posix.m4: New file.
-1998-05-10 Jim Meyering <meyering@ascend.com>
\ No newline at end of file
+1998-05-10 Jim Meyering <meyering@ascend.com>
/* FreeBSD 4.4 to 4.11 has <wctype.h> but lacks the functions.
Assume all 12 functions are implemented the same way, or not at all. */
-#if ! HAVE_ISWCNTRL
+#if ! @HAVE_ISWCNTRL@
/* IRIX 5.3 has macros but no functions, its isw* macros refer to an
undefined variable _ctmp_ and to <ctype.h> macros like _P, and they
AC_DEFUN([gl_WCTYPE_H],
[
AC_CHECK_FUNCS_ONCE([iswcntrl])
+ if test $ac_cv_func_iswcntrl = yes; then
+ HAVE_ISWCNTRL=1
+ else
+ HAVE_ISWCNTRL=0
+ fi
+ AC_SUBST([HAVE_ISWCNTRL])
AC_CHECK_HEADERS_ONCE([wctype.h])
AC_REQUIRE([AC_C_INLINE])
WCTYPE_H=wctype.h
if test $ac_cv_header_wctype_h = yes; then
- if test "$ac_cv_func_iswcntrl" = yes; then
+ if test $ac_cv_func_iswcntrl = yes; then
WCTYPE_H=
fi
dnl Compute ABSOLUTE_WCTYPE_H even if WCTYPE_H is empty,
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \
-e 's|@''ABSOLUTE_WCTYPE_H''@|$(ABSOLUTE_WCTYPE_H)|g' \
- -e 's/@''HAVE_WCTYPE_CTMP_BUG''@/$(HAVE_WCTYPE_CTMP_BUG)/g' \
+ -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \
-e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
< $(srcdir)/wctype_.h; \
} > $@-t