X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=configure.in;h=5767798759fb0d0a95be3efc0169845bd0f2f906;hb=3201adca0560cf447024e23b0e572c9b5137111c;hp=ccba64e299bf8c890fc80906170fe78da2b69c7c;hpb=5467e3fdc675f190e2616c2f24921bd22de5eab4;p=tclrobot.git diff --git a/configure.in b/configure.in index ccba64e..5767798 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ -dnl (c) Index Data 1996-2000 +dnl (c) Index Data 1996-2001 dnl See the file LICENSE for details. -dnl $Id: configure.in,v 1.6 2001/01/23 12:05:07 adam Exp $ +dnl $Id: configure.in,v 1.8 2002/09/20 09:45:02 adam Exp $ AC_INIT(hswitch.c) dnl ------ Substitutions AC_SUBST(CC) @@ -14,8 +14,7 @@ AC_PROG_INSTALL dnl dnl ------ look for Tcl tclconfig=NONE -tryprefix=NONE -AC_ARG_WITH(tclconfig, [ --with-tclconfig Path for tclConfig.sh/tkConfig.sh], [tclconfig=$withval]) +AC_ARG_WITH(tclconfig, [ --with-tclconfig Path for tclConfig.sh], [tclconfig=$withval]) if test "x$tclconfig" = xNONE; then saveprefix=${prefix} AC_PREFIX_PROGRAM(tclsh) @@ -41,14 +40,29 @@ if test "x$tclconfig" = xNONE; then prefix=/usr/local fi tclconfig=${prefix}/lib - tryprefix=${prefix} prefix=${saveprefix} + if test ! -r ${tclconfig}/tclConfig.sh; then + # Not found, try search for Tcl on Debian systems. + for d in /usr/lib/tcl*; do + if test -f $d/tclConfig.sh; then + tclconfig=$d + fi + done + fi +fi +AC_MSG_CHECKING(for Tcl) +if test -d ${tclconfig}; then + tclconfig=${tclconfig}/tclConfig.sh fi -if test -r ${tclconfig}/tclConfig.sh; then - AC_MSG_CHECKING(for Tcl) - . ${tclconfig}/tclConfig.sh +if test -r ${tclconfig}; then + . ${tclconfig} TCLLIB="${TCL_LIB_SPEC} ${TCL_LIBS}" - TCLINC=-I${TCL_PREFIX}/include + + if test -d ${TCL_PREFIX}/include/tcl${TCL_VERSION}; then + TCLINC=-I${TCL_PREFIX}/include/tcl${TCL_VERSION} + else + TCLINC=-I${TCL_PREFIX}/include + fi RANLIB=$TCL_RANLIB SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS SHLIB_LD=$TCL_SHLIB_LD @@ -57,32 +71,6 @@ if test -r ${tclconfig}/tclConfig.sh; then AC_MSG_RESULT($TCL_VERSION) CC=$TCL_CC else - AC_PROG_CC - SHLIB_CFLAGS="" - SHLIB_LD="shared-linker" - SHLIB_SUFFIX="" - SHLIB_VERSION="" - AC_PROG_RANLIB - AC_MSG_CHECKING(for Tcl) - TCL_VERSION=nope - for i in "" 7.4 7.5 7.6 8.0; do - if test -r ${tryprefix}/lib/libtcl${i}.a; then - TCL_VERSION=$i - fi - done - if test "$TCL_VERSION" = nope; then - AC_MSG_WARN(Didn't find Tcl) - TCL_LIB_SPEC=-ltcl - TCLINC=" # -I.. Tcl/Tk include path" - else - if test "$TCL_VERSION" = ""; then - AC_MSG_RESULT(7.3) - else - AC_MSG_RESULT($TCL_VERSION) - fi - TCL_LIB_SPEC=${tryprefix}/lib/libtcl${TCL_VERSION}.a - TCLINC=-I${tryprefix}/include - fi - TCLLIB="${TCL_LIB_SPEC} ${LIBS} -lm" + AC_MSG_RESULT(Not found) fi AC_OUTPUT(Makefile)