diff --git a/configure.ac b/configure.ac index 6948aa6ff..f985e1047 100644 --- a/configure.ac +++ b/configure.ac @@ -147,7 +147,7 @@ AC_ARG_WITH(glib, [Use glib @<:@default=auto@:>@])],, [with_glib=auto]) have_glib=false -GLIB_DEPS="glib-2.0 >= 2.38" +GLIB_DEPS="glib-2.0 >= 2.19.1" AC_SUBST(GLIB_DEPS) if test "x$with_glib" = "xyes" -o "x$with_glib" = "xauto"; then PKG_CHECK_MODULES(GLIB, $GLIB_DEPS, have_glib=true, :) diff --git a/src/hb-glib.cc b/src/hb-glib.cc index e20352475..2b91b5b65 100644 --- a/src/hb-glib.cc +++ b/src/hb-glib.cc @@ -382,6 +382,7 @@ hb_glib_get_unicode_funcs (void) return const_cast (&_hb_glib_unicode_funcs); } +#if GLIB_CHECK_VERSION(2,31,10) /** * hb_glib_blob_create: * @@ -398,3 +399,4 @@ hb_glib_blob_create (GBytes *gbytes) g_bytes_ref (gbytes), (hb_destroy_func_t) g_bytes_unref); } +#endif diff --git a/src/hb-glib.h b/src/hb-glib.h index 12c3e3b3a..5f04183ba 100644 --- a/src/hb-glib.h +++ b/src/hb-glib.h @@ -46,9 +46,10 @@ hb_glib_script_from_script (hb_script_t script); HB_EXTERN hb_unicode_funcs_t * hb_glib_get_unicode_funcs (void); +#if GLIB_CHECK_VERSION(2,31,10) HB_EXTERN hb_blob_t * hb_glib_blob_create (GBytes *gbytes); - +#endif HB_END_DECLS diff --git a/test/api/test-ot-math.c b/test/api/test-ot-math.c index 5f4ccb7fc..049656a03 100644 --- a/test/api/test-ot-math.c +++ b/test/api/test-ot-math.c @@ -54,7 +54,11 @@ cleanupFreeType (void) static void openFont(const char* fontFile) { +#if GLIB_CHECK_VERSION(2,37,2) gchar* path = g_test_build_filename(G_TEST_DIST, fontFile, NULL); +#else + gchar* path = g_strdup(fontFile); +#endif FT_Error ft_error; if ((ft_error = FT_New_Face (ft_library, path, 0, &ft_face))) {