Bug 178 - fontconfig fails to build with freetype <= 2.1.4
Summary: fontconfig fails to build with freetype <= 2.1.4
Alias: None
Product: fontconfig
Classification: Unclassified
Component: library (show other bugs)
Version: 2.2
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Keith Packard
QA Contact:
Depends on:
Reported: 2004-02-10 05:53 UTC by James Henstridge
Modified: 2004-02-11 10:33 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

old-freetype.patch (1.11 KB, patch)
2004-02-10 17:54 UTC, James Henstridge
Details | Splinter Review

Description James Henstridge 2004-02-10 05:53:58 UTC
The changes on 2004-02-07 broke the build for freetype <= 2.1.4.  According to
the release notes, the y_ppem member of the FT_Bitmap_Size structure was only
added in  2.1.5.

For reference, Fedora Core 1 only shipped with 2.1.4 so there will likely be a
lot of boxes out there without a new enough freetype.
Comment 1 Keith Packard 2004-02-10 10:39:16 UTC
I've added an AC_CHECK_MEMBER test for y_ppem.  I don't have an older version of
FreeType to test against; please update and see if it works.
Comment 2 James Henstridge 2004-02-10 17:50:20 UTC
The build was still broken after your change, so I am reopenning.  I'll attach a
patch that gets things to compile in a sec.
Comment 3 James Henstridge 2004-02-10 17:54:42 UTC
Created attachment 87 [details] [review]

With your change when the FT_Bitmap_Size.y_ppem member is not found,
HAVE_FT_BITMAP_SIZE_Y_PPEM gets #define'd to 0.

Later on in fcfreetype.c, you do a "#ifdef HAVE_FT_BITMAP_SIZE_Y_PPEM" to check
whether the member exists.  Unfortunately having HAVE_FT_BITMAP_SIZE_Y_PPEM
defined to 0 counts as it being defined.

The attached patch alters configure.in so that HAVE_FT_BITMAP_SIZE_Y_PPEM will
only ever be defined if y_ppem exists.	It also makes configure.in 10 lines
shorter, which can't hurt :)
Comment 4 Keith Packard 2004-02-11 10:54:36 UTC
Thanks for the fix.  I decided to do it slightly differently, using the (I think
corrrect) #if HAVE_ ... syntax.

Let me know if it's *still* busted...
Comment 5 James Henstridge 2004-02-12 05:33:18 UTC
Seems to build fine now.  Thanks.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.