[virt-tools-list] [virt-viewer v2 1/5] Use GLIB_VERSION_MAX_ALLOWED
Eduardo Lima (Etrunko)
etrunko at redhat.com
Thu Feb 25 14:42:19 UTC 2016
On 02/24/2016 04:04 AM, Fabiano Fidêncio wrote:
> In order to avoid using a too new GLib API.
>
> Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
> ---
> acinclude.m4 | 2 +-
> configure.ac | 10 +++++++++-
> 2 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/acinclude.m4 b/acinclude.m4
> index a9561c4..30d5cc1 100644
> --- a/acinclude.m4
> +++ b/acinclude.m4
> @@ -34,7 +34,7 @@ AC_DEFUN([VIRT_VIEWER_COMPILE_WARNINGS],[
> try_compiler_flags="$try_compiler_flags -Wall -Wmissing-prototypes -std=c99 -Wnested-externs -Wpointer-arith"
> try_compiler_flags="$try_compiler_flags -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return"
> # Removed -Wstrict-prototypes to avoid GTK bug
> - try_compiler_flags="$try_compiler_flags -Winline -Wredundant-decls -Wno-sign-compare -Wno-deprecated-declarations"
> + try_compiler_flags="$try_compiler_flags -Winline -Wredundant-decls -Wdeprecated-declarations -Wno-sign-compare"
> if test "$enable_compile_warnings" = "error" ; then
> try_compiler_flags="$try_compiler_flags -Werror"
> fi
> diff --git a/configure.ac b/configure.ac
> index 5503d46..437f6e4 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -12,7 +12,10 @@ AC_CANONICAL_HOST
> m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
> AM_SILENT_RULES([yes])
>
> -GLIB2_REQUIRED="2.38.0"
> +# Keep these two definitions in agreement.
> +GLIB2_REQUIRED="2.38"
> +GLIB2_ENCODED_VERSION="GLIB_VERSION_2_38"
> +
> LIBXML2_REQUIRED="2.6.0"
> LIBVIRT_REQUIRED="0.10.0"
> GTK_REQUIRED="3.10"
> @@ -94,6 +97,11 @@ GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
> AC_SUBST(GLIB_MKENUMS)
>
> PKG_CHECK_MODULES(GLIB2, glib-2.0 >= $GLIB2_REQUIRED gio-2.0 gthread-2.0 gmodule-export-2.0)
> +GLIB2_CFLAGS="$GLIB2_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=$GLIB2_ENCODED_VERSION"
> +GLIB2_CFLAGS="$GLIB2_CFLAGS -DGLIB_VERSION_MAX_ALLOWED=$GLIB2_ENCODED_VERSION"
I don't really understand why doing this twice instead of in the same line.
> +AC_SUBST(GLIB2_CFLAGS)
> +AC_SUBST(GLIB2_LIBS)
Also, you would not really need to set GLIB2_LIBS again, because you
didn't really touched it.
This also applies to the GDK_VERSION_MAX_ALLOWED patch. I think you
could have squashed both.
--
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
etrunko at redhat.com
More information about the virt-tools-list
mailing list