# HG changeset patch
# User Matt A. Tobin <email@mattatobin.com>
# Date 1723983560 18000
# Node ID 2ba32258511711a8a00e40eb68027234f6face9e
# Parent  b25cde2bc58db09655126f47acc2c664a8881a24
Bug 9999999 - Make MailNews optional at build time.

diff --git a/suite/app.mozbuild b/suite/app.mozbuild
--- a/suite/app.mozbuild
+++ b/suite/app.mozbuild
@@ -1,22 +1,23 @@
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 GENERATED_FILES['source-repo.h'].script = 'comm/build/source_repos.py:source_repo_header'
 
-include('/comm/mailnews/mailnews.mozbuild')
+if CONFIG['MOZ_MAILNEWS']:
+    include('/comm/mailnews/mailnews.mozbuild')
 
 include('/toolkit/toolkit.mozbuild')
 
 DIRS += ['/%s' % CONFIG['MOZ_BRANDING_DIRECTORY']]
 
-if CONFIG['MOZ_CALENDAR']:
+if CONFIG['MOZ_MAILNEWS'] and CONFIG['MOZ_CALENDAR']:
     DIRS += [
         '/comm/calendar/lightning',
         '/comm/calendar/timezones',
     ]
 
 DIRS += [
     '/comm/suite',
 ]
diff --git a/suite/app/profile/suite-prefs.js b/suite/app/profile/suite-prefs.js
--- a/suite/app/profile/suite-prefs.js
+++ b/suite/app/profile/suite-prefs.js
@@ -317,38 +317,41 @@ pref("offline.send.unsent_messages",    
 pref("offline.download.download_messages",  0);
 
 // allow offline web apps to store data but ask for permission by default
 pref("offline-apps.allow_by_default", false);
 pref("browser.offline-apps.notify", true);
 
 pref("browser.formfill.expire_days",        180);
 
+#ifdef MOZ_MAILNEWS
 // Handle mail/news URLs internally by default...
 pref("network.protocol-handler.external.mailto", false); // for mail
 pref("network.protocol-handler.external.news", false);   // for news
 pref("network.protocol-handler.external.snews", false);  // for secure news
 pref("network.protocol-handler.external.nntp", false);   // also news
 
 // ...but still show the dialog at least the first time if switched to external
 pref("network.protocol-handler.warn-external.mailto", true);
 pref("network.protocol-handler.warn-external.news", true);
 pref("network.protocol-handler.warn-external.snews", true);
 pref("network.protocol-handler.warn-external.nntp", true);
+#endif
 
 // bug 1005566 - Disable seer until properly supported
 // bug 1021370 - Rename Seer to Predictor
 pref("network.predictor.enabled", false);
 
 // To allow images to be inserted into a composition with an auth prompt, we
 // need the following two.
 pref("network.auth.subresource-img-cross-origin-http-auth-allow", true);
 // This pref is also needed for showing the caldav auth prompt.
 pref("network.auth.non-web-content-triggered-resources-http-auth-allow", true);
 
+#ifdef MOZ_MAILNEWS
 pref("mail.biff.show_new_alert",     true);
 
 // If the mail tab bar is automatically hidden when there is only one tab.
 pref("mail.tabs.autoHide", false);
 
 // If messages or folders are opened using the context menu or a middle click,
 // should we open them in the foreground or in the background?
 pref("mail.tabs.loadInBackground", true);
@@ -367,16 +370,17 @@ pref("mail.folderpane.sizeUnits", "");
 // Summarize messages count and size of subfolders into a collapsed parent?
 // Allowed values: true/false
 pref("mail.folderpane.sumSubfolders", true);
 
 pref("mailnews.reuse_thread_window2", true);
 
 pref("mailnews.ui.deleteMarksRead", true);
 pref("mailnews.ui.deleteAlwaysSelectedMessages", false);
+#endif
 
 // The maximum amount of decoded image data we'll willingly keep around (we
 // might keep around more than this, but we'll try to get down to this value).
 // (This is intentionally on the high side; see bugs 746055 and 768015.)
 pref("image.mem.max_decoded_image_kb", 256000);
 
 pref("spellchecker.dictionary", "");
 pref("spellchecker.dictionaries.download.url", "https://addons.thunderbird.net/%LOCALE%/%APP%/dictionaries");
@@ -930,16 +934,17 @@ pref("services.sync.prefs.sync.dom.disab
 pref("services.sync.prefs.sync.dom.event.contextmenu.enabled", true);
 pref("services.sync.prefs.sync.extensions.update.enabled", true);
 pref("services.sync.prefs.sync.general.smoothScroll", true);
 pref("services.sync.prefs.sync.intl.accept_languages", true);
 pref("services.sync.prefs.sync.javascript.enabled", true);
 pref("services.sync.prefs.sync.layout.spellcheckDefault", true);
 pref("services.sync.prefs.sync.lightweightThemes.isThemeSelected", true);
 pref("services.sync.prefs.sync.lightweightThemes.usedThemes", true);
+#ifdef MOZ_MAILNEWS
 pref("services.sync.prefs.sync.mailnews.confirm.moveFoldersToTrash", true);
 pref("services.sync.prefs.sync.mailnews.customDBHeaders", true);
 pref("services.sync.prefs.sync.mailnews.customHeaders", true);
 pref("services.sync.prefs.sync.mailnews.display.date_senders_timezone", true);
 pref("services.sync.prefs.sync.mailnews.display.disable_format_flowed_support", true);
 pref("services.sync.prefs.sync.mailnews.display.disallow_mime_handlers", true);
 pref("services.sync.prefs.sync.mailnews.display.html_as", true);
 pref("services.sync.prefs.sync.mailnews.display.html_sanitizer.allowed_tags", true);
@@ -978,16 +983,17 @@ pref("services.sync.prefs.sync.mailnews.
 pref("services.sync.prefs.sync.mailnews.send_plaintext_flowed", true);
 pref("services.sync.prefs.sync.mailnews.show_send_progress", true);
 pref("services.sync.prefs.sync.mailnews.start_page.enabled", true);
 pref("services.sync.prefs.sync.mailnews.thread_pane_column_unthreads", true);
 pref("services.sync.prefs.sync.mailnews.ui.deleteMarksRead", true);
 pref("services.sync.prefs.sync.mailnews.ui.junk.manualMarkAsJunkMarksRead", true);
 pref("services.sync.prefs.sync.mailnews.view_default_charset", true);
 pref("services.sync.prefs.sync.mailnews.wraplength", true);
+#endif
 pref("services.sync.prefs.sync.network.cookie.cookieBehavior", true);
 pref("services.sync.prefs.sync.network.cookie.lifetimePolicy", true);
 pref("services.sync.prefs.sync.offline-apps.allow_by_default", true);
 pref("services.sync.prefs.sync.permissions.default.image", true);
 pref("services.sync.prefs.sync.privacy.donottrackheader.enabled", true);
 pref("services.sync.prefs.sync.privacy.sanitize.sanitizeOnShutdown", true);
 pref("services.sync.prefs.sync.privacy.sanitize.promptOnSanitize", true);
 pref("services.sync.prefs.sync.privacy.clearOnShutdown.cache", true);
diff --git a/suite/base/content/defaultClientDialog.xul b/suite/base/content/defaultClientDialog.xul
--- a/suite/base/content/defaultClientDialog.xul
+++ b/suite/base/content/defaultClientDialog.xul
@@ -21,17 +21,19 @@
         ondialogaccept="return onAccept();"
         title="&defaultClient.title;">
 
   <script src="chrome://communicator/content/defaultClientDialog.js"/>
 
   <description>&defaultClient.intro;</description>
   <listbox rows="4" id="defaultList">
     <listitem value="BROWSER" type="checkbox" label="&browser.label;"/>
+#ifdef MOZ_MAILNEWS
     <listitem value="MAIL" type="checkbox" label="&email.label;"/>
     <listitem value="NEWS" type="checkbox" label="&newsgroups.label;"/>
     <listitem value="RSS" type="checkbox" label="&feeds.label;"/>
+#endif
   </listbox>
 
   <separator class="thin"/>
   <checkbox id="checkOnStartup" checked="true" label="&checkOnStartup.label;" accesskey="&checkOnStartup.accesskey;"/>
 
 </dialog>
diff --git a/suite/base/jar.mn b/suite/base/jar.mn
--- a/suite/base/jar.mn
+++ b/suite/base/jar.mn
@@ -35,27 +35,29 @@ comm.jar:
 % overlay chrome://pippki/content/escrowWarn.xul chrome://communicator/content/helpSecurityOverlay.xul
 % overlay chrome://pippki/content/getp12password.xul chrome://communicator/content/helpSecurityOverlay.xul
 % overlay chrome://pippki/content/setp12password.xul chrome://communicator/content/helpSecurityOverlay.xul
 % overlay chrome://pippki/content/pref-crlupdate.xul chrome://communicator/content/helpSecurityOverlay.xul
 % overlay chrome://pippki/content/serverCrlNextupdate.xul chrome://communicator/content/helpSecurityOverlay.xul
 % overlay chrome://pippki/content/crlManager.xul chrome://communicator/content/helpSecurityOverlay.xul
 % overlay chrome://pippki/content/resetpassword.xul chrome://communicator/content/helpSecurityOverlay.xul
 % overlay chrome://pippki/content/downloadcert.xul chrome://communicator/content/helpSecurityOverlay.xul
+#ifdef MOZ_MAILNEWS
 % overlay chrome://messenger/content/addressbook/pref-editdirectories.xul chrome://communicator/content/helpMessengerOverlay.xul
 % overlay chrome://messenger/content/addressbook/pref-directory-add.xul chrome://communicator/content/helpMessengerOverlay.xul
 % overlay chrome://messenger/content/AccountManager.xul chrome://communicator/content/helpMessengerOverlay.xul
 % overlay chrome://messenger/content/FilterEditor.xul chrome://communicator/content/helpMessengerOverlay.xul
 % overlay chrome://messenger/content/junkMailInfo.xul chrome://communicator/content/helpMessengerOverlay.xul
 % overlay chrome://messenger/content/msgSelectOfflineFolders.xul chrome://communicator/content/helpMessengerOverlay.xul
 % overlay chrome://messenger/content/subscribe.xul chrome://communicator/content/helpMessengerOverlay.xul
 % overlay chrome://messenger/content/mailViewList.xul chrome://communicator/content/helpMessengerOverlay.xul
 % overlay chrome://messenger/content/mailViewSetup.xul chrome://communicator/content/helpMessengerOverlay.xul
 % overlay chrome://messenger-smime/content/msgCompSecurityInfo.xul chrome://communicator/content/helpMessengerOverlay.xul
 % overlay chrome://messenger-smime/content/msgReadSecurityInfo.xul chrome://communicator/content/helpMessengerOverlay.xul
+#endif
 % style about:addons chrome://communicator/content/extensionsOverlay.css
 % style chrome://mozapps/content/extensions/extensions.xul chrome://communicator/content/extensionsOverlay.css
    content/communicator/about.js                                    (content/about.js)
    content/communicator/about.xhtml                                 (content/about.xhtml)
    content/communicator/aboutLife.xhtml                             (content/aboutLife.xhtml)
    content/communicator/aboutPrivateBrowsing.css                    (content/aboutPrivateBrowsing.css)
    content/communicator/aboutPrivateBrowsing.js                     (content/aboutPrivateBrowsing.js)
    content/communicator/aboutPrivateBrowsing.xul                    (content/aboutPrivateBrowsing.xul)
@@ -69,17 +71,17 @@ comm.jar:
    content/communicator/certError.js                                (content/certError.js)
    content/communicator/certError.xhtml                             (content/certError.xhtml)
    content/communicator/certError.xml                               (content/certError.xml)
    content/communicator/charsetOverlay.xul                          (content/charsetOverlay.xul)
    content/communicator/communicator.css                            (content/communicator.css)
    content/communicator/contentAreaClick.js                         (content/contentAreaClick.js)
    content/communicator/contentAreaContextOverlay.xul               (content/contentAreaContextOverlay.xul)
    content/communicator/defaultClientDialog.js                      (content/defaultClientDialog.js)
-   content/communicator/defaultClientDialog.xul                     (content/defaultClientDialog.xul)
+*  content/communicator/defaultClientDialog.xul                     (content/defaultClientDialog.xul)
    content/communicator/extensionsOverlay.css                       (content/extensionsOverlay.css)
    content/communicator/findUtils.js                                (content/findUtils.js)
    content/communicator/fullscreen-video.xhtml                      (content/fullscreen-video.xhtml)
    content/communicator/gopherAddon.xhtml                           (content/gopherAddon.xhtml)
    content/communicator/helpEditorOverlay.xul                       (content/helpEditorOverlay.xul)
    content/communicator/helpMessengerOverlay.xul                    (content/helpMessengerOverlay.xul)
    content/communicator/helpSecurityOverlay.xul                     (content/helpSecurityOverlay.xul)
    content/communicator/labelsencodings.properties                  (/dom/encoding/labelsencodings.properties)
diff --git a/suite/browser/jar.mn b/suite/browser/jar.mn
--- a/suite/browser/jar.mn
+++ b/suite/browser/jar.mn
@@ -8,18 +8,20 @@ comm.jar:
    content/navigator/browser-places.js
    content/navigator/content.js
    content/navigator/fullScreen.js
    content/navigator/hiddenWindow.xul
    content/navigator/linkToolbarHandler.js
    content/navigator/linkToolbarItem.js
    content/navigator/linkToolbarOverlay.js
    content/navigator/linkToolbarOverlay.xul
+#ifdef MOZ_MAILNEWS
    content/navigator/mailNavigatorOverlay.js
 *  content/navigator/mailNavigatorOverlay.xul
+#endif
    content/navigator/metadata.js
    content/navigator/metadata.xul
    content/navigator/navigator.css
    content/navigator/navigator.js
    content/navigator/navigator.xul
    content/navigator/navigatorDD.js
 *  content/navigator/navigatorOverlay.xul
    content/navigator/nsBrowserContentListener.js
diff --git a/suite/browser/navigatorOverlay.xul b/suite/browser/navigatorOverlay.xul
--- a/suite/browser/navigatorOverlay.xul
+++ b/suite/browser/navigatorOverlay.xul
@@ -4,17 +4,19 @@
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
 <?xul-overlay href="chrome://communicator/content/viewZoomOverlay.xul"?>
 <?xul-overlay href="chrome://communicator/content/viewApplyThemeOverlay.xul"?>
 <?xul-overlay href="chrome://communicator/content/tasksOverlay.xul"?>
 <?xul-overlay href="chrome://communicator/content/places/placesOverlay.xul"?>
 <?xul-overlay href="chrome://communicator/content/charsetOverlay.xul"?>
+#ifdef MOZ_MAILNEWS
 <?xul-overlay href="chrome://navigator/content/mailNavigatorOverlay.xul"?>
+#endif
 
 <!DOCTYPE overlay [
 <!ENTITY % navigatorDTD SYSTEM "chrome://navigator/locale/navigator.dtd" >
 %navigatorDTD;
 <!ENTITY % navigatorOverlayDTD SYSTEM "chrome://navigator/locale/navigatorOverlay.dtd">
 %navigatorOverlayDTD;
 <!ENTITY % contentAreaCommandsDTD SYSTEM "chrome://communicator/locale/contentAreaCommands.dtd" >
 %contentAreaCommandsDTD;
diff --git a/suite/components/moz.build b/suite/components/moz.build
--- a/suite/components/moz.build
+++ b/suite/components/moz.build
@@ -42,11 +42,12 @@ XPIDL_SOURCES += [
     'nsISuiteGlue.idl',
 ]
 
 XPIDL_MODULE = 'suite-components'
 
 EXTRA_COMPONENTS += [
     'nsAbout.js',
     'nsGopherProtocolStubHandler.js',
-    'nsSuiteGlue.js',
     'SuiteComponents.manifest',
 ]
+
+EXTRA_PP_COMPONENTS += ['nsSuiteGlue.js']
\ No newline at end of file
diff --git a/suite/components/nsSuiteGlue.js b/suite/components/nsSuiteGlue.js
--- a/suite/components/nsSuiteGlue.js
+++ b/suite/components/nsSuiteGlue.js
@@ -1,17 +1,20 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
+
+#ifdef MOZ_MAILNEWS
 ChromeUtils.import("resource:///modules/mailnewsMigrator.js");
+#endif
 
 XPCOMUtils.defineLazyModuleGetters(this, {
   AddonManager: "resource://gre/modules/AddonManager.jsm",
   L10nRegistry: "resource://gre/modules/L10nRegistry.jsm",
   LoginManagerParent: "resource://gre/modules/LoginManagerParent.jsm",
   NetUtil: "resource://gre/modules/NetUtil.jsm",
   FileSource: "resource://gre/modules/L10nRegistry.jsm",
   FileUtils: "resource://gre/modules/FileUtils.jsm",
@@ -201,21 +204,23 @@ SuiteGlue.prototype = {
         listeners.init();
 
         Services.mm.loadFrameScript("chrome://navigator/content/content.js",
                                     true);
         ChromeUtils.import("resource://gre/modules/NotificationDB.jsm");
         break;
       case "browser-delayed-startup-finished":
          // Intended fallthrough.
+#ifdef MOZ_MAILNEWS
       case "mail-startup-done":
         Services.obs.removeObserver(this, "browser-delayed-startup-finished");
         Services.obs.removeObserver(this, "mail-startup-done");
         this._onFirstWindowLoaded(subject);
         break;
+#endif
       case "sessionstore-windows-restored":
         this._onBrowserStartup(subject);
         break;
       case "browser:purge-session-history":
         // reset the console service's error buffer
         Services.console.logStringMessage(null); // clear the console (in case it's open)
         Services.console.reset();
         break;
@@ -329,17 +334,19 @@ SuiteGlue.prototype = {
   // initialization (called on application startup)
   _init: function()
   {
     // observer registration
     Services.obs.addObserver(this, "profile-before-change", true);
     Services.obs.addObserver(this, "profile-after-change", true);
     Services.obs.addObserver(this, "final-ui-startup", true);
     Services.obs.addObserver(this, "browser-delayed-startup-finished", true);
+#ifdef MOZ_MAILNEWS
     Services.obs.addObserver(this, "mail-startup-done", true);
+#endif
     Services.obs.addObserver(this, "sessionstore-windows-restored", true);
     Services.obs.addObserver(this, "browser:purge-session-history", true);
     Services.obs.addObserver(this, "quit-application-requested", true);
     Services.obs.addObserver(this, "quit-application-granted", true);
     Services.obs.addObserver(this, "browser-lastwindow-close-requested", true);
     Services.obs.addObserver(this, "browser-lastwindow-close-granted", true);
     Services.obs.addObserver(this, "console-api-log-event", true);
     Services.obs.addObserver(this, "weave:service:ready", true);
@@ -373,17 +380,19 @@ SuiteGlue.prototype = {
     }
     this._copyDefaultProfileFiles();
   },
 
   // profile startup handler (contains profile initialization routines)
   _onProfileStartup: function()
   {
     this._migrateUI();
+#ifdef MOZ_MAILNEWS
     migrateMailnews(); // mailnewsMigrator.js
+#endif
 
     // Initialize the default l10n resource sources for L10nRegistry.
     // const locales = [AppConstants.INSTALL_LOCALE];
     const locales = [Services.locale.defaultLocale];
     const toolkitSource = new FileSource("toolkit", locales, "resource://gre/localization/{locale}/");
     L10nRegistry.registerSource(toolkitSource);
 
     Sanitizer.onStartup();
diff --git a/suite/components/shell/moz.build b/suite/components/shell/moz.build
--- a/suite/components/shell/moz.build
+++ b/suite/components/shell/moz.build
@@ -27,21 +27,18 @@ if CONFIG['OS_ARCH'] == 'WINNT':
         '/other-licenses/nsis/Contrib/CityHash/cityhash',
     ]
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     SOURCES += ['nsMacShellService.cpp']
 elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
     SOURCES += ['nsGNOMEShellService.cpp']
 
 if SOURCES:
-    EXTRA_COMPONENTS += [
-        'nsSetDefault.js',
-        'nsSetDefault.manifest',
-    ]
-
+    EXTRA_COMPONENTS += ['nsSetDefault.manifest']
+    EXTRA_PP_COMPONENTS += ['nsSetDefault.js']
 EXTRA_JS_MODULES += [
     'ShellService.jsm',
 ]
 
 FINAL_LIBRARY = 'suite'
 
 CXXFLAGS += CONFIG['TK_CFLAGS']
 
diff --git a/suite/components/shell/nsGNOMEShellService.cpp b/suite/components/shell/nsGNOMEShellService.cpp
--- a/suite/components/shell/nsGNOMEShellService.cpp
+++ b/suite/components/shell/nsGNOMEShellService.cpp
@@ -54,27 +54,31 @@ struct MimeTypeAssociation {
   const char* extensions;
 };
 
 static const ProtocolAssociation gProtocols[] = {
   { nsIShellService::BROWSER, "http", true },
   { nsIShellService::BROWSER, "https", true },
   { nsIShellService::BROWSER, "ftp", false },
   { nsIShellService::BROWSER, "chrome", false },
+#ifdef MOZ_MAILNEWS
   { nsIShellService::MAIL, "mailto", true },
   { nsIShellService::NEWS, "news", true },
   { nsIShellService::NEWS, "snews", true },
   { nsIShellService::RSS, "feed", true }
+#endif
 };
 
 static const MimeTypeAssociation gMimeTypes[] = {
   { nsIShellService::BROWSER, "text/html", "htm html shtml" },
   { nsIShellService::BROWSER, "application/xhtml+xml", "xhtml xht" },
+#ifdef MOZ_MAILNEWS
   { nsIShellService::MAIL, "message/rfc822", "eml" },
   { nsIShellService::RSS, "application/rss+xml", "rss" }
+#endif
 };
 
 #define kDesktopBGSchema "org.gnome.desktop.background"
 #define kDesktopImageGSKey "picture-uri"
 #define kDesktopOptionGSKey "picture-options"
 #define kDesktopDrawBGGSKey "draw-background"
 #define kDesktopColorGSKey "primary-color"
 
diff --git a/suite/components/shell/nsMacShellService.cpp b/suite/components/shell/nsMacShellService.cpp
--- a/suite/components/shell/nsMacShellService.cpp
+++ b/suite/components/shell/nsMacShellService.cpp
@@ -33,25 +33,27 @@ NS_IMPL_ISUPPORTS(nsMacShellService, nsI
 NS_IMETHODIMP
 nsMacShellService::IsDefaultClient(bool aStartupCheck, uint16_t aApps, bool *aIsDefaultClient)
 {
   *aIsDefaultClient = false;
 
   if (aApps & nsIShellService::BROWSER)
     if(!isDefaultHandlerForProtocol(CFSTR("http")))
       return NS_OK;
+#ifdef MOZ_MAILNEWS
   if (aApps & nsIShellService::MAIL)
     if(!isDefaultHandlerForProtocol(CFSTR("mailto")))
       return NS_OK;
   if (aApps & nsIShellService::NEWS)
     if(!isDefaultHandlerForProtocol(CFSTR("news")))
       return NS_OK;
   if (aApps & nsIShellService::RSS)
     if(!isDefaultHandlerForProtocol(CFSTR("feed")))
       return NS_OK;
+#endif
 
   *aIsDefaultClient = true;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMacShellService::SetDefaultClient(bool aForAllUsers,
@@ -70,25 +72,27 @@ nsMacShellService::SetDefaultClient(bool
     if (::LSSetDefaultHandlerForURLScheme(CFSTR("https"), suiteID) != noErr)
       return NS_ERROR_FAILURE;
     if (::LSSetDefaultRoleHandlerForContentType(kUTTypeHTML, kLSRolesAll, suiteID) != noErr)
       return NS_ERROR_FAILURE;
     if (::LSSetDefaultRoleHandlerForContentType(CFSTR("public.xhtml"), kLSRolesAll, suiteID) != noErr)
       return NS_ERROR_FAILURE;
   }
 
+#ifdef MOZ_MAILNEWS
   if (aApps & nsIShellService::MAIL)
     if (::LSSetDefaultHandlerForURLScheme(CFSTR("mailto"), suiteID) != noErr)
       return NS_ERROR_FAILURE;
   if (aApps & nsIShellService::NEWS)
     if (::LSSetDefaultHandlerForURLScheme(CFSTR("news"), suiteID) != noErr)
       return NS_ERROR_FAILURE;
   if (aApps & nsIShellService::RSS)
     if (::LSSetDefaultHandlerForURLScheme(CFSTR("feed"), suiteID) != noErr)
       return NS_ERROR_FAILURE;
+#endif
 
   return NS_OK;
 }
 
 bool
 nsMacShellService::isDefaultHandlerForProtocol(CFStringRef aScheme)
 {
   bool isDefault = false;
diff --git a/suite/components/shell/nsSetDefault.js b/suite/components/shell/nsSetDefault.js
--- a/suite/components/shell/nsSetDefault.js
+++ b/suite/components/shell/nsSetDefault.js
@@ -18,36 +18,41 @@ function nsSetDefault() {
 
 nsSetDefault.prototype = {
   handle: function nsSetDefault_handle(aCmdline) {
     if (aCmdline.handleFlag("setDefaultBrowser", false)) {
       var shell = Cc["@mozilla.org/suite/shell-service;1"]
                     .getService(Ci.nsIShellService);
       shell.setDefaultClient(true, true, Ci.nsIShellService.BROWSER);
     }
+#ifdef MOZ_MAILNEWS
     else if (aCmdline.handleFlag("setDefaultMail", false)) {
       var shell = Cc["@mozilla.org/suite/shell-service;1"]
                     .getService(Ci.nsIShellService);
       shell.setDefaultClient(true, true, Ci.nsIShellService.MAIL);
     }
     else if (aCmdline.handleFlag("setDefaultNews", false)) {
       var shell = Cc["@mozilla.org/suite/shell-service;1"]
                     .getService(Ci.nsIShellService);
       shell.setDefaultClient(true, true, Ci.nsIShellService.NEWS);
     }
     else if (aCmdline.handleFlag("setDefaultFeed", false)) {
       var shell = Cc["@mozilla.org/suite/shell-service;1"]
                     .getService(Ci.nsIShellService);
       shell.setDefaultClient(true, true, Ci.nsIShellService.RSS);
     }
+#endif
   },
 
+  helpInfo: "  -setDefaultBrowser Set this app as the default browser client.\n",
+#ifdef MOZ_MAILNEWS
   helpInfo: "  -setDefaultBrowser Set this app as the default browser client.\n" +
             "  -setDefaultMail    Set this app as the default mail client.\n" +
             "  -setDefaultNews    Set this app as the default newsreader.\n" +
             "  -setDefaultFeed    Set this app as the default feedreader.\n",
+#endif
 
   classID: Components.ID("{a3d5b950-690a-491f-a881-2c2cdcd241cb}"),
   QueryInterface: XPCOMUtils.generateQI([nsICommandLineHandler])
 }
 
 var NSGetFactory = XPCOMUtils.generateNSGetFactory([nsSetDefault]);
 
diff --git a/suite/components/shell/nsWindowsShellService.cpp b/suite/components/shell/nsWindowsShellService.cpp
--- a/suite/components/shell/nsWindowsShellService.cpp
+++ b/suite/components/shell/nsWindowsShellService.cpp
@@ -220,35 +220,42 @@ OpenKeyForReading(HKEY aKeyRoot, const w
 
 
 typedef enum {
   NO_SUBSTITUTION           = 0x00,
   APP_PATH_SUBSTITUTION     = 0x01
 } SettingFlags;
 
 #define APP_REG_NAME L"SeaMonkey"
+#ifdef MOZ_MAILNEWS
 // APP_REG_NAME_MAIL and APP_REG_NAME_NEWS should be kept in synch with
 // AppRegNameMail and AppRegNameNews in the installer file: defines.nsi.in
 #define APP_REG_NAME_MAIL L"SeaMonkey (Mail)"
 #define APP_REG_NAME_NEWS L"SeaMonkey (News)"
+#endif
 #define CLS_HTML "SeaMonkeyHTML"
 #define CLS_URL "SeaMonkeyURL"
+#ifdef MOZ_MAILNEWS
 #define CLS_EML "SeaMonkeyEML"
 #define CLS_MAILTOURL "SeaMonkeyCOMPOSE"
 #define CLS_NEWSURL "SeaMonkeyNEWS"
 #define CLS_FEEDURL "SeaMonkeyFEED"
+#endif
 #define SMI "SOFTWARE\\Clients\\StartMenuInternet\\"
 #define DI "\\DefaultIcon"
 #define II "\\InstallInfo"
 #define SOP "\\shell\\open\\command"
 
 #define VAL_ICON "%APPPATH%,0"
 #define VAL_HTML_OPEN "\"%APPPATH%\" -url \"%1\""
 #define VAL_URL_OPEN "\"%APPPATH%\" -requestPending -osint -url \"%1\""
+
+#ifdef MOZ_MAILNEWS
 #define VAL_MAIL_OPEN "\"%APPPATH%\" \"%1\""
+#endif
 
 #define MAKE_KEY_NAME1(PREFIX, MID) \
   PREFIX MID
 
 // The DefaultIcon registry key value should never be used (e.g. NON_ESSENTIAL)
 // when checking if SeaMonkey is the default browser since other applications
 // (e.g. MS Office) may modify the DefaultIcon registry key value to add Icon
 // Handlers.
@@ -268,16 +275,17 @@ static SETTING gBrowserSettings[] = {
   { MAKE_KEY_NAME1("HTTPS", DI),   "", VAL_ICON, APP_PATH_SUBSTITUTION },
   { MAKE_KEY_NAME1("HTTPS", SOP),  "", VAL_URL_OPEN, APP_PATH_SUBSTITUTION }
 
   // These values must be set by hand, since they contain localized strings.
   //   seamonkey.exe\shell\properties   (default)   REG_SZ  SeaMonkey &Preferences
   //   seamonkey.exe\shell\safemode     (default)   REG_SZ  SeaMonkey &Safe Mode
 };
 
+#ifdef MOZ_MAILNEWS
  static SETTING gMailSettings[] = {
    // File Extension Aliases
    { ".eml", "", CLS_EML, NO_SUBSTITUTION },
    // File Extension Class
    { MAKE_KEY_NAME1(CLS_EML, SOP), "",  VAL_MAIL_OPEN, APP_PATH_SUBSTITUTION},
 
    // Protocol Handler Class - for Vista and above
    { MAKE_KEY_NAME1(CLS_MAILTOURL, SOP), "", "\"%APPPATH%\" -osint -compose \"%1\"", APP_PATH_SUBSTITUTION },
@@ -297,16 +305,17 @@ static SETTING gBrowserSettings[] = {
 
  static SETTING gFeedSettings[] = {
    // Protocol Handler Class - for Vista and above
    { MAKE_KEY_NAME1(CLS_FEEDURL, SOP), "", "\"%APPPATH%\" -osint -mail \"%1\"", APP_PATH_SUBSTITUTION },
 
    // Protocol Handlers
    { MAKE_KEY_NAME1("feed", SOP), "", "\"%APPPATH%\" -osint -mail \"%1\"", APP_PATH_SUBSTITUTION },
 };
+#endif
 
 nsresult
 GetHelperPath(nsString& aPath)
 {
   nsresult rv;
   nsCOMPtr<nsIProperties> directoryService =
     do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
@@ -421,27 +430,33 @@ nsWindowsShellService::IsDefaultClientVi
   HRESULT hr = CoCreateInstance(CLSID_ApplicationAssociationRegistration,
                                 nullptr,
                                 CLSCTX_INPROC,
                                 IID_IApplicationAssociationRegistration,
                                 (void**)&pAAR);
 
   if (SUCCEEDED(hr)) {
     BOOL isDefaultBrowser = true;
+
+    if (aApps & nsIShellService::BROWSER)
+      pAAR->QueryAppIsDefaultAll(AL_EFFECTIVE, APP_REG_NAME, &isDefaultBrowser);
+
+#ifdef MOZ_MAILNEWS
     BOOL isDefaultMail    = true;
     BOOL isDefaultNews    = true;
-    if (aApps & nsIShellService::BROWSER)
-      pAAR->QueryAppIsDefaultAll(AL_EFFECTIVE, APP_REG_NAME, &isDefaultBrowser);
+
     if (aApps & nsIShellService::MAIL)
       pAAR->QueryAppIsDefaultAll(AL_EFFECTIVE, APP_REG_NAME_MAIL, &isDefaultMail);
     if (aApps & nsIShellService::NEWS)
       pAAR->QueryAppIsDefaultAll(AL_EFFECTIVE, APP_REG_NAME_NEWS, &isDefaultNews);
 
     *aIsDefaultClient = isDefaultBrowser && isDefaultNews && isDefaultMail;
-
+#else
+    *aIsDefaultClient = isDefaultBrowser;
+#endif
     pAAR->Release();
     return true;
   }
   return false;
 }
 
 NS_IMETHODIMP
 nsWindowsShellService::IsDefaultClient(bool aStartupCheck, uint16_t aApps, bool *aIsDefaultClient)
@@ -452,31 +467,32 @@ nsWindowsShellService::IsDefaultClient(b
   // browser check needs to be at the top
   if (aApps & nsIShellService::BROWSER) {
     *aIsDefaultClient &= TestForDefault(gBrowserSettings, sizeof(gBrowserSettings)/sizeof(SETTING));
     // Only check if this app is default on Vista if the previous checks
     // indicate that this app is the default.
     if (*aIsDefaultClient)
       IsDefaultClientVista(nsIShellService::BROWSER, aIsDefaultClient);
   }
+#ifdef MOZ_MAILNEWS
   if (aApps & nsIShellService::MAIL) {
     *aIsDefaultClient &= TestForDefault(gMailSettings, sizeof(gMailSettings)/sizeof(SETTING));
     // Only check if this app is default on Vista if the previous checks
     // indicate that this app is the default.
     if (*aIsDefaultClient)
       IsDefaultClientVista(nsIShellService::MAIL, aIsDefaultClient);
   }
   if (aApps & nsIShellService::NEWS) {
     *aIsDefaultClient &= TestForDefault(gNewsSettings, sizeof(gNewsSettings)/sizeof(SETTING));
     // Only check if this app is default on Vista if the previous checks
     // indicate that this app is the default.
     if (*aIsDefaultClient)
       IsDefaultClientVista(nsIShellService::NEWS, aIsDefaultClient);
   }
-
+#endif
   return NS_OK;
 }
 
 
 NS_IMETHODIMP
 nsWindowsShellService::SetDefaultClient(bool aForAllUsers,
                                         bool aClaimAllTypes, uint16_t aApps)
 {
diff --git a/suite/installer/package-manifest.in b/suite/installer/package-manifest.in
--- a/suite/installer/package-manifest.in
+++ b/suite/installer/package-manifest.in
@@ -40,17 +40,19 @@
 @APPNAME@/Contents/PkgInfo
 @RESPATH@/seamonkey.icns
 @RESPATH@/@LPROJ_ROOT@.lproj/*
 #endif
 
 [@AB_CD@]
 @RESPATH@/chrome/@AB_CD@@JAREXT@
 @RESPATH@/chrome/@AB_CD@.manifest
+#ifdef MOZ_MAILNEWS
 @RESPATH@/defaults/messenger/mailViews.dat
+#endif
 @RESPATH@/defaults/profile/bookmarks.html
 @RESPATH@/defaults/profile/chrome/*
 @RESPATH@/defaults/profile/mimeTypes.rdf
 @RESPATH@/defaults/profile/panels.rdf
 @RESPATH@/dictionaries/*
 @RESPATH@/hyphenation/*
 @RESPATH@/localization/*
 #ifdef MOZ_BUNDLED_FONTS
@@ -164,17 +166,19 @@
 @RESPATH@/components/autocomplete.xpt
 @RESPATH@/components/autoconfig.xpt
 @RESPATH@/components/browser-element.xpt
 @RESPATH@/components/caps.xpt
 @RESPATH@/components/captivedetect.xpt
 @RESPATH@/components/chrome.xpt
 @RESPATH@/components/commandhandler.xpt
 @RESPATH@/components/commandlines.xpt
+#ifdef MOZ_MAILNEWS
 @RESPATH@/components/commuconv.xpt
+#endif
 @RESPATH@/components/composer.xpt
 @RESPATH@/components/content_events.xpt
 @RESPATH@/components/content_geckomediaplugins.xpt
 @RESPATH@/components/content_html.xpt
 #ifdef MOZ_WEBRTC
 @RESPATH@/components/content_webrtc.xpt
 #endif
 @RESPATH@/components/content_xslt.xpt
@@ -389,17 +393,19 @@
 @RESPATH@/components/FeedConverter.js
 @RESPATH@/components/FeedProcessor.js
 @RESPATH@/components/FeedProcessor.manifest
 @RESPATH@/components/UAOverridesBootstrapper.js
 @RESPATH@/components/UAOverridesBootstrapper.manifest
 @RESPATH@/components/WellKnownOpportunisticUtils.js
 @RESPATH@/components/WellKnownOpportunisticUtils.manifest
 @RESPATH@/components/FeedWriter.js
+#ifdef MOZ_MAILNEWS
 @RESPATH@/components/folderLookupService.js
+#endif
 @RESPATH@/components/htmlMenuBuilder.js
 @RESPATH@/components/htmlMenuBuilder.manifest
 @RESPATH@/components/jsconsole-clhandler.js
 @RESPATH@/components/jsconsole-clhandler.manifest
 @RESPATH@/components/mozProtocolHandler.js
 @RESPATH@/components/mozProtocolHandler.manifest
 @RESPATH@/components/addoncompat.manifest
 @RESPATH@/components/multiprocessShims.js
@@ -718,25 +724,27 @@
 
 ; for Solaris SPARC
 #ifdef SOLARIS
 bin/libfreebl_32fpu_3.so
 bin/libfreebl_32int_3.so
 bin/libfreebl_32int64_3.so
 #endif
 
+#ifdef MOZ_MAILNEWS
 ; LDAP components need to be in the browser for AutoConfig
 @RESPATH@/components/nsAbLDAPAttributeMap.js
 @RESPATH@/components/mozldap.xpt
 @RESPATH@/components/nsAbLDAPAutoCompleteSearch.js
 @RESPATH@/components/nsLDAPProtocolHandler.js
 @RESPATH@/components/ldapComponents.manifest
 @BINPATH@/@DLL_PREFIX@ldap60@DLL_SUFFIX@
 @BINPATH@/@DLL_PREFIX@ldif60@DLL_SUFFIX@
 @BINPATH@/@DLL_PREFIX@prldap60@DLL_SUFFIX@
+#endif
 
 ; [Updater]
 ;
 #ifdef MOZ_UPDATER
 #ifdef XP_MACOSX
 @BINPATH@/updater.app/
 #else
 @BINPATH@/updater@BIN_SUFFIX@
@@ -768,16 +776,17 @@ bin/libfreebl_32int64_3.so
 ;
 #ifdef MOZ_CRASHREPORTER
 @BINPATH@/minidump-analyzer@BIN_SUFFIX@
 #endif
 
 ; https://bugzilla.mozilla.org/show_bug.cgi?id=1113086
 @RESPATH@/components/dom_audiochannel.xpt
 
+#ifdef MAILNEWS
 [mail]
 ; MailNews component xpts
 @RESPATH@/components/addrbook.xpt
 @RESPATH@/components/nsAddrbook.manifest
 @RESPATH@/components/fts3tok.xpt
 @RESPATH@/components/import.xpt
 @RESPATH@/components/mailview.xpt
 @RESPATH@/components/mime.xpt
@@ -871,16 +880,17 @@ bin/libfreebl_32int64_3.so
 @RESPATH@/chrome/gloda@JAREXT@
 @RESPATH@/chrome/gloda.manifest
 @RESPATH@/components/glautocomp.js
 @RESPATH@/components/jsmimeemitter.js
 @RESPATH@/components/gloda.manifest
 
 ; New message notification
 @RESPATH@/components/newMailNotificationService.js
+#endif MOZ_MAILNEWS
 
 ; Address Sanitizer
 #ifdef LLVM_SYMBOLIZER
 @BINPATH@/@LLVM_SYMBOLIZER@
 #endif
 
 #ifdef MOZ_CLANG_RT_ASAN_LIB
 @BINPATH@/@MOZ_CLANG_RT_ASAN_LIB@
diff --git a/suite/moz.build b/suite/moz.build
--- a/suite/moz.build
+++ b/suite/moz.build
@@ -7,23 +7,25 @@ CONFIGURE_SUBST_FILES += ['installer/Mak
 
 DIRS += [
     'base',
     'browser',
     'components',
     'editor',
     'extensions',
     'locales',
-    'mailnews',
     'modules',
     'themes/classic',
     'themes/modern',
     'smile',
 ]
 
+if CONFIG['MOZ_MAILNEWS']:
+    DIRS += ['mailnews']
+
 if CONFIG['MAKENSISU']:
     DIRS += ['installer/windows']
 
 if CONFIG['MOZ_BUNDLED_FONTS']:
     DIRS += ['/browser/fonts']
 
 # app is always last as it packages up the built files on mac.
 DIRS += [
diff --git a/suite/moz.configure b/suite/moz.configure
--- a/suite/moz.configure
+++ b/suite/moz.configure
@@ -70,16 +70,29 @@ set_defconf('SEAMONKEY_VERSION', seamonk
 set_defconf('SEAMONKEY_VERSION_DISPLAY', seamonkey_version.version_display)
 set_defconf('MOZ_PKG_VERSION', seamonkey_version.version_package)
 
 set_define('MOZ_SEPARATE_MANIFEST_FOR_THEME_OVERRIDES', True)
 
 imply_option('MOZ_PLACES', True)
 imply_option('MOZ_SERVICES_SYNC', False)
 
+# =========================================================
+# = MailNews
+# ==============================================================
+option('--disable-mailnews', help='Enable mailnews core')
+
+@depends('--disable-mailnews')
+def mailnews(value):
+    if value:
+        return True
+
+set_config('MOZ_MAILNEWS', mailnews)
+set_define('MOZ_MAILNEWS', mailnews)
+
 # Building extensions is disabled by default.
 
 # =========================================================
 # = ChatZilla extension
 # =========================================================
 option('--enable-irc', default=False,
        help='Enable building of the ChatZilla IRC extension')
 
@@ -118,10 +131,10 @@ with only_when(target_is_linux & compile
            help='Enable non-PIE wrapper')
 
     set_config('MOZ_NO_PIE_COMPAT',
                depends_if('MOZ_NO_PIE_COMPAT')(lambda _: True))
 
 
 include('../build/moz.configure/gecko_source.configure')
 
-include('../mailnews/moz.configure')
+include('../mailnews/moz.configure', when='--enable-mailnews')
 include('../../toolkit/moz.configure')
diff --git a/suite/themes/classic/jar.mn b/suite/themes/classic/jar.mn
--- a/suite/themes/classic/jar.mn
+++ b/suite/themes/classic/jar.mn
@@ -1,23 +1,29 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 classic.jar:
 % skin communicator classic/1.0 %skin/classic/communicator/
 % skin editor classic/1.0 %skin/classic/editor/
+#ifdef MOZ_MAILNEWS
 % skin messenger classic/1.0 %skin/classic/messenger/
+#endif
 % skin navigator classic/1.0 %skin/classic/navigator/
+#ifdef MOZ_MAILNEWS
 % skin messenger-newsblog classic/1.0 %skin/classic/messenger-newsblog/
+#endif
 % style chrome://global/content/customizeToolbar.xul chrome://navigator/skin/navigator.css
+#ifdef MOZ_MAILNEWS
 % style chrome://global/content/customizeToolbar.xul chrome://messenger/skin/primaryToolbar.css
 % style chrome://global/content/customizeToolbar.xul chrome://messenger/skin/messengercompose/messengercompose.css
 % style chrome://global/content/customizeToolbar.xul chrome://messenger/skin/smime/msgCompSMIMEOverlay.css
 % style chrome://global/content/customizeToolbar.xul chrome://messenger/skin/addressbook/addressbook.css
+#endif
 % style chrome://global/content/customizeToolbar.xul chrome://editor/skin/editorPrimaryToolbar.css
 % style chrome://global/content/customizeToolbar.xul chrome://editor/skin/editorFormatToolbar.css
 #ifdef XP_MACOSX
   skin/classic/communicator/aboutPrivateBrowsing.css                    (mac/communicator/aboutPrivateBrowsing.css)
   skin/classic/communicator/aboutSessionRestore.css                     (mac/communicator/aboutSessionRestore.css)
   skin/classic/communicator/button.css                                  (mac/communicator/button.css)
   skin/classic/communicator/communicator.css                            (mac/communicator/communicator.css)
   skin/classic/communicator/config.css                                  (mac/communicator/config.css)
@@ -230,16 +236,17 @@ classic.jar:
   skin/classic/editor/icons/img-align-middle.png                        (editor/icons/img-align-middle.png)
   skin/classic/editor/icons/img-align-right.png                         (editor/icons/img-align-right.png)
   skin/classic/editor/icons/img-align-top.png                           (editor/icons/img-align-top.png)
   skin/classic/editor/icons/btn2.png                                    (editor/icons/btn2.png)
   skin/classic/editor/icons/multicolor.png                              (editor/icons/multicolor.png)
   skin/classic/editor/icons/progress-busy.png                           (editor/icons/progress-busy.png)
   skin/classic/editor/icons/progress-done.png                           (editor/icons/progress-done.png)
   skin/classic/editor/icons/progress-failed.png                         (editor/icons/progress-failed.png)
+#ifdef MOZ_MAILNEWS
 #ifdef XP_MACOSX
   skin/classic/messenger/accountManage.css                              (mac/messenger/accountManage.css)
   skin/classic/messenger/browserRequest.css                             (mac/messenger/browserRequest.css)
   skin/classic/messenger/filterDialog.css                               (mac/messenger/filterDialog.css)
   skin/classic/messenger/mailWindow1.css                                (mac/messenger/mailWindow1.css)
   skin/classic/messenger/messageHeader.css                              (mac/messenger/messageHeader.css)
   skin/classic/messenger/messageQuotes.css                              (mac/messenger/messageQuotes.css)
   skin/classic/messenger/primaryToolbar.css                             (mac/messenger/primaryToolbar.css)
@@ -438,16 +445,17 @@ classic.jar:
   skin/classic/messenger/smime/icons/sbCryptoNotOk.png                  (messenger/smime/icons/sbCryptoNotOk.png)
   skin/classic/messenger/smime/icons/hdrSignOk.png                      (messenger/smime/icons/hdrSignOk.png)
   skin/classic/messenger/smime/icons/hdrSignUnknown.png                 (messenger/smime/icons/hdrSignUnknown.png)
   skin/classic/messenger/smime/icons/hdrSignNotOk.png                   (messenger/smime/icons/hdrSignNotOk.png)
   skin/classic/messenger/smime/icons/hdrCryptoOk.png                    (messenger/smime/icons/hdrCryptoOk.png)
   skin/classic/messenger/smime/icons/hdrCryptoNotOk.png                 (messenger/smime/icons/hdrCryptoNotOk.png)
   skin/classic/messenger-newsblog/feed-subscriptions.css                (messenger/newsblog/feed-subscriptions.css)
   skin/classic/messenger-newsblog/icons/rss-feed.png                    (messenger/newsblog/rss-feed.png)
+#endif
 #ifdef XP_MACOSX
   skin/classic/navigator/navigator.css                                  (mac/navigator/navigator.css)
   skin/classic/navigator/linkToolbar.css                                (mac/navigator/linkToolbar.css)
   skin/classic/navigator/pageInfo.css                                   (mac/navigator/pageInfo.css)
   skin/classic/navigator/tabbrowser.css                                 (mac/navigator/tabbrowser.css)
   skin/classic/navigator/webDeveloper.css                               (mac/navigator/webDeveloper.css)
   skin/classic/navigator/icons/identity.png                             (mac/navigator/icons/identity.png)
   skin/classic/navigator/icons/navigatoricons.png                       (mac/navigator/icons/navigatoricons.png)
diff --git a/suite/themes/modern/jar.mn b/suite/themes/modern/jar.mn
--- a/suite/themes/modern/jar.mn
+++ b/suite/themes/modern/jar.mn
@@ -5,25 +5,31 @@
 modern.jar:
 % override chrome://mozapps/skin/places/defaultFavicon.svg chrome://communicator/skin/places/bookmark-item.svg
 % skin communicator modern/1.0 %skin/modern/communicator/
 % skin editor modern/1.0 %skin/modern/editor/
 % skin global modern/1.0 %skin/modern/global/
 % skin global-platform modern/1.0 %skin/modern/global/gtk/
 % skin global-platform modern/1.0 %skin/modern/global/mac/ os=Darwin
 % skin global-platform modern/1.0 %skin/modern/global/win/ os=WINNT
+#ifdef MOZ_MAILNEWS
 % skin messenger modern/1.0 %skin/modern/messenger/
 % skin mozapps modern/1.0 %skin/modern/mozapps/
+#endif
 % skin navigator modern/1.0 %skin/modern/navigator/
+#ifdef MOZ_MAILNEWS
 % skin messenger-newsblog modern/1.0 %skin/modern/messenger-newsblog/
+#endif
 % style chrome://global/content/customizeToolbar.xul chrome://navigator/skin/navigator.css
+#ifdef MOZ_MAILNEWS
 % style chrome://global/content/customizeToolbar.xul chrome://messenger/skin/primaryToolbar.css
 % style chrome://global/content/customizeToolbar.xul chrome://messenger/skin/messengercompose/messengercompose.css
 % style chrome://global/content/customizeToolbar.xul chrome://messenger/skin/smime/msgCompSMIMEOverlay.css
 % style chrome://global/content/customizeToolbar.xul chrome://messenger/skin/addressbook/addressbook.css
+#endif
 % style chrome://global/content/customizeToolbar.xul chrome://editor/skin/editorPrimaryToolbar.css
 % style chrome://global/content/customizeToolbar.xul chrome://editor/skin/editorFormatToolbar.css
   skin/modern/communicator/brand.css                               (communicator/brand.css)
   skin/modern/communicator/blockedSite.css                         (communicator/blockedSite.css)
   skin/modern/communicator/certError.css                           (communicator/certError.css)
   skin/modern/communicator/prefpanels.css                          (communicator/prefpanels.css)
   skin/modern/communicator/preferences.css                         (communicator/preferences.css)
   skin/modern/communicator/tasksOverlay.css                        (communicator/tasksOverlay.css)
@@ -383,16 +389,17 @@ modern.jar:
   skin/modern/global/mac/tree/sort-dsc.png                         (global/tree/sort-asc.png)
   skin/modern/global/gtk/tree/sort-asc.png                         (global/tree/sort-asc.png)
   skin/modern/global/gtk/tree/sort-dsc.png                         (global/tree/sort-dsc.png)
   skin/modern/global/win/tree/sort-asc.png                         (global/tree/sort-dsc.png)
   skin/modern/global/win/tree/sort-dsc.png                         (global/tree/sort-asc.png)
   skin/modern/global/tree/twisty-clsd.png                          (global/tree/twisty-clsd.png)
   skin/modern/global/tree/twisty-open.png                          (global/tree/twisty-open.png)
   skin/modern/global/tree/columnpicker.png                         (global/tree/columnpicker.png)
+#ifdef MOZ_MAILNEWS
   skin/modern/messenger/threadPaneLabels.css                       (messenger/threadPaneLabels.css)
   skin/modern/messenger/accountCentral.css                         (messenger/accountCentral.css)
   skin/modern/messenger/accountManage.css                          (messenger/accountManage.css)
   skin/modern/messenger/accountWizard.css                          (messenger/accountWizard.css)
   skin/modern/messenger/addressingWidget.css                       (messenger/addressingWidget.css)
   skin/modern/messenger/browserRequest.css                         (messenger/browserRequest.css)
   skin/modern/messenger/dialogs.css                                (messenger/dialogs.css)
   skin/modern/messenger/filterDialog.css                           (messenger/filterDialog.css)
@@ -564,16 +571,17 @@ modern.jar:
   skin/modern/messenger/smime/icons/sbCryptoNotOk.png              (messenger/smime/icons/sbCryptoNotOk.png)
   skin/modern/messenger/smime/icons/hdrSignOk.png                  (messenger/smime/icons/hdrSignOk.png)
   skin/modern/messenger/smime/icons/hdrSignUnknown.png             (messenger/smime/icons/hdrSignUnknown.png)
   skin/modern/messenger/smime/icons/hdrSignNotOk.png               (messenger/smime/icons/hdrSignNotOk.png)
   skin/modern/messenger/smime/icons/hdrCryptoOk.png                (messenger/smime/icons/hdrCryptoOk.png)
   skin/modern/messenger/smime/icons/hdrCryptoNotOk.png             (messenger/smime/icons/hdrCryptoNotOk.png)
   skin/modern/messenger-newsblog/feed-subscriptions.css            (messenger/newsblog/feed-subscriptions.css)
   skin/modern/messenger-newsblog/icons/rss-feed.png                (messenger/newsblog/rss-feed.png)
+#endif
   skin/modern/mozapps/aboutNetworking.css                          (mozapps/aboutNetworking.css)
   skin/modern/mozapps/downloads/downloadIcon.png                   (mozapps/downloads/downloadIcon.png)
   skin/modern/mozapps/downloads/downloads.css                      (mozapps/downloads/downloads.css)
   skin/modern/mozapps/downloads/unknownContentType.css             (mozapps/downloads/unknownContentType.css)
   skin/modern/mozapps/extensions/about.css                         (mozapps/extensions/about.css)
   skin/modern/mozapps/extensions/alerticon-error.png               (mozapps/extensions/alerticon-error.png)
   skin/modern/mozapps/extensions/alerticon-info-negative.png       (mozapps/extensions/alerticon-info-negative.png)
   skin/modern/mozapps/extensions/alerticon-info-positive.png       (mozapps/extensions/alerticon-info-positive.png)
