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.
--- a/build/autoconf/android.m4
+++ b/build/autoconf/android.m4
@@ -376,21 +376,24 @@ case "$target" in
if ! test -e $ANDROID_MEDIAROUTER_LIB ; then
AC_MSG_ERROR([You must download the v7 media router Android support library when targeting Android with native video casting support enabled. Run the Android SDK tool and install Android Support Library under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (looked for $ANDROID_MEDIAROUTER_LIB)])
fi
AC_MSG_RESULT([$ANDROID_MEDIAROUTER_LIB])
AC_SUBST(ANDROID_MEDIAROUTER_LIB)
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}.])
fi
if test -z "$DX" -o "$DX" = ":"; then
AC_MSG_ERROR([The program dx was not found. Use --with-android-sdk={android-sdk-dir}.])
fi
if test -z "$AAPT" -o "$AAPT" = ":"; then