aboutsummaryrefslogtreecommitdiff
blob: 9a3eaf7101ffa227eed2bcb4a672e97b342d9242 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
http://bugs.gentoo.org/239110

assume %zd is supported when cross-compiling.  any target we care about
supports it, so ...

--- configure.in
+++ configure.in
@@ -3417,7 +3417,7 @@
 					   
 
 
-AC_MSG_CHECKING(for %zd printf() format support)
+AC_CACHE_CHECK([for %zd printf() format support], [py_cv_has_zd_printf], [dnl
 AC_TRY_RUN([#include <stdio.h>
 #include <stddef.h>
 #include <string.h>
@@ -3451,10 +3451,13 @@
 	return 1;
 
     return 0;
-}],
-[AC_MSG_RESULT(yes)
- AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])],
- AC_MSG_RESULT(no))
+}], [py_cv_has_zd_printf="yes"],
+    [py_cv_has_zd_printf="no"],
+    [py_cv_has_zd_printf="cross -- assuming yes"]
+)])
+if test "$py_cv_has_zd_printf" != "no" ; then
+  AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])
+fi
 
 AC_CHECK_TYPE(socklen_t,,
   AC_DEFINE(socklen_t,int,