Re: [PATCH v3 4/5] Use GLIB_VERSION_MAX_ALLOWED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 11, 2016 at 02:19:54PM +0100, Fabiano Fidêncio wrote:
> In order to avoid using a too new GLib API.
> ---
>  configure.ac       | 14 ++++++++++++--
>  osinfo/Makefile.am |  2 ++
>  test/Makefile.am   |  2 ++
>  tools/Makefile.am  |  5 +++++
>  4 files changed, 21 insertions(+), 2 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 5c38b96..403b4e0 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -36,12 +36,22 @@ m4_if(m4_version_compare([2.61a.100],
>  # Use the silent-rules feature when possible.
>  m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
>  
> -PKG_CHECK_MODULES([GOBJECT], [gobject-2.0])
> -PKG_CHECK_MODULES([GIO], [gio-2.0 >= 2.36])
> +# Keep these two definitions in agreement.
> +GLIB_MINIMUM_VERSION="2.36"
> +GLIB_ENCODED_VERSION="GLIB_VERSION_2_36"
> +
> +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])
>  
> +PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $GLIB_MINIMUM_VERSION])
> +GLIB_CFLAGS="$GLIB_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=$GLIB_ENCODED_VERSION"
> +GLIB_CFLAGS="$GLIB_CFLAGS -DGLIB_VERSION_MAX_ALLOWED=$GLIB_ENCODED_VERSION"
> +AC_SUBST(GLIB_CFLAGS)
> +AC_SUBST(GLIB_LIBS)
> +

I'd tend to merge everything in a single test
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $GLIB_MINIMUM_VERSION gobject-2.0 gio-2.0])
as GOBJECT_LIBS and GIO_LIBS always go together in libosinfo
Makefile.am.

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux