Skip to content
Browse files

[RT #9675] add the library detection summary back in and improve it

  • Loading branch information...
1 parent ba751da commit d97c8dbdcb83ad98cf4e959bcbe9d9204e2ac835 @tonycoz committed Mar 14, 2011
Showing with 58 additions and 0 deletions.
  1. +3 −0 Changes
  2. +5 −0 FT2/Makefile.PL
  3. +5 −0 GIF/Makefile.PL
  4. +5 −0 JPEG/Makefile.PL
  5. +20 −0 Makefile.PL
  6. +5 −0 PNG/Makefile.PL
  7. +5 −0 T1/Makefile.PL
  8. +5 −0 TIFF/Makefile.PL
  9. +5 −0 W32/Makefile.PL
View
3 Changes
@@ -21,6 +21,9 @@ Bug fixes:
- add an (unshipped) test to check Imager's internal POD links
https://rt.cpan.org/Ticket/Display.html?id=65749
+ - improve the library detection summary
+ https://rt.cpan.org/Ticket/Display.html?id=9675
+
Imager 0.81 - 14 Feb 2011
===========
View
5 FT2/Makefile.PL
@@ -13,6 +13,7 @@ GetOptions("incpath=s", \@incpaths,
"verbose|v" => \$verbose);
our $BUILDING_IMAGER;
+our %IMAGER_LIBS;
my $MM_ver = eval $ExtUtils::MakeMaker::VERSION;
@@ -95,6 +96,8 @@ my %probe =
my $probe_res = Imager::Probe->probe(\%probe);
if ($probe_res) {
+ $IMAGER_LIBS{FT2} = 1;
+
push @inc, $probe_res->{INC};
$opts{LIBS} = $probe_res->{LIBS};
$opts{DEFINE} = $probe_res->{DEFINE};
@@ -110,6 +113,8 @@ if ($probe_res) {
WriteMakefile(%opts);
}
else {
+ $IMAGER_LIBS{FT2} = 0;
+
if ($BUILDING_IMAGER) {
ExtUtils::MakeMaker::WriteEmptyMakefile(%opts);
}
View
5 GIF/Makefile.PL
@@ -13,6 +13,7 @@ GetOptions("incpath=s", \@incpaths,
"verbose|v" => \$verbose);
our $BUILDING_IMAGER;
+our %IMAGER_LIBS;
my $MM_ver = eval $ExtUtils::MakeMaker::VERSION;
@@ -83,6 +84,8 @@ my %probe =
my $probe_res = Imager::Probe->probe(\%probe);
if ($probe_res) {
+ $IMAGER_LIBS{GIF} = 1;
+
push @inc, $probe_res->{INC};
$opts{LIBS} = $probe_res->{LIBS};
$opts{DEFINE} = $probe_res->{DEFINE};
@@ -96,6 +99,8 @@ if ($probe_res) {
WriteMakefile(%opts);
}
else {
+ $IMAGER_LIBS{GIF} = 0;
+
if ($BUILDING_IMAGER) {
ExtUtils::MakeMaker::WriteEmptyMakefile(%opts);
}
View
5 JPEG/Makefile.PL
@@ -13,6 +13,7 @@ GetOptions("incpath=s", \@incpaths,
"verbose|v" => \$verbose);
our $BUILDING_IMAGER;
+our %IMAGER_LIBS;
my $MM_ver = eval $ExtUtils::MakeMaker::VERSION;
@@ -83,6 +84,8 @@ my %probe =
my $probe_res = Imager::Probe->probe(\%probe);
if ($probe_res) {
+ $IMAGER_LIBS{JPEG} = 1;
+
push @inc, $probe_res->{INC};
$opts{LIBS} = $probe_res->{LIBS};
$opts{DEFINE} = $probe_res->{DEFINE};
@@ -96,6 +99,8 @@ if ($probe_res) {
WriteMakefile(%opts);
}
else {
+ $IMAGER_LIBS{JPEG} = 0;
+
if ($BUILDING_IMAGER) {
ExtUtils::MakeMaker::WriteEmptyMakefile(%opts);
}
View
20 Makefile.PL
@@ -15,6 +15,9 @@ use Devel::CheckLib;
# see this
our $BUILDING_IMAGER = 1;
+# used to display a summary after we've probed the world
+our %IMAGER_LIBS;
+
#
# IM_INCPATH colon seperated list of paths to extra include paths
# IM_LIBPATH colon seperated list of paths to extra library paths
@@ -241,6 +244,23 @@ mkdir('testout',0777); # since we cannot include it in the archive.
WriteMakefile(%opts);
+my @good;
+my @bad;
+for my $name (sort { lc $a cmp lc $b } keys %IMAGER_LIBS) {
+ if ($IMAGER_LIBS{$name}) {
+ push @good, $name;
+ }
+ else {
+ push @bad, $name;
+ }
+}
+
+print "\n";
+print "Libraries found:\n" if @good;
+print " $_\n" for @good;
+print "Libraries *not* found:\n" if @bad;
+print " $_\n" for @bad;
+
exit;
View
5 PNG/Makefile.PL
@@ -13,6 +13,7 @@ GetOptions("incpath=s", \@incpaths,
"verbose|v" => \$verbose);
our $BUILDING_IMAGER;
+our %IMAGER_LIBS;
my $MM_ver = eval $ExtUtils::MakeMaker::VERSION;
@@ -103,6 +104,8 @@ my %probe =
my $probe_res = Imager::Probe->probe(\%probe);
if ($probe_res) {
+ $IMAGER_LIBS{PNG} = 1;
+
push @inc, $probe_res->{INC};
$opts{LIBS} = $probe_res->{LIBS};
$opts{DEFINE} = $probe_res->{DEFINE};
@@ -116,6 +119,8 @@ if ($probe_res) {
WriteMakefile(%opts);
}
else {
+ $IMAGER_LIBS{PNG} = 0;
+
if ($BUILDING_IMAGER) {
ExtUtils::MakeMaker::WriteEmptyMakefile(%opts);
}
View
5 T1/Makefile.PL
@@ -13,6 +13,7 @@ GetOptions("incpath=s", \@incpaths,
"verbose|v" => \$verbose);
our $BUILDING_IMAGER;
+our %IMAGER_LIBS;
my $MM_ver = eval $ExtUtils::MakeMaker::VERSION;
@@ -84,6 +85,8 @@ my %probe =
my $probe_res = Imager::Probe->probe(\%probe);
if ($probe_res) {
+ $IMAGER_LIBS{T1} = 1;
+
push @inc, $probe_res->{INC};
$opts{LIBS} = $probe_res->{LIBS};
$opts{DEFINE} = $probe_res->{DEFINE};
@@ -97,6 +100,8 @@ if ($probe_res) {
WriteMakefile(%opts);
}
else {
+ $IMAGER_LIBS{T1} = 0;
+
if ($BUILDING_IMAGER) {
ExtUtils::MakeMaker::WriteEmptyMakefile(%opts);
}
View
5 TIFF/Makefile.PL
@@ -13,6 +13,7 @@ GetOptions("incpath=s", \@incpaths,
"verbose|v" => \$verbose);
our $BUILDING_IMAGER;
+our %IMAGER_LIBS;
my $MM_ver = eval $ExtUtils::MakeMaker::VERSION;
@@ -83,6 +84,8 @@ my %probe =
my $probe_res = Imager::Probe->probe(\%probe);
if ($probe_res) {
+ $IMAGER_LIBS{TIFF} = 1;
+
push @inc, $probe_res->{INC};
$opts{LIBS} = $probe_res->{LIBS};
$opts{DEFINE} = $probe_res->{DEFINE};
@@ -96,6 +99,8 @@ if ($probe_res) {
WriteMakefile(%opts);
}
else {
+ $IMAGER_LIBS{TIFF} = 0;
+
if ($BUILDING_IMAGER) {
ExtUtils::MakeMaker::WriteEmptyMakefile(%opts);
}
View
5 W32/Makefile.PL
@@ -13,6 +13,7 @@ GetOptions("incpath=s", \@incpaths,
"verbose|v" => \$verbose);
our $BUILDING_IMAGER;
+our %IMAGER_LIBS;
my $MM_ver = eval $ExtUtils::MakeMaker::VERSION;
@@ -83,6 +84,8 @@ my %probe =
my $probe_res = Imager::Probe->probe(\%probe);
if ($probe_res) {
+ $IMAGER_LIBS{Win32} = 1;
+
push @inc, $probe_res->{INC};
$opts{LIBS} = $probe_res->{LIBS};
$opts{DEFINE} = $probe_res->{DEFINE};
@@ -96,6 +99,8 @@ if ($probe_res) {
WriteMakefile(%opts);
}
else {
+ $IMAGER_LIBS{Win32} = 0;
+
if ($BUILDING_IMAGER) {
ExtUtils::MakeMaker::WriteEmptyMakefile(%opts);
}

0 comments on commit d97c8db

Please sign in to comment.
Something went wrong with that request. Please try again.