Blame m4/wchar_t.m4

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