diff --git a/src/pl/plpgsql/Makefile b/src/pl/plpgsql/Makefile
index 860416dcdc68f90e2d2a0172dec2cfcc2588c9ef..6eb85fcfe54735fa5e5260708f3a2ab9d24283d0 100644
--- a/src/pl/plpgsql/Makefile
+++ b/src/pl/plpgsql/Makefile
@@ -4,7 +4,7 @@
 #
 # Copyright (c) 1994, Regents of the University of California
 #
-# $Header: /cvsroot/pgsql/src/pl/plpgsql/Makefile,v 1.6 2001/05/24 15:53:34 momjian Exp $
+# $Header: /cvsroot/pgsql/src/pl/plpgsql/Makefile,v 1.7 2001/05/24 22:33:18 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -12,17 +12,8 @@ subdir = src/pl/plpgsql
 top_builddir = ../../..
 include $(top_builddir)/src/Makefile.global
 
-ifneq ($(PORTNAME), qnx4)
-
 all install installdirs uninstall distprep:
 	$(MAKE) -C src $@
 
-else  #qnx4
-
-all install installdirs uninstall distprep:
-	echo plpgsql not supported with QNX due to lack of shared library support
-
-endif # qnx4
-
 clean distclean maintainer-clean:
 	-$(MAKE) -C src $@
diff --git a/src/pl/plpgsql/src/Makefile b/src/pl/plpgsql/src/Makefile
index 46d27daabc0607ff7209ef51afe0ade28a4d2126..24911ec52bee7e39fe29d742112859b007ae4cd6 100644
--- a/src/pl/plpgsql/src/Makefile
+++ b/src/pl/plpgsql/src/Makefile
@@ -2,7 +2,7 @@
 #
 # Makefile for the plpgsql shared object
 #
-# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.13 2001/04/04 21:15:56 tgl Exp $
+# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.14 2001/05/24 22:33:18 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -21,7 +21,14 @@ override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
 
 OBJS = pl_parse.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o
 
+ifeq ($(PORTNAME), qnx4)
 all: all-lib
+else
+all:
+      @echo "*****"; \
+       echo "* PL/pgSQL was not built due to library manager problems."; \
+       echo "*****"
+endif
 
 # Shared library stuff
 include $(top_srcdir)/src/Makefile.shlib
diff --git a/src/template/qnx4 b/src/template/qnx4
index 62ba3ff130d288d5c02d70b694bd284a8b475716..d153324b9a6cbe992efbc440e21e7dc07425b2d2 100644
--- a/src/template/qnx4
+++ b/src/template/qnx4
@@ -1,2 +1,2 @@
-CFLAGS=
+CFLAGS=-I/usr/local/include
 LIBS=-lunix