bpo-29040: Support building Android with Unified Headers (GH-4492) · pythoncapi/cpython@c06c22e · GitHub
Skip to content

Commit c06c22e

Browse files
authored
bpo-29040: Support building Android with Unified Headers (pythonGH-4492)
1 parent 5ad7ef8 commit c06c22e

4 files changed

Lines changed: 13 additions & 3 deletions

File tree

Include/pyport.h

Lines changed: 3 additions & 1 deletion
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Support building Android with Unified Headers. The first NDK release to
2+
support Unified Headers is android-ndk-r14.

configure

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5611,7 +5611,6 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
56115611
$as_echo_n "checking for the Android API level... " >&6; }
56125612
cat >> conftest.c <<EOF
56135613
#ifdef __ANDROID__
5614-
#include <android/api-level.h>
56155614
android_api = __ANDROID_API__
56165615
arm_arch = __ARM_ARCH
56175616
#else
@@ -5624,6 +5623,10 @@ if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
56245623
_arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
56255624
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
56265625
$as_echo "$ANDROID_API_LEVEL" >&6; }
5626+
if test -z "$ANDROID_API_LEVEL"; then
5627+
echo 'Fatal: you must define __ANDROID_API__'
5628+
exit 1
5629+
fi
56275630

56285631
cat >>confdefs.h <<_ACEOF
56295632
#define ANDROID_API_LEVEL $ANDROID_API_LEVEL

configure.ac

Lines changed: 4 additions & 1 deletion

0 commit comments

Comments
 (0)