Blame m4/iswblank.m4

Packit Service fdd496
# iswblank.m4 serial 4
Packit Service fdd496
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
Packit Service fdd496
dnl This file is free software; the Free Software Foundation
Packit Service fdd496
dnl gives unlimited permission to copy and/or distribute it,
Packit Service fdd496
dnl with or without modifications, as long as this notice is preserved.
Packit Service fdd496
Packit Service fdd496
AC_DEFUN([gl_FUNC_ISWBLANK],
Packit Service fdd496
[
Packit Service fdd496
  AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
Packit Service fdd496
  AC_REQUIRE([gl_WCTYPE_H])
Packit Service fdd496
  dnl Persuade glibc <wctype.h> to declare iswblank().
Packit Service fdd496
  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
Packit Service fdd496
  AC_CHECK_FUNCS_ONCE([iswblank])
Packit Service fdd496
  AC_CHECK_DECLS([iswblank], , , [[
Packit Service fdd496
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
Packit Service fdd496
   <wchar.h>.
Packit Service fdd496
   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
Packit Service fdd496
   before <wchar.h>.  */
Packit Service fdd496
#include <stddef.h>
Packit Service fdd496
#include <stdio.h>
Packit Service fdd496
#include <time.h>
Packit Service fdd496
#include <wchar.h>
Packit Service fdd496
#include <wctype.h>
Packit Service fdd496
]])
Packit Service fdd496
  if test $ac_cv_func_iswblank = no; then
Packit Service fdd496
    HAVE_ISWBLANK=0
Packit Service fdd496
    if test $ac_cv_have_decl_iswblank = yes; then
Packit Service fdd496
      REPLACE_ISWBLANK=1
Packit Service fdd496
    fi
Packit Service fdd496
  fi
Packit Service fdd496
  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
Packit Service fdd496
    dnl Redefine all of iswcntrl, ..., towupper in <wctype.h>.
Packit Service fdd496
    :
Packit Service fdd496
  else
Packit Service fdd496
    if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
Packit Service fdd496
      dnl Redefine only iswblank.
Packit Service fdd496
      :
Packit Service fdd496
    fi
Packit Service fdd496
  fi
Packit Service fdd496
Packit Service fdd496
])