Bug 789787 - Part 1. Build config change (detect MAPI header and add --disable-mapi)
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Wed, 17 Apr 2013 15:34:49 +0900
changeset 17397 7f801d20bb698825933073469df81d71c9e313a4
parent 17396 4bb2aa33181bf1311f68960bd73c5fe2d53d1eb2
child 17398 5af409e108b683b7994d994eb975769fcee26b71
push id737
push userm_kato@ga2.so-net.ne.jp
push dateWed, 17 Apr 2013 06:39:15 +0000
treeherdertry-comm-central@5af409e108b6 [default view] [failures only]
bugs789787
Bug 789787 - Part 1. Build config change (detect MAPI header and add --disable-mapi)
mail/configure.in
mail/confvars.sh
suite/configure.in
--- a/mail/configure.in
+++ b/mail/configure.in
@@ -87,16 +87,34 @@ if test "$MOZ_LDAP_XPCOM"; then
     export LDAP_MODULE
 fi
 AC_SUBST(MOZ_INCOMPLETE_TOOLKIT_LDAP_AUTOCOMPLETE)
 
 AC_SUBST(MOZ_LDAP_XPCOM)
 AC_SUBST(LDAP_CFLAGS)
 AC_SUBST(LDAP_LIBS)
 
+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
+
 # Rerun the confvars, since we need to add to our components list.
 . "${srcdir}/${MOZ_BUILD_APP}/confvars.sh"
 
 # Check for PBBUILD on OS X.
 case "$target_os" in
 darwin*)
   for name in pbbuild xcodebuild pbxbuild; do
     PBBUILD_BIN=`which $name`
--- a/mail/confvars.sh
+++ b/mail/confvars.sh
@@ -27,17 +27,17 @@ fi
 # Disable WebRTC as we don't use it currently and to work around bug 837618
 # for Mac
 MOZ_WEBRTC=
 
 MOZ_SAFE_BROWSING=1
 MOZ_MORK=1
 MAIL_COMPONENT="mail msgsmime import"
 MAIL_MODULE="MODULE(nsMailModule) MODULE(nsMsgSMIMEModule) MODULE(nsImportServiceModule)"
-if test -n "$_WIN32_MSVC"; then
+if test -n "$MOZ_MAPI_SUPPORT"; then
   MAIL_COMPONENT="$MAIL_COMPONENT msgMapi"
   MAIL_MODULE="$MAIL_MODULE MODULE(msgMapiModule)"
 fi
 if test -z "$MOZ_INCOMPLETE_EXTERNAL_LINKAGE"; then
 MOZ_APP_COMPONENT_LIBS="xpautocomplete mailcomps $MAIL_COMPONENT $LDAP_COMPONENT $MORK_COMPONENT"
 MOZ_APP_COMPONENT_MODULES="MODULE(xpAutoComplete) MODULE(nsMailCompsModule) $MAIL_MODULE $LDAP_MODULE $MORK_MODULE"
 MOZ_APP_EXTRA_LIBS="$LDAP_LIBS"
 fi
--- a/suite/configure.in
+++ b/suite/configure.in
@@ -87,16 +87,34 @@ if test "$MOZ_LDAP_XPCOM"; then
     export LDAP_MODULE
 fi
 AC_SUBST(MOZ_INCOMPLETE_TOOLKIT_LDAP_AUTOCOMPLETE)
 
 AC_SUBST(MOZ_LDAP_XPCOM)
 AC_SUBST(LDAP_CFLAGS)
 AC_SUBST(LDAP_LIBS)
 
+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
+
 # Rerun the confvars, since we need to add to our components list.
 . "${srcdir}/${MOZ_BUILD_APP}/confvars.sh"
 
 # if we're building the LDAP XPCOM component, we need to build
 # the c-sdk first.
 if test -n "$COMPILE_ENVIRONMENT" -a -n "$MOZ_LDAP_XPCOM"; then
     # Save configure args so we can restore them after configuring LDAP.
     _save_ac_configure_args="$ac_configure_args"