]> git.imager.perl.org - imager.git/blobdiff - TIFF/Makefile.PL
[rt #74540] handle the TIFF SampleFormat tag
[imager.git] / TIFF / Makefile.PL
index e6edcefe343f3a92ee66dff830e3d374238d7978..c8a8c38521a899ba93e1ac2001b3307ed3f2d7b1 100644 (file)
@@ -1,6 +1,6 @@
 #!perl -w
 use strict;
-use ExtUtils::MakeMaker qw(WriteMakefile WriteEmptyMakefile);
+use ExtUtils::MakeMaker;
 use Getopt::Long;
 use Config;
 
@@ -13,14 +13,23 @@ GetOptions("incpath=s", \@incpaths,
            "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;
@@ -36,7 +45,7 @@ else {
   $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} =
       {
@@ -52,17 +61,14 @@ else {
        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,
       };
   }
 }
@@ -76,27 +82,32 @@ my %probe =
    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