[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - configure.ac

Jan Holesovsky (via logerrit) logerrit at kemper.freedesktop.org
Tue Oct 22 12:18:52 UTC 2019


 configure.ac |   15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

New commits:
commit 59eee888bf7174114e5749855d95e8ff7dd15013
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Thu Jul 4 09:06:49 2019 +0200
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Tue Oct 22 14:18:10 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>

diff --git a/configure.ac b/configure.ac
index be8a5be03ed4..80ca6532ceea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -370,6 +370,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"
@@ -406,6 +411,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
@@ -418,7 +427,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
@@ -445,6 +456,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