Look for Tcl on Debian systems
[tclrobot.git] / configure.in
index 017b51b..5767798 100644 (file)
@@ -1,6 +1,6 @@
 dnl (c) Index Data 1996-2001
 dnl See the file LICENSE for details.
-dnl $Id: configure.in,v 1.7 2001/10/26 13:26:11 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,7 +14,6 @@ AC_PROG_INSTALL
 dnl
 dnl ------ look for Tcl
 tclconfig=NONE
-tryprefix=NONE
 AC_ARG_WITH(tclconfig, [  --with-tclconfig        Path for tclConfig.sh], [tclconfig=$withval])
 if test "x$tclconfig" = xNONE; then
         saveprefix=${prefix}
@@ -41,8 +40,15 @@ 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