[PATCH] Make the online update service configurable (via --enable-online-update).

Jan Holesovsky kendy at suse.cz
Thu Jun 16 10:12:35 PDT 2011


---
 configure.in                     |   28 ++++++++++++++++++++++++++++
 scp2/source/ooo/common_brand.scp |    2 +-
 scp2/source/ooo/makefile.mk      |    4 ++++
 scp2/util/makefile.mk            |    4 ++--
 set_soenv.in                     |    1 +
 5 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/configure.in b/configure.in
index 5ad2e37..c29f73f 100755
--- a/configure.in
+++ b/configure.in
@@ -475,6 +475,12 @@ AC_ARG_ENABLE(lomenubar,
 	[Enable global menu support.]),
 ,)
 
+AC_ARG_ENABLE(online-update,
+    AS_HELP_STRING([--enable-online-update],
+	[Enable the online update service that will check for new versions of
+	 LibreOffice. By default, it is on on Windows and Mac, and off on Linux.]),
+,)
+
 dnl ===================================================================
 dnl Optional Packages (--with/without-)
 dnl ===================================================================
@@ -7502,6 +7508,28 @@ fi
 AC_SUBST(ENABLE_LOMENUBAR)
 
 dnl ===================================================================
+dnl Test whether to enable online update service
+dnl ===================================================================
+AC_MSG_CHECKING([whether to enable online update])
+ENABLE_ONLINE_UPDATE=
+if test "z$enable_online_update" = "z" ; then
+  if test "$_os" = "WINNT" -o "$_os" = "Darwin" ; then
+    AC_MSG_RESULT([yes])
+    ENABLE_ONLINE_UPDATE="TRUE"
+  else
+    AC_MSG_RESULT([no])
+  fi
+else
+  if test "z$enable_online_update" = "zyes" ; then
+    AC_MSG_RESULT([yes])
+    ENABLE_ONLINE_UPDATE="TRUE"
+  else
+    AC_MSG_RESULT([no])
+  fi
+fi
+AC_SUBST(ENABLE_ONLINE_UPDATE)
+
+dnl ===================================================================
 dnl Test whether to enable ActiveX embedding
 dnl ===================================================================
 if test "$_os" = "WINNT"; then
diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp
index 47e5f9f..2557f0d 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -1152,7 +1152,7 @@ ProfileItem gid_Brand_Profileitem_Version_Updateurl
     Section = "Version";
     Order = 15;
     Key = "UpdateURL";
-  #if defined(BUILD_SPECIAL)
+  #if defined(ENABLE_ONLINE_UPDATE)
   #ifdef WNT
     Value = "${UPDATEURL}";
   #else  // defined WNT
diff --git a/scp2/source/ooo/makefile.mk b/scp2/source/ooo/makefile.mk
index 86ef48c..e553440 100644
--- a/scp2/source/ooo/makefile.mk
+++ b/scp2/source/ooo/makefile.mk
@@ -45,6 +45,10 @@ SCPDEFS+=-D_MSC
 SCPDEFS+=-DBUILD_SPECIAL
 .ENDIF
 
+.IF "$(ENABLE_ONLINE_UPDATE)"!=""
+SCPDEFS+=-DENABLE_ONLINE_UPDATE
+.ENDIF
+
 .IF "$(BUILD_X64)"!=""
 SCPDEFS+=-DBUILD_X64
 .ENDIF
diff --git a/scp2/util/makefile.mk b/scp2/util/makefile.mk
index a7873d1..9030699 100644
--- a/scp2/util/makefile.mk
+++ b/scp2/util/makefile.mk
@@ -215,7 +215,7 @@ SCP1FILES += cairocanvas.par
 SCP1FILES += layout.par
 .ENDIF # ENABLE_LAYOUT == TRUE
 
-.IF "$(BUILD_SPECIAL)"!=""
+.IF "$(ENABLE_ONLINE_UPDATE)"!=""
 SCP1FILES += \
              module_onlineupdate.par   \
              file_onlineupdate.par
@@ -392,7 +392,7 @@ SCP2FILES += \
 SCP2FILES += layout.par
 .ENDIF # ENABLE_LAYOUT == TRUE
 
-.IF "$(BUILD_SPECIAL)"!=""
+.IF "$(ENABLE_ONLINE_UPDATE)"!=""
 SCP2FILES += \
              module_onlineupdate.par   \
              file_onlineupdate.par
diff --git a/set_soenv.in b/set_soenv.in
index 779fb3e..f015bab 100755
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1983,6 +1983,7 @@ ToFile( "DB_CPPLIB",         "@DB_CPPLIB@",        "e" );
 ToFile( "DB_INCLUDES",       "@DB_INCLUDES@",      "e" );
 ToFile( "ENABLE_MYSQLC",     "@ENABLE_MYSQLC@",    "e" );
 ToFile( "ENABLE_LOMENUBAR",  "@ENABLE_LOMENUBAR@", "e" );
+ToFile( "ENABLE_ONLINE_UPDATE","@ENABLE_ONLINE_UPDATE@", "e" );
 ToFile( "SYSTEM_MYSQL",      "@SYSTEM_MYSQL@",     "e" );
 ToFile( "SYSTEM_MYSQL_CPPCONN","@SYSTEM_MYSQL_CPPCONN@","e" );
 ToFile( "MYSQL_INC",         "@MYSQL_INC@",        "e" );
-- 
1.6.0.2


--=-aQxDEOIXiILBWOuxyfCK--



More information about the LibreOffice mailing list