AC_DEFUN([gl_FUNC_STRTOUMAX],
[
AC_REQUIRE([AC_PROG_CPP])
AC_REQUIRE([AC_PROG_EGREP])
AC_CACHE_CHECK([whether <inttypes.h> defines strtoumax as a macro],
jm_cv_func_strtoumax_macro,
[AC_EGREP_CPP([inttypes_h_defines_strtoumax], [ inttypes_h_defines_strtoumax
jm_cv_func_strtoumax_macro=yes,
jm_cv_func_strtoumax_macro=no)])
if test "$jm_cv_func_strtoumax_macro" != yes; then
AC_REPLACE_FUNCS(strtoumax)
if test $ac_cv_func_strtoumax = no; then
gl_PREREQ_STRTOUMAX
fi
fi
])
AC_DEFUN([gl_PREREQ_STRTOUMAX], [
gl_AC_TYPE_UINTMAX_T
AC_CHECK_DECLS(strtoull)
AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG])
])