From d09edbb368c83c28d88a7994a23376af30506fc6 Mon Sep 17 00:00:00 2001 From: jay Date: Sun, 17 Oct 2004 17:36:33 +0000 Subject: [PATCH] Define intmax_t if it is not already defined - allows parser.c to compile on AIX 4.3 --- configure.in | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 8a93a94..5b7650a 100644 --- a/configure.in +++ b/configure.in @@ -2,6 +2,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(find/pred.c) AM_CONFIG_HEADER(config.h) AC_CANONICAL_HOST +AC_CONFIG_MACRO_DIR(gnulib/m4) dnl Set of available languages. ALL_LINGUAS="da de es et fr gl id it ko nl pl pt_BR ru sv tr" @@ -38,7 +39,7 @@ AC_CHECK_LIB(sun, getpwnam) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(fcntl.h string.h limits.h unistd.h errno.h stdlib.h stddef.h) -AC_CHECK_HEADERS(unistd.h inttypes.h fcntl.h locale.h) +AC_CHECK_HEADERS(unistd.h inttypes.h fcntl.h locale.h stdint.h) AC_CHECK_HEADERS(sys/param.h) AC_HEADER_MAJOR AC_HEADER_DIRENT @@ -96,7 +97,32 @@ AC_FUNC_ALLOCA AC_FUNC_GETMNTENT AC_FUNC_CLOSEDIR_VOID -gl_XALLOC +dnl gl_XALLOC +gl_FUNC_ALLOCA + + +AC_PREREQ(2.13) + +# Define intmax_t to 'signed long' or 'signed long long' +# if it is not already defined in or . +dnl Derived from gnulib's uintmax_t which was from Paul Eggert. +AC_DEFUN([jy_AC_TYPE_INTMAX_T], +[ + if test $ac_cv_header_inttypes_h = no && test $ac_cv_header_stdint_h = no; then + AC_REQUIRE([jm_AC_TYPE_LONG_LONG]) + test $ac_cv_type_long_long = yes \ + && ac_type='long long' \ + || ac_type='long' + AC_DEFINE_UNQUOTED(intmax_t, $ac_type, + [Define to signed long or signed long long + if and don't define.]) + else + AC_DEFINE(HAVE_INTMAX_T, 1, + [Define if you have the 'intmax_t' type in or .]) + fi +]) + +jy_AC_TYPE_INTMAX_T dnl internationalization macros AM_GNU_GETTEXT -- 2.11.4.GIT