aboutsummaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-08-13 18:57:48 +0000
committerYang Tse <yangsita@gmail.com>2008-08-13 18:57:48 +0000
commit7bdae7be4f46871465272a0620e635cd3d42c9c6 (patch)
tree5b0d1bef6eca20a1ec46fbcc507eef0d803131b6 /acinclude.m4
parentc125d83e9e65366b01719bd9f3f9245b09f2daaf (diff)
Ensure that the compiler 'knows' the 'long' type in CURL_CONFIGURE_LONG
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m450
1 files changed, 26 insertions, 24 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 3f100a86f..b2e4995df 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -3613,6 +3613,30 @@ _EOF
])
+dnl CURL_INCLUDES_INTTYPES
+dnl -------------------------------------------------
+dnl Set up variable with list of headers that must be
+dnl included when inttypes.h is to be included.
+
+AC_DEFUN([CURL_INCLUDES_INTTYPES], [
+curl_includes_inttypes="\
+/* includes start */
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+/* includes end */"
+ AC_CHECK_HEADERS(
+ sys/types.h stdint.h inttypes.h,
+ [], [], [$curl_includes_inttypes])
+])
+
+
dnl CURL_CONFIGURE_LONG
dnl -------------------------------------------------
dnl Find out the size of long as reported by sizeof() and define
@@ -3622,6 +3646,7 @@ dnl The size of long is a build time characteristic and as such
dnl must be recorded in curlbuild.h
AC_DEFUN([CURL_CONFIGURE_LONG], [
+ AC_REQUIRE([CURL_INCLUDES_INTTYPES])dnl
if test ! -z "$ac_cv_sizeof_long"; then
AC_MSG_WARN([Use CURL-CONFIGURE-LONG to check the size of long first])
fi
@@ -3631,6 +3656,7 @@ AC_DEFUN([CURL_CONFIGURE_LONG], [
if test "$curl_sizeof_long" = "unknown"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
+ $curl_includes_inttypes
typedef char dummy_arr[sizeof(long) == $tmp_size ? 1 : -1];
]],[[
dummy_arr[1] = (long)1;
@@ -3650,30 +3676,6 @@ AC_DEFUN([CURL_CONFIGURE_LONG], [
])
-dnl CURL_INCLUDES_INTTYPES
-dnl -------------------------------------------------
-dnl Set up variable with list of headers that must be
-dnl included when inttypes.h is to be included.
-
-AC_DEFUN([CURL_INCLUDES_INTTYPES], [
-curl_includes_inttypes="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-/* includes end */"
- AC_CHECK_HEADERS(
- sys/types.h stdint.h inttypes.h,
- [], [], [$curl_includes_inttypes])
-])
-
-
dnl DO_CURL_OFF_T_CHECK (TYPE, SIZE)
dnl -------------------------------------------------
dnl Internal macro for CURL_CONFIGURE_CURL_OFF_T