diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index 274e11fcb49c4134d043d49e4983f36a3e681c62..1890182c800895ebdaefa6ed3ac7071a4e6028c4 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -6,7 +6,7 @@
 # Copyright (c) 1998, Regents of the University of California
 #
 # IDENTIFICATION
-#    $PostgreSQL: pgsql/src/Makefile.shlib,v 1.87 2004/11/16 21:51:13 tgl Exp $
+#    $PostgreSQL: pgsql/src/Makefile.shlib,v 1.88 2004/11/17 17:08:15 tgl Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -219,7 +219,7 @@ endif
 ifeq ($(PORTNAME), cygwin)
   shlib			= $(NAME)$(DLSUFFIX)
   # needed for /contrib modules, not sure why
-  SHLIB_LINK		+= -lpgport
+  SHLIB_LINK		+= $(LIBS)
   haslibarule   = yes
 endif