Bug 1032756 - Look for Android {build-,platform-}tools in all possible locations. r=glandium
authorNick Alexander <nalexander@mozilla.com>
Fri, 04 Jul 2014 09:05:56 -0700
changeset 192395 bafba8a17aa9a57ff22afb6bb90510eb010b8ebd
parent 192394 d031c88447acf7aa5ba0158e3423d597fe27bf75
child 192396 95c6ac84956f8e2805b9b18c00faf1d8b5cede9e
push id7605
push usernalexander@mozilla.com
push dateFri, 04 Jul 2014 16:06:31 +0000
treeherderfx-team@bafba8a17aa9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1032756
milestone33.0a1
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.
build/autoconf/android.m4
--- 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