[Libosinfo] [PATCH v2 5/5] Use SOUP_VERSION_MAX_ALLOWED

Fabiano Fidêncio fidencio at redhat.com
Thu Jan 7 17:54:41 UTC 2016


In order to avoid using a too new libsoup API.
---
 configure.ac | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index c280b2a..c2215cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,9 +40,12 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
 m4_define([glib_minimum_version], [2.36])
 m4_define([glib_encoded_version], [GLIB_VERSION_2_36])
 
+# Keep these two definitions in agreement.
+m4_define([soup_minimum_version], [2.42])
+m4_define([soup_encoded_version], [SOUP_VERSION_2_42])
+
 PKG_CHECK_MODULES([GOBJECT], [gobject-2.0])
 PKG_CHECK_MODULES([GIO], [gio-2.0])
-PKG_CHECK_MODULES([SOUP], [libsoup-2.4 >= 2.42])
 PKG_CHECK_MODULES([LIBXML], [libxml-2.0 >= 2.6.0])
 PKG_CHECK_MODULES([LIBXSLT], [libxslt >= 1.0.0])
 
@@ -52,6 +55,12 @@ GLIB_CFLAGS="$GLIB_CFLAGS -DGLIB_VERSION_MAX_ALLOWED=glib_encoded_version"
 AC_SUBST(GLIB_CFLAGS)
 AC_SUBST(GLIB_LIBS)
 
+PKG_CHECK_MODULES([SOUP], [libsoup-2.4 >= soup_minimum_version])
+SOUP_CFLAGS="$SOUP_CFLAGS -DSOUP_VERSION_MIN_REQUIRED=soup_encoded_version"
+SOUP_CFLAGS="$SOUP_CFLAGS -DSOUP_VERSION_MAX_ALLOWED=soup_encoded_version"
+AC_SUBST(SOUP_CFLAGS)
+AC_SUBST(SOUP_LIBS)
+
 GTK_DOC_CHECK([1.10],[--flavour no-tmpl])
 
 AC_ARG_ENABLE([tests],
-- 
2.5.0




More information about the Libosinfo mailing list