1dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
2
3dnl Copyright (C) 2007 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
7
8dnl Written by Eric Blake.
9
10# wchar.m4 serial 1
11
12AC_DEFUN([gl_WCHAR_H],
13[
14  AC_CACHE_CHECK([whether <wchar.h> is standalone],
15    [gl_cv_header_wchar_h_standalone],
16    [AC_COMPILE_IFELSE([[#include <wchar.h>
17wchar_t w;]],
18      [gl_cv_header_wchar_h_standalone=yes],
19      [gl_cv_header_wchar_h_standalone=no])])
20  if test $gl_cv_header_wchar_h_standalone = yes; then
21    WCHAR_H=
22  else
23    gl_ABSOLUTE_HEADER([wchar.h])
24    ABSOLUTE_WCHAR_H=\"$gl_cv_absolute_wchar_h\"
25    WCHAR_H=wchar.h
26  fi
27  AC_SUBST([ABSOLUTE_WCHAR_H])
28  AC_SUBST([WCHAR_H])
29])
30