2 dnl macros for type checks not covered by autoconf
8 # Check for C99 integer type definitions, or define if missing
9 AC_DEFUN([MUTT_C99_INTTYPES],
11 AC_CHECK_HEADERS([inttypes.h])
12 AC_CHECK_TYPE([uint32_t],
13 [AC_DEFINE(HAVE_C99_INTTYPES, 1, [Define if you have the C99 integer types])],
14 [AC_CHECK_SIZEOF(short)
17 AC_CHECK_SIZEOF(long long)])
18 AH_VERBATIM([X_HAVE_C99_INTTYPES],
19 [#ifndef HAVE_C99_INTTYPES
20 # if SIZEOF_SHORT == 4
21 typedef unsigned short uint32_t;
22 # elif SIZEOF_INT == 4
23 typedef unsigned int uint32_t;
24 # elif SIZEOF_LONG == 4
25 typedef unsigned long uint32_t;
28 typedef unsigned int uint64_t;
29 # elif SIZEOF_LONG == 8
30 typedef unsigned long uint64_t;
31 # elif SIZEOF_LONG_LONG == 8
32 typedef unsigned long long uint64_t;