[evolution-data-server/openismus-work] Require less dependencies to build EDS (bgo #686688)



commit 97cc6bf1d4717b4e779a1685d3ef3963db37b4c2
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Tue Dec 4 21:39:51 2012 +0900

    Require less dependencies to build EDS (bgo #686688)
    
    This patch makes google backend optional and makes interactive authentication
    also optional. Furthermore it removes libedataserverui completely as
    these widgets are to be folded into evolution directly (and some parts
    reimplemented in the few modules which actually depend on libedataserverui).
    
    Patch is based on Patrick Ohly's work.

 Makefile.am                                        |    2 +-
 addressbook/backends/Makefile.am                   |    8 +-
 configure.ac                                       |   72 +-
 docs/reference/Makefile.am                         |    1 -
 docs/reference/libedataserverui/Makefile.am        |   45 -
 .../libedataserverui/libedataserverui-docs.sgml    |   90 -
 .../libedataserverui/libedataserverui-sections.txt |  444 ---
 .../libedataserverui/libedataserverui.types        |   17 -
 libebackend/e-authentication-mediator.c            |   26 +-
 libebackend/e-authentication-session.c             |   18 +-
 libedataserver/e-source-registry.c                 |   16 +
 libedataserverui/Makefile.am                       |  113 -
 libedataserverui/e-book-auth-util.c                |  187 -
 libedataserverui/e-book-auth-util.h                |   49 -
 libedataserverui/e-categories-dialog.c             |  156 -
 libedataserverui/e-categories-dialog.h             |   73 -
 libedataserverui/e-categories-editor.c             |  440 ---
 libedataserverui/e-categories-editor.h             |   88 -
 libedataserverui/e-categories-selector.c           |  589 ----
 libedataserverui/e-categories-selector.h           |   97 -
 libedataserverui/e-category-completion.c           |  505 ---
 libedataserverui/e-category-completion.h           |   72 -
 libedataserverui/e-category-editor.c               |  353 --
 libedataserverui/e-category-editor.h               |   81 -
 libedataserverui/e-cell-renderer-color.c           |  237 --
 libedataserverui/e-cell-renderer-color.h           |   79 -
 libedataserverui/e-client-utils.c                  |  450 ---
 libedataserverui/e-client-utils.h                  |   55 -
 libedataserverui/e-contact-store.c                 | 1370 --------
 libedataserverui/e-contact-store.h                 |   94 -
 libedataserverui/e-data-server-ui-marshal.list     |    3 -
 libedataserverui/e-destination-store.c             |  751 ----
 libedataserverui/e-destination-store.h             |  106 -
 libedataserverui/e-name-selector-dialog.c          | 1754 ----------
 libedataserverui/e-name-selector-dialog.h          |   93 -
 libedataserverui/e-name-selector-entry.c           | 3577 --------------------
 libedataserverui/e-name-selector-entry.h           |  124 -
 libedataserverui/e-name-selector-list.c            |  733 ----
 libedataserverui/e-name-selector-list.h            |   82 -
 libedataserverui/e-name-selector-model.c           |  663 ----
 libedataserverui/e-name-selector-model.h           |  108 -
 libedataserverui/e-name-selector.c                 |  693 ----
 libedataserverui/e-name-selector.h                 |   94 -
 libedataserverui/e-passwords-win32.c               | 1050 ------
 libedataserverui/e-passwords.c                     | 1121 ------
 libedataserverui/e-passwords.h                     |   81 -
 libedataserverui/e-source-combo-box.c              |  701 ----
 libedataserverui/e-source-combo-box.h              |   90 -
 libedataserverui/e-source-selector-dialog.c        |  439 ---
 libedataserverui/e-source-selector-dialog.h        |   85 -
 libedataserverui/e-source-selector.c               | 2085 ------------
 libedataserverui/e-source-selector.h               |  141 -
 libedataserverui/e-tree-model-generator.c          | 1345 --------
 libedataserverui/e-tree-model-generator.h          |  104 -
 libedataserverui/libedataserverui.h                |   50 -
 libedataserverui/libedataserverui.pc.in            |   13 -
 .../evolution-addressbook-factory.c                |    4 +-
 .../evolution-calendar-factory.c                   |    4 +-
 .../evolution-source-registry.c                    |    4 +-
 tests/Makefile.am                                  |    2 +-
 tests/libedataserverui/Makefile.am                 |   56 -
 tests/libedataserverui/evolution-source-viewer.c   | 1123 ------
 tests/libedataserverui/test-category-completion.c  |   60 -
 tests/libedataserverui/test-contact-store.c        |  134 -
 tests/libedataserverui/test-name-selector.c        |  102 -
 tests/libedataserverui/test-source-combo-box.c     |  107 -
 tests/libedataserverui/test-source-selector.c      |  147 -
 67 files changed, 102 insertions(+), 23554 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 18ba847..88a5838 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS=-I m4
 
 DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --with-private-docs --with-krb5=/usr --enable-introspection
 
-SUBDIRS = camel data private libedataserver libebackend addressbook calendar libedataserverui modules services tests docs art po
+SUBDIRS = camel data private libedataserver libebackend addressbook calendar modules services tests docs art po
 
 if HAVE_INTROSPECTION
 if HAVE_VALA
diff --git a/addressbook/backends/Makefile.am b/addressbook/backends/Makefile.am
index d566392..4df5b3d 100644
--- a/addressbook/backends/Makefile.am
+++ b/addressbook/backends/Makefile.am
@@ -4,6 +4,12 @@ else
 LDAP_SUBDIR =
 endif
 
-SUBDIRS = file vcf $(LDAP_SUBDIR) google webdav
+if HAVE_GOOGLE
+GOOGLE_SUBDIR = google
+else
+GOOGLE_SUBDIR = 
+endif
+
+SUBDIRS = file vcf $(LDAP_SUBDIR) $(GOOGLE_SUBDIR) webdav
 
 -include $(top_srcdir)/git.mk
diff --git a/configure.ac b/configure.ac
index e47c02f..54e6554 100644
--- a/configure.ac
+++ b/configure.ac
@@ -92,10 +92,6 @@ LIBEDATASERVER_CURRENT=17
 LIBEDATASERVER_REVISION=0
 LIBEDATASERVER_AGE=0
 
-LIBEDATASERVERUI_CURRENT=4
-LIBEDATASERVERUI_REVISION=0
-LIBEDATASERVERUI_AGE=0
-
 LIBECAL_CURRENT=15
 LIBECAL_REVISION=0
 LIBECAL_AGE=0
@@ -130,9 +126,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)
@@ -343,10 +336,12 @@ dnl ***********************************
 PKG_CHECK_MODULES(GNOME_PLATFORM,
 	[gio-2.0 >= glib_minimum_version
 	gmodule-2.0 >= glib_minimum_version
-	gtk+-3.0 >= gtk_minimum_version
 	libxml-2.0 >= libxml_minimum_version
-	libsoup-2.4 >= libsoup_minimum_version
-	libgdata >= libgdata_minimum_version])
+	libsoup-2.4 >= libsoup_minimum_version])
+
+
+#	libgdata >= libgdata_minimum_version
+#	gtk+-3.0 >= gtk_minimum_version
 
 if test x$os_win32 = xno; then
 	PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0])
@@ -402,9 +397,18 @@ AC_SUBST(GNOME_KEYRING_LIBS)
 dnl **********************************************************
 dnl gcr-base is needed for secure password exchange over D-Bus
 dnl **********************************************************
-PKG_CHECK_MODULES(GCR_BASE, [gcr-base-3 >= gcr_minimum_version])
-AC_SUBST(GCR_BASE_CFLAGS)
-AC_SUBST(GCR_BASE_LIBS)
+AC_ARG_ENABLE([authentication],
+	[AS_HELP_STRING([--enable-authentication],
+	[enable interactive authentication support (default=yes)])],
+	[enable_authentication=$enableval], [enable_authentication=yes])
+AC_MSG_CHECKING([if GNOME Online Accounts support is enabled])
+AC_MSG_RESULT([$enable_authentication])
+if test "x$enable_authentication" = xyes; then
+	PKG_CHECK_MODULES(GCR_BASE, [gcr-base-3 >= gcr_minimum_version])
+	AC_SUBST(GCR_BASE_CFLAGS)
+	AC_SUBST(GCR_BASE_LIBS)
+        AC_DEFINE(ENABLE_AUTHENTICATION, 1, [use gcr])
+fi
 
 LIBICAL_REQUIRED=libical_minimum_version
 AC_SUBST(LIBICAL_REQUIRED)
@@ -1300,26 +1304,10 @@ AC_SUBST(E_DATA_SERVER_CFLAGS)
 AC_SUBST(E_DATA_SERVER_LIBS)
 
 dnl ******************************
-dnl libedataserverui
+dnl libebackend flags
 dnl ******************************
-E_DATA_SERVER_UI_DEPS="gtk+-3.0 libxml-2.0 libsoup-2.4"
-
-EVO_SET_COMPILE_FLAGS(E_DATA_SERVER_UI, $E_DATA_SERVER_UI_DEPS, , )
-AC_SUBST(E_DATA_SERVER_UI_CFLAGS)
-AC_SUBST(E_DATA_SERVER_UI_LIBS)
-
-if test "x$enable_maintainer_mode" = "xyes" ; then
-	FACTORY_GTK_CFLAGS=$E_DATA_SERVER_UI_CFLAGS
-	FACTORY_GTK_LIBS=$E_DATA_SERVER_UI_LIBS
-	AC_SUBST(FACTORY_GTK_CFLAGS)
-	AC_SUBST(FACTORY_GTK_LIBS)
-fi
-
 E_BACKEND_DEPS="gio-2.0 gmodule-2.0 gnome-keyring-1 libsoup-2.4 libxml-2.0"
 
-dnl ******************************
-dnl libebackend flags
-dnl ******************************
 EVO_SET_COMPILE_FLAGS(E_BACKEND, $E_BACKEND_DEPS)
 AC_SUBST(E_BACKEND_CFLAGS)
 AC_SUBST(E_BACKEND_LIBS)
@@ -1373,10 +1361,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
@@ -1626,8 +1624,6 @@ libebackend/libebackend.pc
 libedataserver/Makefile
 libedataserver/eds-version.h
 libedataserver/libedataserver.pc
-libedataserverui/Makefile
-libedataserverui/libedataserverui.pc
 modules/Makefile
 modules/cache-reaper/Makefile
 modules/google-backend/Makefile
@@ -1646,7 +1642,6 @@ tests/libecal/Makefile
 tests/libecal/client/Makefile
 tests/libedata-cal/Makefile
 tests/libedataserver/Makefile
-tests/libedataserverui/Makefile
 docs/Makefile
 docs/reference/Makefile
 docs/reference/addressbook/Makefile
@@ -1657,7 +1652,6 @@ docs/reference/calendar/libecal/Makefile
 docs/reference/calendar/libedata-cal/Makefile
 docs/reference/camel/Makefile
 docs/reference/libedataserver/Makefile
-docs/reference/libedataserverui/Makefile
 docs/reference/libebackend/Makefile
 docs/reference/private/Makefile
 po/Makefile.in
@@ -1681,5 +1675,7 @@ echo "
 	Introspection:		$enable_introspection
 	Vala bindings:		$enable_vala_bindings
 	GNOME Online Accounts	$enable_goa
+	Interactive activation	$enable_authentication
+	Google Contacts		$enable_google
 	Code coverage (gcov):	$enable_code_coverage
 "
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index 2d64b2c..f1f2986 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -9,7 +9,6 @@ SUBDIRS = \
 	calendar \
 	camel \
 	libedataserver \
-	libedataserverui \
 	libebackend \
 	$(PRIVATE_DIR) \
 	$(NULL)
diff --git a/libebackend/e-authentication-mediator.c b/libebackend/e-authentication-mediator.c
index dea9b2d..8c419fb 100644
--- a/libebackend/e-authentication-mediator.c
+++ b/libebackend/e-authentication-mediator.c
@@ -30,12 +30,16 @@
 
 #include "e-authentication-mediator.h"
 
+#include <config.h>
+
+#ifdef ENABLE_AUTHENTICATION
 /* XXX Yeah, yeah... */
 #define GCR_API_SUBJECT_TO_CHANGE
 
-#include <config.h>
-#include <glib/gi18n-lib.h>
 #include <gcr/gcr-base.h>
+#endif
+
+#include <glib/gi18n-lib.h>
 
 /* Private D-Bus classes. */
 #include <e-dbus-authenticator.h>
@@ -55,7 +59,9 @@ typedef struct _ThreadClosure ThreadClosure;
 struct _EAuthenticationMediatorPrivate {
 	GDBusConnection *connection;
 	EDBusAuthenticator *interface;
+#ifdef ENABLE_AUTHENTICATION
 	GcrSecretExchange *secret_exchange;
+#endif
 	gchar *object_path;
 	gchar *sender;
 
@@ -278,7 +284,9 @@ authentication_mediator_handle_ready (EDBusAuthenticator *interface,
                                       ThreadClosure *closure)
 {
 	EAuthenticationMediator *mediator;
+#ifdef ENABLE_AUTHENTICATION
 	GcrSecretExchange *secret_exchange;
+#endif
 	GSimpleAsyncResult *simple;
 	GQueue *queue;
 
@@ -289,8 +297,10 @@ authentication_mediator_handle_ready (EDBusAuthenticator *interface,
 
 	mediator->priv->client_is_ready = TRUE;
 
+#ifdef ENABLE_AUTHENTICATION
 	secret_exchange = mediator->priv->secret_exchange;
 	gcr_secret_exchange_receive (secret_exchange, encrypted_key);
+#endif
 
 	queue = &mediator->priv->wait_for_client_queue;
 
@@ -661,10 +671,12 @@ authentication_mediator_dispose (GObject *object)
 		priv->interface = NULL;
 	}
 
+#ifdef ENABLE_AUTHENTICATION
 	if (priv->secret_exchange != NULL) {
 		g_object_unref (priv->secret_exchange);
 		priv->secret_exchange = NULL;
 	}
+#endif
 
 	queue = &priv->wait_for_client_queue;
 
@@ -850,6 +862,7 @@ authentication_mediator_try_password (ESourceAuthenticator *auth,
 		g_simple_async_result_complete_in_idle (simple);
 
 	} else {
+#ifdef ENABLE_AUTHENTICATION
 		gchar *encrypted_secret;
 
 		g_queue_push_tail (
@@ -863,6 +876,13 @@ authentication_mediator_try_password (ESourceAuthenticator *auth,
 			mediator->priv->interface, encrypted_secret);
 
 		g_free (encrypted_secret);
+#else
+		/* TODO: which error code? */
+		g_simple_async_result_set_error (
+			simple, G_IO_ERROR, G_IO_ERROR_CANCELLED,
+			"%s", _("Authentication support not enabled in EDS"));
+		g_simple_async_result_complete_in_idle (simple);
+#endif
 	}
 
 	g_mutex_unlock (mediator->priv->shared_data_lock);
@@ -967,7 +987,9 @@ e_authentication_mediator_init (EAuthenticationMediator *mediator)
 	mediator->priv = E_AUTHENTICATION_MEDIATOR_GET_PRIVATE (mediator);
 
 	mediator->priv->interface = e_dbus_authenticator_skeleton_new ();
+#ifdef ENABLE_AUTHENTICATION
 	mediator->priv->secret_exchange = gcr_secret_exchange_new (NULL);
+#endif
 
 	mediator->priv->shared_data_lock = g_mutex_new ();
 }
diff --git a/libebackend/e-authentication-session.c b/libebackend/e-authentication-session.c
index b54842e..2dc679b 100644
--- a/libebackend/e-authentication-session.c
+++ b/libebackend/e-authentication-session.c
@@ -46,13 +46,16 @@
 
 #include "e-authentication-session.h"
 
+#ifdef ENABLE_AUTHENTICATION
 /* XXX Yeah, yeah... */
 #define GCR_API_SUBJECT_TO_CHANGE
 
+#include <gcr/gcr-base.h>
+#endif /* ENABLE_AUTHENTICATION */
+
 #include <config.h>
 #include <string.h>
 #include <glib/gi18n-lib.h>
-#include <gcr/gcr-base.h>
 
 /* Private D-Bus classes. */
 #include <e-dbus-authenticator.h>
@@ -404,12 +407,14 @@ authentication_session_execute_sync (EAuthenticationSession *session,
 	ESourceAuthenticationResult auth_result;
 	ESourceRegistryServer *server;
 	ESource *source;
+#ifdef ENABLE_AUTHENTICATION
 	GcrPrompt *prompt;
+	const gchar *prompt_password;
+	const gchar *label;
+#endif
 	GString *password_string;
 	gboolean allow_auth_prompt;
-	const gchar *label;
 	const gchar *source_uid;
-	const gchar *prompt_password;
 	gchar *stored_password = NULL;
 	gboolean success;
 	GError *local_error = NULL;
@@ -505,7 +510,7 @@ authentication_session_execute_sync (EAuthenticationSession *session,
 	}
 
 	/* Configure a system prompt. */
-
+#ifdef ENABLE_AUTHENTICATION
 	prompt = gcr_system_prompt_open (
 		SYSTEM_PROMPT_TIMEOUT, cancellable, error);
 
@@ -639,6 +644,10 @@ close_prompt:
 
 	g_object_unref (prompt);
 
+#else
+	session_result = E_AUTHENTICATION_SESSION_ERROR;
+#endif /* ENABLE_AUTHENTICATION */
+
 exit:
 
 	switch (session_result) {
@@ -1803,4 +1812,3 @@ e_authentication_session_delete_password_finish (EAuthenticationSession *session
 	/* Assume success unless a GError is set. */
 	return !g_simple_async_result_propagate_error (simple, error);
 }
-
diff --git a/libedataserver/e-source-registry.c b/libedataserver/e-source-registry.c
index cdcb60b..ce3126c 100644
--- a/libedataserver/e-source-registry.c
+++ b/libedataserver/e-source-registry.c
@@ -44,10 +44,12 @@
 #include <glib/gstdio.h>
 #include <glib/gi18n-lib.h>
 
+#ifdef ENABLE_AUTHENTICATION
 /* XXX Yeah, yeah... */
 #define GCR_API_SUBJECT_TO_CHANGE
 
 #include <gcr/gcr-base.h>
+#endif
 
 /* Private D-Bus classes. */
 #include <e-dbus-source.h>
@@ -129,7 +131,9 @@ struct _AuthContext {
 	GCancellable *cancellable;
 	GMainLoop *main_loop;
 	ESourceAuthenticationResult auth_result;
+#ifdef ENABLE_AUTHENTICATION
 	GcrSecretExchange *secret_exchange;
+#endif
 	gboolean authenticating;
 	gboolean success;
 	GError **error;
@@ -202,6 +206,7 @@ async_context_free (AsyncContext *async_context)
 	g_slice_free (AsyncContext, async_context);
 }
 
+#ifdef ENABLE_AUTHENTICATION
 static void
 auth_context_free (AuthContext *auth_context)
 {
@@ -222,6 +227,7 @@ auth_context_free (AuthContext *auth_context)
 
 	g_slice_free (AuthContext, auth_context);
 }
+#endif
 
 static void
 source_closure_free (SourceClosure *closure)
@@ -1405,6 +1411,7 @@ source_registry_authenticate_thread (GSimpleAsyncResult *simple,
 		g_simple_async_result_take_error (simple, error);
 }
 
+#ifdef ENABLE_AUTHENTICATION
 /* Helper for e_source_registry_authenticate_sync() */
 static gboolean
 source_registry_authenticate_respond_cb (AuthContext *auth_context)
@@ -1609,6 +1616,7 @@ source_registry_call_authenticate_for_source (ESourceRegistry *registry,
 
 	return success;
 }
+#endif /* ENABLE_AUTHENTICATION */
 
 /**
  * e_source_registry_authenticate_sync:
@@ -1641,6 +1649,7 @@ e_source_registry_authenticate_sync (ESourceRegistry *registry,
                                      GCancellable *cancellable,
                                      GError **error)
 {
+#ifdef ENABLE_AUTHENTICATION
 	AuthContext *auth_context;
 	GMainContext *main_context;
 	EDBusAuthenticator *dbus_auth;
@@ -1732,6 +1741,13 @@ exit:
 	g_main_context_unref (main_context);
 
 	return success;
+#else
+	g_set_error_literal (error,
+			     G_IO_ERROR, G_IO_ERROR_CANCELLED,
+			     _("Authentication support not enabled in EDS"));
+	return FALSE;
+
+#endif /* ENABLE_AUTHENTICATION */
 }
 
 /**
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 bc96819..eabb16e 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);
diff --git a/tests/Makefile.am b/tests/Makefile.am
index bb1ea20..2a3a85b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,3 +1,3 @@
-SUBDIRS = libedataserver libedataserverui libebook libecal libedata-cal
+SUBDIRS = libedataserver libebook libecal libedata-cal
 
 -include $(top_srcdir)/git.mk



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