From 1ccbe7d9799bad4c2e145e93a0a8475a12f772c2 Mon Sep 17 00:00:00 2001 From: Michael Wu Date: Wed, 19 May 2010 13:05:47 -0700 Subject: [PATCH] Bug 552121 - Add omnijar as a configure option [1/7], r=ted --- config/autoconf.mk.in | 1 + configure.in | 27 ++++++++++++++++++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index 6040482d8e3..2ffcd214da4 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -80,6 +80,7 @@ SYSTEM_LIBXUL = @SYSTEM_LIBXUL@ XULRUNNER_STUB_NAME = @XULRUNNER_STUB_NAME@ MOZ_CHROME_FILE_FORMAT = @MOZ_CHROME_FILE_FORMAT@ +MOZ_OMNIJAR = @MOZ_OMNIJAR@ MOZ_WIDGET_TOOLKIT = @MOZ_WIDGET_TOOLKIT@ MOZ_GFX_OPTIMIZE_MOBILE = @MOZ_GFX_OPTIMIZE_MOBILE@ diff --git a/configure.in b/configure.in index 773ab47efd3..1f21ad18184 100644 --- a/configure.in +++ b/configure.in @@ -7367,7 +7367,7 @@ dnl ========================================================= dnl = Chrome format dnl ========================================================= MOZ_ARG_ENABLE_STRING([chrome-format], -[ --enable-chrome-format=jar|flat|both|symlink +[ --enable-chrome-format=jar|flat|both|symlink|omni Select FORMAT of chrome files (default=jar)], MOZ_CHROME_FILE_FORMAT=`echo $enableval | tr A-Z a-z`) @@ -7378,13 +7378,30 @@ fi if test "$MOZ_CHROME_FILE_FORMAT" != "jar" && test "$MOZ_CHROME_FILE_FORMAT" != "flat" && test "$MOZ_CHROME_FILE_FORMAT" != "symlink" && - test "$MOZ_CHROME_FILE_FORMAT" != "both"; then - AC_MSG_ERROR([--enable-chrome-format must be set to either jar, flat, both, or symlink]) + test "$MOZ_CHROME_FILE_FORMAT" != "both" && + test "$MOZ_CHROME_FILE_FORMAT" != "omni"; then + AC_MSG_ERROR([--enable-chrome-format must be set to either jar, flat, both, symlink, or omni]) fi -if test "$MOZ_CHROME_FILE_FORMAT" = "jar"; then - AC_DEFINE(MOZ_CHROME_FILE_FORMAT_JAR) +dnl ========================================================= +dnl Omnijar packaging (bug 552121) +dnl ========================================================= +dnl Omnijar packaging is compatible with flat packaging. +dnl In unpackaged builds, omnijar looks for files as if +dnl things were flat packaged. After packaging, all files +dnl are loaded from a single jar. MOZ_CHROME_FILE_FORMAT +dnl is set to flat since putting files into jars is only +dnl done during packaging with omnijar. +if test "$MOZ_CHROME_FILE_FORMAT" = "omni"; then + MOZ_OMNIJAR=1 + AC_DEFINE(MOZ_OMNIJAR) + MOZ_CHROME_FILE_FORMAT=flat +elif test "$MOZ_CHROME_FILE_FORMAT" = "jar"; then + AC_DEFINE(MOZ_CHROME_FILE_FORMAT_JAR) fi + +AC_SUBST(MOZ_OMNIJAR) + dnl ======================================================== dnl = Define default location for MOZILLA_FIVE_HOME dnl ========================================================