dnl autoconf rules to find tclcl
dnl $Header: /usr/src/mash/repository/common/conf/configure.in.TclCL,v 1.13 1998/10/23 17:03:28 haldar Exp $ (LBL)

dnl This next line is to fix old invocations.
AC_ARG_WITH(Tcl,	--with-Tcl: old command now replaced by --with-TclCL,
	AC_MSG_ERROR([The --with-Tcl option has been replaced with --with-tclcl.
Please insure you have an up-to-date copy of TclCL and re-run your configuration.]))

AC_ARG_WITH(tclcl,	--with-tclcl=path	specify a pathname for TclCL (the ex-libTcl), d=$withval, d="")

TclCL_VERS=1.0b7
TclCL_ALT_VERS=1.0

TclCL_H_PLACES="\
		../tclcl-$TclCL_VERS \
		../tclcl-$TclCL_ALT_VERS \
		../tclcl \
		../TclCL \
		../Tcl-$TclCL_VERS \
		../Tcl-$TclCL_ALT_VERS \
		../Tcl \
                /usr/src/local/Tcl \
                /usr/src/local/Tcl-1.0 \
                /import/Tcl/include \
                /usr/local/include \
                /usr/contrib/include \
                /usr/include"
TclCL_H_PLACES_D="$d \
 		$d/include"
TclCL_LIB_PLACES="\
		../tclcl-$TclCL_VERS \
		../tclcl-$TclCL_ALT_VERS \
		../tclcl \
		../TclCL \
		../Tcl-$TclCL_VERS \
		../Tcl-$TclCL_ALT_VERS \
		../Tcl \
                $x_libraries \
                /usr/contrib/lib \
                /usr/local/lib \
                /usr/lib \
                /usr/src/local/Tcl \
                /usr/src/local/Tcl-1.0"
TclCL_LIB_PLACES_D="$d \
        $d/lib"  
TclCL_PROG_PLACES="\
		../tclcl-$TclCL_VERS \
		../tclcl-$TclCL_ALT_VERS \
		../tclcl \
		../TclCL \
		../Tcl-$TclCL_VERS \
		../Tcl-$TclCL_ALT_VERS \
		../Tcl \
                $prefix/bin \
                $x_libraries \
                /usr/contrib/bin \
                /usr/local/bin \
                /usr/bin \
                /usr/src/local/Tcl \
                /usr/src/local/Tcl-1.0 \
                "
TclCL_PROG_PLACES_D="$d"


NS_BEGIN_PACKAGE(TclCL)
NS_CHECK_HEADER_PATH(tclcl.h,$TclCL_H_PLACES,$d,$TclCL_H_PLACES_D,V_INCLUDE_TclCL,TclCL)
NS_CHECK_LIB_PATH(tclcl$TclCL_VERS,$TclCL_LIB_PLACES,$d,$TclCL_LIB_PLACES_D,V_LIB_TclCL,TclCL)
NS_CHECK_ANY_PATH(tcl2c++,$TclCL_PROG_PLACES,$d,$TclCL_PROG_PLACES_D,V_TCL2CPP_DIR,TclCL)

V_TCL2CPP=$V_TCL2CPP_DIR/tcl2c++
AC_SUBST(V_TCL2CPP)

NS_END_PACKAGE(TclCL,yes)

