diff -urN libreoffice-4.2.1.1-orig/Repository.mk libreoffice-4.2.1.1/Repository.mk
--- libreoffice-4.2.1.1-orig/Repository.mk	2014-02-13 09:31:05 +0900
+++ libreoffice-4.2.1.1/Repository.mk	2014-03-19 01:54:32 +0900
@@ -341,7 +341,7 @@
 	tl \
 	ucpexpand1 \
 	ucpext \
-	ucpcmis1 \
+	$(if $(filter YES,$(BUILD_CMIS)),ucpcmis1) \
 	ucptdoc1 \
 	unordf \
 	unoxml \
diff -urN libreoffice-4.2.1.1-orig/RepositoryExternal.mk libreoffice-4.2.1.1/RepositoryExternal.mk
--- libreoffice-4.2.1.1-orig/RepositoryExternal.mk	2014-02-13 09:31:05 +0900
+++ libreoffice-4.2.1.1/RepositoryExternal.mk	2014-03-19 01:54:25 +0900
@@ -638,6 +638,8 @@
 endif # SYSTEM_BOOST
 
 
+ifeq ($(BUILD_CMIS),YES)
+
 ifeq ($(SYSTEM_CMIS),YES)
 
 define gb_LinkTarget__use_cmis
@@ -664,6 +666,8 @@
 
 endif # SYSTEM_CMIS
 
+endif # BUILD_CMIS
+
 ifeq ($(OS)$(COM),WNTGCC)
 
 define gb_LinkTarget__use_jawt
diff -urN libreoffice-4.2.1.1-orig/config_host.mk.in libreoffice-4.2.1.1/config_host.mk.in
--- libreoffice-4.2.1.1-orig/config_host.mk.in	2014-02-13 09:31:05 +0900
+++ libreoffice-4.2.1.1/config_host.mk.in	2014-03-19 01:54:25 +0900
@@ -40,6 +40,7 @@
 export BOOST_SYSTEM_LIB=@BOOST_SYSTEM_LIB@
 export BRAND_INTRO_IMAGES=@BRAND_INTRO_IMAGES@
 export BSH_JAR=@BSH_JAR@
+export BUILD_CMIS=@BUILD_CMIS@
 export BUILD_PLATFORM=@build@
 export BUILD_POSTGRESQL_SDBC=@BUILD_POSTGRESQL_SDBC@
 export BUILD_TYPE=@BUILD_TYPE@
diff -urN libreoffice-4.2.1.1-orig/configure.ac libreoffice-4.2.1.1/configure.ac
--- libreoffice-4.2.1.1-orig/configure.ac	2014-02-13 09:31:05 +0900
+++ libreoffice-4.2.1.1/configure.ac	2014-03-19 01:54:25 +0900
@@ -1322,6 +1322,11 @@
         [Enable the Windows IAccessibility2. Disables Java Accessibility Bridge.]),
 ,)
 
+AC_ARG_ENABLE(cmis,
+    AS_HELP_STRING([--disable-cmis],
+        [Don't include CMIS support.]),,
+    [enable_cmis="yes"])
+
 dnl ===================================================================
 dnl Optional Packages (--with/without-)
 dnl ===================================================================
@@ -7754,10 +7759,23 @@
 dnl ===================================================================
 libo_CHECK_SYSTEM_MODULE([libvisio],[VISIO],[libvisio-0.0])
 
+if test "$enable_cmis" = "no"; then
+    BUILD_CMIS=NO
+else
+    BUILD_CMIS=YES
+fi
+AC_SUBST(BUILD_CMIS)
+
 dnl ===================================================================
 dnl Check for system libcmis
 dnl ===================================================================
-libo_CHECK_SYSTEM_MODULE([libcmis],[CMIS],[libcmis-0.4 >= 0.4.0])
+if test "$BUILD_CMIS" = "NO"; then
+    AC_MSG_CHECKING([which libcmis to use])
+    AC_MSG_RESULT([none])
+    SYSTEM_LIBCMIS=NO
+else
+    libo_CHECK_SYSTEM_MODULE([libcmis],[CMIS],[libcmis-0.4 >= 0.4.0])
+fi
 
 dnl ===================================================================
 dnl Check for system libwpd
diff -urN libreoffice-4.2.1.1-orig/postprocess/Rdb_services.mk libreoffice-4.2.1.1/postprocess/Rdb_services.mk
--- libreoffice-4.2.1.1-orig/postprocess/Rdb_services.mk	2014-02-13 09:31:05 +0900
+++ libreoffice-4.2.1.1/postprocess/Rdb_services.mk	2014-03-19 01:54:25 +0900
@@ -93,7 +93,9 @@
 	ucb/source/sorter/srtrs1 \
 	ucb/source/core/ucb1 \
 	ucb/source/cacher/cached1 \
-	ucb/source/ucp/cmis/ucpcmis1 \
+    $(if $(filter YES,$(BUILD_CMIS)), \
+		ucb/source/ucp/cmis/ucpcmis1 \
+	) \
 	ucb/source/ucp/expand/ucpexpand1 \
 	ucb/source/ucp/ext/ucpext \
 	ucb/source/ucp/file/ucpfile1 \
diff -urN libreoffice-4.2.1.1-orig/scp2/InstallModule_ooo.mk libreoffice-4.2.1.1/scp2/InstallModule_ooo.mk
--- libreoffice-4.2.1.1-orig/scp2/InstallModule_ooo.mk	2014-02-13 09:31:05 +0900
+++ libreoffice-4.2.1.1/scp2/InstallModule_ooo.mk	2014-03-19 01:54:25 +0900
@@ -21,6 +21,7 @@
 ))
 
 $(eval $(call gb_InstallModule_define_if_set,scp2/ooo,\
+	BUILD_CMIS \
 	DISABLE_ATL \
 	DISABLE_NEON \
 	ENABLE_CAIRO_CANVAS \
diff -urN libreoffice-4.2.1.1-orig/ucb/Module_ucb.mk libreoffice-4.2.1.1/ucb/Module_ucb.mk
--- libreoffice-4.2.1.1-orig/ucb/Module_ucb.mk	2014-02-13 09:31:05 +0900
+++ libreoffice-4.2.1.1/ucb/Module_ucb.mk	2014-03-19 01:54:25 +0900
@@ -13,7 +13,6 @@
 	Library_cached1 \
 	Library_srtrs1 \
 	Library_ucb1 \
-	Library_ucpcmis1 \
 	Library_ucpexpand1 \
 	Library_ucpext \
 	Library_ucpfile1 \
@@ -23,6 +22,12 @@
 	Library_ucptdoc1 \
 ))
 
+ifeq ($(BUILD_CMIS),YES)
+$(eval $(call gb_Module_add_targets,ucb,\
+	Library_ucpcmis1 \
+))
+endif
+
 ifneq ($(DISABLE_NEON),TRUE)
 $(eval $(call gb_Module_add_targets,ucb,\
 	Library_ucpdav1 \
