Debian Codegraph @

m4/inttypes_h.m4

raw
1 # inttypes_h.m4
2 # serial 10
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_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
12 # doesn't clash with <sys/types.h>, and declares uintmax_t.
13
14 AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
15 [
16 AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h],
17 [AC_COMPILE_IFELSE(
18 [AC_LANG_PROGRAM(
19 [[
20 #include <sys/types.h>
21 #include <inttypes.h>
22 ]],
23 [[uintmax_t i = (uintmax_t) -1; return !i;]])],
24 [gl_cv_header_inttypes_h=yes],
25 [gl_cv_header_inttypes_h=no])])
26 if test $gl_cv_header_inttypes_h = yes; then
27 AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1],
28 [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
29 and declares uintmax_t. ])
30 fi
31 ])