Subject: | Configuration fails if gdlib-config --all returns empty values for variables |
On my box, gdlib-config --all returns the following:
GD library 2.0.34
includedir: /usr/include
cflags: -I/usr/include
ldflags:
libs: -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng12 -lz -lm
libdir:
features: GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON
When this is parsed in try_to_autoconfigure(), the libdir and ldflags lines are incorrectly parsed, e.g.
270 my ($libdir) = $config =~ /^libdir:\s+(.+)/m;
results in
$libdir = 'features: GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON'
which results in a mess:
$ perl Build.PL
Configuring for libgd version 2.0.34.
Checking for stray libgd header files...none found.
Included Features: GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON GD_UNCLOSEDPOLY GD_ANIMGIF GD_FTCIRCLE VERSION_33
GD library used from: features: GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON