Skip to content

Commit

Permalink
Fixes libgd ver check in Makefile.PL and Build.PL
Browse files Browse the repository at this point in the history
  • Loading branch information
sauoq committed Mar 23, 2015
1 parent 04477a2 commit 58eceb8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Build.PL
Expand Up @@ -280,8 +280,10 @@ sub try_to_autoconfigure {
($$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 ($minor, $patch) = $version =~ /^2\.(\d+)\.(\d+)$/;
if ((defined($minor) && $minor > 0) or (defined($patch) && $patch >=33)) {
$$options .= " GD_UNCLOSEDPOLY GD_ANIMGIF GD_FTCIRCLE VERSION_33";
}

my @correct_inc = map {s/^-I// && $_} split /\s+/,$cflags;
check_for_stray_headers($includedir,@correct_inc);
Expand Down
6 changes: 4 additions & 2 deletions Makefile.PL
Expand Up @@ -299,8 +299,10 @@ sub try_to_autoconfigure {
($$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 ($minor, $patch) = $version =~ /^2\.(\d+)\.(\d+)$/;
if ((defined($minor) && $minor > 0) or (defined($patch) && $patch >= 33)) {
$$options .= " GD_UNCLOSEDPOLY GD_ANIMGIF GD_FTCIRCLE VERSION_33";
}

my @correct_inc = map {s/^-I// && $_} split /\s+/,$cflags;
check_for_stray_headers($includedir,@correct_inc);
Expand Down

0 comments on commit 58eceb8

Please sign in to comment.