wchar.m4 876 B

1234567891011121314151617181920212223242526272829
  1. dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
  2. dnl Copyright (C) 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 Eric Blake.
  7. # wchar.m4 serial 1
  8. AC_DEFUN([gl_WCHAR_H],
  9. [
  10. AC_CACHE_CHECK([whether <wchar.h> is standalone],
  11. [gl_cv_header_wchar_h_standalone],
  12. [AC_COMPILE_IFELSE([[#include <wchar.h>
  13. wchar_t w;]],
  14. [gl_cv_header_wchar_h_standalone=yes],
  15. [gl_cv_header_wchar_h_standalone=no])])
  16. if test $gl_cv_header_wchar_h_standalone = yes; then
  17. WCHAR_H=
  18. else
  19. gl_ABSOLUTE_HEADER([wchar.h])
  20. ABSOLUTE_WCHAR_H=\"$gl_cv_absolute_wchar_h\"
  21. WCHAR_H=wchar.h
  22. fi
  23. AC_SUBST([ABSOLUTE_WCHAR_H])
  24. AC_SUBST([WCHAR_H])
  25. ])