comparison lib-src/make-mswin-unicode.pl @ 4558:d9fcb5442c95

Automated merge with file:/Sources/xemacs-21.5-checked-out
author Aidan Kehoe <kehoea@parhasard.net>
date Wed, 21 May 2008 21:47:42 +0200
parents 23ef20edf6ba
children 50861fea97f6
comparison
equal deleted inserted replaced
4557:790bd95b84c1 4558:d9fcb5442c95
102 my ($cout, $hout, $dir) = ($options{"c-output"}, 102 my ($cout, $hout, $dir) = ($options{"c-output"},
103 $options{"h-output"}, 103 $options{"h-output"},
104 $options{"includedir"}); 104 $options{"includedir"});
105 if (!$dir) 105 if (!$dir)
106 { 106 {
107 $dir=$ENV{"MSVCDIR"} or die "Environment variable MSVCDIR undefined - run vcvars32.bat from your MSVC installation"; 107 for my $sdkroot (("WindowsSdkDir", "MSSdk", "MSVCDIR"))
108 {
109 if (defined $ENV{$sdkroot}) {
110 $dir = $ENV{$sdkroot};
111 last;
112 }
113 }
114 unless (defined $dir)
115 {
116 die "Can't find the Windows SDK headers; run vcvars32.bat from your MSVC installation, or setenv.cmd from the Platform SDK installation";
117 }
108 $dir.='/include'; 118 $dir.='/include';
109 } 119 }
110 die "Can't find MSVC include files in \"$dir\"" unless ((-f $dir.'/WINDOWS.H') || (-f $dir.'/windows.h')); 120 die "Can't find MSVC include files in \"$dir\"" unless ((-f $dir.'/WINDOWS.H') || (-f $dir.'/windows.h'));
111 121
112 open (COUT, ">$cout") or die "Can't open C output file $cout: $!"; 122 open (COUT, ">$cout") or die "Can't open C output file $cout: $!";