RFR: JDK-8001922, JDK-8001927, JDK-8001921 Improve freetype detection

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Wed Oct 23 07:52:12 UTC 2013


On 2013-10-21 15:38, Magnus Ihse Bursie wrote:
> 
>> A question on Windows. If we find freetype in $PROGRAMFILES/GnuWin32, will the resulting jdk image find the library there at runtime or should we still bundle it?
> [...]
> 
> *) Actually, when I scrutinized the code, I noticed that USING_SYSTEM_FT_LIB was incorrectly set when using builddeps or pkg-config. I'll update the WebRe regarding this and the typo.
> 

This fix has grown a bit. I've published a new webrev. Some comments about the changes since the last webrev: The old logic with USING_SYSTEM_FT_LIB was very hard to follow, and arguably completely     wrong in certain situations. Instead of trying harder to adapt the configure code to the existing makefile logic, I decided to fix the makefile logic, and make our behavior more explicit. 

The explicit behaviour is now that we, by default, bundle the freetype library on Windows, or (on any platform) when using --with-freetype. There is now a new flag, --enable/disable-freetype-bundling, which overrides this behavior,     and forces/prohibits bundling, regardless of circumstances. If we force bundling, but do not specify a freetype library path, we might be unable to use a freetype library that was provided via builddeps or pkg-config. This is now correctly checked for, and this freetype     library is skipped, and we continue search for one that we can bundle.

I also finally got tired of the mix between using "FREETYPE" and "FREETYPE2", and replaced all instances with just FREETYPE (the versioning is not relevant, and we don't use it for any other library). It's still needed when interfacing external systems such as pkg-config, though.

Finally, it turned out that we do indeed require freetype to build on macosx, contrary to the apparent look of the code, and contrary to general build instructions. :-) We just sneakily detected freetype, and if it were not there, we could not build successfully on macosx. (This is for the open part only; the closed build does not require freetype). I'm not sure if this is a documentation bug, or a build system bug. In any case; I've restored the previous behavior, and made it more explicit. If this behavior should be changed, it must be covered in another bug.

Updated webrev: http://cr.openjdk.java.net/~ihse/JDK-8001922-improve-freetype-detection/webrev.03

/Magnus




More information about the build-dev mailing list