1#serial 6 2 3dnl From Paul Eggert. 4 5AC_PREREQ(2.52) 6 7# Define intmax_t to long or long long if <inttypes.h> doesn't define. 8 9AC_DEFUN([jm_AC_TYPE_INTMAX_T], 10[ 11 AC_REQUIRE([jm_AC_TYPE_LONG_LONG]) 12 AC_CHECK_TYPE(intmax_t, , 13 [test $ac_cv_type_long_long = yes \ 14 && ac_type='long long' \ 15 || ac_type='long' 16 AC_DEFINE_UNQUOTED(intmax_t, $ac_type, 17 [Define to widest signed type if <inttypes.h> doesn't define.])]) 18]) 19 20# Define uintmax_t to unsigned long or unsigned long long 21# if <inttypes.h> doesn't define. 22 23AC_DEFUN([jm_AC_TYPE_UINTMAX_T], 24[ 25 AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) 26 AC_CHECK_TYPE(uintmax_t, , 27 [test $ac_cv_type_unsigned_long_long = yes \ 28 && ac_type='unsigned long long' \ 29 || ac_type='unsigned long' 30 AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, 31 [Define to widest unsigned type if <inttypes.h> doesn't define.])]) 32]) 33