Blame gnulib/m4/stdint_h.m4

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