$NetBSD: patch-ad,v 1.2 2004/10/10 18:26:00 jdolecek Exp $

--- src/Makefile.global.in.orig	2002-09-05 00:54:18.000000000 +0200
+++ src/Makefile.global.in	2004-10-10 20:20:34.000000000 +0200
@@ -111,6 +111,13 @@
 endif
 endif
 
+htmldir := @htmldir@
+ifeq "$(findstring pgsql, $(htmldir))" ""
+ifeq "$(findstring postgres, $(htmldir))" ""
+override htmldir := $(docdir)/postgresql
+endif
+endif
+
 javadir := $(DESTDIR)$(datadir)/java
 localedir := @localedir@
 
@@ -124,6 +131,7 @@
 with_java	= @with_java@
 with_perl	= @with_perl@
 with_python	= @with_python@
+with_python_compile = @with_python_compile@
 with_tcl	= @with_tcl@
 with_tk		= @with_tk@
 enable_shared	= @enable_shared@
@@ -135,7 +143,7 @@
 python_includespec	= @python_includespec@
 python_moduledir	= @python_moduledir@
 python_moduleexecdir	= @python_moduleexecdir@
-python_libspec		= @python_libspec@
+python_libspec		= -Wl,-R${PREFIX}/lib -L${PREFIX}/lib @python_libspec@
 python_configdir	= @python_configdir@
 
 krb_srvtab = @krb_srvtab@
@@ -285,13 +293,20 @@
 libpq_builddir = $(top_builddir)/src/interfaces/libpq
 libpq = -L$(libpq_builddir) -lpq
 
+libpgtcl_srcdir = $(top_srcdir)/src/interfaces/libpgtcl
+libpgtcl_builddir = $(top_builddir)/src/interfaces/libpgtcl
+libpgtcl = -L$(libpgtcl_builddir) -lpgtcl
+
 submake-libpq:
 	$(MAKE) -C $(libpq_builddir) all
 
 submake-libpgport:
 	$(MAKE) -C $(top_builddir)/src/port all
 
-.PHONY: submake-libpq submake-libpgport
+submake-libpgtcl:
+	$(MAKE) -C $(libpgtcl_builddir) all
+
+.PHONY: submake-libpq submake-libpgport submake-libpgtcl
 
 
 ##########################################################################
