diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 51 |
1 files changed, 46 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index bf27ab8..d5b8192 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) @@ -70,7 +70,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= @@ -880,10 +880,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" @@ -900,6 +907,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*) @@ -1970,6 +1996,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 @@ -3750,6 +3781,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,[ @@ -4326,6 +4361,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, @@ -4444,7 +4481,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 |