diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2023-01-25 11:13:15 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2023-02-16 20:32:59 +0000 |
commit | 7fe6f298131386d80349f2fe46b1f69d31fd4af9 (patch) | |
tree | 1a6402b09814746ce4d95893fe964d02896ad8da /configure.ac | |
parent | 7e4ffea3187534326232588860e335989602e90b (diff) |
android: Move android API level check up in configure.ac
No logical change intended. This is in preparation of
using `ANDROID_API_LEVEL` in the NDK check in a follow-up commit.
Change-Id: I746cae640a57a49efbdefd8ba00dcc1c4edc4ef9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146134
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/configure.ac b/configure.ac index 6707b808ef18..a68d8efb52ba 100644 --- a/configure.ac +++ b/configure.ac @@ -686,34 +686,6 @@ fi if test -n "$with_android_ndk"; then eval ANDROID_NDK_DIR=$with_android_ndk - # Set up a lot of pre-canned defaults - - if test ! -f $ANDROID_NDK_DIR/RELEASE.TXT; then - if test ! -f $ANDROID_NDK_DIR/source.properties; then - AC_MSG_ERROR([Unrecognized Android NDK. Missing RELEASE.TXT or source.properties file in $ANDROID_NDK_DIR.]) - fi - ANDROID_NDK_VERSION=`sed -n -e 's/Pkg.Revision = //p' $ANDROID_NDK_DIR/source.properties` - else - ANDROID_NDK_VERSION=`cut -f1 -d' ' <$ANDROID_NDK_DIR/RELEASE.TXT` - fi - if test -z "$ANDROID_NDK_VERSION"; then - AC_MSG_ERROR([Failed to determine Android NDK version. Please check your installation.]) - fi - case $ANDROID_NDK_VERSION in - r9*|r10*) - AC_MSG_ERROR([Building for Android requires NDK version >= 23.*]) - ;; - 11.1.*|12.1.*|13.1.*|14.1.*|16.*|17.*|18.*|19.*|20.*|21.*|22.*) - AC_MSG_ERROR([Building for Android requires NDK version >= 23.*]) - ;; - 23.*) - ;; - *) - AC_MSG_WARN([Untested Android NDK version $ANDROID_NDK_VERSION, only versions 23.* have been used successfully. Proceed at your own risk.]) - add_warning "Untested Android NDK version $ANDROID_NDK_VERSION, only versions 23.* have been used successfully. Proceed at your own risk." - ;; - esac - ANDROID_API_LEVEL=16 if test -n "$with_android_api_level" ; then ANDROID_API_LEVEL="$with_android_api_level" @@ -746,6 +718,34 @@ if test -n "$with_android_ndk"; then ANDROID_APP_ABI=x86 fi + # Set up a lot of pre-canned defaults + + if test ! -f $ANDROID_NDK_DIR/RELEASE.TXT; then + if test ! -f $ANDROID_NDK_DIR/source.properties; then + AC_MSG_ERROR([Unrecognized Android NDK. Missing RELEASE.TXT or source.properties file in $ANDROID_NDK_DIR.]) + fi + ANDROID_NDK_VERSION=`sed -n -e 's/Pkg.Revision = //p' $ANDROID_NDK_DIR/source.properties` + else + ANDROID_NDK_VERSION=`cut -f1 -d' ' <$ANDROID_NDK_DIR/RELEASE.TXT` + fi + if test -z "$ANDROID_NDK_VERSION"; then + AC_MSG_ERROR([Failed to determine Android NDK version. Please check your installation.]) + fi + case $ANDROID_NDK_VERSION in + r9*|r10*) + AC_MSG_ERROR([Building for Android requires NDK version >= 23.*]) + ;; + 11.1.*|12.1.*|13.1.*|14.1.*|16.*|17.*|18.*|19.*|20.*|21.*|22.*) + AC_MSG_ERROR([Building for Android requires NDK version >= 23.*]) + ;; + 23.*) + ;; + *) + AC_MSG_WARN([Untested Android NDK version $ANDROID_NDK_VERSION, only versions 23.* have been used successfully. Proceed at your own risk.]) + add_warning "Untested Android NDK version $ANDROID_NDK_VERSION, only versions 23.* have been used successfully. Proceed at your own risk." + ;; + esac + case "$with_android_ndk_toolchain_version" in clang5.0) ANDROID_GCC_TOOLCHAIN_VERSION=4.9 |