CVS User Account cvsuser
Thu Jun 2 19:35:42 PDT 2005
Log Message:
-----------
Dave Page <dpage at vale-housing.co.uk> submitted some patches as
alternatives to the previous ones.

Post-1.1, this should be worked into the main code base.

Feature request...
<http://gborg.postgresql.org/project/slony1/bugs/bugupdate.php?1325>

Added Files:
-----------
    slony1-engine/Win32:
        README.win32_build (r1.1)
        README.win32_libpq_detection (r1.1)
        win32_build.diff (r1.1)
        win32_libpq_detection.diff (r1.1)

-------------- next part --------------
--- /dev/null
+++ Win32/win32_libpq_detection.diff
@@ -0,0 +1,27 @@
+Index: config/acx_libpq.m4
+===================================================================
+RCS file: /usr/local/cvsroot/slony1/slony1-engine/config/acx_libpq.m4,v
+retrieving revision 1.9
+diff -c -r1.9 acx_libpq.m4
+*** config/acx_libpq.m4	18 Feb 2005 00:15:56 -0000	1.9
+--- config/acx_libpq.m4	2 Jun 2005 09:30:10 -0000
+***************
+*** 145,150 ****
+--- 145,161 ----
+  
+  CPPFLAGS="$TEMP_CPPFLAGS -I$PG_INCLUDEDIR -I$PG_INCLUDESERVERDIR"
+  
++ dnl ---------------------------------------------------
++ dnl Add the port specific include directory if required
++ dnl ---------------------------------------------------
++ 
++ case "${host_os}" in
++         *mingw32*)
++         
++         CPPFLAGS="$CPPFLAGS -I$PG_INCLUDESERVERDIR/port/win32"
++         ;;
++ esac
++ 
+  AC_CHECK_HEADER(postgres.h, HAVE_LIBPQSERVER=1)
+  AC_CHECK_HEADER(utils/typcache.h, AC_DEFINE(HAVE_TYPCACHE,1,[PostgreSQL typcache]),[],[#include "postgres.h"])
+  if test -n "$HAVE_LIBPQSERVER" -a "$HAVE_TYPCACHE" != "yes"; then
--- /dev/null
+++ Win32/README.win32_libpq_detection
@@ -0,0 +1,11 @@
+The attached patch fixes configure to detect libpq on Windows boxes.
+Unfortunately it is necessary to explicitly specify the appropriate
+options on the command line (with msys/unix style paths) because
+pg_config returns semi-DOS style paths (such as
+C:/msys/1.0/local/pgsql/include) which GCC doesn't like.
+
+I haven't included an updated version of configure as I only have
+autoconf 2.59 on Windows, and wasn't sure if an update would be
+accepted. I can supply it if required though.
+
+Regards, Dave Page
--- /dev/null
+++ Win32/win32_build.diff
@@ -0,0 +1,111 @@
+Index: configure.ac
+===================================================================
+RCS file: /usr/local/cvsroot/slony1/slony1-engine/configure.ac,v
+retrieving revision 1.47
+diff -c -r1.47 configure.ac
+*** configure.ac	31 May 2005 04:37:20 -0000	1.47
+--- configure.ac	2 Jun 2005 12:02:02 -0000
+***************
+*** 37,43 ****
+      irix*) template=irix ;;
+     linux*|gnu*|k*bsd*-gnu) 
+             template=linux ;;
+!    mingw*) template=win ;;
+    netbsd*) template=netbsd ;;
+  nextstep*) template=nextstep ;;
+   openbsd*) template=openbsd ;;
+--- 37,43 ----
+      irix*) template=irix ;;
+     linux*|gnu*|k*bsd*-gnu) 
+             template=linux ;;
+!    mingw*) template=win32 ;;
+    netbsd*) template=netbsd ;;
+  nextstep*) template=nextstep ;;
+   openbsd*) template=openbsd ;;
+Index: config/libc.m4
+===================================================================
+RCS file: /usr/local/cvsroot/slony1/slony1-engine/config/libc.m4,v
+retrieving revision 1.3
+diff -c -r1.3 libc.m4
+*** config/libc.m4	2 Apr 2005 08:25:43 -0000	1.3
+--- config/libc.m4	2 Jun 2005 12:02:03 -0000
+***************
+*** 12,21 ****
+      HAVE_POSIX_SIGNALS=$slonac_cv_func_posix_signals  
+    else
+      if test x"$template" = "xwin" ; then
+!       AC_MSG_RESULT("Skipping Error on win32")
+!     else
+!       AC_MSG_RESULT("error")
+!       AC_MSG_ERROR(Slony requires a POSIX compatible signal interface.)
+      fi
+    fi
+    AC_SUBST(HAVE_POSIX_SIGNALS)]
+--- 12,24 ----
+      HAVE_POSIX_SIGNALS=$slonac_cv_func_posix_signals  
+    else
+      if test x"$template" = "xwin" ; then
+!       AC_MSG_RESULT(*** Skipping error on Cygwin ***)
+!     else 
+!       if test x"$template" = "xwin32" ; then
+!         AC_MSG_RESULT(*** Skipping error on MinGW/Msys to allow xxid/slony_funcs compilation ***)
+!       else
+!         AC_MSG_ERROR(Slony requires a POSIX compatible signal interface.)
+!       fi
+      fi
+    fi
+    AC_SUBST(HAVE_POSIX_SIGNALS)]
+Index: makefiles/Makefile.win32
+===================================================================
+RCS file: /usr/local/cvsroot/slony1/slony1-engine/makefiles/Makefile.win32,v
+retrieving revision 1.1
+diff -c -r1.1 Makefile.win32
+*** makefiles/Makefile.win32	9 Jul 2004 07:29:46 -0000	1.1
+--- makefiles/Makefile.win32	2 Jun 2005 12:02:03 -0000
+***************
+*** 1,12 ****
+! # $PostgreSQL: pgsql-server/src/makefiles/Makefile.win32,v 1.3 2003/11/29 19:52:12 pgsql Exp $
+  
+  # Use replacement include files for those missing on Win32
+! override CPPFLAGS+="-I$(top_srcdir)/src/include/port/win32"
+! 
+  DLLTOOL= dlltool
+  DLLWRAP= dllwrap
+! BE_DLLLIBS= -L$(top_builddir)/src/backend -lpostgres
+! DLLINIT = $(top_builddir)/src/utils/dllinit.o
+  
+  AROPT = crs
+  DLSUFFIX = .dll
+--- 1,11 ----
+! # $Header: /usr/local/cvsroot/slony1/slony1-engine/Win32/win32_build.diff,v 1.1 2005/06/02 18:35:40 cbbrowne Exp $
+  
+  # Use replacement include files for those missing on Win32
+! override CPPFLAGS+=-I${pgincludeserverdir}/port/win32
+! 
+  DLLTOOL= dlltool
+  DLLWRAP= dllwrap
+! DLLINIT = ${pglibdir}/pgxs/src/utils/dllinit.o -L${pglibdir} -lpostgres
+  
+  AROPT = crs
+  DLSUFFIX = .dll
+***************
+*** 16,33 ****
+  	$(DLLTOOL) --export-all --output-def $*.def $<
+  	$(DLLWRAP) -o $@ --def $*.def $< $(DLLINIT) $(SHLIB_LINK)
+  	rm -f $*.def
+- 
+- ifneq (,$(findstring backend,$(subdir)))
+- ifeq (,$(findstring conversion_procs,$(subdir)))
+- override CPPFLAGS+= -DBUILDING_DLL
+- endif
+- endif
+- 
+- ifneq (,$(findstring ecpg/lib,$(subdir)))
+- override CPPFLAGS+= -DBUILDING_DLL
+- endif
+- 
+- # required by Python headers
+- ifneq (,$(findstring src/pl/plpython,$(subdir)))
+- override CPPFLAGS+= -DUSE_DL_IMPORT
+- endif
+--- 15,17 ----
--- /dev/null
+++ Win32/README.win32_build
@@ -0,0 +1,23 @@
+The attached patch (in addition to my earlier patch) configures the
+build properly for Win32/Mingw. The following points should be noted.
+
+- A Mingw/Msys PostgreSQL installation is required. pgInstaller doesn't
+yet install all the required headers, and as previously noted, gcc seems
+to barf on C:/path/to/file style paths. I do not anticipate this to be a
+problem as I intend to eventually include a pre-built Slony with
+pgInstaller so only developers will need to worry about this (and they
+will probably already have the required enviroment for PostgreSQL
+development anyway).
+
+- Currently slon and slonik do not compile. These will need additional
+porting. xxid and slony1_funcs do compile however, consequently this
+patch obsoletes the /Win32 directory containing Andreas' pgxs makefiles.
+
+- Failure of the posix signals test is noted with a warning, but not a
+configure failure at this time to allow compilation of working
+components, and porting of the rest.
+
+As with my previous patch, I have not included an updated configure
+script as I'm running autoconf 2.59. I can send it if required.
+
+Regards, Dave Page


More information about the Slony1-commit mailing list