Blame m4/inttypes_h.m4

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