Support building with older glib versions
authorMike Hommey <mh@glandium.org>
Fri, 30 Sep 2016 09:15:37 +0000 (18:15 +0900)
committerBehdad Esfahbod <behdad@behdad.org>
Sun, 18 Dec 2016 07:37:07 +0000 (01:37 -0600)
commit1c98ff87c76536553e53c131e75aba33033ee3a0
treeb9198ee630e94311257a54a851954bc1f730629d
parentad273881c597a95929ce3b84f63865f9d7dcdb7e
Support building with older glib versions

It is desirable to be able to build against older versions of glib.

fd7a245 changed the configure check to require glib > 2.38 for
G_TEST_DIST. Before that, version 2.16 was required, but in fact,
since aafe395, G_PASTE is being used, which was introduced in 2.19.1.
And since 0ef179e2, hb-glib uses GBytes, which were introduced in
2.31.10.

2.19.1 is rather old, but 2.38 is rather new. For Firefox, building
against 2.22 is still supported, although we could probably get away
with bumping that to 2.28. Either way, GBytes is not available.

Arguably, if you build against a glib that doesn't support GBytes,
you're not going to use the hb_glib_blob_create function, so we hide
the function when building against such a glib.

As for G_TEST_DIST, when building against versions of glib that don't
support it, we can fallback to the previous behavior, which, AIUI, was
just making the test not work when building in a separate directory.
configure.ac
src/hb-glib.cc
src/hb-glib.h
test/api/test-ot-math.c