summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Hagander2008-02-28 12:18:03 +0000
committerMagnus Hagander2008-02-28 12:18:03 +0000
commit61a066fc025a115e9775b06881401eeb3869f687 (patch)
treedc91b740596b1a9f2572d725b16b665505610afb
parentb73c2722351469812e7f178b89a6d4eb2c4e8549 (diff)
Support for building contrib/uuid-ossp with MSVC.
Original patch from Hiroshi Saito, modified by me.
-rw-r--r--doc/src/sgml/install-win32.sgml9
-rw-r--r--src/tools/msvc/Install.pm2
-rw-r--r--src/tools/msvc/Mkvcbuild.pm12
-rw-r--r--src/tools/msvc/Solution.pm5
-rw-r--r--src/tools/msvc/config.pl1
5 files changed, 27 insertions, 2 deletions
diff --git a/doc/src/sgml/install-win32.sgml b/doc/src/sgml/install-win32.sgml
index a72f77af3d..f88f184c05 100644
--- a/doc/src/sgml/install-win32.sgml
+++ b/doc/src/sgml/install-win32.sgml
@@ -161,6 +161,15 @@
</varlistentry>
<varlistentry>
+ <term><productname>ossp-uuid</productname></term>
+ <listitem><para>
+ Required for UUID-OSSP support (contrib only). Source can be
+ downloaded from
+ <ulink url="http://www.ossp.org/pkg/lib/uuid/"></>.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><productname>Python</productname></term>
<listitem><para>
Required for building <application>PL/Python</application>. Binaries can
diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm
index 4005d61bdf..4f7faae849 100644
--- a/src/tools/msvc/Install.pm
+++ b/src/tools/msvc/Install.pm
@@ -291,7 +291,7 @@ sub CopyContribFiles
{
next if ($d =~ /^\./);
next unless (-f "contrib/$d/Makefile");
- next if ($d eq "uuid-ossp");
+ next if ($d eq "uuid-ossp"&& !defined($config->{uuid}));
next if ($d eq "sslinfo" && !defined($config->{openssl}));
next if ($d eq "xml2" && !defined($config->{xml}));
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index 4e8795c79e..0c1aeb3cc9 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -31,7 +31,7 @@ my $contrib_extrasource = {
'cube' => ['cubescan.l','cubeparse.y'],
'seg' => ['segscan.l','segparse.y']
};
-my @contrib_excludes = ('pgcrypto','uuid-ossp');
+my @contrib_excludes = ('pgcrypto');
sub mkvcbuild
{
@@ -247,6 +247,16 @@ sub mkvcbuild
push @contrib_excludes,'sslinfo';
}
+ if ($solution->{options}->{uuid})
+ {
+ $contrib_extraincludes->{'uuid-ossp'} = [ $solution->{options}->{uuid} . '\include' ];
+ $contrib_extralibs->{'uuid-ossp'} = [ $solution->{options}->{uuid} . '\lib\uuid.lib' ];
+ }
+ else
+ {
+ push @contrib_excludes,'uuid-ossp';
+ }
+
# Pgcrypto makefile too complex to parse....
my $pgcrypto = $solution->AddProject('pgcrypto','dll','crypto');
$pgcrypto->AddFiles(
diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm
index 57a3a32a35..3fc32356ff 100644
--- a/src/tools/msvc/Solution.pm
+++ b/src/tools/msvc/Solution.pm
@@ -113,6 +113,10 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
print O "#define USE_SSL 1\n" if ($self->{options}->{openssl});
print O "#define ENABLE_NLS 1\n" if ($self->{options}->{nls});
+ if ($self->{options}->{uuid})
+ {
+ print O "#define HAVE_UUID_H\n";
+ }
if ($self->{options}->{xml})
{
print O "#define HAVE_LIBXML2\n";
@@ -451,6 +455,7 @@ sub GetFakeConfigure
$cfg .= ' --with-ldap' if ($self->{options}->{ldap});
$cfg .= ' --without-zlib' unless ($self->{options}->{zlib});
$cfg .= ' --with-openssl' if ($self->{options}->{ssl});
+ $cfg .= ' --with-ossp-uuid' if ($self->{options}->{uuid});
$cfg .= ' --with-libxml' if ($self->{options}->{xml});
$cfg .= ' --with-libxslt' if ($self->{options}->{xslt});
$cfg .= ' --with-krb5' if ($self->{options}->{krb5});
diff --git a/src/tools/msvc/config.pl b/src/tools/msvc/config.pl
index 548485a074..52e64ef609 100644
--- a/src/tools/msvc/config.pl
+++ b/src/tools/msvc/config.pl
@@ -12,6 +12,7 @@ our $config = {
krb5=>'c:\prog\pgsql\depend\krb5', # --with-krb5=<path>
ldap=>1, # --with-ldap
openssl=>'c:\openssl', # --with-ssl=<path>
+ uuid=>'c:\prog\pgsql\depend\ossp-uuid', #--with-ossp-uuid
xml=>'c:\prog\pgsql\depend\libxml2',
xslt=>'c:\prog\pgsql\depend\libxslt',
iconv=>'c:\prog\pgsql\depend\iconv',