Commit b13635ce authored by Magnus Hagander's avatar Magnus Hagander

Support for building contrib/uuid-ossp with MSVC.

Original patch from Hiroshi Saito, modified by me.
parent b8eef283
<!-- $PostgreSQL: pgsql/doc/src/sgml/install-win32.sgml,v 1.45 2008/02/06 15:13:25 mha Exp $ --> <!-- $PostgreSQL: pgsql/doc/src/sgml/install-win32.sgml,v 1.46 2008/02/28 12:17:59 mha Exp $ -->
<chapter id="install-win32"> <chapter id="install-win32">
<title>Installation on <productname>Windows</productname></title> <title>Installation on <productname>Windows</productname></title>
...@@ -160,6 +160,15 @@ ...@@ -160,6 +160,15 @@
</para></listitem> </para></listitem>
</varlistentry> </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> <varlistentry>
<term><productname>Python</productname></term> <term><productname>Python</productname></term>
<listitem><para> <listitem><para>
......
...@@ -3,7 +3,7 @@ package Install; ...@@ -3,7 +3,7 @@ package Install;
# #
# Package that provides 'make install' functionality for msvc builds # Package that provides 'make install' functionality for msvc builds
# #
# $PostgreSQL: pgsql/src/tools/msvc/Install.pm,v 1.28 2008/02/07 17:58:16 mha Exp $ # $PostgreSQL: pgsql/src/tools/msvc/Install.pm,v 1.29 2008/02/28 12:17:59 mha Exp $
# #
use strict; use strict;
use warnings; use warnings;
...@@ -291,7 +291,7 @@ sub CopyContribFiles ...@@ -291,7 +291,7 @@ sub CopyContribFiles
{ {
next if ($d =~ /^\./); next if ($d =~ /^\./);
next unless (-f "contrib/$d/Makefile"); 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 "sslinfo" && !defined($config->{openssl}));
next if ($d eq "xml2" && !defined($config->{xml})); next if ($d eq "xml2" && !defined($config->{xml}));
......
...@@ -3,7 +3,7 @@ package Mkvcbuild; ...@@ -3,7 +3,7 @@ package Mkvcbuild;
# #
# Package that generates build files for msvc build # Package that generates build files for msvc build
# #
# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.25 2008/02/05 14:17:23 mha Exp $ # $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.26 2008/02/28 12:17:59 mha Exp $
# #
use Carp; use Carp;
use Win32; use Win32;
...@@ -31,7 +31,7 @@ my $contrib_extrasource = { ...@@ -31,7 +31,7 @@ my $contrib_extrasource = {
'cube' => ['cubescan.l','cubeparse.y'], 'cube' => ['cubescan.l','cubeparse.y'],
'seg' => ['segscan.l','segparse.y'] 'seg' => ['segscan.l','segparse.y']
}; };
my @contrib_excludes = ('pgcrypto','uuid-ossp'); my @contrib_excludes = ('pgcrypto');
sub mkvcbuild sub mkvcbuild
{ {
...@@ -247,6 +247,16 @@ sub mkvcbuild ...@@ -247,6 +247,16 @@ sub mkvcbuild
push @contrib_excludes,'sslinfo'; 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.... # Pgcrypto makefile too complex to parse....
my $pgcrypto = $solution->AddProject('pgcrypto','dll','crypto'); my $pgcrypto = $solution->AddProject('pgcrypto','dll','crypto');
$pgcrypto->AddFiles( $pgcrypto->AddFiles(
......
...@@ -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.35 2008/02/19 12:00:03 mha Exp $ # $PostgreSQL: pgsql/src/tools/msvc/Solution.pm,v 1.36 2008/02/28 12:17:59 mha Exp $
# #
use Carp; use Carp;
use strict; use strict;
...@@ -113,6 +113,10 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY ...@@ -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 USE_SSL 1\n" if ($self->{options}->{openssl});
print O "#define ENABLE_NLS 1\n" if ($self->{options}->{nls}); 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}) if ($self->{options}->{xml})
{ {
print O "#define HAVE_LIBXML2\n"; print O "#define HAVE_LIBXML2\n";
...@@ -451,6 +455,7 @@ sub GetFakeConfigure ...@@ -451,6 +455,7 @@ sub GetFakeConfigure
$cfg .= ' --with-ldap' if ($self->{options}->{ldap}); $cfg .= ' --with-ldap' if ($self->{options}->{ldap});
$cfg .= ' --without-zlib' unless ($self->{options}->{zlib}); $cfg .= ' --without-zlib' unless ($self->{options}->{zlib});
$cfg .= ' --with-openssl' if ($self->{options}->{ssl}); $cfg .= ' --with-openssl' if ($self->{options}->{ssl});
$cfg .= ' --with-ossp-uuid' if ($self->{options}->{uuid});
$cfg .= ' --with-libxml' if ($self->{options}->{xml}); $cfg .= ' --with-libxml' if ($self->{options}->{xml});
$cfg .= ' --with-libxslt' if ($self->{options}->{xslt}); $cfg .= ' --with-libxslt' if ($self->{options}->{xslt});
$cfg .= ' --with-krb5' if ($self->{options}->{krb5}); $cfg .= ' --with-krb5' if ($self->{options}->{krb5});
......
...@@ -12,6 +12,7 @@ our $config = { ...@@ -12,6 +12,7 @@ our $config = {
krb5=>'c:\prog\pgsql\depend\krb5', # --with-krb5=<path> krb5=>'c:\prog\pgsql\depend\krb5', # --with-krb5=<path>
ldap=>1, # --with-ldap ldap=>1, # --with-ldap
openssl=>'c:\openssl', # --with-ssl=<path> openssl=>'c:\openssl', # --with-ssl=<path>
uuid=>'c:\prog\pgsql\depend\ossp-uuid', #--with-ossp-uuid
xml=>'c:\prog\pgsql\depend\libxml2', xml=>'c:\prog\pgsql\depend\libxml2',
xslt=>'c:\prog\pgsql\depend\libxslt', xslt=>'c:\prog\pgsql\depend\libxslt',
iconv=>'c:\prog\pgsql\depend\iconv', iconv=>'c:\prog\pgsql\depend\iconv',
......
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