Debian Codegraph @

m4/stdint_h.m4

raw
1 # stdint_h.m4
2 # serial 9
3 dnl Copyright (C) 1997-2004, 2006, 2008-2024 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
7 dnl This file is offered as-is, without any warranty.
8
9 dnl From Paul Eggert.
10
11 # Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
12 # doesn't clash with <sys/types.h>, and declares uintmax_t.
13
14 AC_DEFUN([gl_AC_HEADER_STDINT_H],
15 [
16 AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h],
17 [AC_COMPILE_IFELSE(
18 [AC_LANG_PROGRAM(
19 [[#include <sys/types.h>
20 #include <stdint.h>]],
21 [[uintmax_t i = (uintmax_t) -1; return !i;]])],
22 [gl_cv_header_stdint_h=yes],
23 [gl_cv_header_stdint_h=no])])
24 if test $gl_cv_header_stdint_h = yes; then
25 AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1],
26 [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
27 and declares uintmax_t. ])
28 fi
29 ])