From 7ac6f32625254a14180677694a0a98d333fc5813 Mon Sep 17 00:00:00 2001 From: LRN Date: Fri, 18 May 2012 08:40:38 -0700 Subject: Don't use deprecated glib function to construct path on win32 g_win32_get_package_installation_subdirectory() has been deprecated since GLib 2.18 and in recent (2.31) GLib versions disabled entirely by default. This patch replaces usage of that function by g_win32_get_package_installation_directory_of_module() and g_build_filename(). Use the new functions and rework the code a bit so it leaks less memory. g_win32_get_package_installation_directory_of_module() is supported since GLib 2.16. The minimal GLib version is bumped accordingly. Freedesktop #45742 --- configure.ac | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 763c7d1..2c936d4 100644 --- a/configure.ac +++ b/configure.ac @@ -123,6 +123,11 @@ esac AC_MSG_RESULT([$native_win32]) AM_CONDITIONAL(NATIVE_WIN32, [test "x$native_win32" = xyes]) +dnl +dnl Find glib or use internal copy. Required version is 2.16 for +dnl g_win32_get_package_installation_directory_of_module(). +dnl +m4_define([glib_module], ["glib-2.0 >= 2.16"]) AC_ARG_WITH([internal-glib], [AS_HELP_STRING([--with-internal-glib], [use internal glib])], [with_internal_glib="$withval"], @@ -136,14 +141,14 @@ if test "x$with_internal_glib" = xyes; then else if test "x$GLIB_CFLAGS" = "x" && test "x$GLIB_LIBS" = "x"; then AC_CHECK_PROGS([PKG_CONFIG], [pkg-config], []) - if test -n $PKG_CONFIG && $PKG_CONFIG --exists glib-2.0; then - GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0` - GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0` + if test -n $PKG_CONFIG && $PKG_CONFIG --exists glib_module; then + GLIB_CFLAGS=`$PKG_CONFIG --cflags glib_module` + GLIB_LIBS=`$PKG_CONFIG --libs glib_module` else - AC_MSG_ERROR(m4_normalize([pkg-config and glib-2.0 not found, please set - GLIB_CFLAGS and GLIB_LIBS to the correct - values or pass --with-internal-glib to - configure])) + AC_MSG_ERROR(m4_normalize([pkg-config and ]glib_module[ not found, + please set GLIB_CFLAGS and GLIB_LIBS to + the correct values or pass + --with-internal-glib to configure])) fi fi fi -- cgit v1.2.1