[evolution-data-server/openismus-work-master: 1/10] This patch makes google addressbook backend optional



commit 53519b4112fcb8c69c9bd7b43af01aa5b12628aa
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Mon Dec 17 19:51:21 2012 +0900

    This patch makes google addressbook backend optional
    
    Adds a configure option to avoid building the google backend,
    making libgdata an optional dependency.

 addressbook/backends/Makefile.am |    8 +++++++-
 configure.ac                     |   22 ++++++++++++++++------
 2 files changed, 23 insertions(+), 7 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 2cc7e96..0175ff0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -359,8 +359,7 @@ PKG_CHECK_MODULES(GNOME_PLATFORM,
 	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])
@@ -1350,10 +1349,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
@@ -1658,6 +1667,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
 "



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