From 2d7f4f2220f1f1feebd61b07be3c2063f67fb571 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Thu, 26 Apr 2007 10:36:47 +0000 Subject: [PATCH] Generate "fake configure output" for pg_config, so that external builds like Slony can figure out which options were enabled in the build. --- src/tools/msvc/Solution.pm | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index 12a2bf0ef1..cd65cb3b45 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -3,7 +3,7 @@ package Solution; # # 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 strict; @@ -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 PG_KRB_SRVNAM \"postgres\"\n"; } + print O "#define VAL_CONFIGURE \"" . $self->GetFakeConfigure() . "\"\n"; print O "#endif /* IGNORE_CONFIGURED_SETTINGS */\n"; close(O); close(I); @@ -417,4 +418,25 @@ EOF 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; -- 2.11.0