aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Hagander <magnus@hagander.net>2007-04-26 10:36:47 +0000
committerMagnus Hagander <magnus@hagander.net>2007-04-26 10:36:47 +0000
commit2d7f4f2220f1f1feebd61b07be3c2063f67fb571 (patch)
tree95643d7dedc8f538162f8b348791e3a79ac109b4
parent85904e0d3618f5ec5f24ac0f316938faf7e0676c (diff)
downloadpostgresql-2d7f4f2220f1f1feebd61b07be3c2063f67fb571.tar.gz
postgresql-2d7f4f2220f1f1feebd61b07be3c2063f67fb571.zip
Generate "fake configure output" for pg_config, so that external builds
like Slony can figure out which options were enabled in the build.
-rw-r--r--src/tools/msvc/Solution.pm24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm
index 12a2bf0ef19..cd65cb3b455 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;