Bug 506493 - Resync' configure.in between c-c and m-c; (Pv1) Port (the useful part of) bug 464394 and bug 543976.
authorSerge Gautherie <sgautherie.bz@free.fr>
Fri, 09 Apr 2010 04:46:01 +0200
changeset 5408 912bb76e50654180c7d95461d632d036f135ee57
parent 5407 54912bb44312eda4b691253e6457124b9fccc0d7
child 5409 c7bca06e4b2482923a3e43ab467b20a487b8c2ab
push idunknown
push userunknown
push dateunknown
bugs506493, 464394, 543976
Bug 506493 - Resync' configure.in between c-c and m-c; (Pv1) Port (the useful part of) bug 464394 and bug 543976. r=Callek. Bug 464394 - Define MOZ_GFX_OPTIMIZE_MOBILE on WINCE Bug 543976 - Clean up Maemo defines
configure.in
--- a/configure.in
+++ b/configure.in
@@ -2166,16 +2166,18 @@ fi
     AC_DEFINE(WIN32_LEAN_AND_MEAN)
 
     TARGET_MD_ARCH=win32
     _PLATFORM_DEFAULT_TOOLKIT='cairo-windows'
     BIN_SUFFIX='.exe'
     USE_SHORT_LIBNAME=1
     MOZ_USER_DIR="Mozilla"
 
+    MOZ_GFX_OPTIMIZE_MOBILE=1
+
     # Sanity check for WINCE_WINDOWS_MOBILE
     # XXX disabled until we can fix the mobile tinderbox
     ##if test "$WINCE_WINDOWS_MOBILE"; then
     ##   AC_CHECK_HEADER(tpcshell.h, [],
     ##        AC_MSG_ERROR([Can't find tpcshell.h in your SDK; are you sure you don't need --disable-windows-mobile-components?]))
     ##fi
 ;;
 
@@ -5797,16 +5799,50 @@ dnl = Disable zipwriter
 dnl ========================================================
 MOZ_ARG_DISABLE_BOOL(zipwriter,
 [  --disable-zipwriter             Disable zipwriter component],
     MOZ_ZIPWRITER=,
     MOZ_ZIPWRITER=1 )
 AC_SUBST(MOZ_ZIPWRITER)
 
 dnl ========================================================
+dnl = Maemo checks
+dnl ========================================================
+
+MAEMO_SDK_TARGET_VER=-1
+
+MOZ_ARG_WITH_STRING(maemo-version,
+[  --with-maemo-version=MAEMO_SDK_TARGET_VER
+                        Maemo SDK Version],
+  MAEMO_SDK_TARGET_VER=$withval)
+
+case "$MAEMO_SDK_TARGET_VER" in
+5)
+    MOZ_PLATFORM_MAEMO=5
+    ;;
+
+6)
+    MOZ_PLATFORM_MAEMO=6
+    ;;
+
+-1)
+    dnl We aren't compiling for Maemo, move on.
+    ;;
+*)
+    AC_MSG_ERROR([Unknown Maemo Version.  Try setting --with-maemo-version to 5 or 6.])
+    ;;
+esac
+
+if test $MOZ_PLATFORM_MAEMO; then
+   AC_DEFINE_UNQUOTED([MOZ_PLATFORM_MAEMO], $MOZ_PLATFORM_MAEMO)
+
+   MOZ_GFX_OPTIMIZE_MOBILE=1
+fi
+
+dnl ========================================================
 dnl =
 dnl = Feature options that require extra sources to be pulled
 dnl =
 dnl ========================================================
 dnl MOZ_ARG_HEADER(Features that require extra sources)
 
 dnl ========================================================
 dnl =
@@ -5883,16 +5919,27 @@ if test -n "$MOZ_DEBUG"; then
     AC_MSG_RESULT([$_results])
     if test "$_results" = "no"; then
         AC_MSG_ERROR([These compiler flags are invalid: $MOZ_DEBUG_FLAGS])
     fi
     CFLAGS=$_SAVE_CFLAGS
 fi
 
 dnl ========================================================
+dnl enable mobile optimizations
+dnl ========================================================
+MOZ_ARG_ENABLE_BOOL(mobile-optimize,
+[  --enable-mobile-optimize   Enable mobile optimizations],
+    MOZ_GFX_OPTIMIZE_MOBILE=1)
+
+if test "$MOZ_GFX_OPTIMIZE_MOBILE"; then
+    AC_DEFINE(MOZ_GFX_OPTIMIZE_MOBILE)
+fi
+
+dnl ========================================================
 dnl = Enable code optimization. ON by default.
 dnl ========================================================
 if test -z "$MOZ_OPTIMIZE_FLAGS"; then
 	MOZ_OPTIMIZE_FLAGS="-O"
 fi
 
 MOZ_ARG_ENABLE_STRING(optimize,
 [  --disable-optimize      Disable compiler optimization