You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Joe Orton <jo...@redhat.com> on 2002/09/13 23:37:30 UTC
[PATCH] configure: fix INT64_C detection
INT64_C is not being detected if defined in stdint.h; the code path
for that case goes:
ac_cv_define_INT64_C=no
APR_CHECK_DEFINE(INT64_C, stdint.h)
The AC_CACHE_CHECK in APR_CHECK_DEFINE sees that ac_cv_define_INT64_C is
already defined, and fails:
checking for INT64_C... no
checking for INT64_C in stdint.h... (cached) no
This patch fixes that, simplifies the code to use a single
AC_CACHE_CHECK, and gets out of the ac_cv_* namespace which is reserved
by autoconf.
(this patch is cumulative to my earlier AC_DEFINE cleanup patch; let me
know if I should resubmit these in a different order)
--- ./configure.in.second Fri Sep 13 22:07:46 2002
+++ ./configure.in Fri Sep 13 22:17:29 2002
@@ -1092,29 +1092,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, [Define if INT64_C is available])
- 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