#!perl -w
use strict;
-use ExtUtils::MakeMaker qw(WriteMakefile WriteEmptyMakefile);
+use ExtUtils::MakeMaker;
use Getopt::Long;
use Config;
"verbose|v" => \$verbose);
our $BUILDING_IMAGER;
+our %IMAGER_LIBS;
my $MM_ver = eval $ExtUtils::MakeMaker::VERSION;
+my $define = "";
+my $fp_rep = unpack("H*", pack("f<", 1.25));
+if ($fp_rep eq "0000a03f") {
+ $define = "-DIEEEFP_TYPES";
+}
+
my %opts =
(
NAME => 'Imager::File::TIFF',
VERSION_FROM => 'TIFF.pm',
OBJECT => 'TIFF.o imtiff.o',
+ DEFINE => $define,
+ clean => { FILES => 'testout' },
);
my @inc;
$opts{TYPEMAPS} = [ Imager::ExtUtils->typemap ];
# Imager required configure through use
- my @Imager_req = ( Imager => "0.77" );
+ my @Imager_req = ( Imager => "0.94" );
if ($MM_ver >= 6.46) {
$opts{META_MERGE} =
{
resources =>
{
homepage => "http://imager.perl.org/",
- repository =>
- {
- url => "http://imager.perl.org/svn/trunk/Imager-File-TIFF",
- web => "http://imager.perl.org/svnweb/public/browse/trunk/Imager-File-TIFF",
- type => "svn",
- },
+ repository => "git://git.imager.perl.org/imager.git",
+ bugtracker => "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Imager",
},
};
$opts{PREREQ_PM} =
{
@Imager_req,
+ XSLoader => 0,
};
}
}
libbase => "tiff",
testcode => _tiff_test_code(),
testcodeheaders => [ "tiffio.h", "stdio.h", "string.h" ],
- incpath => join($Config{path_sep}, @incpaths),
- libpath => join($Config{path_sep}, @libpaths),
+ incpath => \@incpaths,
+ libpath => \@libpaths,
+ verbose => $verbose,
);
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}";
$opts{INC} = "@inc";
if ($MM_ver > 6.06) {
- $opts{AUTHOR} = 'Tony Cook <tony@imager.perl.org>';
+ $opts{AUTHOR} = 'Tony Cook <tonyc@cpan.org>';
$opts{ABSTRACT} = 'TIFF image file support for Imager';
}
WriteMakefile(%opts);
}
else {
+ $IMAGER_LIBS{TIFF} = 0;
+
if ($BUILDING_IMAGER) {
- WriteEmptyMakefile(%opts);
+ ExtUtils::MakeMaker::WriteEmptyMakefile(%opts);
}
else {
# fail in good way