summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-08-03 22:02:42 -0700
committerBenjamin Peterson <benjamin@python.org>2016-08-03 22:02:42 -0700
commit7141cf9493d058350ea85043cc8426b5334c8418 (patch)
tree3a5c1cd26733c8733e3682abb68d6960cfb5667d /configure.ac
parent374f16c5abb521ca2ffcc58219819cfd14a718e6 (diff)
parent21ba6ba34d5b3648d13f9944dc9a66c29893edf3 (diff)
downloadcpython-7141cf9493d058350ea85043cc8426b5334c8418.tar.gz
merge 3.5 (#27670)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac51
1 files changed, 46 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 11acb0ac78..a83fe51e9e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ dnl * Please run autoreconf to test your changes! *
dnl ***********************************************
# Set VERSION so we only need to edit in one place (i.e., here)
-m4_define(PYTHON_VERSION, 3.5)
+m4_define(PYTHON_VERSION, 3.6)
AC_PREREQ(2.65)
@@ -69,7 +69,7 @@ if test "$cross_compiling" = yes; then
if test -z "$PYTHON_FOR_BUILD"; then
for interp in python$PACKAGE_VERSION python3 python; do
which $interp >/dev/null 2>&1 || continue
- if $interp -c 'import sys;sys.exit(not sys.version_info@<:@:2@:>@ >= (3,3))'; then
+ if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info@<:@:2@:>@) == '$PACKAGE_VERSION')"; then
break
fi
interp=
@@ -883,10 +883,17 @@ if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
fi
fi
-PLATDIR=plat-$MACHDEP
+if test x$PLATFORM_TRIPLET = x; then
+ PLATDIR=plat-$MACHDEP
+else
+ PLATDIR=plat-$PLATFORM_TRIPLET
+fi
AC_SUBST(PLATDIR)
AC_SUBST(PLATFORM_TRIPLET)
-
+if test x$MULTIARCH != x; then
+ MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
+fi
+AC_SUBST(MULTIARCH_CPPFLAGS)
AC_MSG_CHECKING([for -Wl,--no-as-needed])
save_LDFLAGS="$LDFLAGS"
@@ -903,6 +910,25 @@ AC_SUBST(NO_AS_NEEDED)
# checks for UNIX variants that set C preprocessor variables
AC_USE_SYSTEM_EXTENSIONS
+AC_MSG_CHECKING([for the Android API level])
+cat >> conftest.c <<EOF
+#ifdef __ANDROID__
+#include <android/api-level.h>
+__ANDROID_API__
+#else
+#error not Android
+#endif
+EOF
+
+if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
+ ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'`
+ AC_MSG_RESULT([$ANDROID_API_LEVEL])
+ AC_DEFINE_UNQUOTED(ANDROID_API_LEVEL, $ANDROID_API_LEVEL, [The Android API level.])
+else
+ AC_MSG_RESULT([not Android])
+fi
+rm -f conftest.c conftest.out
+
# Check for unsupported systems
case $ac_sys_system/$ac_sys_release in
atheos*|Linux*/1*)
@@ -1973,6 +1999,11 @@ if test "$sol_lfs_bug" = "yes"; then
use_lfs=no
fi
+# Don't use largefile support for GNU/Hurd
+case $ac_sys_system in GNU*)
+ use_lfs=no
+esac
+
if test "$use_lfs" = "yes"; then
# Two defines needed to enable largefile support on various platforms
# These may affect some typedefs
@@ -3753,6 +3784,10 @@ AC_CHECK_MEMBERS([struct stat.st_flags])
AC_CHECK_MEMBERS([struct stat.st_gen])
AC_CHECK_MEMBERS([struct stat.st_birthtime])
AC_CHECK_MEMBERS([struct stat.st_blocks])
+AC_CHECK_MEMBERS([struct passwd.pw_gecos, struct passwd.pw_passwd], [], [], [[
+ #include <sys/types.h>
+ #include <pwd.h>
+]])
AC_MSG_CHECKING(for time.h that defines altzone)
AC_CACHE_VAL(ac_cv_header_time_altzone,[
@@ -4329,6 +4364,8 @@ then
[define to 1 if your sem_getvalue is broken.])
fi
+AC_CHECK_DECLS([RTLD_LAZY, RTLD_NOW, RTLD_GLOBAL, RTLD_LOCAL, RTLD_NODELETE, RTLD_NOLOAD, RTLD_DEEPBIND], [], [], [[#include <dlfcn.h>]])
+
# determine what size digit to use for Python's longs
AC_MSG_CHECKING([digit size for Python's longs])
AC_ARG_ENABLE(big-digits,
@@ -4447,7 +4484,11 @@ AC_MSG_RESULT($LDVERSION)
dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
AC_SUBST(PY_ENABLE_SHARED)
-LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
+if test x$PLATFORM_TRIPLET = x; then
+ LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
+else
+ LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
+fi
AC_SUBST(LIBPL)
# Check whether right shifting a negative integer extends the sign bit