Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
[gnulib.git] / m4 / strtoimax.m4
1 # strtoimax.m4 serial 4
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.
8
9 AC_DEFUN([gl_FUNC_STRTOIMAX],
10 [
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])
14
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>
18 #ifdef strtoimax
19  inttypes_h_defines_strtoimax
20 #endif],
21        jm_cv_func_strtoimax_macro=yes,
22        jm_cv_func_strtoimax_macro=no)])
23
24   if test "$jm_cv_func_strtoimax_macro" != yes; then
25     AC_REPLACE_FUNCS(strtoimax)
26     if test $ac_cv_func_strtoimax = no; then
27       gl_PREREQ_STRTOIMAX
28     fi
29   fi
30 ])
31
32 # Prerequisites of lib/strtoimax.c.
33 AC_DEFUN([gl_PREREQ_STRTOIMAX], [
34   gl_AC_TYPE_INTMAX_T
35   AC_CHECK_DECLS(strtoll)
36   AC_REQUIRE([gl_AC_TYPE_LONG_LONG])
37 ])