# Copyright (c) 1998, Regents of the University of California
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.72 2003/10/20 01:34:33 tgl Exp $
+# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.72.2.1 2005/07/17 04:06:04 tgl Exp $
#
#-------------------------------------------------------------------------
ifeq ($(enable_shared), yes)
+# Insert -L from LDFLAGS after any -L already present in SHLIB_LINK
+SHLIB_LINK := $(filter -L%, $(SHLIB_LINK)) $(filter -L%, $(LDFLAGS)) $(filter-out -L%, $(SHLIB_LINK))
+
# For each platform we support shared libraries on, set shlib to the
# name of the library, LINK.shared to the command to link the library,
# and adjust SHLIB_LINK if necessary.
SHLIB_LINK += -ltermcap -lstdc++.r4 -lbind -lsocket -L/boot/develop/lib/x86
endif
-SHLIB_LINK := $(filter -L%, $(LDFLAGS)) $(SHLIB_LINK)
ifeq ($(enable_rpath), yes)
SHLIB_LINK += $(rpath)
endif