diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-11-16 12:47:54 -0500 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-11-18 10:59:16 +0000 |
commit | 976ccaa9223740c743d18824f12a521ed5a5601b (patch) | |
tree | bcae91cb897085a3e595182c6321d7f2a9273a01 /old-configure.in | |
parent | 8b3375e2c202c04935ca056cc8dc389a08e47bb6 (diff) | |
download | UXP-976ccaa9223740c743d18824f12a521ed5a5601b.tar UXP-976ccaa9223740c743d18824f12a521ed5a5601b.tar.gz UXP-976ccaa9223740c743d18824f12a521ed5a5601b.tar.lz UXP-976ccaa9223740c743d18824f12a521ed5a5601b.tar.xz UXP-976ccaa9223740c743d18824f12a521ed5a5601b.zip |
Issue #251 - Move chrome packaging options to ac configure
Also adds options for new functionality in #1683
Diffstat (limited to 'old-configure.in')
-rw-r--r-- | old-configure.in | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/old-configure.in b/old-configure.in index d34f72204..ade675e95 100644 --- a/old-configure.in +++ b/old-configure.in @@ -4315,6 +4315,85 @@ dnl = dnl ======================================================== MOZ_ARG_HEADER(Misc. Options) +dnl ========================================================= +dnl = Chrome format +dnl ========================================================= +MOZ_ARG_ENABLE_STRING([chrome-format], +[ --enable-chrome-format=jar|flat|omni + Select FORMAT of chrome files during packaging], + MOZ_CHROME_FILE_FORMAT=`echo $enableval | tr A-Z a-z`) + +if test -z "$MOZ_CHROME_FILE_FORMAT"; then + MOZ_CHROME_FILE_FORMAT=omni +fi + +if test "$MOZ_CHROME_FILE_FORMAT" = "symlink"; then + AC_MSG_ERROR([--enable-chrome-format=symlink has been deprecated. It is now used by default in $DIST/bin on platforms that support it]) +fi + +if test "$MOZ_CHROME_FILE_FORMAT" != "jar" && + test "$MOZ_CHROME_FILE_FORMAT" != "flat" && + test "$MOZ_CHROME_FILE_FORMAT" != "omni"; then + AC_MSG_ERROR([--enable-chrome-format must be set to either jar, flat, or omni]) +fi + +dnl ========================================================= +dnl = Chrome compression +dnl ========================================================= +MOZ_ARG_ENABLE_STRING([chrome-compression], +[ --enable-chrome-compression=none|deflate|brotli + Select COMPRESSION type of chrome files during packaging], + JAR_COMPRESSION=`echo $enableval | tr A-Z a-z`) + +if test -z "$JAR_COMPRESSION"; then + JAR_COMPRESSION=deflate +fi + +if test "$JAR_COMPRESSION" != "none" && + test "$JAR_COMPRESSION" != "deflate" && + test "$JAR_COMPRESSION" != "brotli"; then + AC_MSG_ERROR([--enable-chrome-compression must be set to either none, deflate, or brotli]) +fi + +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) +fi + +# Allow someone to change OMNIJAR_NAME in mozconfig +MOZ_ARG_WITH_STRING(chrome-name, +[ --with-chrome-name=CHROMENAME + Set chrome jar name (default=omni.ja)], +[ val=`echo $withval` + OMNIJAR_NAME="$val"]) + +# Default Omni Jar Name +if test -z "$OMNIJAR_NAME" ; then + OMNIJAR_NAME=omni.ja +fi + +MOZ_PACKAGER_FORMAT="$MOZ_CHROME_FILE_FORMAT" +if test "$OS_ARCH" = "WINNT"; then + MOZ_CHROME_FILE_FORMAT=flat +else + MOZ_CHROME_FILE_FORMAT=symlink +fi + +AC_SUBST(JAR_COMPRESSION) +AC_SUBST(OMNIJAR_NAME) +AC_SUBST(MOZ_OMNIJAR) +AC_SUBST(MOZ_PACKAGER_FORMAT) +AC_SUBST(MOZ_CHROME_FILE_FORMAT) + dnl ======================================================== dnl = Disable Jetpack dnl ======================================================== |