Commit 2d7f4f22 authored by Magnus Hagander's avatar Magnus Hagander

Generate "fake configure output" for pg_config, so that external builds

like Slony can figure out which options were enabled in the build.
parent 85904e0d
...@@ -3,7 +3,7 @@ package Solution; ...@@ -3,7 +3,7 @@ package Solution;
# #
# Package that encapsulates a Visual C++ solution file generation # Package that encapsulates a Visual C++ solution file generation
# #
# $PostgreSQL: pgsql/src/tools/msvc/Solution.pm,v 1.22 2007/04/16 18:39:19 mha Exp $ # $PostgreSQL: pgsql/src/tools/msvc/Solution.pm,v 1.23 2007/04/26 10:36:47 mha Exp $
# #
use Carp; use Carp;
use strict; use strict;
...@@ -125,6 +125,7 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY ...@@ -125,6 +125,7 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
print O "#define HAVE_KRB5_TICKET_ENC_PART2 1\n"; print O "#define HAVE_KRB5_TICKET_ENC_PART2 1\n";
print O "#define PG_KRB_SRVNAM \"postgres\"\n"; print O "#define PG_KRB_SRVNAM \"postgres\"\n";
} }
print O "#define VAL_CONFIGURE \"" . $self->GetFakeConfigure() . "\"\n";
print O "#endif /* IGNORE_CONFIGURED_SETTINGS */\n"; print O "#endif /* IGNORE_CONFIGURED_SETTINGS */\n";
close(O); close(O);
close(I); close(I);
...@@ -417,4 +418,25 @@ EOF ...@@ -417,4 +418,25 @@ EOF
close(SLN); close(SLN);
} }
sub GetFakeConfigure
{
my $self = shift;
my $cfg = '--enable-thread-safety';
$cfg .= ' --enable-cassert' if ($self->{options}->{asserts});
$cfg .= ' --enable-integer-datetimes' if ($self->{options}->{integer_datetimes});
$cfg .= ' --enable-nls' if ($self->{options}->{nls});
$cfg .= ' --with-ldap' if ($self->{options}->{ldap});
$cfg .= ' --without-zlib' unless ($self->{options}->{zlib});
$cfg .= ' --with-openssl' if ($self->{options}->{ssl});
$cfg .= ' --with-libxml' if ($self->{options}->{xml});
$cfg .= ' --with-libxslt' if ($self->{options}->{xslt});
$cfg .= ' --with-krb5' if ($self->{options}->{krb5});
$cfg .= ' --with-tcl' if ($self->{options}->{tcl});
$cfg .= ' --with-perl' if ($self->{options}->{perl});
$cfg .= ' --with-python' if ($self->{options}->{python});
return $cfg;
}
1; 1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment