From 4c572183d5ebc719ffc901aaa7fba76d80ffcd24 Mon Sep 17 00:00:00 2001 From: stefanjones Date: Thu, 17 Jul 2003 13:32:51 +0000 Subject: [PATCH] * configure.in : Change --enable-tcl to --with-tcl[=dir] for non-std install setup. --- ChangeLog | 4 ++++ configure.in | 26 +++++++++++++++++--------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4db1eeb80..a4a34ea3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,10 @@ * configure.in src/xspice/xspice.c : Fix compile problems with garbage collector + * configure.in : + Change --enable-tcl to --with-tcl[=dir] for non-std + install setup. + 2003-07-17 Steven Borley * src/frontend/resource.c src/frontend/parser/complete.c diff --git a/configure.in b/configure.in index 3e4b6c469..bae2ced93 100644 --- a/configure.in +++ b/configure.in @@ -56,8 +56,8 @@ AC_ARG_ENABLE(xspice, [ --enable-xspice Enables XSpice enchancements, experimental *not in standard distribution*]) dnl --enable-tcl: define TCL_MODULE in the code. This is for tcl support -AC_ARG_ENABLE(tcl, - [ --enable-tcl Compiles the tcl module instead, experimental, see README in src/tcl/README]) +AC_ARG_WITH(tcl, + [ --with-tcl[=tcldir] Compiles the tcl module instead, experimental, see README.Tcl]) dnl --enable-cluster: define CLUSTER in the code. This is for tcl support AC_ARG_ENABLE(cluster, @@ -114,16 +114,16 @@ AC_CANONICAL_HOST dnl dnl The tclSpice options dnl -if test "$enable_tcl" = "yes"; then +if test "x$with_tcl" != "x" -a "$with_tcl" != "no" ; then AC_DEFINE(TCL_MODULE) with_x=no enable_shared=no AC_MSG_CHECKING([for tclConfig.sh]) tcl_config_sh="" - if test "x$blt_with_tcl" != "x" ; then + if test "x$with_tcl" != "xyes" ; then for dir in \ - $blt_with_tcl + $with_tcl do if test -r "$dir/tclConfig.sh" ; then tcl_config_sh="$dir/tclConfig.sh" @@ -181,7 +181,13 @@ fi . $tcl_config_sh -AC_CHECK_HEADERS(tcl.h blt.h,,AC_MSG_ERROR(Couldn't find Tcl/BLT headers)) +CFLAGS="$CFLAGS $TCL_INCLUDE_SPEC" + +AC_CHECK_HEADERS(tcl.h blt.h,,AC_MSG_ERROR(Couldn't find Tcl/BLT headers),$TCL_INCLUDE_SPEC) + +if test ! -x "$TCL_EXEC_PREFIX/bin/tclsh$TCL_VERSION" ; then +AC_MSG_ERROR(Couldn't find $TCL_EXEC_PREFIX/bin/tclsh$TCL_VERSION) +fi AC_MSG_CHECKING(for TCL module BLT) rm -f conftest.tcl @@ -189,7 +195,8 @@ cat > conftest.tcl << EOF package require BLT; exit; EOF -if (wish conftest.tcl; exit) 2>/dev/null; then +if ($TCL_EXEC_PREFIX/bin/tclsh$TCL_VERSION conftest.tcl; exit) 2>/dev/null +then AC_MSG_RESULT(Found) else AC_MSG_ERROR(Couldn't find BLT) @@ -202,7 +209,8 @@ cat > conftest.tcl << EOF package require tclreadline; exit; EOF -if (wish conftest.tcl; exit) 2>/dev/null; then +if ($TCL_EXEC_PREFIX/bin/tclsh$TCL_VERSION conftest.tcl; exit) 2>/dev/null +then AC_MSG_RESULT(Found) else AC_MSG_ERROR(Couldn't find tclreadline) @@ -508,6 +516,6 @@ tests/TransImpedanceAmp/Makefile ) dnl Printout Tcl option -if test "$enable_tcl" = "yes"; then +if test "x$with_tcl" != "x" -a "$with_tcl" != "no" ; then echo 'Tcl module being made, use "make tcl" and "make install-tcl", read README.Tcl' fi