iswblank.m4 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # iswblank.m4 serial 4
  2. dnl Copyright (C) 2011-2017 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. AC_DEFUN([gl_FUNC_ISWBLANK],
  7. [
  8. AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
  9. AC_REQUIRE([gl_WCTYPE_H])
  10. dnl Persuade glibc <wctype.h> to declare iswblank().
  11. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
  12. AC_CHECK_FUNCS_ONCE([iswblank])
  13. AC_CHECK_DECLS([iswblank], , , [[
  14. /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
  15. <wchar.h>.
  16. BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
  17. before <wchar.h>. */
  18. #include <stddef.h>
  19. #include <stdio.h>
  20. #include <time.h>
  21. #include <wchar.h>
  22. #include <wctype.h>
  23. ]])
  24. if test $ac_cv_func_iswblank = no; then
  25. HAVE_ISWBLANK=0
  26. if test $ac_cv_have_decl_iswblank = yes; then
  27. REPLACE_ISWBLANK=1
  28. fi
  29. fi
  30. if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
  31. dnl Redefine all of iswcntrl, ..., towupper in <wctype.h>.
  32. :
  33. else
  34. if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
  35. dnl Redefine only iswblank.
  36. :
  37. fi
  38. fi
  39. ])