Blame m4/stdint_h.m4

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