diff lib-src/make-mswin-unicode.pl @ 4467:23ef20edf6ba

Check %WindowsSdkDir%, %MSSddk% for the Windows header files too. 2008-05-21 Aidan Kehoe <kehoea@parhasard.net> * make-mswin-unicode.pl: Check %WindowsSdkDir%, %MSSddk% for the Windows header files too.
author Aidan Kehoe <kehoea@parhasard.net>
date Wed, 21 May 2008 21:09:20 +0200
parents 6765f2581182
children 50861fea97f6
line wrap: on
line diff
--- a/lib-src/make-mswin-unicode.pl	Wed May 21 21:07:26 2008 +0200
+++ b/lib-src/make-mswin-unicode.pl	Wed May 21 21:09:20 2008 +0200
@@ -104,7 +104,17 @@
                           $options{"includedir"});
 if (!$dir)
   {
-    $dir=$ENV{"MSVCDIR"} or die "Environment variable MSVCDIR undefined - run vcvars32.bat from your MSVC installation";
+    for my $sdkroot (("WindowsSdkDir", "MSSdk", "MSVCDIR"))
+      {
+        if (defined $ENV{$sdkroot}) {
+          $dir = $ENV{$sdkroot};
+          last;
+        }
+      }
+    unless (defined $dir)
+      {
+        die "Can't find the Windows SDK headers; run vcvars32.bat from your MSVC installation, or setenv.cmd from the Platform SDK installation";
+      }
     $dir.='/include';
   }
 die "Can't find MSVC include files in \"$dir\"" unless ((-f $dir.'/WINDOWS.H') || (-f $dir.'/windows.h'));