diff --git a/src/interfaces/libpq++/Makefile b/src/interfaces/libpq++/Makefile
index e1de2b16c4e4de47265fdbd6aa820dd46c6a0c7d..71670caf9babaa3eb71ab720dd25a34b63c4e3fd 100644
--- a/src/interfaces/libpq++/Makefile
+++ b/src/interfaces/libpq++/Makefile
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile,v 1.9 1997/09/16 18:47:23 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile,v 1.10 1998/03/20 04:07:11 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -48,6 +48,12 @@ ifeq ($(PORTNAME), i386_solaris)
   LDFLAGS_SL = -G -z text
   CFLAGS += $(CFLAGS_SL)
 endif
+ifeq ($(PORTNAME), hpux)
+  install-shlib-dep := install-shlib
+  shlib := libpq.sl
+  LDFLAGS_SL = -b
+  CFLAGS += $(CFLAGS_SL)
+endif
 
 all: $(LIBNAME).a $(SHLIB) install examples
 
diff --git a/src/interfaces/libpq/Makefile.in b/src/interfaces/libpq/Makefile.in
index 9b8de869aabb0518b4ae7d7e1f96a9abbc3bca4d..d4261305e1cbf002c50aee685e0e471a814e32e9 100644
--- a/src/interfaces/libpq/Makefile.in
+++ b/src/interfaces/libpq/Makefile.in
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.8 1998/02/27 02:40:59 scrappy Exp $
+#    $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.9 1998/03/20 04:07:02 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -59,6 +59,12 @@ ifeq ($(PORTNAME), univel)
   LDFLAGS_SL = -G -z text
   CFLAGS += $(CFLAGS_SL)
 endif
+ifeq ($(PORTNAME), hpux)
+  install-shlib-dep := install-shlib
+  shlib := libpq.sl
+  LDFLAGS_SL = -b
+  CFLAGS += $(CFLAGS_SL)
+endif
 
 all: libpq.a $(shlib) c.h