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 843ef6a..22f9ae9 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 674b4f9..5d6ec52 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