--- Makefile.PL.orig 2014-10-28 02:34:54.000000000 +0100 +++ Makefile.PL 2016-12-25 16:43:25.592841289 +0100 @@ -299,8 +299,8 @@ ($$lib_gd_path = $libdir) =~ s!/[^/]+$!!; $$options = $features; - my ($minor) = $version =~ /^2\.\d+\.(\d+)$/; - $$options .= " GD_UNCLOSEDPOLY GD_ANIMGIF GD_FTCIRCLE VERSION_33" if defined($minor) && $minor >= 33; + my ($release, $major, $minor) = $version =~ /^(\d+)\.(\d+)\.(\d+)$/; + $$options .= " GD_UNCLOSEDPOLY GD_ANIMGIF GD_FTCIRCLE VERSION_33" if defined($minor) && ($release > 2 || ($release == 2 && $major > 0) || ($release == 2 && $major == 0 && $minor >= 33)); my @correct_inc = map {s/^-I// && $_} split /\s+/,$cflags; check_for_stray_headers($includedir,@correct_inc);