]> git.0d.be Git - empathy.git/commitdiff
add an optional dep on geocode-glib
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 5 May 2011 13:06:05 +0000 (15:06 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 8 Jun 2011 09:27:26 +0000 (11:27 +0200)
configure.ac
libempathy-gtk/Makefile.am
libempathy/Makefile.am

index 1692810bb03a3cf8d198a3d6fc652f070ddbb586..3e998de911d7132a52110012d4f27e0774168a00 100644 (file)
@@ -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}
index be1aeeea3bdc31a2deeed248a398a61ff0dff795..bb2565885a81d559dffc5d5e84b1c7b5daf463cc 100644 (file)
@@ -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)                          \
index cfea24c0e6c8c501fca3afd1f51f5d3742c6397d..41cec88fde3f3735de79b740d9b6bc0ffa465f64 100644 (file)
@@ -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)