Blame m4/intmax.m4

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