1 # strtoimax.m4 serial 3
2 dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
3 dnl This file is free software, distributed under the terms of the GNU
4 dnl General Public License. As a special exception to the GNU General
5 dnl Public License, this file may be distributed as part of a program
6 dnl that contains a configuration script generated by Autoconf, under
7 dnl the same distribution terms as the rest of that program.
9 AC_DEFUN([gl_FUNC_STRTOIMAX],
11 dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
12 AC_REQUIRE([AC_PROG_CPP])
13 AC_REQUIRE([AC_PROG_EGREP])
15 AC_CACHE_CHECK([whether <inttypes.h> defines strtoimax as a macro],
16 jm_cv_func_strtoimax_macro,
17 [AC_EGREP_CPP([inttypes_h_defines_strtoimax], [#include <inttypes.h>
19 inttypes_h_defines_strtoimax
21 jm_cv_func_strtoimax_macro=yes,
22 jm_cv_func_strtoimax_macro=no)])
24 if test "$jm_cv_func_strtoimax_macro" != yes; then
25 AC_REPLACE_FUNCS(strtoimax)
26 if test $ac_cv_func_strtoimax = no; then
32 # Prerequisites of lib/strtoimax.c.
33 AC_DEFUN([gl_PREREQ_STRTOIMAX], [
35 AC_CHECK_DECLS(strtoll)
36 AC_REQUIRE([jm_AC_TYPE_LONG_LONG])