#endif /* Py_BUILD_CORE */
#ifdef __ANDROID__
-#include <android/api-level.h>
+/* The Android langinfo.h header is not used. */
+#undef HAVE_LANGINFO_H
+#undef CODESET
#endif
/* Maximum value of the Windows DWORD type */
--- /dev/null
+Support building Android with Unified Headers. The first NDK release to
+support Unified Headers is android-ndk-r14.
$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
_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
AC_MSG_CHECKING([for the Android API level])
cat >> conftest.c <<EOF
#ifdef __ANDROID__
-#include <android/api-level.h>
android_api = __ANDROID_API__
arm_arch = __ARM_ARCH
#else
ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
_arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
AC_MSG_RESULT([$ANDROID_API_LEVEL])
+ if test -z "$ANDROID_API_LEVEL"; then
+ echo 'Fatal: you must define __ANDROID_API__'
+ exit 1
+ fi
AC_DEFINE_UNQUOTED(ANDROID_API_LEVEL, $ANDROID_API_LEVEL, [The Android API level.])
AC_MSG_CHECKING([for the Android arm ABI])