summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authormdejong <mdejong>2005-07-25 01:33:50 (GMT)
committermdejong <mdejong>2005-07-25 01:33:50 (GMT)
commit4acbabe60fcb27871141aa191ac778f523243c4b (patch)
tree72ba278e783d250dc396b309ae2af942e7d5b6b1 /win
parent4ae82e332a39743b7d9a3df7e514069bda33a3a9 (diff)
downloadtk-4acbabe60fcb27871141aa191ac778f523243c4b.zip
tk-4acbabe60fcb27871141aa191ac778f523243c4b.tar.gz
tk-4acbabe60fcb27871141aa191ac778f523243c4b.tar.bz2
* unix/Makefile.in: Subst TCLSH_PROG and
BUILD_TCLSH into Makefile. Rework html target so that it depends on the tclsh installed on the system PATH. * unix/configure: Regen. * unix/configure.in: Invoke SC_PROG_TCLSH and SC_BUILD_TCLSH and subst into Makefile. * unix/tcl.m4: Update from Tcl. * win/Makefile.in: Subst TCLSH_PROG and BUILD_TCLSH into Makefile. Rework winhelp target so that it depends on the tclsh installed on the system PATH. * win/configure: Regen. * win/configure.in: Invoke SC_BUILD_TCLSH and subst into Makefile. * win/tcl.m4: Update from Tcl. [Tcl patch 1244153]
Diffstat (limited to 'win')
-rw-r--r--win/Makefile.in11
-rwxr-xr-xwin/configure21
-rw-r--r--win/configure.in3
-rw-r--r--win/tcl.m455
4 files changed, 57 insertions, 33 deletions
diff --git a/win/Makefile.in b/win/Makefile.in
index 8527a75..fe3ab8e 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -4,7 +4,7 @@
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.59 2003/01/13 07:30:58 mdejong Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.59.2.1 2005/07/25 01:33:54 mdejong Exp $
TCLVERSION = @TCL_VERSION@
VERSION = @TK_VERSION@
@@ -189,14 +189,14 @@ SHELL = @SHELL@
RM = rm -f
COPY = cp
-TCLSH_PROG = @TCLSH_PROG@
+BUILD_TCLSH = @BUILD_TCLSH@
# TCL_EXE is the name of a tclsh executable that is available *BEFORE*
# running make for the first time. Certain build targets (make genstubs)
# need it to be available on the PATH. This executable should *NOT* be
# required just to do a normal build although it can be required to run
# make dist.
-TCL_EXE = tclsh
+TCL_EXE = @TCLSH_PROG@
CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \
-I"${GENERIC_DIR_NATIVE}" -I"${WIN_DIR_NATIVE}" \
@@ -362,10 +362,7 @@ $(ROOT_DIR)/doc/man.macros:
doc: $(ROOT_DIR)/doc/man.macros
winhelp: $(TCL_SRC_DIR_NATIVE)/tools/man2help.tcl $(MAN2TCL)
- TCL_LIBRARY="$(TCL_SRC_DIR_NATIVE)/library"; export TCL_LIBRARY; \
- TK_LIBRARY="$(ROOT_DIR_NATIVE)/library"; export TK_LIBRARY; \
- PATH="$(PATH):$(TCL_BIN_DIR)"; export PATH; \
- $(TCLSH_PROG) "$(TCL_SRC_DIR_NATIVE)/tools/man2help.tcl" tcl "$(VER)" $(CORE_DOCS)
+ $(TCL_EXE) "$(TCL_SRC_DIR_NATIVE)/tools/man2help.tcl" tcl "$(VER)" $(CORE_DOCS)
$(COPY) "$(TCL_BIN_DIR)"/tcl.hpj ./
hcw /c /e tcl.hpj
$(COPY) ./tcl$(VER).cnt ./TCL$(VER).HLP "$(TCL_SRC_DIR_NATIVE)"/tools/
diff --git a/win/configure b/win/configure
index ffe25ec..7d3090a 100755
--- a/win/configure
+++ b/win/configure
@@ -1709,14 +1709,21 @@ echo "configure:1661: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
+ echo $ac_n "checking for tclsh in Tcl build directory""... $ac_c" 1>&6
+echo "configure:1714: checking for tclsh in Tcl build directory" >&5
+ BUILD_TCLSH=${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}
+ echo "$ac_t""$BUILD_TCLSH" 1>&6
+
+
+
echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:1714: checking for tclsh" >&5
+echo "configure:1721: checking for tclsh" >&5
if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'`
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
for dir in $search_path ; do
for j in `ls -r $dir/tclsh[8-9]*.exe 2> /dev/null` \
`ls -r $dir/tclsh* 2> /dev/null` ; do
@@ -1735,13 +1742,10 @@ fi
if test -f "$ac_cv_path_tclsh" ; then
TCLSH_PROG="$ac_cv_path_tclsh"
echo "$ac_t""$TCLSH_PROG" 1>&6
- elif test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
- # One-tree build.
- ac_cv_path_tclsh="$TCL_BIN_DIR/tclsh"
- TCLSH_PROG="$ac_cv_path_tclsh"
- echo "$ac_t""$TCLSH_PROG" 1>&6
else
- { echo "configure: error: No tclsh found in PATH: $search_path" 1>&2; exit 1; }
+ # It is not an error if an installed version of Tcl can't be located.
+ TCLSH_PROG=""
+ echo "$ac_t""No tclsh found on PATH" 1>&6
fi
@@ -2060,6 +2064,7 @@ s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
s%@TCL_DEFS@%$TCL_DEFS%g
+s%@BUILD_TCLSH@%$BUILD_TCLSH%g
s%@TCLSH_PROG@%$TCLSH_PROG%g
s%@TK_VERSION@%$TK_VERSION%g
s%@TK_MAJOR_VERSION@%$TK_MAJOR_VERSION%g
diff --git a/win/configure.in b/win/configure.in
index e4a32ee..4036dd5 100644
--- a/win/configure.in
+++ b/win/configure.in
@@ -3,7 +3,7 @@
# generate the file "configure", which is run during Tk installation
# to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.49.2.14 2005/06/18 19:36:59 dgp Exp $
+# RCS: @(#) $Id: configure.in,v 1.49.2.15 2005/07/25 01:33:54 mdejong Exp $
AC_INIT(../generic/tk.h)
AC_PREREQ(2.13)
@@ -129,6 +129,7 @@ TK_DBGX=${DBGX}
SC_PATH_TCLCONFIG($TK_PATCH_LEVEL)
SC_LOAD_TCLCONFIG
+SC_BUILD_TCLSH
SC_PROG_TCLSH
#------------------------------------------------------------------------
diff --git a/win/tcl.m4 b/win/tcl.m4
index c7b615c..540fcc1 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -680,18 +680,17 @@ AC_DEFUN(SC_WITH_TCL, [
AC_SUBST(TCL_BIN_DIR)
])
-# FIXME : SC_PROG_TCLSH should really look for the installed tclsh and
-# not the build version. If we want to use the build version in the
-# tk script, it is better to hardcode that!
-
#------------------------------------------------------------------------
# SC_PROG_TCLSH
-# Locate a tclsh shell in the following directories:
-# ${exec_prefix}/bin
-# ${prefix}/bin
-# ${TCL_BIN_DIR}
-# ${TCL_BIN_DIR}/../bin
-# ${PATH}
+# Locate a tclsh shell installed on the system path. This macro
+# will only find a Tcl shell that already exists on the system.
+# It will not find a Tcl shell in the Tcl build directory or
+# a Tcl shell that has been installed from the Tcl build directory.
+# If a Tcl shell can't be located on the PATH, then TCLSH_PROG will
+# be set to "". Extensions should take care not to create Makefile
+# rules that are run by default and depend on TCLSH_PROG. An
+# extension can't assume that an executable Tcl shell exists at
+# build time.
#
# Arguments
# none
@@ -705,7 +704,7 @@ AC_DEFUN(SC_PROG_TCLSH, [
AC_MSG_CHECKING([for tclsh])
AC_CACHE_VAL(ac_cv_path_tclsh, [
- search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'`
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
for dir in $search_path ; do
for j in `ls -r $dir/tclsh[[8-9]]*.exe 2> /dev/null` \
`ls -r $dir/tclsh* 2> /dev/null` ; do
@@ -722,13 +721,35 @@ AC_DEFUN(SC_PROG_TCLSH, [
if test -f "$ac_cv_path_tclsh" ; then
TCLSH_PROG="$ac_cv_path_tclsh"
AC_MSG_RESULT($TCLSH_PROG)
- elif test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
- # One-tree build.
- ac_cv_path_tclsh="$TCL_BIN_DIR/tclsh"
- TCLSH_PROG="$ac_cv_path_tclsh"
- AC_MSG_RESULT($TCLSH_PROG)
else
- AC_MSG_ERROR(No tclsh found in PATH: $search_path)
+ # It is not an error if an installed version of Tcl can't be located.
+ TCLSH_PROG=""
+ AC_MSG_RESULT([No tclsh found on PATH])
fi
AC_SUBST(TCLSH_PROG)
])
+
+#------------------------------------------------------------------------
+# SC_BUILD_TCLSH
+# Determine the fully qualified path name of the tclsh executable
+# in the Tcl build directory. This macro will correctly determine
+# the name of the tclsh executable even if tclsh has not yet
+# been built in the build directory. The build tclsh must be used
+# when running tests from an extension build directory. It is not
+# correct to use the TCLSH_PROG in cases like this.
+#
+# Arguments
+# none
+#
+# Results
+# Subst's the following values:
+# BUILD_TCLSH
+#------------------------------------------------------------------------
+
+AC_DEFUN(SC_BUILD_TCLSH, [
+ AC_MSG_CHECKING([for tclsh in Tcl build directory])
+ BUILD_TCLSH=${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}
+ AC_MSG_RESULT($BUILD_TCLSH)
+ AC_SUBST(BUILD_TCLSH)
+])
+