diff options
author | Jan Holesovsky <kendy@collabora.com> | 2019-07-04 09:06:49 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2019-10-22 14:18:10 +0200 |
commit | 59eee888bf7174114e5749855d95e8ff7dd15013 (patch) | |
tree | 28a25cd278ed7e7f9e8ea6e69cd289c22325a81b /configure.ac | |
parent | 7d8f0a8fdef91f7f46fc6b5d86a169a55c934519 (diff) |
android: Allow specification of the API level.
Change-Id: Icf33e2703f42a7866ce895437cf5f276066eeebe
Reviewed-on: https://gerrit.libreoffice.org/81227
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 14 insertions, 1 deletions
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 |