Skip to content

Commit 2d7f4f2

Browse files
committed
Generate "fake configure output" for pg_config, so that external builds
like Slony can figure out which options were enabled in the build.
1 parent 85904e0 commit 2d7f4f2

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

src/tools/msvc/Solution.pm

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package Solution;
33
#
44
# Package that encapsulates a Visual C++ solution file generation
55
#
6-
# $PostgreSQL: pgsql/src/tools/msvc/Solution.pm,v 1.22 2007/04/16 18:39:19 mha Exp $
6+
# $PostgreSQL: pgsql/src/tools/msvc/Solution.pm,v 1.23 2007/04/26 10:36:47 mha Exp $
77
#
88
use Carp;
99
use strict;
@@ -125,6 +125,7 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
125125
print O "#define HAVE_KRB5_TICKET_ENC_PART2 1\n";
126126
print O "#define PG_KRB_SRVNAM \"postgres\"\n";
127127
}
128+
print O "#define VAL_CONFIGURE \"" . $self->GetFakeConfigure() . "\"\n";
128129
print O "#endif /* IGNORE_CONFIGURED_SETTINGS */\n";
129130
close(O);
130131
close(I);
@@ -417,4 +418,25 @@ EOF
417418
close(SLN);
418419
}
419420

421+
sub GetFakeConfigure
422+
{
423+
my $self = shift;
424+
425+
my $cfg = '--enable-thread-safety';
426+
$cfg .= ' --enable-cassert' if ($self->{options}->{asserts});
427+
$cfg .= ' --enable-integer-datetimes' if ($self->{options}->{integer_datetimes});
428+
$cfg .= ' --enable-nls' if ($self->{options}->{nls});
429+
$cfg .= ' --with-ldap' if ($self->{options}->{ldap});
430+
$cfg .= ' --without-zlib' unless ($self->{options}->{zlib});
431+
$cfg .= ' --with-openssl' if ($self->{options}->{ssl});
432+
$cfg .= ' --with-libxml' if ($self->{options}->{xml});
433+
$cfg .= ' --with-libxslt' if ($self->{options}->{xslt});
434+
$cfg .= ' --with-krb5' if ($self->{options}->{krb5});
435+
$cfg .= ' --with-tcl' if ($self->{options}->{tcl});
436+
$cfg .= ' --with-perl' if ($self->{options}->{perl});
437+
$cfg .= ' --with-python' if ($self->{options}->{python});
438+
439+
return $cfg;
440+
}
441+
420442
1;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy