aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>1998-12-13 23:46:49 +0000
committerTom Lane <tgl@sss.pgh.pa.us>1998-12-13 23:46:49 +0000
commite3909672f12e0ddf3e202b824fda068ad2195ef2 (patch)
treed2eb3947c103e1aa377f2104f9446bba4626b408 /src
parent3a52e3f3a205ae05875a9bacda3b34b2066364ec (diff)
downloadpostgresql-e3909672f12e0ddf3e202b824fda068ad2195ef2.tar.gz
postgresql-e3909672f12e0ddf3e202b824fda068ad2195ef2.zip
Build pltcl.so correctly on platforms that want dependent
shared libraries to be listed in the link command.
Diffstat (limited to 'src')
-rw-r--r--src/pl/tcl/Makefile23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/pl/tcl/Makefile b/src/pl/tcl/Makefile
index 6ffe172ca01..8e400e1dfab 100644
--- a/src/pl/tcl/Makefile
+++ b/src/pl/tcl/Makefile
@@ -4,7 +4,7 @@
# Makefile for the pltcl shared object
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.9 1998/10/18 19:41:00 tgl Exp $
+# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.10 1998/12/13 23:46:49 tgl Exp $
#
#-------------------------------------------------------------------------
@@ -38,14 +38,25 @@ endif
endif
-# Change following to how shared library that contain
-# correct references to libtcl must get built on your system.
+# Change following to how shared library that contains
+# references to libtcl must get built on your system.
# Since these definitions come from the tclConfig.sh script,
# they should work if the shared build of tcl was successful
-# on this system.
-#
+# on this system. However, tclConfig.sh lies to us a little bit
+# (at least in versions 7.6 through 8.0.4) --- it doesn't mention -lc
+# in TCL_LIBS, but you still need it on systems that want to hear about
+# dependent libraries...
+
+ifneq ($(TCL_SHLIB_LD_LIBS),)
+# link command for a shared lib must mention shared libs it uses
+SHLIB_EXTRA_LIBS=$(TCL_LIBS) -lc
+else
+# link command for a shared lib must NOT mention shared libs it uses
+SHLIB_EXTRA_LIBS=
+endif
+
%$(TCL_SHLIB_SUFFIX): %.o
- $(TCL_SHLIB_LD) -o $@ $< $(TCL_SHLIB_LD_LIBS) $(TCL_LIB_SPEC) $(TCL_LIBS)
+ $(TCL_SHLIB_LD) -o $@ $< $(TCL_LIB_SPEC) $(SHLIB_EXTRA_LIBS)
#