test for gio

It seems glib added gio in 2.15, though I don't know if svgload will
actually work with a glib that old.
This commit is contained in:
John Cupitt 2019-11-19 17:05:12 +00:00
parent 73985463fd
commit 9a193f6f4c
3 changed files with 19 additions and 3 deletions

View File

@ -475,6 +475,16 @@ PKG_CHECK_MODULES(CONTEXT_GET_HELP, glib-2.0 >= 2.14,
]
)
# from 2.15 we have GIO
PKG_CHECK_MODULES(GIO, glib-2.0 >= 2.15,
[AC_DEFINE(HAVE_GIO,1,
[define if your glib has GIO.]
)
],
[:
]
)
# from 2.28 we have a monotonic timer
PKG_CHECK_MODULES(MONOTONIC_TIME, glib-2.0 >= 2.28,
[AC_DEFINE(HAVE_MONOTONIC_TIME,1,
@ -508,6 +518,8 @@ PKG_CHECK_MODULES(THREADS, glib-2.0 >= 2.32,
AC_DEFINE(HAVE_VALUE_GET_SCHAR,1,
[define if your glib has g_value_get_schar().]
)
],
[:
]
)

View File

@ -67,7 +67,12 @@
#include <vips/internal.h>
#include <vips/debug.h>
#ifdef HAVE_RSVG
/* We need GIO for GInputStream.
*/
#if defined(HAVE_RSVG) && defined(HAVE_GIO)
#include <gio/gio.h>
/* A GInputStream that's actually a VipsStreami under the hood. This lets us
* hook librsvg up to libvips using the GInputStream interface.
@ -1002,7 +1007,7 @@ vips_foreign_load_svg_buffer_init( VipsForeignLoadSvgBuffer *buffer )
{
}
#endif /*HAVE_RSVG*/
#endif /*HAVE_RSVG && HAVE_GIO*/
/**
* vips_svgload:

View File

@ -88,7 +88,6 @@ extern "C" {
#include <glib/gstdio.h>
#include <gmodule.h>
#include <glib-object.h>
#include <gio/gio.h>
/* If we're being parsed by SWIG, remove gcc attributes.
*/