Blame m4/intmax.m4

Packit Service f629e6
# intmax.m4 serial 6 (gettext-0.18.2)
Packit Service f629e6
dnl Copyright (C) 2002-2005, 2008-2014 Free Software Foundation, Inc.
Packit Service f629e6
dnl This file is free software; the Free Software Foundation
Packit Service f629e6
dnl gives unlimited permission to copy and/or distribute it,
Packit Service f629e6
dnl with or without modifications, as long as this notice is preserved.
Packit Service f629e6
Packit Service f629e6
dnl From Bruno Haible.
Packit Service f629e6
dnl Test whether the system has the 'intmax_t' type, but don't attempt to
Packit Service f629e6
dnl find a replacement if it is lacking.
Packit Service f629e6
Packit Service f629e6
AC_DEFUN([gt_TYPE_INTMAX_T],
Packit Service f629e6
[
Packit Service f629e6
  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
Packit Service f629e6
  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
Packit Service f629e6
  AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t],
Packit Service f629e6
    [AC_COMPILE_IFELSE(
Packit Service f629e6
       [AC_LANG_PROGRAM(
Packit Service f629e6
          [[
Packit Service f629e6
#include <stddef.h>
Packit Service f629e6
#include <stdlib.h>
Packit Service f629e6
#if HAVE_STDINT_H_WITH_UINTMAX
Packit Service f629e6
#include <stdint.h>
Packit Service f629e6
#endif
Packit Service f629e6
#if HAVE_INTTYPES_H_WITH_UINTMAX
Packit Service f629e6
#include <inttypes.h>
Packit Service f629e6
#endif
Packit Service f629e6
          ]],
Packit Service f629e6
          [[intmax_t x = -1;
Packit Service f629e6
            return !x;]])],
Packit Service f629e6
       [gt_cv_c_intmax_t=yes],
Packit Service f629e6
       [gt_cv_c_intmax_t=no])])
Packit Service f629e6
  if test $gt_cv_c_intmax_t = yes; then
Packit Service f629e6
    AC_DEFINE([HAVE_INTMAX_T], [1],
Packit Service f629e6
      [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
Packit Service f629e6
  fi
Packit Service f629e6
])