From e82991579f807741443aa7522f25c697f87632dc Mon Sep 17 00:00:00 2001
From: Jon Trulson <jon@radscan.com>
Date: Wed, 19 Sep 2018 17:49:15 -0600
Subject: [PATCH] use system tcl: clean up Imake files for dtdocbook/instant

---
 cde/programs/dtdocbook/Imakefile         |  8 +++++++-
 cde/programs/dtdocbook/instant/Imakefile | 13 +++++++++++--
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/cde/programs/dtdocbook/Imakefile b/cde/programs/dtdocbook/Imakefile
index cb689084..a2504152 100644
--- a/cde/programs/dtdocbook/Imakefile
+++ b/cde/programs/dtdocbook/Imakefile
@@ -3,7 +3,13 @@ XCOMM $XConsortium: Imakefile /main/6 1996/10/24 00:10:08 cde-hp $
 #define IHaveSubdirs
 #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
 
-SUBDIRS = doc2sdl lib tcl instant xlate_locale
+#if defined(LinuxArchitecture)
+TCLDIR =
+#else
+TCLDIR = tcl
+#endif
+
+SUBDIRS = doc2sdl lib $(TCLDIR) instant xlate_locale
 
 MakeSubdirs($(SUBDIRS))
 DependSubdirs($(SUBDIRS))
diff --git a/cde/programs/dtdocbook/instant/Imakefile b/cde/programs/dtdocbook/instant/Imakefile
index 8314e0dd..01e4e8e8 100644
--- a/cde/programs/dtdocbook/instant/Imakefile
+++ b/cde/programs/dtdocbook/instant/Imakefile
@@ -2,10 +2,19 @@ XCOMM $XConsortium: Imakefile /main/6 1996/11/29 11:06:09 rswiston $
 
 XLATESRC  = $(DTSVCSRC)/DtUtil2
 
-INCLUDES = -I../lib/tptregexp -I$(XLATESRC) -I/usr/include/tcl
+#if defined(LinuxArchitecture)
+TCLINC = -I/usr/include/tcl
+TCLLIB = -ltcl
+#else
+TCLINC = -I../tcl
+TCLLIB = ../tcl/libtcl.a
+#endif
+
+INCLUDES = -I../lib/tptregexp -I$(XLATESRC) $(TCLINC)
 DEPLIBS = $(DEPDTSVCLIB)
 LOCAL_LIBRARIES = $(DTSVCLIB) $(TTLIB) $(XMLIB) $(XTOOLLIB) $(XLIB) \
--L../lib/tptregexp -ltptregexp -ltcl
+	-L../lib/tptregexp -ltptregexp $(TCLLIB)
+
 #if defined(SunArchitecture)
 EXTRA_LIBRARIES = -lsocket -lnsl -lgen -lm
 #else
-- 
2.25.1