diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/configure.in test/configure.in *** postgresql-8.3.3/configure.in 2008-06-09 01:38:40.000000000 +0100 --- test/configure.in 2008-08-09 20:32:33.000000000 +0100 *************** *** 619,624 **** --- 619,642 ---- AC_SUBST(with_system_tzdata) # + # zic if cross-compiling + # + if test "$build_os" != "$host_os" -a -z "$with_system_tzdata"; then + PGAC_ARG_REQ(with, zic, [ --with-zic=path set location of zic tool], + [ZIC=$withval], + [ZIC=:]) + + if test "$ZIC" = ":"; then + AC_PATH_TOOL(ZIC, zic, :) + fi + + if test "$ZIC" = ":"; then + AC_MSG_ERROR([zic is required for cross-compilation. + Use --with-zic to set the location.]) + fi + fi + + # # Zlib # PGAC_ARG_BOOL(with, zlib, yes, *************** *** 677,682 **** --- 695,708 ---- AC_PROG_RANLIB PGAC_CHECK_STRIP + if test "$PORTNAME" = "win32"; then + AC_CHECK_TOOL(DLLWRAP, dllwrap, :) + AC_CHECK_TOOL(DLLTOOL, dlltool, :) + AC_CHECK_TOOL(WINDRES, windres, :) + fi + + AC_CHECK_TOOL(AR, ar, :) + AC_PATH_PROG(TAR, tar) AC_PROG_LN_S AC_PROG_AWK diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/bin/pgevent/Makefile test/src/bin/pgevent/Makefile *** postgresql-8.3.3/src/bin/pgevent/Makefile 2008-01-01 19:45:55.000000000 +0000 --- test/src/bin/pgevent/Makefile 2008-08-09 14:56:10.000000000 +0100 *************** *** 21,31 **** install: all install-lib ! pgevent.dll: $(OBJS) pgevent.def ! $(DLLWRAP) --def pgevent.def -o $(NAME) $(OBJS) ! pgmsgevent.o: pgmsgevent.rc win32ver.rc ! windres pgmsgevent.rc -o pgmsgevent.o --include-dir=$(top_builddir)/src/include all-lib: $(NAME) --- 21,36 ---- install: all install-lib ! pgevent.dll: $(OBJS) $(srcdir)/pgevent.def ! $(DLLWRAP) --def $(srcdir)/pgevent.def -o $(NAME) $(OBJS) ! # windres from binutils 2.18 can segfault if the input file name contains / or \. For safety, ! # copy to the local directory. ! ! pgmsgevent.o: $(srcdir)/pgmsgevent.rc win32ver.rc ! cp $(srcdir)/pgmsgevent.rc localpgmsgevent.rc ! $(WINDRES) localpgmsgevent.rc -o pgmsgevent.o --include-dir=$(top_srcdir)/src/include --include-dir=$(top_builddir)/src/include --include-dir=$(srcdir) ! rm -f localpgmsgevent.rc all-lib: $(NAME) diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/interfaces/ecpg/compatlib/Makefile test/src/interfaces/ecpg/compatlib/Makefile *** postgresql-8.3.3/src/interfaces/ecpg/compatlib/Makefile 2008-01-01 19:45:59.000000000 +0000 --- test/src/interfaces/ecpg/compatlib/Makefile 2008-08-08 21:17:38.000000000 +0100 *************** *** 31,37 **** OBJS= informix.o $(filter snprintf.o, $(LIBOBJS)) ifeq ($(PORTNAME), win32) ! DLL_DEFFILE=libecpg_compatdll.def endif all: def-files all-lib --- 31,37 ---- OBJS= informix.o $(filter snprintf.o, $(LIBOBJS)) ifeq ($(PORTNAME), win32) ! DLL_DEFFILE=$(srcdir)/libecpg_compatdll.def endif all: def-files all-lib diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/interfaces/ecpg/ecpglib/Makefile test/src/interfaces/ecpg/ecpglib/Makefile *** postgresql-8.3.3/src/interfaces/ecpg/ecpglib/Makefile 2008-03-21 16:10:10.000000000 +0000 --- test/src/interfaces/ecpg/ecpglib/Makefile 2008-08-08 21:17:08.000000000 +0100 *************** *** 39,45 **** ifeq ($(PORTNAME), win32) # Link to shfolder.dll instead of shell32.dll SHLIB_LINK += -lshfolder ! DLL_DEFFILE=libecpgdll.def endif all: def-files all-lib --- 39,45 ---- ifeq ($(PORTNAME), win32) # Link to shfolder.dll instead of shell32.dll SHLIB_LINK += -lshfolder ! DLL_DEFFILE=$(srcdir)/libecpgdll.def endif all: def-files all-lib diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/interfaces/ecpg/pgtypeslib/Makefile test/src/interfaces/ecpg/pgtypeslib/Makefile *** postgresql-8.3.3/src/interfaces/ecpg/pgtypeslib/Makefile 2008-01-01 19:45:59.000000000 +0000 --- test/src/interfaces/ecpg/pgtypeslib/Makefile 2008-08-08 21:16:38.000000000 +0100 *************** *** 32,38 **** $(filter rint.o snprintf.o, $(LIBOBJS)) ifeq ($(PORTNAME), win32) ! DLL_DEFFILE=libpgtypesdll.def endif all: def-files all-lib --- 32,38 ---- $(filter rint.o snprintf.o, $(LIBOBJS)) ifeq ($(PORTNAME), win32) ! DLL_DEFFILE=$(srcdir)/libpgtypesdll.def endif all: def-files all-lib diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/interfaces/ecpg/test/Makefile test/src/interfaces/ecpg/test/Makefile *** postgresql-8.3.3/src/interfaces/ecpg/test/Makefile 2007-08-14 11:01:53.000000000 +0100 --- test/src/interfaces/ecpg/test/Makefile 2008-08-08 20:31:05.000000000 +0100 *************** *** 20,26 **** NOLOCALE += --no-locale endif ! ifneq ($(PORTNAME),win32) abs_builddir := $(shell pwd) else abs_builddir := $(shell pwd -W) --- 20,26 ---- NOLOCALE += --no-locale endif ! ifneq ($(BUILDOS),mingw32) abs_builddir := $(shell pwd) else abs_builddir := $(shell pwd -W) diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/interfaces/libpq/Makefile test/src/interfaces/libpq/Makefile *** postgresql-8.3.3/src/interfaces/libpq/Makefile 2008-04-16 15:21:22.000000000 +0100 --- test/src/interfaces/libpq/Makefile 2008-08-08 21:15:57.000000000 +0100 *************** *** 20,26 **** SO_MINOR_VERSION= 1 DLTYPE= library ! override CPPFLAGS := -DFRONTEND -DUNSAFE_STAT_OK -I$(srcdir) $(CPPFLAGS) -I$(top_builddir)/src/port ifneq ($(PORTNAME), win32) override CFLAGS += $(PTHREAD_CFLAGS) endif --- 20,26 ---- SO_MINOR_VERSION= 1 DLTYPE= library ! override CPPFLAGS := -DFRONTEND -DUNSAFE_STAT_OK -I$(srcdir) $(CPPFLAGS) -I$(top_srcdir)/src/port -I$(top_builddir)/src/port ifneq ($(PORTNAME), win32) override CFLAGS += $(PTHREAD_CFLAGS) endif *************** *** 42,51 **** ifeq ($(PORTNAME), win32) OBJS += win32.o pgsleep.o libpqrc.o ! DLL_DEFFILE=libpqdll.def libpqrc.o: libpq.rc ! windres -i libpq.rc -o libpqrc.o ifeq ($(enable_thread_safety), yes) OBJS += pthread-win32.o --- 42,51 ---- ifeq ($(PORTNAME), win32) OBJS += win32.o pgsleep.o libpqrc.o ! DLL_DEFFILE=$(srcdir)/libpqdll.def libpqrc.o: libpq.rc ! $(WINDRES) -i $(srcdir)/libpq.rc -o libpqrc.o ifeq ($(enable_thread_safety), yes) OBJS += pthread-win32.o diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/Makefile.global.in test/src/Makefile.global.in *** postgresql-8.3.3/src/Makefile.global.in 2007-11-13 00:13:19.000000000 +0000 --- test/src/Makefile.global.in 2008-08-09 10:52:15.000000000 +0100 *************** *** 238,243 **** --- 238,247 ---- LDOUT = -o RANLIB = @RANLIB@ X = @EXEEXT@ + AR = @AR@ + DLLTOOL = @DLLTOOL@ + DLLWRAP = @DLLWRAP@ + WINDRES = @WINDRES@ # Perl *************** *** 264,269 **** --- 268,275 ---- PL_TESTDB = pl_regression CONTRIB_TESTDB = contrib_regression + ZIC = @ZIC@ + # Installation. INSTALL = $(SHELL) $(top_srcdir)/config/install-sh -c *************** *** 302,307 **** --- 308,315 ---- # Additional platform-specific settings # + BUILDOS = @build_os@ + # Name of the "template" PORTNAME= @PORTNAME@ *************** *** 465,475 **** ifneq (,$(PGAPPICON)) PGICOSTR=$(subst /,\/,IDI_ICON ICON \"$(top_builddir)/src/port/$(PGAPPICON).ico\") endif ! win32ver.rc: $(top_builddir)/src/port/win32ver.rc ! sed -e 's;FILEDESC;$(PGFILEDESC);' -e 's;VFT_APP;$(PGFTYPE);' -e 's;_ICO_;$(PGICOSTR);' -e 's;\(VERSION.*\),0 *$$;\1,'`date '+%y%j' | sed 's/^0*//'`';' $(top_builddir)/src/port/win32ver.rc > win32ver.rc ! win32ver.o: $(top_builddir)/src/port/win32ver.rc ! sed -e 's;FILEDESC;$(PGFILEDESC);' -e 's;VFT_APP;$(PGFTYPE);' -e 's;_ICO_;$(PGICOSTR);' -e 's;\(VERSION.*\),0 *$$;\1,'`date '+%y%j' | sed 's/^0*//'`';' $(top_builddir)/src/port/win32ver.rc > win32ver.rc ! windres -i win32ver.rc -o win32ver.o --include-dir=$(top_builddir)/src/include rm -f win32ver.rc endif --- 473,483 ---- ifneq (,$(PGAPPICON)) PGICOSTR=$(subst /,\/,IDI_ICON ICON \"$(top_builddir)/src/port/$(PGAPPICON).ico\") endif ! win32ver.rc: $(top_srcdir)/src/port/win32ver.rc ! sed -e 's;FILEDESC;$(PGFILEDESC);' -e 's;VFT_APP;$(PGFTYPE);' -e 's;_ICO_;$(PGICOSTR);' -e 's;\(VERSION.*\),0 *$$;\1,'`date '+%y%j' | sed 's/^0*//'`';' $(top_srcdir)/src/port/win32ver.rc > win32ver.rc ! win32ver.o: $(top_srcdir)/src/port/win32ver.rc ! sed -e 's;FILEDESC;$(PGFILEDESC);' -e 's;VFT_APP;$(PGFTYPE);' -e 's;_ICO_;$(PGICOSTR);' -e 's;\(VERSION.*\),0 *$$;\1,'`date '+%y%j' | sed 's/^0*//'`';' $(top_srcdir)/src/port/win32ver.rc > win32ver.rc ! $(WINDRES) -i win32ver.rc -o win32ver.o --include-dir=$(top_builddir)/src/include --include-dir=$(srcdir) rm -f win32ver.rc endif diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/makefiles/Makefile.win32 test/src/makefiles/Makefile.win32 *** postgresql-8.3.3/src/makefiles/Makefile.win32 2007-08-21 14:32:33.000000000 +0100 --- test/src/makefiles/Makefile.win32 2008-08-08 21:07:09.000000000 +0100 *************** *** 3,10 **** # Use replacement include files for those missing on Win32 override CPPFLAGS+="-I$(top_srcdir)/src/include/port/win32" ! DLLTOOL= dlltool ! DLLWRAP= dllwrap ifdef PGXS BE_DLLLIBS= -L$(libdir) -lpostgres else --- 3,17 ---- # Use replacement include files for those missing on Win32 override CPPFLAGS+="-I$(top_srcdir)/src/include/port/win32" ! ifndef DLLTOOL ! DLLTOOL = dlltool ! endif ! ifndef DLLWRAP ! DLLWRAP = dllwrap ! endif ! ifndef WINDRES ! WINDRES = windres ! endif ifdef PGXS BE_DLLLIBS= -L$(libdir) -lpostgres else diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/pl/plperl/GNUmakefile test/src/pl/plperl/GNUmakefile *** postgresql-8.3.3/src/pl/plperl/GNUmakefile 2007-12-01 15:30:09.000000000 +0000 --- test/src/pl/plperl/GNUmakefile 2008-08-08 20:31:05.000000000 +0100 *************** *** 56,62 **** # test script can find them. See comments in src/test/regress/GNUmakefile. ifdef VPATH ! ifneq ($(PORTNAME),win32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else --- 56,62 ---- # test script can find them. See comments in src/test/regress/GNUmakefile. ifdef VPATH ! ifneq ($(BUILDOS),mingw32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/pl/plpython/Makefile test/src/pl/plpython/Makefile *** postgresql-8.3.3/src/pl/plpython/Makefile 2007-02-10 04:26:24.000000000 +0000 --- test/src/pl/plpython/Makefile 2008-08-08 20:31:05.000000000 +0100 *************** *** 72,78 **** # test script can find them. See comments in src/test/regress/GNUmakefile. ifdef VPATH ! ifneq ($(PORTNAME),win32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else --- 72,78 ---- # test script can find them. See comments in src/test/regress/GNUmakefile. ifdef VPATH ! ifneq ($(BUILDOS),mingw32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/pl/tcl/Makefile test/src/pl/tcl/Makefile *** postgresql-8.3.3/src/pl/tcl/Makefile 2006-07-21 01:24:04.000000000 +0100 --- test/src/pl/tcl/Makefile 2008-08-08 20:31:05.000000000 +0100 *************** *** 56,62 **** # test script can find them. See comments in src/test/regress/GNUmakefile. ifdef VPATH ! ifneq ($(PORTNAME),win32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else --- 56,62 ---- # test script can find them. See comments in src/test/regress/GNUmakefile. ifdef VPATH ! ifneq ($(BUILDOS),mingw32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/test/regress/GNUmakefile test/src/test/regress/GNUmakefile *** postgresql-8.3.3/src/test/regress/GNUmakefile 2008-01-01 19:46:00.000000000 +0000 --- test/src/test/regress/GNUmakefile 2008-08-08 20:31:05.000000000 +0100 *************** *** 97,103 **** ofile_list := $(subst .source,, $(notdir $(wildcard $(top_srcdir)/$(subdir)/output/*.source))) output_files := $(foreach file, $(ofile_list), expected/$(file).out) ! ifneq ($(PORTNAME),win32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else --- 97,103 ---- ofile_list := $(subst .source,, $(notdir $(wildcard $(top_srcdir)/$(subdir)/output/*.source))) output_files := $(foreach file, $(ofile_list), expected/$(file).out) ! ifneq ($(BUILDOS),mingw32) abs_srcdir := $(shell cd $(srcdir) && pwd) abs_builddir := $(shell pwd) else diff -c -r -x libpq.rc -x '*~' -x configure postgresql-8.3.3/src/timezone/Makefile test/src/timezone/Makefile *** postgresql-8.3.3/src/timezone/Makefile 2007-08-25 21:29:25.000000000 +0100 --- test/src/timezone/Makefile 2008-08-08 20:31:05.000000000 +0100 *************** *** 27,32 **** --- 27,38 ---- # for POSIX-style timezone specs POSIXRULES = US/Eastern + # ZIC is set when cross compiling + + ifeq (,$(ZIC)) + ZIC=./zic + endif + # use system timezone data? ifneq (,$(with_system_tzdata)) override CPPFLAGS += '-DSYSTEMTZDIR="$(with_system_tzdata)"' *************** *** 46,52 **** install: all installdirs ifeq (,$(with_system_tzdata)) ! ./zic -d '$(DESTDIR)$(datadir)/timezone' -p '$(POSIXRULES)' $(TZDATAFILES) endif $(MAKE) -C tznames $@ --- 52,58 ---- install: all installdirs ifeq (,$(with_system_tzdata)) ! $(ZIC) -d '$(DESTDIR)$(datadir)/timezone' -p '$(POSIXRULES)' $(TZDATAFILES) endif $(MAKE) -C tznames $@