[empathy] allow building empathy without eds



commit 05166126df1b96b26a7fb2c9eb6c344214878371
Author: Saleem Abdulrasool <compnerd compnerd org>
Date:   Wed Mar 3 20:30:24 2010 +0000

    allow building empathy without eds

 configure.ac                            |   13 ++++++++++++-
 src/Makefile.am                         |    6 ++++--
 src/empathy-auto-salut-account-helper.c |    7 +++++++
 tests/interactive/Makefile.am           |    8 +++++---
 4 files changed, 28 insertions(+), 6 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a4fb6e6..208fcbf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -159,7 +159,6 @@ PKG_CHECK_MODULES(EMPATHY,
    gobject-2.0
    gstreamer-0.10
    gstreamer-interfaces-0.10
-   libebook-1.2
    libxml-2.0
    telepathy-farsight >= $TELEPATHY_FARSIGHT_REQUIRED
    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
@@ -168,6 +167,17 @@ PKG_CHECK_MODULES(EMPATHY,
 ])
 
 # -----------------------------------------------------------
+# evolution-data-server (about-me)
+# -----------------------------------------------------------
+AC_ARG_WITH(eds,
+            AC_HELP_STRING([--with-eds], [build with evolution-data-server support]),,
+            [with_eds=yes])
+if test x"$with_eds" = x"yes" ; then
+   PKG_CHECK_MODULES(EDS, [libebook-1.2])
+   AC_DEFINE(HAVE_EDS, 1, [Define if we have libebook])
+fi
+
+# -----------------------------------------------------------
 # GTK+
 # -----------------------------------------------------------
 AC_ARG_ENABLE(gtk3,
@@ -568,4 +578,5 @@ Configure summary:
 
     Extras:
 	Nautilus-sendto plugin......:  ${have_nst}
+	Salut E-D-S support.........:  ${with_eds}
 "
diff --git a/src/Makefile.am b/src/Makefile.am
index e21b348..c77b63a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,7 +2,8 @@ include $(top_srcdir)/tools/flymake.mk
 
 CPPFLAGS_COMMON =					\
 	$(EMPATHY_CFLAGS)				\
-	$(GTK_CFLAGS)				\
+	$(EDS_CFLAGS)					\
+	$(GTK_CFLAGS)					\
 	$(ERROR_CFLAGS)					\
 	-I$(top_srcdir)                          	\
 	-DG_LOG_DOMAIN=\"empathy\"			\
@@ -25,7 +26,7 @@ LDADD =								\
 	$(top_builddir)/libempathy/libempathy.la		\
 	$(top_builddir)/extensions/libemp-extensions.la		\
 	$(LIBNOTIFY_LIBS)					\
-	$(UNIQUE_LIBS) \
+	$(UNIQUE_LIBS)						\
 	$(EMPATHY_LIBS)						\
 	$(GTK_LIBS)						\
 	$(LIBCHAMPLAIN_LIBS)					\
@@ -46,6 +47,7 @@ libempathy_accounts_common_la_SOURCES =					\
 
 libempathy_accounts_common_la_LIBADD =					\
         $(top_builddir)/libempathy-gtk/libempathy-gtk.la		\
+	$(EDS_LIBS)							\
         $(LIBNOTIFY_LIBS)						\
         $(UNIQUE_LIBS) \
         $(EMPATHY_LIBS)							\
diff --git a/src/empathy-auto-salut-account-helper.c b/src/empathy-auto-salut-account-helper.c
index 23484dd..57d3987 100644
--- a/src/empathy-auto-salut-account-helper.c
+++ b/src/empathy-auto-salut-account-helper.c
@@ -26,7 +26,10 @@
 
 #include <telepathy-glib/account-manager.h>
 #include <telepathy-glib/util.h>
+
+#if HAVE_EDS
 #include <libebook/e-book.h>
+#endif
 
 #include <libempathy/empathy-account-settings.h>
 
@@ -65,6 +68,7 @@ EmpathyAccountSettings *
 create_salut_account_settings (void)
 {
   EmpathyAccountSettings  *settings;
+#if HAVE_EDS
   EBook *book;
   EContact *contact;
   gchar *nickname = NULL;
@@ -73,10 +77,12 @@ create_salut_account_settings (void)
   gchar *email = NULL;
   gchar *jid = NULL;
   GError *error = NULL;
+#endif
 
   settings = empathy_account_settings_new ("salut", "local-xmpp",
       _("People nearby"));
 
+#if HAVE_EDS
   /* Get self EContact from EDS */
   if (!e_book_get_self (&contact, &book, &error))
     {
@@ -117,6 +123,7 @@ create_salut_account_settings (void)
   g_free (jid);
   g_object_unref (contact);
   g_object_unref (book);
+#endif
 
   return settings;
 }
diff --git a/tests/interactive/Makefile.am b/tests/interactive/Makefile.am
index bd3acea..258b86d 100644
--- a/tests/interactive/Makefile.am
+++ b/tests/interactive/Makefile.am
@@ -3,15 +3,17 @@ AM_CPPFLAGS =						\
 	-I$(top_srcdir)                          	\
 	-DPKGDATADIR=\""$(pkgdatadir)"\"		\
 	$(EMPATHY_CFLAGS)				\
-	$(GTK_CFLAGS) \
+	$(EDS_CFLAGS)					\
+	$(GTK_CFLAGS)					\
 	$(WARN_CFLAGS)					\
 	$(DISABLE_DEPRECATED)
 
 LDADD =								\
 	$(top_builddir)/libempathy-gtk/libempathy-gtk.la	\
 	$(top_builddir)/libempathy/libempathy.la		\
-	$(EMPATHY_LIBS) \
-	$(GTK_LIBS)
+	$(EMPATHY_LIBS)						\
+	$(GTK_LIBS)						\
+	$(EDS_LIBS)
 
 noinst_PROGRAMS =			\
 	contact-manager			\



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