On 2013-10-25 10:49, Magnus Ihse Bursie wrote:
I checked on a newer Ubuntu (13.04). It turns out that pkg-config is stripping the -L provided by the freetype pkg-config metadata file! This is apparantly the default behavior of pkg-config, unless PKG_CONFIG_ALLOW_SYSTEM_LIBS=true is set. The difference between the older and newer Ubuntus seems to be wether pkg-config considers the freetype library path to be a system library or not. :-&

That analysis was only partially correct.

Yes, pkg-config is stripping -L, but that shouldn't really be a problem since gcc should add it again by itself, since it's a system library path.

The real culprit was that I appended $FREETYPE_LIBS to $LDFLAGS instead of $LIBS. The former is placed before the source code filename when autoconf tests compiling with the library, the latter after. For gcc 4.5 (which I tested with), this does not matter, but for gcc 4.7 (which is shipped with Ubuntu 13.04), this matters, so gcc will report a link failure.

PKG_CONFIG_ALLOW_SYSTEM_LIBS was just a red herring.

I'll post a review shortly with a fix for this.

/Magnus

Reply via email to