]> git.imager.perl.org - imager.git/commitdiff
portability to Windows/VC++
authorTony Cook <tony@develop=help.com>
Tue, 1 Sep 2009 13:28:31 +0000 (13:28 +0000)
committerTony Cook <tony@develop=help.com>
Tue, 1 Sep 2009 13:28:31 +0000 (13:28 +0000)
Makefile.PL
inc/Devel/CheckLib.pm

index 843ef6a250ecf679273373300244a0ed0075b45c..22f9ae9b95739665210ac4a45e10aa190241f366 100644 (file)
@@ -1003,6 +1003,14 @@ sub postcheck_tiff {
 
   my $tiffver_name = "probe/tiffver.txt";
 
+  my $lib;
+  if ($Config{cc} =~ /\b(cl|bcc)\b/) {
+    $lib = "libtiff";
+  }
+  else {
+    $lib = "tiff";
+  }
+
   my $good =
     eval {
       assert_lib
@@ -1010,7 +1018,7 @@ sub postcheck_tiff {
         debug => $VERBOSE,
         incpath => $format->{incdir},
         libpath => $format->{libdir},
-        lib => "tiff",
+        lib => $lib,
         header => [ qw(stdio.h tiffio.h) ],
         function => <<FUNCTION,
   {
index 674b4f955da3ef593354d78e06ef7db70b895642..5d6ec52df66cda96a68025871bf413f3d5b50171 100644 (file)
@@ -266,9 +266,9 @@ sub assert_lib {
                 $cfile,
                 "${lib}.lib",
                 "/Fe$exefile", 
+                (map { '/I'.Win32::GetShortPathName($_) } @incpaths),
                 "/link",
                 (map {'/libpath:'.Win32::GetShortPathName($_)} @libpaths),
-                (map { '/I'.Win32::GetShortPathName($_) } @incpaths)
             );
         } elsif($Config{cc} eq 'CC/DECC') {          # VMS
         } elsif($Config{cc} =~ /bcc32(\.exe)?/) {    # Borland