#!/bin/sh
#
# $Id: pre-configure,v 1.1.1.1 1994/10/06 01:29:34 jkh Exp $
#
# Fixup the ./configure script to know where tcl is, and to use
# shared libs.
#
# The first depends element is the tcl location, the second
# is the tk location.
#
for depend in $DEPENDS
do
  tclloc=$depend
  break
done

sed	-e "s;TCL_SRCDIR=\"\";TCL_SRCDIR=\"${tclloc}/work/tcl7.3\";" \
	-e "s;test -n \"\$SHLIB\";test 0 = 1;" \
	< $WRKSRC/configure > $WRKSRC/configure.new
	mv $WRKSRC/configure $WRKSRC/configure.bak
	mv $WRKSRC/configure.new $WRKSRC/configure
	chmod +x $WRKSRC/configure
