Bug 1032756 - Look for Android {build-,platform-}tools in all possible locations. r=glandium

Google has a history of moving the Android tools around.  We don't care
where they are, so let's try to find them anywhere we can.
This commit is contained in:
Nick Alexander 2014-07-04 09:05:56 -07:00
parent 86cd1f87bb
commit 0debda49e4

View File

@ -381,11 +381,14 @@ case "$target" in
AC_SUBST(ANDROID_MEDIAROUTER_RES)
fi
MOZ_PATH_PROG(ZIPALIGN, zipalign, :, [$ANDROID_TOOLS])
MOZ_PATH_PROG(DX, dx, :, [$ANDROID_BUILD_TOOLS])
MOZ_PATH_PROG(AAPT, aapt, :, [$ANDROID_BUILD_TOOLS])
MOZ_PATH_PROG(AIDL, aidl, :, [$ANDROID_BUILD_TOOLS])
MOZ_PATH_PROG(ADB, adb, :, [$ANDROID_PLATFORM_TOOLS])
dnl Google has a history of moving the Android tools around. We don't
dnl care where they are, so let's try to find them anywhere we can.
ALL_ANDROID_TOOLS_PATHS="$ANDROID_TOOLS:$ANDROID_BUILD_TOOLS:$ANDROID_PLATFORM_TOOLS"
MOZ_PATH_PROG(ZIPALIGN, zipalign, :, [$ALL_ANDROID_TOOLS_PATHS])
MOZ_PATH_PROG(DX, dx, :, [$ALL_ANDROID_TOOLS_PATHS])
MOZ_PATH_PROG(AAPT, aapt, :, [$ALL_ANDROID_TOOLS_PATHS])
MOZ_PATH_PROG(AIDL, aidl, :, [$ALL_ANDROID_TOOLS_PATHS])
MOZ_PATH_PROG(ADB, adb, :, [$ALL_ANDROID_TOOLS_PATHS])
if test -z "$ZIPALIGN" -o "$ZIPALIGN" = ":"; then
AC_MSG_ERROR([The program zipalign was not found. Use --with-android-sdk={android-sdk-dir}.])