[Libreoffice-commits] core.git: configure.ac
Jan Holesovsky (via logerrit)
logerrit at kemper.freedesktop.org
Wed Oct 23 22:38:49 UTC 2019
configure.ac | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
New commits:
commit 4c0bccbb21ba022fd9d630eb1d9ae34673b4dc11
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Thu Jul 4 09:06:49 2019 +0200
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Thu Oct 24 00:37:05 2019 +0200
android: Allow specification of the API level.
Change-Id: Icf33e2703f42a7866ce895437cf5f276066eeebe
Reviewed-on: https://gerrit.libreoffice.org/81227
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
(cherry picked from commit 59eee888bf7174114e5749855d95e8ff7dd15013)
Reviewed-on: https://gerrit.libreoffice.org/81327
Tested-by: Jenkins
diff --git a/configure.ac b/configure.ac
index 43cdf69ac8a8..0850870ca809 100644
--- a/configure.ac
+++ b/configure.ac
@@ -386,6 +386,11 @@ AC_ARG_WITH(android-sdk,
[Specify location of the Android SDK. Mandatory when building for Android.]),
,)
+AC_ARG_WITH(android-api-level,
+ AS_HELP_STRING([--with-android-api-level],
+ [Specify the API level when building for Android. Defaults to 16 for ARM and x86 and to 21 for ARM64 and x86-64]),
+,)
+
ANDROID_NDK_HOME=
if test -z "$with_android_ndk" -a -e "$SRC_ROOT/external/android-ndk" -a "$build" != "$host"; then
with_android_ndk="$SRC_ROOT/external/android-ndk"
@@ -422,6 +427,10 @@ if test -n "$with_android_ndk"; then
esac
ANDROID_API_LEVEL=16
+ if test -n "$with_android_api_level" ; then
+ ANDROID_API_LEVEL="$with_android_api_level"
+ fi
+
android_cpu=$host_cpu
if test $host_cpu = arm; then
android_platform_prefix=arm-linux-androideabi
@@ -434,7 +443,9 @@ if test -n "$with_android_ndk"; then
android_gnu_prefix=$android_platform_prefix
LLVM_TRIPLE=$android_platform_prefix
# minimum android version that supports aarch64
- ANDROID_API_LEVEL=21
+ if test "$ANDROID_API_LEVEL" -lt "21" ; then
+ ANDROID_API_LEVEL=21
+ fi
ANDROID_APP_ABI=arm64-v8a
elif test $host_cpu = x86_64; then
android_platform_prefix=x86_64-linux-android
@@ -461,6 +472,8 @@ if test -n "$with_android_ndk"; then
AC_MSG_ERROR([Unrecognized value for the --with-android-ndk-toolchain-version option. Building for Android is only supported with Clang 5.*])
esac
+ AC_MSG_NOTICE([using the Android API level... $ANDROID_API_LEVEL])
+
# NDK 15 or later toolchain is 64bit-only, except for Windows that we don't support. Using a 64-bit
# linker is required if you compile large parts of the code with -g. A 32-bit linker just won't
# manage to link the (app-specific) single huge .so that is built for the app in
More information about the Libreoffice-commits
mailing list