From 0b336e0233bfd1c9e5c396800aa2260833753467 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sun, 14 Nov 2004 09:50:15 +0000 Subject: [PATCH] Cross-compilation friendly version of the (u)int64_t checks. --- configure.in | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/configure.in b/configure.in index 8814d5b36..257092354 100644 --- a/configure.in +++ b/configure.in @@ -25,7 +25,7 @@ AC_CHECK_TOOL(LD, ld, :) dnl Check for headers AC_HEADER_STDC() - +AC_CHECK_HEADERS([inttypes.h stdint.h sys/types.h]) AC_CHECK_FUNCS(vsscanf,,) dnl Optional features that are built and those that aren't @@ -187,32 +187,38 @@ dnl AC_MSG_CHECKING(for int64_t) AC_LANG_PUSH(C++) AC_CACHE_VAL(has_int64_t,[ - AC_TRY_RUN([ -#ifdef __BEOS__ -#include + AC_TRY_COMPILE([ +#if HAVE_INTTYPES_H +# include +#endif +#if HAVE_STDINT_H +# include +#endif +#if HAVE_SYS_TYPES_H +# include #endif -#include -int64_t foo; -int main() {return 0;} ], + [int64_t foo;], has_int64_t=yes, - has_int64_t=no, has_int64_t=no) ]) AC_MSG_RESULT($has_int64_t) AC_MSG_CHECKING(for uint64_t) AC_CACHE_VAL(has_uint64_t,[ - AC_TRY_RUN([ -#ifdef __BEOS__ -#include + AC_TRY_COMPILE([ +#if HAVE_INTTYPES_H +# include +#endif +#if HAVE_STDINT_H +# include +#endif +#if HAVE_SYS_TYPES_H +# include #endif -#include -int64_t foo; -int main() {return 0;} ], + [int64_t foo;], has_uint64_t=yes, - has_uint64_t=no, has_uint64_t=no) ]) AC_MSG_RESULT($has_uint64_t)