diff options
author | Guido Günther <agx@sigxcpu.org> | 2014-03-09 18:19:05 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2014-03-18 22:08:55 +0100 |
commit | 2fa6ec197f98760d859d14741b03f684558f4d7e (patch) | |
tree | 6c8b4fb1e322ff1aa6caa28088525fc0ec6eefd4 | |
parent | 81eb564eabd741547afb0f1ff0066ef8a898844d (diff) |
Cope with older libsoup
as found in Debian Wheezy
We can't use SOUP_CHECK_VERSION since this isn't available in 2.38.
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | libplanfahr/providers/hafas-bin6.c | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index d556c9c..9bbd195 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,7 @@ GOBJECT2_REQUIRED=2.10.0 GIO_REQUIRED=2.10.0 GOBJECT_INTROSPECTION_REQUIRED=1.39.90 LIBXML2_REQUIRED=2.0.0 -LIBSOUP_REQUIRED=2.42 +LIBSOUP_REQUIRED=2.38 LIBPLANFAHR_MAJOR_VERSION=`echo $VERSION | awk -F. '{print $1}'` LIBPLANFAHR_MINOR_VERSION=`echo $VERSION | awk -F. '{print $2}'` @@ -57,6 +57,11 @@ if test x"$enable_debug" = x"yes"; then AC_DEFINE(ENABLE_DEBUG, 1, [whether debugging is enabled]) fi +OLDLIBS=$LIBS +LIBS=$LIBSOUP_LIBS +AC_CHECK_FUNCS(soup_session_new) +LIBS=$OLDLIBS + # Setup GLIB_MKENUMS to use glib-mkenums even if GLib is uninstalled. GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` AC_SUBST(GLIB_MKENUMS) diff --git a/libplanfahr/providers/hafas-bin6.c b/libplanfahr/providers/hafas-bin6.c index 83ca2e9..f72d79b 100644 --- a/libplanfahr/providers/hafas-bin6.c +++ b/libplanfahr/providers/hafas-bin6.c @@ -846,7 +846,11 @@ lpf_provider_hafas_bin6_activate (LpfProvider *self, GObject *obj) GFile *dir; gchar *debugstr; +#ifdef HAVE_SOUP_SESSION_NEW priv->session = soup_session_new(); +#else + priv->session = soup_session_async_new(); +#endif priv->logdir = g_build_path(G_DIR_SEPARATOR_S, g_get_user_cache_dir(), PACKAGE, |