Blame m4/wchar_t.m4

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