diff --git a/configure.sh b/configure.sh index 0e0e4f1..f605f5f 100755 --- a/configure.sh +++ b/configure.sh @@ -18,7 +18,13 @@ then else extra_configure_flags+=("--java=${jdk}") fi - extra_configure_flags+=("--macros=ANDROID_API_PATH=$ANDROID_SDK/platforms/android-$target_api") + + android_jar="$android_sdk/platforms/android-$android_target_api/android.jar" + if [ ! -f "$android_jar" ] + then + echo "Error: $android_jar doesn't exist, check that android_sdk and android_target_api are correct" 1>&2 + exit 1 + fi fi if $use_security diff --git a/setenv.sh b/setenv.sh index e12f148..fcbdcbb 100644 --- a/setenv.sh +++ b/setenv.sh @@ -154,10 +154,15 @@ export PATH=${PATH}:"$ACE_ROOT/bin" export use_java=${use_java:-false} if $use_java then - export ANDROID_SDK="${ANDROID_SDK-"${workspace}/android-sdk"}" - if [ -z ${target_api+x} ] + export android_sdk="${ANDROID_SDK-"${workspace}/android-sdk"}" + if [ ! -z ${android_target_api+x} ] then - echo "Error: use_java is true, but target_api isn't set" 1>&2 + export target_api="$android_target_api" + elif [ ! -z ${target_api+x} ] + then + export android_target_api="$target_api" + else + echo "Error: use_java is true, but android_target_api isn't set" 1>&2 exit 1 fi fi