Blame gettext-runtime/m4/wchar_t.m4

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