-if test "$checkBoth" = "1"; then
- oldLibs=$LIBS
- LIBS="$LIBS -lsocket -lnsl"
- AC_CHECK_FUNC(accept, , [LIBS=$oldLibs])
+AC_MSG_CHECKING(for Tcl)
+if test -r ${tclconfig}/tclConfig.sh; then
+ . ${tclconfig}/tclConfig.sh
+ if test -r ${tclconfig}/../generic/tcl.h; then
+ TCL_INCLUDE=-I${tclconfig}/../generic
+ TCL_LIB="$TCL_BUILD_LIB_SPEC $TCL_LIBS"
+ elif test -d ${TCL_PREFIX}/include/tcl${TCL_VERSION}; then
+ TCL_INCLUDE=-I${TCL_PREFIX}/include/tcl${TCL_VERSION}
+ TCL_LIB="$TCL_LIB_SPEC $TCL_LIBS"
+ else
+ TCL_INCLUDE=-I${TCL_PREFIX}/include
+ TCL_LIB="$TCL_LIB_SPEC $TCL_LIBS"
+ fi
+ SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS
+ SHLIB_LD=$TCL_SHLIB_LD
+ SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
+ SHLIB_VERSION=$TCL_SHLIB_VERSION
+ AC_MSG_RESULT($TCL_VERSION)
+ AC_DEFINE(HAVE_TCL_H,1)
+else
+ AC_MSG_RESULT(Not found)
+ AC_DEFINE(HAVE_TCL_H,0)