Blame m4/inttypes_h.m4

Packit fc043f
# inttypes_h.m4 serial 6
Packit fc043f
dnl Copyright (C) 1997-2004 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 Paul Eggert.
Packit fc043f
Packit fc043f
# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
Packit fc043f
# doesn't clash with <sys/types.h>, and declares uintmax_t.
Packit fc043f
Packit fc043f
AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
Packit fc043f
[
Packit fc043f
  AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h,
Packit fc043f
  [AC_TRY_COMPILE(
Packit fc043f
    [#include <sys/types.h>
Packit fc043f
#include <inttypes.h>],
Packit fc043f
    [uintmax_t i = (uintmax_t) -1;],
Packit fc043f
    gl_cv_header_inttypes_h=yes,
Packit fc043f
    gl_cv_header_inttypes_h=no)])
Packit fc043f
  if test $gl_cv_header_inttypes_h = yes; then
Packit fc043f
    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
Packit fc043f
      [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
Packit fc043f
       and declares uintmax_t. ])
Packit fc043f
  fi
Packit fc043f
])