diff --git a/addressbook/backends/google/Makefile.am b/addressbook/backends/google/Makefile.am
index 0138234..dc9fbd5 100644
--- a/addressbook/backends/google/Makefile.am
+++ b/addressbook/backends/google/Makefile.am
@@ -1,5 +1,7 @@
 SUBDIRS = . tests
 
+if HAVE_GOOGLE
+
 ebook_backend_LTLIBRARIES = libebookbackendgoogle.la
 
 if HAVE_GOA
@@ -90,3 +92,5 @@ libebook_google_utils_la_LDFLAGS = \
 	$(NULL)
 
 -include $(top_srcdir)/git.mk
+
+endif # HAVE_GOOGLE
\ No newline at end of file
diff --git a/addressbook/backends/google/tests/Makefile.am b/addressbook/backends/google/tests/Makefile.am
index 3b31197..2d46147 100644
--- a/addressbook/backends/google/tests/Makefile.am
+++ b/addressbook/backends/google/tests/Makefile.am
@@ -1,3 +1,5 @@
+if HAVE_GOOGLE
+
 phone_numbers_CPPFLAGS = \
 	$(AM_CPPFLAGS) \
 	-I$(top_srcdir) \
@@ -28,3 +30,5 @@ TESTS = $(noinst_PROGRAMS)
 phone_numbers_SOURCES = phone-numbers.c
 
 -include $(top_srcdir)/git.mk
+
+endif # HAVE_GOOGLE
\ No newline at end of file
diff --git a/configure.ac b/configure.ac
index 7dc9c8c..ef69707 100644
--- a/configure.ac
+++ b/configure.ac
@@ -336,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])
@@ -395,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)
@@ -1295,18 +1306,28 @@ AC_SUBST(E_DATA_SERVER_LIBS)
 dnl ******************************
 dnl libedataserverui
 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
+AC_ARG_ENABLE([edataserverui],
+	[AS_HELP_STRING([--enable-edataserverui],
+	[enable edataserverui (default=yes)])],
+	[enable_edataserverui=$enableval], [enable_edataserverui=yes])
+AC_MSG_CHECKING([if edataserverui is enabled])
+AC_MSG_RESULT([$enable_edataserverui])
+if test "x$enable_edataserverui" = xyes; then
+   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)
+   AC_DEFINE([HAVE_EDATASERVERUI], 1, [edataserverui + GTK enabled])
+
+   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
 fi
+AM_CONDITIONAL(HAVE_EDATASERVERUI, [test x$enable_edataserverui = xyes])
 
 E_BACKEND_DEPS="gio-2.0 gmodule-2.0 gnome-keyring-1 libsoup-2.4 libxml-2.0"
 
@@ -1366,10 +1387,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
@@ -1672,5 +1703,8 @@ echo "
 	Introspection:		$enable_introspection
 	Vala bindings:		$enable_vala_bindings
 	GNOME Online Accounts	$enable_goa
+	Interactive activation	$enable_authentication
+	Google Contacts		$enable_google
+	edataserverui           $enable_edataserverui
 	Code coverage (gcov):	$enable_code_coverage
 "
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 1336ad8..d20e4ac 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);
 
@@ -612,6 +617,10 @@ close_prompt:
 
 	g_object_unref (prompt);
 
+#else
+	session_result = E_AUTHENTICATION_SESSION_ERROR;
+#endif /* ENABLE_AUTHENTICATION */
+
 exit:
 
 	switch (session_result) {
@@ -1776,4 +1785,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/libebackend/e-source-registry-server.c b/libebackend/e-source-registry-server.c
index 91ecbf7..3e084e3 100644
--- a/libebackend/e-source-registry-server.c
+++ b/libebackend/e-source-registry-server.c
@@ -2175,4 +2175,3 @@ e_source_registry_server_authenticate_finish (ESourceRegistryServer *server,
 	/* 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 3933712..fb2a99f 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)
@@ -1389,6 +1395,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)
@@ -1593,6 +1600,7 @@ source_registry_call_authenticate_for_source (ESourceRegistry *registry,
 
 	return success;
 }
+#endif /* ENABLE_AUTHENTICATION */
 
 /**
  * e_source_registry_authenticate_sync:
@@ -1625,6 +1633,7 @@ e_source_registry_authenticate_sync (ESourceRegistry *registry,
                                      GCancellable *cancellable,
                                      GError **error)
 {
+#ifdef ENABLE_AUTHENTICATION
 	AuthContext *auth_context;
 	GMainContext *main_context;
 	EDBusAuthenticator *dbus_auth;
@@ -1716,6 +1725,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/libedataserverui/Makefile.am b/libedataserverui/Makefile.am
index abecb12..6744769 100644
--- a/libedataserverui/Makefile.am
+++ b/libedataserverui/Makefile.am
@@ -1,3 +1,5 @@
+if HAVE_EDATASERVERUI
+
 # The marshallers
 MARSHAL_GENERATED = e-data-server-ui-marshal.c e-data-server-ui-marshal.h
 @EVO_MARSHAL_RULE@
@@ -110,3 +112,5 @@ CLEANFILES = $(BUILT_SOURCES)
 DISTCLEANFILES = $(pkgconfig_DATA)
 
 -include $(top_srcdir)/git.mk
+
+endif # HAVE_EDATASERVERUI
\ No newline at end of file
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/libedataserverui/Makefile.am b/tests/libedataserverui/Makefile.am
index 8b0ed2e..4009f36 100644
--- a/tests/libedataserverui/Makefile.am
+++ b/tests/libedataserverui/Makefile.am
@@ -1,3 +1,5 @@
+if HAVE_EDATASERVERUI
+
 noinst_PROGRAMS = 							\
 	evolution-source-viewer						\
 	test-category-completion					\
@@ -53,3 +55,5 @@ test_name_selector_SOURCES = test-name-selector.c
 test_name_selector_LDADD = $(TEST_EDATASERVERUI_LDFLAGS)
 
 -include $(top_srcdir)/git.mk
+
+endif # HAVE_EDATASERVERUI
