1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +03:00

More MSVC build fixes:

* New versions of OpenSSL come with proper debug versions, and use
suffixed names on the LIBs for that. Adapts library handling to deal
with that.

* Fixes error where it incorrectly enabled Kerberos based on NLS
configuration instead of Kerberos configuration

* Specifies path of perl in config, instead of using current one.
Required when using a 64-bit perl normally, but want to build pl/perl
against 32-bit one (required)

* Fix so pgevent generates win32ver.rc automatically

Magnus Hagander
This commit is contained in:
Tom Lane
2006-11-20 19:18:02 +00:00
parent e2b1dbd394
commit aaef29b377
4 changed files with 30 additions and 16 deletions

View File

@ -18,7 +18,8 @@ sub new {
guid => Win32::GuidGen(),
files => {},
references => [],
libraries => '',
libraries => [],
suffixlib => [],
includes => '',
defines => ';',
solution => $solution,
@ -86,12 +87,12 @@ sub AddReference {
}
sub AddLibrary {
my ($self, $lib) = @_;
my ($self, $lib, $dbgsuffix) = @_;
if ($self->{libraries} ne '') {
$self->{libraries} .= ' ';
push @{$self->{libraries}}, $lib;
if ($dbgsuffix) {
push @{$self->{suffixlib}}, $lib;
}
$self->{libraries} .= $lib;
}
sub AddIncludeDir {
@ -351,7 +352,19 @@ sub WriteConfiguration
{
my ($self, $f, $cfgname, $p) = @_;
my $cfgtype = ($self->{type} eq "exe")?1:($self->{type} eq "dll"?2:4);
my $libs = $self->{libraries};
my $libcfg = (uc $cfgname eq "RELEASE")?"MD":"MDd";
my $libs = '';
foreach my $lib (@{$self->{libraries}}) {
my $xlib = $lib;
foreach my $slib (@{$self->{suffixlib}}) {
if ($slib eq $lib) {
$xlib =~ s/\.lib$/$libcfg.lib/;
last;
}
}
$libs .= $xlib . " ";
}
$libs =~ s/ $//;
$libs =~ s/__CFGNAME__/$cfgname/g;
print $f <<EOF;
<Configuration Name="$cfgname|Win32" OutputDirectory=".\\$cfgname\\$self->{name}" IntermediateDirectory=".\\$cfgname\\$self->{name}"