Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Include/pyport.h
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,9 @@ extern _invalid_parameter_handler _Py_silent_invalid_parameter_handler;
#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 */
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Support building Android with Unified Headers. The first NDK release to
support Unified Headers is android-ndk-r14.
19 changes: 5 additions & 14 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,6 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
Expand Down Expand Up @@ -890,7 +889,6 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
Expand Down Expand Up @@ -1143,15 +1141,6 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;

-runstatedir | --runstatedir | --runstatedi | --runstated \
| --runstate | --runstat | --runsta | --runst | --runs \
| --run | --ru | --r)
ac_prev=runstatedir ;;
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
| --run=* | --ru=* | --r=*)
runstatedir=$ac_optarg ;;

-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
Expand Down Expand Up @@ -1289,7 +1278,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir runstatedir
libdir localedir mandir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
Expand Down Expand Up @@ -1442,7 +1431,6 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
Expand Down Expand Up @@ -5623,7 +5611,6 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&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
Expand All @@ -5636,6 +5623,10 @@ if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
_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
Expand Down
5 changes: 4 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,6 @@ 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 = __ANDROID_API__
arm_arch = __ARM_ARCH
#else
Expand All @@ -897,6 +896,10 @@ if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
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])
Expand Down