Support for building contrib/uuid-ossp with MSVC.
authorMagnus Hagander <magnus@hagander.net>
Thu, 28 Feb 2008 12:18:03 +0000 (12:18 +0000)
committerMagnus Hagander <magnus@hagander.net>
Thu, 28 Feb 2008 12:18:03 +0000 (12:18 +0000)
Original patch from Hiroshi Saito, modified by me.

doc/src/sgml/install-win32.sgml
src/tools/msvc/Install.pm
src/tools/msvc/Mkvcbuild.pm
src/tools/msvc/Solution.pm
src/tools/msvc/config.pl

index a72f77af3d62d09fe640fa12f766ef26f66f78e0..f88f184c056cedf40d45583705aa818e872bffcd 100644 (file)
      </para></listitem>
     </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>
index 4005d61bdf5e3fa822d985840af46a6e105a46e6..4f7faae849d04566c1360a389c00b1cdc0ed8740 100644 (file)
@@ -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}));
 
index 4e8795c79eaa5656fd510e214d20379781af37aa..0c1aeb3cc96adde7722e9dc73ff4821fde5fb3f6 100644 (file)
@@ -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(
index 1adc982a7199afbafd67171cd93b5d76a70a3e4d..21d81d6f58be53e2f409d53bc605dc99269796dd 100644 (file)
@@ -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";
@@ -450,6 +454,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});
index 548485a0746ad50b2e6c22ce13e081e9cea7f2fd..52e64ef60927412eb854c95f8675c005f968d553 100644 (file)
@@ -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',