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

Fabiano Fidêncio fidencio at redhat.com
Mon Jan 11 13:19:55 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 403b4e0..d29d639 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,9 +40,12 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
 GLIB_MINIMUM_VERSION="2.36"
 GLIB_ENCODED_VERSION="GLIB_VERSION_2_36"
 
+# Keep these two definitions in agreement.
+SOUP_MINIMUM_VERSION="2.42"
+SOUP_ENCODED_VERSION="SOUP_VERSION_2_42"
+
 PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= $GLIB_MINIMUM_VERSION])
 PKG_CHECK_MODULES([GIO], [gio-2.0 >= $GLIB_MINIMUM_VERSION])
-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