bpo-29040: Support building Android with Unified Headers (GH-4492)
diff --git a/configure b/configure
index ab33115..969e1d5 100755
--- a/configure
+++ b/configure
@@ -5611,7 +5611,6 @@
$as_echo_n "checking for the Android API level... " >&6; }
cat >> conftest.c <<EOF
#ifdef __ANDROID__
-#include <android/api-level.h>
android_api = __ANDROID_API__
arm_arch = __ARM_ARCH
#else
@@ -5624,6 +5623,10 @@
_arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
$as_echo "$ANDROID_API_LEVEL" >&6; }
+ if test -z "$ANDROID_API_LEVEL"; then
+ echo 'Fatal: you must define __ANDROID_API__'
+ exit 1
+ fi
cat >>confdefs.h <<_ACEOF
#define ANDROID_API_LEVEL $ANDROID_API_LEVEL