apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <...@manyfish.co.uk>
Subject [PATCH] fix INT64_C() detection
Date Tue, 15 Oct 2002 19:51:33 GMT
Resend:

This patch fixes detection of INT64_C() when defined in stdint.h;
previously the use of APR_CHECK_DEFINE was breaking by picking up the
result of the previous test:

checking for INT64_C... no
checking for INT64_C in stdint.h... (cached) no

--- configure.in	3 Oct 2002 15:31:49 -0000	1.484
+++ configure.in	15 Oct 2002 19:48:07 -0000
@@ -1093,29 +1093,26 @@
     int64_t_fmt_len='#error Can not determine the proper size for apr_int64_t'
 fi
 
-dnl # If present, allow the C99 macro INT64_C to override our conversion.
-dnl #
-dnl # HP-UX's ANSI C compiler provides this without any includes, so we
-dnl # will first look for INT64_C without adding stdint.h
-AC_MSG_CHECKING(for INT64_C)
-stdint=0
+# If present, allow the C99 macro INT64_C to override our conversion.
+#
+# HP-UX's ANSI C compiler provides this without any includes, so we
+# will first look for INT64_C without adding stdint.h
+AC_CACHE_CHECK([for INT64_C], [apr_cv_define_INT64_C], [
 AC_EGREP_CPP(YES_IS_DEFINED,
 [#ifdef INT64_C
 YES_IS_DEFINED
-#endif
-], 
-[ ac_cv_define_INT64_C=yes
-  AC_MSG_RESULT(yes)
-],
-[ ac_cv_define_INT64_C=no 
-  AC_MSG_RESULT(no)
-  APR_CHECK_DEFINE(INT64_C, stdint.h)
-  if test "$ac_cv_define_INT64_C" = "yes"; then
-    stdint=1
-  fi
-])
-if test "$ac_cv_define_INT64_C" = "yes"; then
+#endif], [apr_cv_define_INT64_C=yes], [
+    # Now check for INT64_C in stdint.h
+    AC_EGREP_CPP(YES_IS_DEFINED, [#include <stdint.h>
+#ifdef INT64_C
+YES_IS_DEFINED
+#endif], [apr_cv_define_INT64_C=yes], [apr_cv_define_INT64_C=no])])])
+
+if test "$apr_cv_define_INT64_C" = "yes"; then
     int64_literal='#define APR_INT64_C(val) INT64_C(val)'
+    stdint=1
+else
+    stdint=0
 fi
 
 if test "$ac_cv_type_off_t" = "yes"; then


Mime
View raw message