Bug 1418652: Migrate configure options to moz.configure; r?Build,Fallen,frg draft
authorTom Prince <mozilla@hocat.ca>
Sat, 18 Nov 2017 10:24:42 -0700
changeset 56334 2969051e3e5f099b1ae9c56dfb8c441dc5a3779f
parent 56333 8f7f2170dd259c43f83e1b09378d4ecbc0bcf8f9
child 56335 97b2b3a715fb41485fc4c448f84c33eb8bfc2d9f
push id5364
push usermozilla@hocat.ca
push dateSat, 18 Nov 2017 17:35:18 +0000
treeherdertry-comm-central@97b2b3a715fb [default view] [failures only]
reviewersBuild, Fallen, frg
bugs1418652
Bug 1418652: Migrate configure options to moz.configure; r?Build,Fallen,frg MozReview-Commit-ID: 51LfUVsaEVJ
mail/configure.in
mail/moz.configure
mailnews/moz.configure
suite/configure.in
suite/moz.configure
--- a/mail/configure.in
+++ b/mail/configure.in
@@ -29,45 +29,8 @@ if test "$OS_ARCH" != "WINNT"; then
   HAVE_MOVEMAIL=1
   AC_DEFINE(HAVE_MOVEMAIL)
 fi
 AC_SUBST(MOZ_MOVEMAIL)
 
 dnl Get other versions (for the calendar plugin)
 SEAMONKEY_VERSION=`cat ${_topsrcdir}/../suite/config/version.txt`
 AC_SUBST(SEAMONKEY_VERSION)
-
-dnl =========================================================
-dnl = Lightning extension
-dnl =========================================================
-MOZ_ARG_ENABLE_BOOL(calendar,
-[  --enable-calendar      Enable building of the Lightning calendar extension],
-    MOZ_CALENDAR=1,
-    MOZ_CALENDAR= )
-AC_SUBST(MOZ_CALENDAR)
-
-dnl =========================================================
-dnl = LDAP
-dnl =========================================================
-MOZ_ARG_DISABLE_BOOL(ldap,
-[  --disable-ldap          Disable LDAP support],
-    MOZ_LDAP_XPCOM=,
-    MOZ_LDAP_XPCOM=1)
-
-AC_SUBST(MOZ_LDAP_XPCOM)
-
-dnl =========================================================
-dnl = MAPI support (Windows only)
-dnl =========================================================
-
-if test "$_WIN32_MSVC"; then
-    MOZ_MAPI_SUPPORT=1
-fi
-
-MOZ_ARG_DISABLE_BOOL(mapi,
-[  --disable-mapi          Disable MAPI support],
-    MOZ_MAPI_SUPPORT= )
-
-AC_SUBST(MOZ_MAPI_SUPPORT)
-
-if test -n "$MOZ_MAPI_SUPPORT"; then
-    AC_DEFINE(MOZ_MAPI_SUPPORT)
-fi
--- a/mail/moz.configure
+++ b/mail/moz.configure
@@ -2,16 +2,17 @@
 # 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/.
 
 imply_option('MOZ_PLACES', True)
 imply_option('MOZ_ALLOW_LEGACY_EXTENSIONS', True)
 
+include('../mailnews/moz.configure')
 
 @depends(application)
 def is_comm_topdir(app):
     return not app[0].startswith('comm/')
 
 set_config('MOZ_IS_COMM_TOPDIR', is_comm_topdir)
 
 @depends(is_comm_topdir)
new file mode 100644
--- /dev/null
+++ b/mailnews/moz.configure
@@ -0,0 +1,46 @@
+# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
+# 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/.
+
+
+# =========================================================
+# = Lightning extension
+# =========================================================
+option('--enable-calendar',
+       help='Enable building of the Lightning calendar extension')
+
+@depends_if("--enable-calendar")
+def calendar(mapi):
+    return True
+
+set_config('MOZ_CALENDAR', calendar)
+set_define('MOZ_CALENDAR', calendar)
+
+# =========================================================
+# = LDAP
+# =========================================================
+@depends_if("-disable-ldap",
+            help="Disable LDAP support")
+
+@depends_if("--enable-ldap")
+def ldap(mapi):
+    return True
+
+set_config('MOZ_LDAP_XPCOM', ldap)
+set_define('MOZ_LDAP_XPCOM', ldap)
+
+# =========================================================
+# = MAPI support (Windows only)
+# =========================================================
+
+option('--disable-mapi',
+       help="Disable MAPI support")
+
+@depends_if("--enable-mapi")
+def mapi_support(mapi):
+    return True
+
+set_config('MOZ_MAPI_SUPPORT', mapi_support)
+set_define('MOZ_MAPI_SUPPORT', mapi_support)
--- a/suite/configure.in
+++ b/suite/configure.in
@@ -32,45 +32,8 @@ if test "$OS_ARCH" != "WINNT"; then
   HAVE_MOVEMAIL=1
   AC_DEFINE(HAVE_MOVEMAIL)
 fi
 AC_SUBST(MOZ_MOVEMAIL)
 
 dnl Get other versions (for the calendar plugin)
 THUNDERBIRD_VERSION=`cat ${_topsrcdir}/../mail/config/version.txt`
 AC_SUBST(THUNDERBIRD_VERSION)
-
-dnl =========================================================
-dnl = Lightning extension
-dnl =========================================================
-MOZ_ARG_ENABLE_BOOL(calendar,
-[  --enable-calendar      Enable building of the Lightning calendar extension],
-    MOZ_CALENDAR=1,
-    MOZ_CALENDAR= )
-AC_SUBST(MOZ_CALENDAR)
-
-dnl =========================================================
-dnl = LDAP
-dnl =========================================================
-MOZ_ARG_DISABLE_BOOL(ldap,
-[  --disable-ldap          Disable LDAP support],
-    MOZ_LDAP_XPCOM=,
-    MOZ_LDAP_XPCOM=1)
-
-AC_SUBST(MOZ_LDAP_XPCOM)
-
-dnl =========================================================
-dnl = MAPI support (Windows only)
-dnl =========================================================
-
-if test "$_WIN32_MSVC"; then
-    MOZ_MAPI_SUPPORT=1
-fi
-
-MOZ_ARG_DISABLE_BOOL(mapi,
-[  --disable-mapi          Disable MAPI support],
-    MOZ_MAPI_SUPPORT= )
-
-AC_SUBST(MOZ_MAPI_SUPPORT)
-
-if test -n "$MOZ_MAPI_SUPPORT"; then
-    AC_DEFINE(MOZ_MAPI_SUPPORT)
-fi
--- a/suite/moz.configure
+++ b/suite/moz.configure
@@ -3,16 +3,17 @@
 # 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/.
 
 imply_option('MOZ_PLACES', True)
 imply_option('MOZ_SERVICES_SYNC', True)
 imply_option('MOZ_ALLOW_LEGACY_EXTENSIONS', True)
 
+include('../mailnews/moz.configure')
 
 @depends(application)
 def is_comm(app):
     return app[0].startswith('comm/')
 
 
 @depends(is_comm)
 def toolkit_configure(is_comm):