$OpenBSD: patch-Makefile_in,v 1.2 2001/10/17 11:19:59 naddy Exp $
--- Makefile.in.orig	Fri May 14 08:55:33 1999
+++ Makefile.in	Wed Oct 17 00:48:06 2001
@@ -15,11 +15,11 @@ PURELINK =
 PURIFY =
 
 # Libraries needed to link with Tcl & (optionally) Tk
-TCLTK_LIBS = @TCLTKLIBS@
+TCLTK_LIBS = -L/usr/lib @TCLTKLIBS@
 # Include directives needed to compile with Tcl & Tk, and
 # -DTCL if Tcl is available, and
 # -DTK if Tk is available.
-TCLTK_FLAGS = @TCLTKFLAGS@
+TCLTK_FLAGS = @TCLTKFLAGS@ -I${X11BASE}/include
 
 # Libraries needed to link with GNU readline
 RLLIBS = @RLLIBS@
@@ -109,29 +109,29 @@ libcc/libpicc.a: FORCE
 	$(SUBMAKE_COMM_CC) libpicc.a
 
 installdirs:
-	$(SHELL) ${srcdir}/scripts/mkinstalldirs $(bindir) $(includedir) $(libdir) $(pixdir) $(mandir1) $(mandir7)
+	$(SHELL) ${srcdir}/scripts/mkinstalldirs ${DESTDIR}/$(bindir) \
+		${DESTDIR}/$(includedir) ${DESTDIR}/$(libdir) \
+		${DESTDIR}/$(pixdir) ${DESTDIR}/$(mandir1) \
+		${DESTDIR}/$(mandir7)
 
 install: $(EXECS) installdirs $(PILIB) $(PICCLIB)
-	$(INSTALL_DATA) $(PILIB) $(libdir)/libpisock.la
-	if test -n "$(PICCLIB)"; then \
-		$(INSTALL_DATA) $(PICCLIB) $(libdir)/libpicc.la; \
-	fi
+	$(LIBTOOL) $(INSTALL_DATA) $(PILIB) ${DESTDIR}/$(libdir)/libpisock.la
+	$(LIBTOOL) $(INSTALL_DATA) $(PICCLIB) ${DESTDIR}/$(libdir)/libpicc.la
 	for p in $(EXECS); do \
-		$(INSTALL_PROGRAM) $$p $(bindir)/$$p; \
+		$(LIBTOOL) $(INSTALL_PROGRAM) $$p ${DESTDIR}/$(bindir)/$$p; \
 	done
 	for h in include/*.h $(srcdir)/include/*.h include/*.hxx $(srcdir)/include/*.hxx; do \
-		$(INSTALL_DATA) $$h $(includedir)/`basename $$h`; \
+		$(INSTALL_DATA) $$h ${DESTDIR}/$(includedir)/`basename $$h`; \
 	done
 	for m in man/*.1; do \
-		$(INSTALL_DATA) $$m $(mandir1)/`basename $$m`; \
+		$(INSTALL_DATA) $$m ${DESTDIR}/$(mandir1)/`basename $$m`; \
 	done
 	for m in man/*.7; do \
-		$(INSTALL_DATA) $$m $(mandir7)/`basename $$m`; \
+		$(INSTALL_DATA) $$m ${DESTDIR}/$(mandir7)/`basename $$m`; \
 	done
 	for p in $(srcdir)/pix/*.gif $(srcdir)/pix/*.xbm; do \
-		$(INSTALL_DATA) $$p $(pixdir)/`basename $$p`; \
+		$(INSTALL_DATA) $$p ${DESTDIR}/$(pixdir)/`basename $$p`; \
 	done
-	$(LIBTOOL) -n --finish $(libdir)
 
 uninstall:
 	-for p in $(EXECS) $(PERLEXECS) $(CXXEXECS) $(TCLEXECS); do \
