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 196323 626b749ccb2802388564921d100c9da2e2a47693
parent 196322 91abb890c863d1297cc9fa999dac23bdf864cbcb
child 196324 153a8b79e121861b74a155653c6bcf7369fcd580
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,39 @@ 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 -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