The MSVC installer doesn't install the headers in the same directory structure as the Mingw build. This causes other apps (such as Slony) to fail their configure tests.

The attached patch fixes this.

Regards, Dave
Index: Install.pm
===================================================================
RCS file: /projects/cvsroot/pgsql/src/tools/msvc/Install.pm,v
retrieving revision 1.12
diff -c -r1.12 Install.pm
*** Install.pm  23 Apr 2007 17:18:58 -0000      1.12
--- Install.pm  25 Apr 2007 13:49:14 -0000
***************
*** 299,307 ****
  {
      my $target = shift;
  
!     EnsureDirectories($target, 'include', 'include/libpq', 
'include/postgresql',
!         'include/postgresql/internal', 'include/postgresql/internal/libpq',
!         'include/postgresql/server');
  
      CopyFiles(
          'Public headers',
--- 299,307 ----
  {
      my $target = shift;
  
!     EnsureDirectories($target, 'include', 'include/libpq',
!         'include/internal', 'include/internal/libpq',
!         'include/server');
  
      CopyFiles(
          'Public headers',
***************
*** 314,337 ****
      CopyFiles('Libpq headers', $target . '/include/', 
'src/interfaces/libpq/', 'libpq-fe.h');
      CopyFiles(
          'Libpq internal headers',
!         $target .'/include/postgresql/internal/',
          'src/interfaces/libpq/', 'libpq-int.h', 'pqexpbuffer.h'
      );
  
      CopyFiles(
          'Internal headers',
!         $target . '/include/postgresql/internal/',
          'src/include/', 'c.h', 'port.h', 'postgres_fe.h'
      );
!     copy('src/include/libpq/pqcomm.h', $target . 
'/include/postgresql/internal/libpq/')
        || croak 'Could not copy pqcomm.h';
  
      CopyFiles(
          'Server headers',
!         $target . '/include/postgresql/server/',
          'src/include/', 'pg_config.h', 'pg_config_os.h'
      );
!     CopySetOfFiles('', "src\\include\\*.h", $target . 
'/include/postgresql/server/', 1, 1);
      my $D;
      opendir($D, 'src/include') || croak "Could not opendir on src/include!\n";
  
--- 314,337 ----
      CopyFiles('Libpq headers', $target . '/include/', 
'src/interfaces/libpq/', 'libpq-fe.h');
      CopyFiles(
          'Libpq internal headers',
!         $target .'/include/internal/',
          'src/interfaces/libpq/', 'libpq-int.h', 'pqexpbuffer.h'
      );
  
      CopyFiles(
          'Internal headers',
!         $target . '/include/internal/',
          'src/include/', 'c.h', 'port.h', 'postgres_fe.h'
      );
!     copy('src/include/libpq/pqcomm.h', $target . '/include/internal/libpq/')
        || croak 'Could not copy pqcomm.h';
  
      CopyFiles(
          'Server headers',
!         $target . '/include/server/',
          'src/include/', 'pg_config.h', 'pg_config_os.h'
      );
!     CopySetOfFiles('', "src\\include\\*.h", $target . '/include/server/', 1, 
1);
      my $D;
      opendir($D, 'src/include') || croak "Could not opendir on src/include!\n";
  
***************
*** 341,349 ****
          next if ($d eq 'CVS');
          next unless (-d 'src/include/' . $d);
  
!         EnsureDirectories($target . '/include/postgresql/server', $d);
          system(
!             "xcopy /s /i /q /r /y src\\include\\$d\\*.h 
\"$target\\include\\postgresql\\server\\$d\\\"")
            && croak("Failed to copy include directory $d\n");
      }
      closedir($D);
--- 341,349 ----
          next if ($d eq 'CVS');
          next unless (-d 'src/include/' . $d);
  
!         EnsureDirectories($target . '/include/server', $d);
          system(
!             "xcopy /s /i /q /r /y src\\include\\$d\\*.h 
\"$target\\include\\server\\$d\\\"")
            && croak("Failed to copy include directory $d\n");
      }
      closedir($D);
***************
*** 358,367 ****
          'ecpg_config.h', split /\s+/,$1
      );
      $mf =~ /^informix_headers\s*=\s*(.*)$/m || croak "Could not find 
informix_headers line\n";
!     EnsureDirectories($target . '/include/postgresql', 'informix', 
'informix/esql');
      CopyFiles(
          'ECPG informix headers',
!         $target .'/include/postgresql/informix/esql/',
          'src/interfaces/ecpg/include/',
          split /\s+/,$1
      );
--- 358,367 ----
          'ecpg_config.h', split /\s+/,$1
      );
      $mf =~ /^informix_headers\s*=\s*(.*)$/m || croak "Could not find 
informix_headers line\n";
!     EnsureDirectories($target . '/include', 'informix', 'informix/esql');
      CopyFiles(
          'ECPG informix headers',
!         $target .'/include/informix/esql/',
          'src/interfaces/ecpg/include/',
          split /\s+/,$1
      );
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to