]> granicus.if.org Git - postgresql/commitdiff
pltcl didn't work well at all when Tcl had been built with a different
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 21 Apr 2000 03:28:17 +0000 (03:28 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 21 Apr 2000 03:28:17 +0000 (03:28 +0000)
compiler than the one selected to build Postgres with.  It was trying
to feed Postgres-compiler switches to Tcl's compiler.  (Seen this before
with the perl5 interface...) Fix to use only CFLAGS taken from Tcl's
configure information, plus -I which is pretty universal.

src/pl/tcl/Makefile

index 085baeb5924610861ab7c6c34a86834cc861380a..afd014b061e478c88dd4da08d05e2ff84a70dea3 100644 (file)
@@ -4,7 +4,7 @@
 #    Makefile for the pltcl shared object
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.11 2000/03/08 01:58:46 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.12 2000/04/21 03:28:17 tgl Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -59,6 +59,19 @@ endif
        $(TCL_SHLIB_LD) -o $@ $< $(TCL_LIB_SPEC) $(SHLIB_EXTRA_LIBS)
 
 
+CC = $(TCL_CC)
+
+# Since we are using Tcl's choice of C compiler, which might not be the
+# same one selected for Postgres, do NOT use CFLAGS from Makefile.global.
+# Instead use TCL's CFLAGS plus necessary -I directives.
+
+# Can choose either TCL_CFLAGS_OPTIMIZE or TCL_CFLAGS_DEBUG here, as needed
+CFLAGS= $(TCL_CFLAGS_OPTIMIZE)
+
+CFLAGS+= $(TCL_SHLIB_CFLAGS) $(TCL_DEFS)
+
+CFLAGS+= -I$(SRCDIR)/include -I$(SRCDIR)/backend
+        
 #
 # Uncomment the following to enable the unknown command lookup
 # on the first of all calls to the call handler. See the doc
@@ -67,16 +80,6 @@ endif
 #CFLAGS+= -DPLTCL_UNKNOWN_SUPPORT
 
 
-CC = $(TCL_CC)
-CFLAGS+= -I$(LIBPQDIR) -I$(SRCDIR)/include $(TCL_SHLIB_CFLAGS)
-
-# For fmgr.h
-CFLAGS+= -I$(SRCDIR)/backend
-
-CFLAGS+= $(TCL_DEFS)
-
-LDADD+= $(LIBPQ)
-        
 #
 # DLOBJS is the dynamically-loaded object file.
 #