diff options
author | Xavier de Gaye <xdegaye@users.sourceforge.net> | 2016-07-09 09:05:42 (GMT) |
---|---|---|
committer | Xavier de Gaye <xdegaye@users.sourceforge.net> | 2016-07-09 09:05:42 (GMT) |
commit | 95750b1ca535a9883d483ee82b4373fb47d82bc5 (patch) | |
tree | e6e83f7702a3e2fb2639404230dc83eeb4a9706c /configure | |
parent | 2247e5c48c71e76e44218bfab29129ce0462760c (diff) | |
download | cpython-95750b1ca535a9883d483ee82b4373fb47d82bc5.zip cpython-95750b1ca535a9883d483ee82b4373fb47d82bc5.tar.gz cpython-95750b1ca535a9883d483ee82b4373fb47d82bc5.tar.bz2 |
Issue #27442: Expose the Android API level in sysconfig.get_config_vars()
as 'ANDROID_API_LEVEL'.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -5648,6 +5648,32 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5 +$as_echo_n "checking for the Android API level... " >&6; } +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 '^ *$'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5 +$as_echo "$ANDROID_API_LEVEL" >&6; } + +cat >>confdefs.h <<_ACEOF +#define ANDROID_API_LEVEL $ANDROID_API_LEVEL +_ACEOF + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5 +$as_echo "not Android" >&6; } +fi +rm -f conftest.c conftest.out + # Check for unsupported systems case $ac_sys_system/$ac_sys_release in atheos*|Linux*/1*) |