--- Build.PL.orig 2016-12-13 20:22:30.348550000 +0100 +++ Build.PL 2016-12-13 20:23:01.820955000 +0100 @@ -280,8 +280,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);