I propose the attached patch as a poor fix for the cross-compilation 
problems.  It doesn't really solve anything but prints out a message to 
let cross-compiling folks know that they need to fix up the 
installation themselves.

Comments?

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/
diff -ur ../cvs-pgsql/configure.in ./configure.in
--- ../cvs-pgsql/configure.in	2005-06-09 18:20:28.000000000 +0200
+++ ./configure.in	2005-06-09 23:43:45.000000000 +0200
@@ -291,6 +291,7 @@
 
 AC_PROG_CPP
 AC_SUBST(GCC)
+AC_SUBST(cross_compiling)
 
 # Create compiler version string
 if test x"$GCC" = x"yes" ; then
diff -ur ../cvs-pgsql/GNUmakefile.in ./GNUmakefile.in
--- ../cvs-pgsql/GNUmakefile.in	2005-05-30 17:34:59.000000000 +0200
+++ ./GNUmakefile.in	2005-06-09 23:47:46.836148883 +0200
@@ -18,7 +18,13 @@
 	$(MAKE) -C doc $@
 	$(MAKE) -C src $@
 	$(MAKE) -C config $@
+ifeq ($(cross_compiling),no)
 	@echo "PostgreSQL installation complete."
+else
+	@echo "PostgreSQL installation almost complete. Since you are cross-compiling, you"
+	@echo "need to generate the time zone data files manually on the host machine."
+	@echo "See src/timezone/Makefile."
+endif
 
 installdirs uninstall distprep:
 	$(MAKE) -C doc $@
diff -ur ../cvs-pgsql/src/Makefile.global.in ./src/Makefile.global.in
--- ../cvs-pgsql/src/Makefile.global.in	2005-05-30 17:35:05.000000000 +0200
+++ ./src/Makefile.global.in	2005-06-09 23:44:10.235729352 +0200
@@ -185,6 +185,8 @@
 GCC = @GCC@
 CFLAGS = @CFLAGS@
 
+cross_compiling = @cross_compiling@
+
 # Kind-of compilers
 
 YACC = @YACC@
diff -ur ../cvs-pgsql/src/timezone/Makefile ./src/timezone/Makefile
--- ../cvs-pgsql/src/timezone/Makefile	2005-01-04 20:41:01.000000000 +0100
+++ ./src/timezone/Makefile	2005-06-09 23:44:56.662457181 +0200
@@ -34,7 +34,9 @@
 	$(CC) $(CFLAGS) $(ZICOBJS) $(LDFLAGS) $(LIBS) -o [EMAIL PROTECTED](X)
 
 install: all installdirs
+ifneq ($(cross_compiling),yes)
 	./zic -d $(DESTDIR)$(datadir)/timezone $(TZDATAFILES)
+endif
 
 installdirs:
 	$(mkinstalldirs) $(DESTDIR)$(datadir)
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to