wctype.m4 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
  2. dnl Copyright (C) 2006, 2007 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. dnl Written by Paul Eggert.
  7. AC_DEFUN([gl_WCTYPE_H],
  8. [
  9. AC_CHECK_FUNCS_ONCE([iswcntrl])
  10. AC_CHECK_HEADERS_ONCE([wctype.h])
  11. AC_REQUIRE([AC_C_INLINE])
  12. AC_REQUIRE([gt_TYPE_WINT_T])
  13. if test $gt_cv_c_wint_t = yes; then
  14. HAVE_WINT_T=1
  15. else
  16. HAVE_WINT_T=0
  17. fi
  18. AC_SUBST([HAVE_WINT_T])
  19. WCTYPE_H=wctype.h
  20. if test $ac_cv_header_wctype_h = yes; then
  21. if test "$ac_cv_func_iswcntrl" = yes; then
  22. WCTYPE_H=
  23. fi
  24. dnl Compute ABSOLUTE_WCTYPE_H even if WCTYPE_H is empty,
  25. dnl for the benefit of builds from non-distclean directories.
  26. gl_ABSOLUTE_HEADER([wctype.h])
  27. ABSOLUTE_WCTYPE_H=\"$gl_cv_absolute_wctype_h\"
  28. HAVE_WCTYPE_H=1
  29. else
  30. ABSOLUTE_WCTYPE_H=\"no/such/file/wctype.h\"
  31. HAVE_WCTYPE_H=0
  32. fi
  33. AC_SUBST([ABSOLUTE_WCTYPE_H])
  34. AC_SUBST([HAVE_WCTYPE_H])
  35. AC_SUBST([WCTYPE_H])
  36. ])