packages/lang/python/patches/010-cannot-run-test-programm.patch

88 lines
2.2 KiB
Diff
Raw Normal View History

diff --git a/configure.in b/configure.in
index 14095a1..e7ab47f 100644
--- a/configure.in
+++ b/configure.in
@@ -2559,6 +2559,7 @@ AC_CHECK_LIB(c, inet_aton, [$ac_cv_prog_TRUE],
# On Tru64, chflags seems to be present, but calling it will
# exit Python
AC_MSG_CHECKING(for chflags)
+AC_CACHE_VAL(ac_cv_have_chflags, [
AC_TRY_RUN([
#include <sys/stat.h>
#include <unistd.h>
@@ -2568,12 +2569,19 @@ int main(int argc, char*argv[])
return 1;
return 0;
}
-],AC_DEFINE(HAVE_CHFLAGS, 1, Define to 1 if you have the `chflags' function.)
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no)
-)
+],
+ac_cv_have_chflags=yes,
+ac_cv_have_chflags=no,
+ac_cv_have_chflags=no)])
+AC_MSG_RESULT($ac_cv_have_chflags)
+if test "$ac_cv_have_chflags" = yes
+then
+ AC_DEFINE(HAVE_CHFLAGS, 1,
+ [Define to 1 if you have the `chflags' function.])
+fi
AC_MSG_CHECKING(for lchflags)
+AC_CACHE_VAL(ac_cv_have_lchflags, [
AC_TRY_RUN([
#include <sys/stat.h>
#include <unistd.h>
@@ -2583,10 +2591,16 @@ int main(int argc, char*argv[])
return 1;
return 0;
}
-],AC_DEFINE(HAVE_LCHFLAGS, 1, Define to 1 if you have the `lchflags' function.)
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no)
-)
+],
+ac_cv_have_lchflags=yes,
+ac_cv_have_lchflags=no,
+ac_cv_have_lchflags=no)])
+AC_MSG_RESULT($ac_cv_have_lchflags)
+if test "$ac_cv_have_lchflags" = yes
+then
+ AC_DEFINE(HAVE_CHFLAGS, 1,
+ [Define to 1 if you have the `lchflags' function.])
+fi
dnl Check if system zlib has *Copy() functions
dnl
@@ -3664,6 +3664,7 @@ else
fi
AC_MSG_CHECKING(for %zd printf() format support)
+AC_CACHE_VAL(ac_cv_py_format_size_t, [
AC_TRY_RUN([#include <stdio.h>
#include <stddef.h>
#include <string.h>
@@ -3697,10 +3698,17 @@ int main()
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))
+}
+],
+ac_cv_py_format_size_t=yes,
+ac_cv_py_format_size_t=no,
+ac_cv_py_format_size_t=no)])
+AC_MSG_RESULT($ac_cv_py_format_size_t)
+if test "$ac_cv_pyt_format_t" = yes
+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,