1 dnl (c) Index Data 1996-2000
2 dnl See the file LICENSE for details.
3 dnl $Id: configure.in,v 1.6 2001/01/23 12:05:07 adam Exp $
5 dnl ------ Substitutions
11 AC_SUBST(SHLIB_SUFFIX)
12 AC_SUBST(SHLIB_VERSION)
15 dnl ------ look for Tcl
18 AC_ARG_WITH(tclconfig, [ --with-tclconfig Path for tclConfig.sh/tkConfig.sh], [tclconfig=$withval])
19 if test "x$tclconfig" = xNONE; then
21 AC_PREFIX_PROGRAM(tclsh)
22 if test "x$prefix" = xNONE; then
23 AC_PREFIX_PROGRAM(tclsh8.3)
25 if test "x$prefix" = xNONE; then
26 AC_PREFIX_PROGRAM(tclsh8.2)
28 if test "x$prefix" = xNONE; then
29 AC_PREFIX_PROGRAM(tclsh8.1)
31 if test "x$prefix" = xNONE; then
32 AC_PREFIX_PROGRAM(tclsh8.0)
34 if test "x$prefix" = xNONE; then
35 AC_PREFIX_PROGRAM(tclsh7.6)
37 if test "x$prefix" = xNONE; then
38 AC_PREFIX_PROGRAM(tclsh7.5)
40 if test "x$prefix" = xNONE; then
43 tclconfig=${prefix}/lib
47 if test -r ${tclconfig}/tclConfig.sh; then
48 AC_MSG_CHECKING(for Tcl)
49 . ${tclconfig}/tclConfig.sh
50 TCLLIB="${TCL_LIB_SPEC} ${TCL_LIBS}"
51 TCLINC=-I${TCL_PREFIX}/include
53 SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS
54 SHLIB_LD=$TCL_SHLIB_LD
55 SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
56 SHLIB_VERSION=$TCL_SHLIB_VERSION
57 AC_MSG_RESULT($TCL_VERSION)
62 SHLIB_LD="shared-linker"
66 AC_MSG_CHECKING(for Tcl)
68 for i in "" 7.4 7.5 7.6 8.0; do
69 if test -r ${tryprefix}/lib/libtcl${i}.a; then
73 if test "$TCL_VERSION" = nope; then
74 AC_MSG_WARN(Didn't find Tcl)
76 TCLINC=" # -I.. Tcl/Tk include path"
78 if test "$TCL_VERSION" = ""; then
81 AC_MSG_RESULT($TCL_VERSION)
83 TCL_LIB_SPEC=${tryprefix}/lib/libtcl${TCL_VERSION}.a
84 TCLINC=-I${tryprefix}/include
86 TCLLIB="${TCL_LIB_SPEC} ${LIBS} -lm"