зеркало из https://github.com/mozilla/pjs.git
Bug 686350 - Check in configure script that the selected Android SDK is correct. r=glandium
This commit is contained in:
Родитель
254e534d0f
Коммит
21a2811047
22
configure.in
22
configure.in
|
@ -295,6 +295,28 @@ case "$target" in
|
|||
|
||||
if test -z "$android_sdk" ; then
|
||||
AC_MSG_ERROR([You must specify --with-android-sdk=/path/to/sdk when targeting Android.])
|
||||
else
|
||||
if ! test -e "$android_sdk"/source.properties ; then
|
||||
AC_MSG_ERROR([The path in --with-android-sdk isn't valid (source.properties hasn't been found).])
|
||||
fi
|
||||
|
||||
# Minimum Android SDK API Level we require.
|
||||
android_min_api_level=13
|
||||
|
||||
# Get the api level from "$android_sdk"/source.properties.
|
||||
android_api_level=`$AWK -F = '$1 == "AndroidVersion.ApiLevel" {print $2}' "$android_sdk"/source.properties`
|
||||
|
||||
if test -z "$android_api_level" ; then
|
||||
AC_MSG_ERROR([Unexpected error: no AndroidVersion.ApiLevel field has been found in source.properties.])
|
||||
fi
|
||||
|
||||
if ! test "$android_api_level" -eq "$android_api_level" ; then
|
||||
AC_MSG_ERROR([Unexpected error: the found android api value isn't a number! (found $android_api_level)])
|
||||
fi
|
||||
|
||||
if test $android_api_level -lt $android_min_api_level ; then
|
||||
AC_MSG_ERROR([The given Android SDK provides API level $android_api_level ($android_min_api_level or higher required).])
|
||||
fi
|
||||
fi
|
||||
|
||||
android_platform_tools="$android_sdk"/../../platform-tools
|
||||
|
|
|
@ -291,6 +291,28 @@ case "$target" in
|
|||
android_platform_tools="$android_sdk"/../../platform-tools
|
||||
if test ! -d "$android_platform_tools" ; then
|
||||
android_platform_tools="$android_sdk"/tools # SDK Tools < r8
|
||||
else
|
||||
if ! test -e "$android_sdk"/source.properties ; then
|
||||
AC_MSG_ERROR([The path in --with-android-sdk isn't valid (source.properties hasn't been found).])
|
||||
fi
|
||||
|
||||
# Minimum Android SDK API Level we require.
|
||||
android_min_api_level=13
|
||||
|
||||
# Get the api level from "$android_sdk"/source.properties.
|
||||
android_api_level=`$AWK -F = '$1 == "AndroidVersion.ApiLevel" {print $2}' "$android_sdk"/source.properties`
|
||||
|
||||
if test -z "$android_api_level" ; then
|
||||
AC_MSG_ERROR([Unexpected error: no AndroidVersion.ApiLevel field has been found in source.properties.])
|
||||
fi
|
||||
|
||||
if ! test "$android_api_level" -eq "$android_api_level" ; then
|
||||
AC_MSG_ERROR([Unexpected error: the found android api value isn't a number! (found $android_api_level)])
|
||||
fi
|
||||
|
||||
if test $android_api_level -lt $android_min_api_level ; then
|
||||
AC_MSG_ERROR([The given Android SDK provides API level $android_api_level ($android_min_api_level or higher required).])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$android_toolchain" ; then
|
||||
|
|
Загрузка…
Ссылка в новой задаче