--- Makefile.in.orig	Sun Sep 27 19:33:16 1998
+++ Makefile.in	Sun Sep 27 19:33:28 1998
@@ -55,7 +55,9 @@
 BIN_DIR =		$(exec_prefix)/bin
 
 # Directory in which to install the include file tk.h:
-INCLUDE_INSTALL_DIR =	$(INSTALL_ROOT)$(prefix)/include
+INCLUDE_INSTALL_DIR =	$(INSTALL_ROOT)$(prefix)/include/tk$(VERSION)
+GENERIC_INCLUDE_INSTALL_DIR = $(INCLUDE_INSTALL_DIR)/generic
+UNIX_INCLUDE_INSTALL_DIR = $(INCLUDE_INSTALL_DIR)/unix
 
 # Top-level directory for manual entries:
 MAN_INSTALL_DIR =	$(INSTALL_ROOT)$(prefix)/man
@@ -74,7 +76,7 @@
 # The directory containing the Tcl sources and headers appropriate
 # for this version of Tk ("srcdir" will be replaced or has already
 # been replaced by the configure script):
-TCL_GENERIC_DIR =	@TCL_SRC_DIR@/generic
+TCL_GENERIC_DIR =	$(prefix)/include/tcl7.5/generic
 
 # The directory containing the Tcl library archive file appropriate
 # for this version of Tk:
@@ -94,11 +96,11 @@
 # Libraries to use when linking:  must include at least Xlib, the
 # dynamic loading library, and the math library (in that order).  This
 # definition is determined by the configure script.
-LIBS = @TCL_BUILD_LIB_SPEC@ @LIBS@ $(X11_LIB_SWITCHES) @DL_LIBS@ @MATH_LIBS@ -lc
+LIBS = @TCL_LIB_SPEC@ @LIBS@ $(X11_LIB_SWITCHES) @DL_LIBS@ @MATH_LIBS@ -lc
 
 # To change the compiler switches, for example to change from -O
 # to -g, change the following line:
-CFLAGS = -O
+CFLAGS = @CFLAGS@
 
 # To turn off the security checks that disallow incoming sends when
 # the X server appears to be insecure, reverse the comments on the
@@ -270,6 +272,7 @@
 @TK_LIB_FILE@: ${OBJS}
 	rm -f @TK_LIB_FILE@
 	@MAKE_LIB@
+	ln -sf @TK_LIB_FILE@ libtk41.so
 	$(RANLIB) @TK_LIB_FILE@
 
 wish: $(WISH_OBJS) $(TK_LIB_FILE)
@@ -315,10 +318,12 @@
 	@echo "Installing wish"
 	@$(INSTALL_PROGRAM) wish $(BIN_INSTALL_DIR)/wish$(VERSION)
 	@echo "Installing tkConfig.sh"
-	@$(INSTALL_DATA) tkConfig.sh $(LIB_INSTALL_DIR)/tkConfig.sh
+	@$(INSTALL_DATA) tkConfig.sh $(SCRIPT_INSTALL_DIR)/tkConfig.sh
 
 install-libraries:
 	@for i in $(INSTALL_ROOT)$(prefix)/lib $(INCLUDE_INSTALL_DIR) \
+		$(GENERIC_INCLUDE_INSTALL_DIR) \
+		$(UNIX_INCLUDE_INSTALL_DIR) \
 		$(SCRIPT_INSTALL_DIR) ; \
 	    do \
 	    if [ ! -d $$i ] ; then \
@@ -328,8 +333,17 @@
 		else true; \
 		fi; \
 	    done;
-	@echo "Installing tk.h"
-	@$(INSTALL_DATA) $(GENERIC_DIR)/tk.h $(INCLUDE_INSTALL_DIR)/tk.h
+	@for i in default.h patchlevel.h tk.h tkInt.h tkPort.h ; \
+		do \
+		echo "Installing $(GENERIC_DIR)/$$i"; \
+		$(INSTALL_DATA) $(GENERIC_DIR)/$$i $(GENERIC_INCLUDE_INSTALL_DIR); \
+		done;
+	@for i in tkUnixDefault.h tkUnixInt.h tkUnixPort.h ; \
+		do \
+		echo "Installing $(UNIX_DIR)/$$i"; \
+		$(INSTALL_DATA) $(UNIX_DIR)/$$i $(UNIX_INCLUDE_INSTALL_DIR); \
+		done;
+	@ln -sf $(GENERIC_INCLUDE_INSTALL_DIR)/tk.h $(INCLUDE_INSTALL_DIR)/tk.h
 	for i in $(SRC_DIR)/library/*.tcl $(SRC_DIR)/library/tclIndex $(SRC_DIR)/library/prolog.ps $(UNIX_DIR)/tkAppInit.c; \
 	    do \
 	    echo "Installing $$i"; \
@@ -381,28 +395,28 @@
 	@cd $(SRC_DIR)/doc; for i in *.1; \
 	    do \
 	    echo "Installing doc/$$i"; \
-	    rm -f $(MAN1_INSTALL_DIR)/$$i; \
+	    rm -f $(MAN1_INSTALL_DIR)/$$i.gz; \
 	    sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
-		    $$i > $(MAN1_INSTALL_DIR)/$$i; \
-	    chmod 444 $(MAN1_INSTALL_DIR)/$$i; \
+		    $$i |gzip -9 > $(MAN1_INSTALL_DIR)/$$i.gz; \
+	    chmod 444 $(MAN1_INSTALL_DIR)/$$i.gz; \
 	    done;
 	$(UNIX_DIR)/mkLinks $(MAN1_INSTALL_DIR)
 	@cd $(SRC_DIR)/doc; for i in *.3; \
 	    do \
 	    echo "Installing doc/$$i"; \
-	    rm -f $(MAN3_INSTALL_DIR)/$$i; \
+	    rm -f $(MAN3_INSTALL_DIR)/$$i.gz; \
 	    sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
-		    $$i > $(MAN3_INSTALL_DIR)/$$i; \
-	    chmod 444 $(MAN3_INSTALL_DIR)/$$i; \
+		    $$i |gzip -9 > $(MAN3_INSTALL_DIR)/$$i.gz; \
+	    chmod 444 $(MAN3_INSTALL_DIR)/$$i.gz; \
 	    done;
 	$(UNIX_DIR)/mkLinks $(MAN3_INSTALL_DIR)
 	@cd $(SRC_DIR)/doc; for i in *.n; \
 	    do \
 	    echo "Installing doc/$$i"; \
-	    rm -f $(MANN_INSTALL_DIR)/$$i; \
+	    rm -f $(MANN_INSTALL_DIR)/$$i.gz; \
 	    sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
-		    $$i > $(MANN_INSTALL_DIR)/$$i; \
-	    chmod 444 $(MANN_INSTALL_DIR)/$$i; \
+		    $$i |gzip -9 > $(MANN_INSTALL_DIR)/$$i.gz; \
+	    chmod 444 $(MANN_INSTALL_DIR)/$$i.gz; \
 	    done;
 	$(UNIX_DIR)/mkLinks $(MANN_INSTALL_DIR)
 
