Blame m4/inttypes_h.m4

Packit a6ee4b
# inttypes_h.m4 serial 7
Packit a6ee4b
dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc.
Packit a6ee4b
dnl This file is free software; the Free Software Foundation
Packit a6ee4b
dnl gives unlimited permission to copy and/or distribute it,
Packit a6ee4b
dnl with or without modifications, as long as this notice is preserved.
Packit a6ee4b
Packit a6ee4b
dnl From Paul Eggert.
Packit a6ee4b
Packit a6ee4b
# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
Packit a6ee4b
# doesn't clash with <sys/types.h>, and declares uintmax_t.
Packit a6ee4b
Packit a6ee4b
AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
Packit a6ee4b
[
Packit a6ee4b
  AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h,
Packit a6ee4b
  [AC_TRY_COMPILE(
Packit a6ee4b
    [#include <sys/types.h>
Packit a6ee4b
#include <inttypes.h>],
Packit a6ee4b
    [uintmax_t i = (uintmax_t) -1; return !i;],
Packit a6ee4b
    gl_cv_header_inttypes_h=yes,
Packit a6ee4b
    gl_cv_header_inttypes_h=no)])
Packit a6ee4b
  if test $gl_cv_header_inttypes_h = yes; then
Packit a6ee4b
    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
Packit a6ee4b
      [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
Packit a6ee4b
       and declares uintmax_t. ])
Packit a6ee4b
  fi
Packit a6ee4b
])