diff -urN tcl7.4.orig/Makefile.in tcl7.4/Makefile.in
--- tcl7.4.orig/Makefile.in	Fri Jun 30 13:20:04 1995
+++ tcl7.4/Makefile.in	Fri Jun 30 21:01:24 1995
@@ -11,6 +11,12 @@
 
 VERSION = 7.4
 
+SHARED = true
+ifeq ($(SHARED),true)
+SHVERSION = 1
+SHCFLAGS = -fPIC
+endif
+
 #----------------------------------------------------------------
 # Things you can change to personalize the Makefile for your own
 # site (you can make these changes in either Makefile.in or
@@ -49,25 +55,28 @@
 BIN_INSTALL_DIR =	$(INSTALL_ROOT)$(exec_prefix)/bin
 
 # Directory in which to install the include file tcl.h:
-INCLUDE_INSTALL_DIR =	$(INSTALL_ROOT)$(prefix)/include
+INCLUDE_INSTALL_DIR =	$(INSTALL_ROOT)$(prefix)/include/tcl
 
 # Top-level directory in which to install manual entries:
 MAN_INSTALL_DIR =	$(INSTALL_ROOT)$(prefix)/man
 
 # Directory in which to install manual entry for tclsh:
 MAN1_INSTALL_DIR =	$(MAN_INSTALL_DIR)/man1
+MAN1_EXT = 1tcl
 
 # Directory in which to install manual entries for Tcl's C library
 # procedures:
 MAN3_INSTALL_DIR =	$(MAN_INSTALL_DIR)/man3
+MAN3_EXT = 3tcl
 
 # Directory in which to install manual entries for the built-in
 # Tcl commands:
-MANN_INSTALL_DIR =	$(MAN_INSTALL_DIR)/mann
+MANN_INSTALL_DIR =	$(MAN_INSTALL_DIR)/man3
+MANN_EXT = 3tcl
 
 # To change the compiler switches, for example to change from -O
 # to -g, change the following line:
-CFLAGS = -O
+CFLAGS = -O2
 
 # To disable ANSI-C procedure prototypes reverse the comment characters
 # on the following lines:
@@ -119,7 +128,7 @@
 
 COMPAT_OBJS =		@LIBOBJS@
 AC_FLAGS =		@DEFS@
-INSTALL_PROGRAM =	@INSTALL_PROGRAM@
+INSTALL_PROGRAM =	@INSTALL_PROGRAM@ -s
 INSTALL_DATA =		@INSTALL_DATA@
 RANLIB =		@RANLIB@
 SRC_DIR =		@srcdir@
@@ -135,7 +144,7 @@
 CC =		@CC@
 CC_SWITCHES =	${CFLAGS} -I. -I${SRC_DIR} ${AC_FLAGS} ${MATH_FLAGS} \
 ${GENERIC_FLAGS} ${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} \
--DTCL_LIBRARY=\"${TCL_LIBRARY}\"
+-DTCL_LIBRARY=\"${TCL_LIBRARY}\" $(SHCFLAGS)
 
 GENERIC_OBJS =	regexp.o tclAsync.o tclBasic.o tclCkalloc.o \
 	tclCmdAH.o tclCmdIL.o tclCmdMZ.o tclExpr.o tclGet.o \
@@ -157,16 +166,21 @@
 	rm -f libtcl.a
 	ar cr libtcl.a ${OBJS}
 	$(RANLIB) libtcl.a
+ifeq ($(SHARED),true)
+	$(CC) -shared -Wl,-soname,libtcl.so.$(SHVERSION) -o libtcl.so.$(SHVERSION).$(VERSION) $(OBJS)
+	ln -sf libtcl.so.$(SHVERSION).$(VERSION) libtcl.so.$(SHVERSION) 
+endif
 
 tclsh: tclAppInit.o libtcl.a
-	${CC} ${CC_SWITCHES} tclAppInit.o libtcl.a ${MATH_LIBS} -o tclsh
+	${CC} ${CC_SWITCHES} tclAppInit.o -L. -ltcl ${MATH_LIBS} -o tclsh
 
 tcltest: tclTest.o libtcl.a
-	${CC} ${CC_SWITCHES} tclTest.o libtcl.a ${MATH_LIBS} -o tcltest
+	${CC} ${CC_SWITCHES} tclTest.o -L. -ltcl ${MATH_LIBS} -o tcltest
 
 test: tcltest
 	@cwd=`pwd`; \
 	cd $(SRC_DIR); TCL_LIBRARY=`pwd`/library; export TCL_LIBRARY; \
+	export LD_LIBRARY_PATH=`pwd`:$$LD_LIBRARY_PATH; \
 	cd $$cwd; ( echo cd $(SRC_DIR)/tests\; source all ) | ./tcltest
 
 configInfo: Makefile
@@ -191,12 +205,19 @@
 	@echo "Installing libtcl.a"
 	@$(INSTALL_DATA) libtcl.a $(LIB_INSTALL_DIR)/libtcl$(VERSION).a
 	@$(RANLIB) $(LIB_INSTALL_DIR)/libtcl$(VERSION).a
+ifeq ($(SHARED),true)
+	@echo "Installing libtcl.so.1"
+	@$(INSTALL_PROGRAM) libtcl.so.$(SHVERSION).$(VERSION) $(LIB_INSTALL_DIR)/libtcl.so.$(SHVERSION).$(VERSION)
+	@echo "Running ldconfig"
+	-@/sbin/ldconfig
+endif
 	@echo "Installing tclsh"
 	@$(INSTALL_PROGRAM) tclsh $(BIN_INSTALL_DIR)/tclsh$(VERSION)
+	@ln -sf tclsh$(VERSION) $(BIN_INSTALL_DIR)/tclsh
 
 install-libraries:
-	@for i in $(INSTALL_ROOT)$(prefix)/lib $(INCLUDE_INSTALL_DIR) \
-		$(SCRIPT_INSTALL_DIR) ; \
+	@for i in $(INSTALL_ROOT)$(prefix)/include $(INSTALL_ROOT)$(prefix)/lib \
+		$(INCLUDE_INSTALL_DIR) $(SCRIPT_INSTALL_DIR) ; \
 	    do \
 	    if [ ! -d $$i ] ; then \
 		echo "Making directory $$i"; \
@@ -205,8 +226,11 @@
 		else true; \
 		fi; \
 	    done;
-	@echo "Installing tcl.h"
-	@$(INSTALL_DATA) $(SRC_DIR)/tcl.h $(INCLUDE_INSTALL_DIR)
+	@for i in tcl.h tclInt.h tclPort.h tclRegexp.h; \
+	    do \
+	    echo "Installing $$i"; \
+	    $(INSTALL_DATA) $(SRC_DIR)/$$i $(INCLUDE_INSTALL_DIR); \
+	    done;
 	@for i in $(SRC_DIR)/library/*.tcl $(SRC_DIR)/library/tclIndex $(SRC_DIR)/tclAppInit.c; \
 	    do \
 	    echo "Installing $$i"; \
@@ -226,37 +250,42 @@
 	@cd $(SRC_DIR)/doc; for i in *.1; \
 	    do \
 	    echo "Installing doc/$$i"; \
-	    rm -f $(MAN1_INSTALL_DIR)/$$i; \
+	    page=`basename $$i .1`.$(MAN1_EXT); \
+	    rm -f $(MAN1_INSTALL_DIR)/$$page; \
 	    sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
-		    $$i > $(MAN1_INSTALL_DIR)/$$i; \
-	    chmod 444 $(MAN1_INSTALL_DIR)/$$i; \
+		    $$i > $(MAN1_INSTALL_DIR)/$$page; \
+	    chmod 644 $(MAN1_INSTALL_DIR)/$$page; \
 	    done;
 	@cd $(SRC_DIR)/doc; for i in *.3; \
 	    do \
 	    echo "Installing doc/$$i"; \
-	    rm -f $(MAN3_INSTALL_DIR)/$$i; \
+	    page=`basename $$i .3`.$(MAN3_EXT); \
+	    rm -f $(MAN3_INSTALL_DIR)/$$page; \
 	    sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
-		    $$i > $(MAN3_INSTALL_DIR)/$$i; \
-	    chmod 444 $(MAN3_INSTALL_DIR)/$$i; \
+		    $$i > $(MAN3_INSTALL_DIR)/$$page; \
+	    chmod 644 $(MAN3_INSTALL_DIR)/$$page; \
 	    done;
+	@sh @srcdir@/fixman3.sh $(MAN3_INSTALL_DIR) $(MAN3_EXT)
 	@cd $(SRC_DIR)/doc; for i in *.n; \
 	    do \
 	    echo "Installing doc/$$i"; \
-	    rm -f $(MANN_INSTALL_DIR)/$$i; \
+	    page=`basename $$i .n`.$(MANN_EXT); \
+	    rm -f $(MANN_INSTALL_DIR)/$$page; \
 	    sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
-		    $$i > $(MANN_INSTALL_DIR)/$$i; \
-	    chmod 444 $(MANN_INSTALL_DIR)/$$i; \
+		    $$i > $(MANN_INSTALL_DIR)/$$page; \
+	    chmod 644 $(MANN_INSTALL_DIR)/$$page; \
 	    done;
+	@sh @srcdir@/fixmann.sh $(MANN_INSTALL_DIR) $(MANN_EXT)
 
 Makefile: $(SRC_DIR)/Makefile.in
 	$(SHELL) config.status
 
 clean:
-	rm -f *.a *.o core errs *~ \#* TAGS *.E a.out errors tclsh tcltest \
+	rm -f *.a *.so *.so.* *.o core errs *~ \#* TAGS *.E a.out errors tclsh tcltest \
 		config.info
 
 distclean: clean
-	rm -f Makefile config.status config.cache
+	rm -f Makefile config.status config.cache config.log
 
 depend:
 	makedepend -- $(CC_SWITCHES) -- $(SRCS)
diff -urN tcl7.4.orig/README.linux tcl7.4/README.linux
--- tcl7.4.orig/README.linux	Wed Dec 31 18:00:00 1969
+++ tcl7.4/README.linux	Fri Jun 30 20:58:20 1995
@@ -0,0 +1,26 @@
+Linux-Related Changes:
+
+  Support for ELF shared libraries.
+  Install manual pages under all relevant names.
+
+Required Packages (later versions should also work):
+
+  gcc-2.6.3 (ELF)
+  binutils-2.5.2l.17
+  libc-5.0.9
+  make-3.71
+  ld.so-1.7.4
+
+How to Build and Install:
+
+  ./configure   (optionally specify your favorite --prefix= option)
+  make
+  make install
+
+In Case of Problems:
+
+  Send email to the address listed below.  It may take me a while
+  sometimes, but I will answer eventually.
+
+David Engel
+david@ods.com
diff -urN tcl7.4.orig/fixman3.sh tcl7.4/fixman3.sh
--- tcl7.4.orig/fixman3.sh	Wed Dec 31 18:00:00 1969
+++ tcl7.4/fixman3.sh	Fri Jun 30 20:58:20 1995
@@ -0,0 +1,63 @@
+#!/bin/sh
+
+if [ $# -ne 2 ]; then
+	echo usage: $0 directory extension
+	exit 1
+fi
+
+if ! cd $1; then
+	echo $0: can not cd to $1
+	exit 1
+fi
+
+ext=$2
+
+function fixman {
+	if [ $# -lt 2 ]; then
+		echo fixman: called with too few args
+		exit 1
+	fi
+
+	local base=$1
+	shift 1
+
+	for f in $*; do
+		if ! ln -sf $base.$ext $f.$ext; then
+			echo fixman: cant ln $base.$ext to $f.$ext
+		fi
+	done
+}
+
+fixman AddErrInfo Tcl_AddErrorInfo Tcl_SetErrorCode Tcl_PosixError
+fixman AllowExc Tcl_AllowExceptions
+fixman AppInit Tcl_AppInit
+fixman Async Tcl_AsyncCreate Tcl_AsyncMark Tcl_AsyncInvoke Tcl_AsyncDelete
+fixman Backslash Tcl_Backslash
+fixman CallDel Tcl_CallWhenDeleted Tcl_DontCallWhenDeleted
+fixman CmdCmplt Tcl_CommandComplete
+fixman Concat Tcl_Concat
+fixman CrtCommand Tcl_CreateCommand Tcl_DeleteCommand Tcl_GetCommandInfo Tcl_SetCommandInfo
+fixman CrtInterp Tcl_CreateInterp Tcl_DeleteInterp
+fixman CrtMathFnc Tcl_CreateMathFunc
+fixman CrtPipelin Tcl_CreatePipeline
+fixman CrtTrace Tcl_CreateTrace Tcl_DeleteTrace
+fixman DString Tcl_DStringInit Tcl_DStringAppend Tcl_DStringAppendElement Tcl_DStringStartSublist Tcl_DStringEndSublist Tcl_DStringLength Tcl_DStringValue Tcl_DStringSetLength Tcl_DStringFree Tcl_DStringResult Tcl_DStringGetResult
+fixman DetachPids Tcl_DetachPids Tcl_ReapDetachedProcs
+fixman EnterFile Tcl_EnterFile Tcl_GetOpenFile Tcl_FilePermissions
+fixman Eval Tcl_Eval Tcl_VarEval Tcl_EvalFile Tcl_GlobalEval
+fixman ExprLong Tcl_ExprLong Tcl_ExprDouble Tcl_ExprBoolean Tcl_ExprString
+fixman GetInt Tcl_GetInt Tcl_GetDouble Tcl_GetBoolean
+fixman Hash Tcl_InitHashTable Tcl_DeleteHashTable Tcl_CreateHashEntry Tcl_DeleteHashEntry Tcl_FindHashEntry Tcl_GetHashValue Tcl_SetHashValue Tcl_GetHashKey Tcl_FirstHashEntry Tcl_NextHashEntry Tcl_HashStats
+fixman Interp Tcl_Interp
+fixman LinkVar Tcl_LinkVar Tcl_UnlinkVar
+fixman PrintDbl Tcl_PrintDouble
+fixman RecordEval Tcl_RecordAndEval
+fixman RegExp Tcl_RegExpMatch Tcl_RegExpCompile Tcl_RegExpExec Tcl_RegExpRange
+fixman SetRecLmt Tcl_SetRecursionLimit
+fixman SetResult Tcl_SetResult Tcl_AppendResult Tcl_AppendElement Tcl_ResetResult
+fixman SetVar Tcl_SetVar Tcl_SetVar2 Tcl_GetVar Tcl_GetVar2 Tcl_UnsetVar Tcl_UnsetVar2
+fixman SplitList Tcl_SplitList Tcl_Merge Tcl_ScanElement Tcl_ConvertElement
+fixman StrMatch Tcl_StringMatch
+fixman TildeSubst Tcl_TildeSubst
+fixman TraceVar Tcl_TraceVar Tcl_TraceVar2 Tcl_UntraceVar Tcl_UntraceVar2 Tcl_VarTraceInfo Tcl_VarTraceInfo2
+fixman UpVar Tcl_UpVar Tcl_UpVar2
diff -urN tcl7.4.orig/fixmann.sh tcl7.4/fixmann.sh
--- tcl7.4.orig/fixmann.sh	Wed Dec 31 18:00:00 1969
+++ tcl7.4/fixmann.sh	Fri Jun 30 21:01:54 1995
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+if [ $# -ne 2 ]; then
+	echo usage: $0 directory extension
+	exit 1
+fi
+
+if ! cd $1; then
+	echo $0: can not cd to $1
+	exit 1
+fi
+
+ext=$2
+
+function fixman {
+	if [ $# -lt 2 ]; then
+		echo fixman: called with too few args
+		exit 1
+	fi
+
+	local base=$1
+	shift 1
+
+	for f in $*; do
+		if ! ln -sf $base.$ext $f.$ext; then
+			echo fixman: cant ln $base.$ext to $f.$ext
+		fi
+	done
+}
+
+fixman library auto_execok auto_load auto_mkindex auto_reset parray
+fixman tclvars env errorCode errorInfo tcl_library tcl_precision tcl_version tcl_patchlevel
diff -urN tcl7.4.orig/tclAppInit.c tcl7.4/tclAppInit.c
--- tcl7.4.orig/tclAppInit.c	Thu Jun  8 12:55:57 1995
+++ tcl7.4/tclAppInit.c	Fri Jun 30 20:58:20 1995
@@ -20,8 +20,10 @@
  * Sun shared libraries to be used for Tcl.
  */
 
+#ifdef NEED_MATHERR
 extern int matherr();
 int *tclDummyMathPtr = (int *) matherr;
+#endif
 
 /*
  *----------------------------------------------------------------------
diff -urN tcl7.4.orig/tclTest.c tcl7.4/tclTest.c
--- tcl7.4.orig/tclTest.c	Thu Jun  8 12:55:57 1995
+++ tcl7.4/tclTest.c	Fri Jun 30 20:58:20 1995
@@ -25,8 +25,10 @@
  * Sun shared libraries to be used for Tcl.
  */
 
+#ifdef NEED_MATHERR
 extern int matherr();
 int *tclDummyMathPtr = (int *) matherr;
+#endif
 
 /*
  * Dynamic string shared by TestdcallCmd and DelCallbackProc;  used
