[Xotcl] Bug: configure step chooses wrong tclsh [PATCH]

Jim Lynch jim at jam.sessionsnet.org
Tue Apr 6 16:00:06 CEST 2004


The following patch should solve the problem.

One way of applying it:

 - save it to a file, say "xotch-1.2.0/choose-right-tclsh.diff"
 - cd xotcl-1.2.0
 - cat choose-right-tclsh.diff | patch -p1

Once you have done this, you must run autoconf to regenerate
the script "configure". Following this, the configure script
will always choose the tclsh specified by the supplied tclConfig.sh.

---- cut here ----
diff -Naur xotcl-1.2.0-orig/unix/configure.in xotcl-1.2.0/unix/configure.in
--- xotcl-1.2.0/unix/configure.in       2004-01-28 00:20:39.000000000 -0800
+++ xotcl-1.2.0-work/unix/configure.in  2004-04-05 06:49:39.000000000 -0700
@@ -471,7 +471,26 @@
 # versions have bugs in the pkg_mkIndex routine.
 #--------------------------------------------------------------------
  
-SC_PROG_TCLSH
+#--------------------------------------------------------------------
+# tclsh should be at $TCL_PREFIX/bin/tclsh$TCL_VERSION after
+# loading tclConfig.sh, so: test for this file; do equiv of
+# SC_PROG_TCLSH if found, otherwise complain about error.
+# Require (instead) that we use the tclsh -specified- by
+# tclConfig.sh since others won't be able to do things like
+# find the right module/lib files, etc.
+#   -Jim Lynch
+#--------------------------------------------------------------------
+
+
+if test -x "$TCL_PREFIX/bin/tclsh$TCL_VERSION"
+then
+    TCLSH_PROG="$TCL_PREFIX/bin/tclsh$TCL_VERSION"
+    AC_MSG_CHECKING([for tclsh])
+    AC_MSG_RESULT(found at $TCLSH_PROG)
+    AC_SUBST(TCLSH_PROG)
+else
+    AC_MSG_ERROR(the appropriate tclsh was not found)
+fi
  
 #
 # XOTcl specific configs
---- cut here ----

-Jim

--
Jam sessions community web site: http://jam.sessionsnet.org



More information about the Xotcl mailing list