Blame m4/intmax.m4

Packit Service 9f2c4a
# intmax.m4 serial 1 (gettext-0.12)
Packit Service 9f2c4a
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
Packit Service 9f2c4a
dnl This file is free software, distributed under the terms of the GNU
Packit Service 9f2c4a
dnl General Public License.  As a special exception to the GNU General
Packit Service 9f2c4a
dnl Public License, this file may be distributed as part of a program
Packit Service 9f2c4a
dnl that contains a configuration script generated by Autoconf, under
Packit Service 9f2c4a
dnl the same distribution terms as the rest of that program.
Packit Service 9f2c4a
Packit Service 9f2c4a
dnl From Bruno Haible.
Packit Service 9f2c4a
dnl Test whether the system has the 'intmax_t' type, but don't attempt to
Packit Service 9f2c4a
dnl find a replacement if it is lacking.
Packit Service 9f2c4a
Packit Service 9f2c4a
AC_DEFUN([gt_TYPE_INTMAX_T],
Packit Service 9f2c4a
[
Packit Service 9f2c4a
  AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
Packit Service 9f2c4a
  AC_REQUIRE([jm_AC_HEADER_STDINT_H])
Packit Service 9f2c4a
  AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
Packit Service 9f2c4a
    [AC_TRY_COMPILE([
Packit Service 9f2c4a
#include <stddef.h> 
Packit Service 9f2c4a
#include <stdlib.h>
Packit Service 9f2c4a
#if HAVE_STDINT_H_WITH_UINTMAX
Packit Service 9f2c4a
#include <stdint.h>
Packit Service 9f2c4a
#endif
Packit Service 9f2c4a
#if HAVE_INTTYPES_H_WITH_UINTMAX
Packit Service 9f2c4a
#include <inttypes.h>
Packit Service 9f2c4a
#endif
Packit Service 9f2c4a
], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
Packit Service 9f2c4a
  if test $gt_cv_c_intmax_t = yes; then
Packit Service 9f2c4a
    AC_DEFINE(HAVE_INTMAX_T, 1,
Packit Service 9f2c4a
      [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
Packit Service 9f2c4a
  fi
Packit Service 9f2c4a
])