Blame gnulib/m4/wchar_t.m4

Packit Service 51e54d
# wchar_t.m4 serial 4 (gettext-0.18.2)
Packit Service 51e54d
dnl Copyright (C) 2002-2003, 2008-2014 Free Software Foundation, Inc.
Packit Service 51e54d
dnl This file is free software; the Free Software Foundation
Packit Service 51e54d
dnl gives unlimited permission to copy and/or distribute it,
Packit Service 51e54d
dnl with or without modifications, as long as this notice is preserved.
Packit Service 51e54d
Packit Service 51e54d
dnl From Bruno Haible.
Packit Service 51e54d
dnl Test whether <stddef.h> has the 'wchar_t' type.
Packit Service 51e54d
dnl Prerequisite: AC_PROG_CC
Packit Service 51e54d
Packit Service 51e54d
AC_DEFUN([gt_TYPE_WCHAR_T],
Packit Service 51e54d
[
Packit Service 51e54d
  AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t],
Packit Service 51e54d
    [AC_COMPILE_IFELSE(
Packit Service 51e54d
       [AC_LANG_PROGRAM(
Packit Service 51e54d
          [[#include <stddef.h>
Packit Service 51e54d
            wchar_t foo = (wchar_t)'\0';]],
Packit Service 51e54d
          [[]])],
Packit Service 51e54d
       [gt_cv_c_wchar_t=yes],
Packit Service 51e54d
       [gt_cv_c_wchar_t=no])])
Packit Service 51e54d
  if test $gt_cv_c_wchar_t = yes; then
Packit Service 51e54d
    AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.])
Packit Service 51e54d
  fi
Packit Service 51e54d
])