diff --git a/configure.ac b/configure.ac index b60c974a..510f9e62 100644 --- a/configure.ac +++ b/configure.ac @@ -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().] ) + ], + [: ] ) diff --git a/libvips/foreign/svgload.c b/libvips/foreign/svgload.c index 06783517..fd7f49f2 100644 --- a/libvips/foreign/svgload.c +++ b/libvips/foreign/svgload.c @@ -67,7 +67,12 @@ #include #include -#ifdef HAVE_RSVG +/* We need GIO for GInputStream. + */ + +#if defined(HAVE_RSVG) && defined(HAVE_GIO) + +#include /* 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: diff --git a/libvips/include/vips/vips.h b/libvips/include/vips/vips.h index 00919a6f..de50c441 100644 --- a/libvips/include/vips/vips.h +++ b/libvips/include/vips/vips.h @@ -88,7 +88,6 @@ extern "C" { #include #include #include -#include /* If we're being parsed by SWIG, remove gcc attributes. */