From 76d23bc01b65271a4067a13a9f51037004019d42 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 5 May 2011 15:06:05 +0200 Subject: add an optional dep on geocode-glib --- configure.ac | 30 ++++++++++++++++++++++++++++++ libempathy-gtk/Makefile.am | 2 ++ libempathy/Makefile.am | 2 ++ 3 files changed, 34 insertions(+) diff --git a/configure.ac b/configure.ac index 1692810bb..3e998de91 100644 --- a/configure.ac +++ b/configure.ac @@ -374,6 +374,35 @@ AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes") 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 # ----------------------------------------------------------- @@ -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 be1aeeea3..bb2565885 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 cfea24c0e..41cec88fd 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) -- cgit