[empathy] add an optional dep on geocode-glib



commit 76d23bc01b65271a4067a13a9f51037004019d42
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Thu May 5 15:06:05 2011 +0200

    add an optional dep on geocode-glib

 configure.ac               |   30 ++++++++++++++++++++++++++++++
 libempathy-gtk/Makefile.am |    2 ++
 libempathy/Makefile.am     |    2 ++
 3 files changed, 34 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 1692810..3e998de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -375,6 +375,35 @@ AC_SUBST(GEOCLUE_CFLAGS)
 AC_SUBST(GEOCLUE_LIBS)
 
 # -----------------------------------------------------------
+# location checks: geocode-glib
+# -----------------------------------------------------------
+AC_ARG_ENABLE(geocode,
+              AS_HELP_STRING([--enable-geocode=@<:@no/yes/auto@:>@],
+                             [Enable geocode support]), ,
+                             enable_geocode=auto)
+
+if test "x$enable_geocode" != "xno"; then
+   PKG_CHECK_MODULES(GEOCODE,
+   [
+      geocode-glib
+   ], have_geocode="yes", have_geocode="no")
+
+   if test "x$have_geoclue" = "xyes"; then
+      AC_DEFINE(HAVE_GEOCODE, 1, [Define if you have geocode])
+   fi
+else
+   have_geocode="no"
+fi
+
+if test "x$enable_geocode" = "xyes" -a "x$have_geocode" != "xyes"; then
+   AC_MSG_ERROR([Could not find geocode dependencies.])
+fi
+
+AM_CONDITIONAL(HAVE_GEOCODE, test "x$have_geocode" = "xyes")
+AC_SUBST(GEOCODE_CFLAGS)
+AC_SUBST(GEOCODE_LIBS)
+
+# -----------------------------------------------------------
 # meego widgets support
 # -----------------------------------------------------------
 AC_ARG_ENABLE(meego,
@@ -525,6 +554,7 @@ Configure summary:
 	Spell checking (enchant)....:  ${have_enchant}
 	Display maps (libchamplain).:  ${have_libchamplain}
 	Location awareness (Geoclue):  ${have_geoclue}
+	Geocode support (Geoclue):     ${have_geocode}
 	Adium themes (Webkit).......:  ${have_webkit}
 	Meego widgets ..............:  ${have_meego}
 	Control center embedding....:  ${have_control_center_embedding}
diff --git a/libempathy-gtk/Makefile.am b/libempathy-gtk/Makefile.am
index be1aeee..bb25658 100644
--- a/libempathy-gtk/Makefile.am
+++ b/libempathy-gtk/Makefile.am
@@ -11,6 +11,7 @@ AM_CPPFLAGS =                                           \
 	$(ENCHANT_CFLAGS)				\
 	$(LIBCHAMPLAIN_CFLAGS)				\
 	$(GEOCLUE_CFLAGS)				\
+	$(GEOCODE_CFLAGS)				\
 	$(MEEGO_CFLAGS)					\
 	$(WEBKIT_CFLAGS)				\
 	$(CHEESE_CFLAGS)				\
@@ -165,6 +166,7 @@ libempathy_gtk_la_LIBADD =			\
 	$(ENCHANT_LIBS)				\
 	$(LIBCHAMPLAIN_LIBS)			\
 	$(GEOCLUE_LIBS)				\
+	$(GEOCODE_LIBS)				\
 	$(GCR_LIBS)				\
 	$(MEEGO_LIBS)				\
 	$(WEBKIT_LIBS)				\
diff --git a/libempathy/Makefile.am b/libempathy/Makefile.am
index cfea24c..41cec88 100644
--- a/libempathy/Makefile.am
+++ b/libempathy/Makefile.am
@@ -11,6 +11,7 @@ AM_CPPFLAGS =                                           \
 	-DGCR_API_SUBJECT_TO_CHANGE			\
 	$(EMPATHY_CFLAGS)				\
 	$(GEOCLUE_CFLAGS)				\
+	$(GEOCODE_CFLAGS)				\
 	$(NETWORK_MANAGER_CFLAGS)			\
 	$(CONNMAN_CFLAGS)				\
 	$(WARN_CFLAGS)					\
@@ -112,6 +113,7 @@ libempathy_la_LIBADD =		\
 	$(GCR_LIBS) \
 	$(EMPATHY_LIBS) \
 	$(GEOCLUE_LIBS) \
+	$(GEOCODE_LIBS) \
 	$(NETWORK_MANAGER_LIBS) \
 	$(CONNMAN_LIBS)
 



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