Bug 1042382 - Part 1: configure.in changes to allow Android SDK ranges to be specified. r=glandium
authorRichard Newman <rnewman@mozilla.com>
Fri, 25 Jul 2014 13:27:49 -0700
changeset 196320 894afa1b44ae1d3b72279d835ec0e7ebabeda17b
parent 196319 1b21108d2a5db118aa15d28d07144381b2a5d001
child 196321 cb8ca90a354da01df7bfaa11a32cc88bd4c1db88
push id46844
push usercbook@mozilla.com
push dateMon, 28 Jul 2014 14:30:47 +0000
treeherdermozilla-inbound@7dd701896de8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1042382
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1042382 - Part 1: configure.in changes to allow Android SDK ranges to be specified. r=glandium
build/autoconf/android.m4
mobile/android/confvars.sh
--- a/build/autoconf/android.m4
+++ b/build/autoconf/android.m4
@@ -403,9 +403,43 @@ case "$target" in
       AC_MSG_ERROR([The program aidl was not found.  Use --with-android-sdk={android-sdk-dir}.])
     fi
     if test -z "$ADB" -o "$ADB" = ":"; then
       AC_MSG_ERROR([The program adb was not found.  Use --with-android-sdk={android-sdk-dir}.])
     fi
     ;;
 esac
 
+MOZ_ARG_WITH_STRING(android-min-sdk,
+[  --with-android-min-sdk=[VER]     Impose a minimum Firefox for Android SDK version],
+[ MOZ_ANDROID_MIN_SDK_VERSION=$withval ])
+
+MOZ_ARG_WITH_STRING(android-max-sdk,
+[  --with-android-max-sdk=[VER]     Impose a maximum Firefox for Android SDK version],
+[ MOZ_ANDROID_MAX_SDK_VERSION=$withval ])
+
+if test -n "$MOZ_ANDROID_MIN_SDK_VERSION"; then
+    if test $MOZ_ANDROID_MIN_SDK_VERSION -lt $1 ; then
+        AC_MSG_ERROR([--with-android-min-sdk must be at least $1.])
+    fi
+
+    if test -n "$MOZ_ANDROID_MAX_SDK_VERSION"; then
+        if test $MOZ_ANDROID_MAX_SDK_VERSION -lt $MOZ_ANDROID_MIN_SDK_VERSION ; then
+            AC_MSG_ERROR([--with-android-max-sdk must be at least the value of --with-android-min-sdk.])
+        fi
+    fi
+
+    if test $MOZ_ANDROID_MIN_SDK_VERSION -gt $ANDROID_TARGET_SDK ; then
+        AC_MSG_ERROR([--with-android-min-sdk is expected to be less than $ANDROID_TARGET_SDK])
+    fi
+
+    AC_DEFINE_UNQUOTED(MOZ_ANDROID_MIN_SDK_VERSION, $MOZ_ANDROID_MIN_SDK_VERSION)
+fi
+
+if test -n "$MOZ_ANDROID_MAX_SDK_VERSION"; then
+    if test $MOZ_ANDROID_MAX_SDK_VERSION -lt $1 ; then
+        AC_MSG_ERROR([--with-android-max-sdk must be at least $1.])
+    fi
+
+    AC_DEFINE_UNQUOTED(MOZ_ANDROID_MAX_SDK_VERSION, $MOZ_ANDROID_MAX_SDK_VERSION)
+fi
+
 ])
--- a/mobile/android/confvars.sh
+++ b/mobile/android/confvars.sh
@@ -7,16 +7,20 @@ MOZ_APP_VENDOR=Mozilla
 
 MOZ_APP_VERSION=34.0a1
 MOZ_APP_UA_NAME=Firefox
 
 MOZ_BRANDING_DIRECTORY=mobile/android/branding/unofficial
 MOZ_OFFICIAL_BRANDING_DIRECTORY=mobile/android/branding/official
 # MOZ_APP_DISPLAYNAME is set by branding/configure.sh
 
+# We support Android SDK version 9 and up by default.
+# See the --enable-android-min-sdk and --enable-android-max-sdk arguments in configure.in.
+MOZ_ANDROID_MIN_SDK_VERSION=9
+
 MOZ_SAFE_BROWSING=1
 
 MOZ_DISABLE_CRYPTOLEGACY=1
 
 # Enable getUserMedia
 MOZ_MEDIA_NAVIGATOR=1
 
 # Enable NFC permission