[evolution-data-server/openismus-work-master: 8/15] Remove libedataserverui and make google backend optional



commit d1df29a7444498d5e480f643a28a82d0cec49057
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Wed Dec 5 15:56:07 2012 +0900

    Remove libedataserverui and make google backend optional
    
    This patch removes libedataserverui (which is planned to be folded
    into evolution proper) and only builds the google backend gdata is
    present and the build has been configured to build google (enabled
    by default). Based on Patrick Ohly's patch on bgo #686688.
    
    Conflicts:
    
    	addressbook/backends/Makefile.am
    	configure.ac
    	docs/reference/libedataserverui/libedataserverui-docs.sgml
    	docs/reference/libedataserverui/libedataserverui-sections.txt
    	libedataserverui/Makefile.am
    	libedataserverui/e-book-auth-util.h
    	libedataserverui/e-categories-editor.c
    	libedataserverui/e-categories-editor.h
    	libedataserverui/e-category-editor.c
    	libedataserverui/e-cell-renderer-color.c
    	libedataserverui/e-client-utils.c
    	libedataserverui/e-client-utils.h
    	libedataserverui/e-name-selector-dialog.c
    	libedataserverui/e-name-selector-dialog.h
    	libedataserverui/e-name-selector-entry.c
    	libedataserverui/e-name-selector-list.c
    	libedataserverui/e-name-selector.c
    	libedataserverui/e-passwords-win32.c
    	libedataserverui/e-passwords.c
    	libedataserverui/e-source-selector-dialog.c
    	tests/Makefile.am
    	tests/libedataserverui/Makefile.am
    	tests/libedataserverui/evolution-source-viewer.c
    	tests/libedataserverui/test-category-completion.c
    	tests/libedataserverui/test-contact-store.c
    	tests/libedataserverui/test-source-selector.c

 addressbook/backends/Makefile.am                   |    8 ++-
 configure.ac                                       |   30 +++---
 libedataserverui/Makefile.am                       |  113 --------------------
 .../evolution-addressbook-factory.c                |    4 +-
 .../evolution-calendar-factory.c                   |    4 +-
 .../evolution-source-registry.c                    |    4 +-
 tests/libedataserverui/Makefile.am                 |   57 ----------
 7 files changed, 29 insertions(+), 191 deletions(-)
---
diff --git a/addressbook/backends/Makefile.am b/addressbook/backends/Makefile.am
index f98bd2e..fe72ec0 100644
--- a/addressbook/backends/Makefile.am
+++ b/addressbook/backends/Makefile.am
@@ -4,6 +4,12 @@ else
 LDAP_SUBDIR =
 endif
 
-SUBDIRS = file $(LDAP_SUBDIR) google webdav
+if HAVE_GOOGLE
+GOOGLE_SUBDIR = google
+else
+GOOGLE_SUBDIR = 
+endif
+
+SUBDIRS = file $(LDAP_SUBDIR) $(GOOGLE_SUBDIR) webdav
 
 -include $(top_srcdir)/git.mk
diff --git a/configure.ac b/configure.ac
index fd9f1f4..eed24c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -105,10 +105,6 @@ LIBEDATASERVER_CURRENT=17
 LIBEDATASERVER_REVISION=0
 LIBEDATASERVER_AGE=0
 
-LIBEDATASERVERUI_CURRENT=5
-LIBEDATASERVERUI_REVISION=0
-LIBEDATASERVERUI_AGE=0
-
 LIBECAL_CURRENT=15
 LIBECAL_REVISION=0
 LIBECAL_AGE=0
@@ -143,9 +139,6 @@ AC_SUBST(EDS_MICRO_VERSION)
 AC_SUBST(LIBEDATASERVER_CURRENT)
 AC_SUBST(LIBEDATASERVER_REVISION)
 AC_SUBST(LIBEDATASERVER_AGE)
-AC_SUBST(LIBEDATASERVERUI_CURRENT)
-AC_SUBST(LIBEDATASERVERUI_REVISION)
-AC_SUBST(LIBEDATASERVERUI_AGE)
 AC_SUBST(LIBECAL_CURRENT)
 AC_SUBST(LIBECAL_REVISION)
 AC_SUBST(LIBECAL_AGE)
@@ -371,10 +364,8 @@ dnl ***********************************
 PKG_CHECK_MODULES(GNOME_PLATFORM,
 	[gio-2.0 >= glib_minimum_version
 	gmodule-2.0 >= glib_minimum_version
-	gtk+-3.0 >= gdk_minimum_version
 	libxml-2.0 >= libxml_minimum_version
-	libsoup-2.4 >= libsoup_minimum_version
-	libgdata >= libgdata_minimum_version])
+	libsoup-2.4 >= libsoup_minimum_version])
 
 if test x$os_win32 = xno; then
 	PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0])
@@ -1364,10 +1355,20 @@ dnl Google flags
 dnl ******************************
 LIBGDATA_REQUIRED=libgdata_minimum_version
 AC_SUBST(LIBGDATA_REQUIRED)
-
-EVO_SET_COMPILE_FLAGS(GDATA, libgdata)
-AC_SUBST(GDATA_CFLAGS)
-AC_SUBST(GDATA_LIBS)
+AC_ARG_ENABLE([google],
+	[AS_HELP_STRING([--enable-google],
+	[enable Google Contacts support (default=yes)])],
+	[enable_google=$enableval], [enable_google=yes])
+AC_MSG_CHECKING([if Google Contacts support is enabled])
+AC_MSG_RESULT([$enable_google])
+if test "x$enable_google" = xyes; then
+	EVO_SET_COMPILE_FLAGS(GDATA, libgdata)
+	AC_SUBST(GDATA_CFLAGS)
+	AC_SUBST(GDATA_LIBS)
+
+	AC_DEFINE(HAVE_GOOGLE, 1, [Define to 1 if you have the google-1.0 package.])
+fi
+AM_CONDITIONAL(HAVE_GOOGLE, [test x$enable_google = xyes])
 
 dnl ******************************
 dnl Groupwise flags
@@ -1670,6 +1671,7 @@ echo "
 	Introspection:		$enable_introspection
 	Vala bindings:		$enable_vala_bindings
 	GNOME Online Accounts	$enable_goa
+	Google Contacts		$enable_google
 	Code coverage (gcov):	$enable_code_coverage
 	Strict building:	$enable_strict
 "
diff --git a/services/evolution-addressbook-factory/evolution-addressbook-factory.c b/services/evolution-addressbook-factory/evolution-addressbook-factory.c
index ffb69b7..037deaa 100644
--- a/services/evolution-addressbook-factory/evolution-addressbook-factory.c
+++ b/services/evolution-addressbook-factory/evolution-addressbook-factory.c
@@ -21,7 +21,7 @@
 #include <stdlib.h>
 #include <glib/gi18n.h>
 
-#ifdef ENABLE_MAINTAINER_MODE
+#if defined(ENABLE_MAINTAINER_MODE) && defined(HAVE_EDATASERVERUI)
 #include <gtk/gtk.h>
 #endif
 
@@ -92,7 +92,7 @@ main (gint argc,
 	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 
-#ifdef ENABLE_MAINTAINER_MODE
+#if defined(ENABLE_MAINTAINER_MODE) && defined(HAVE_EDATASERVERUI)
 	/* This is only to load gtk-modules, like
 	 * bug-buddy's gnomesegvhandler, if possible */
 	gtk_init_check (&argc, &argv);
diff --git a/services/evolution-calendar-factory/evolution-calendar-factory.c b/services/evolution-calendar-factory/evolution-calendar-factory.c
index a80731b..4d3a9a3 100644
--- a/services/evolution-calendar-factory/evolution-calendar-factory.c
+++ b/services/evolution-calendar-factory/evolution-calendar-factory.c
@@ -21,7 +21,7 @@
 #include <stdlib.h>
 #include <glib/gi18n.h>
 
-#ifdef ENABLE_MAINTAINER_MODE
+#if defined(ENABLE_MAINTAINER_MODE) && defined(HAVE_EDATASERVERUI)
 #include <gtk/gtk.h>
 #endif
 
@@ -96,7 +96,7 @@ main (gint argc,
 	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 
-#ifdef ENABLE_MAINTAINER_MODE
+#if defined(ENABLE_MAINTAINER_MODE) && defined(HAVE_EDATASERVERUI)
 	/* This is only to load gtk-modules, like
 	 * bug-buddy's gnomesegvhandler, if possible. */
 	gtk_init_check (&argc, &argv);
diff --git a/services/evolution-source-registry/evolution-source-registry.c b/services/evolution-source-registry/evolution-source-registry.c
index 6aca836..6fb936b 100644
--- a/services/evolution-source-registry/evolution-source-registry.c
+++ b/services/evolution-source-registry/evolution-source-registry.c
@@ -21,7 +21,7 @@
 #include <stdlib.h>
 #include <glib/gi18n.h>
 
-#ifdef ENABLE_MAINTAINER_MODE
+#if defined(ENABLE_MAINTAINER_MODE) && defined(HAVE_EDATASERVERUI)
 #include <gtk/gtk.h>
 #endif
 
@@ -43,7 +43,7 @@ main (gint argc,
 	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 
-#ifdef ENABLE_MAINTAINER_MODE
+#if defined(ENABLE_MAINTAINER_MODE) && defined(HAVE_EDATASERVERUI)
 	/* This is only to load gtk-modules, like
 	 * bug-buddy's gnomesegvhandler, if possible */
 	gtk_init_check (&argc, &argv);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]