summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/Makefile.in11
-rwxr-xr-xwin/configure32
-rw-r--r--win/configure.in5
-rw-r--r--win/tcl.m457
4 files changed, 59 insertions, 46 deletions
diff --git a/win/Makefile.in b/win/Makefile.in
index 277a99a..5986853 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.62 2004/07/20 10:23:51 das Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.63 2005/08/23 18:25:34 mdejong Exp $
TCLVERSION = @TCL_VERSION@
VERSION = @TK_VERSION@
@@ -198,14 +198,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}" \
@@ -372,10 +372,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 a74d203..145b936 100755
--- a/win/configure
+++ b/win/configure
@@ -309,7 +309,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT AR RANLIB RC SET_MAKE TCL_THREADS CYGPATH DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING CPP EGREP MAN2TCLFLAGS CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_DEFS TCLSH_PROG TK_VERSION TK_MAJOR_VERSION TK_MINOR_VERSION TK_PATCH_LEVEL TK_DBGX TK_LIB_FILE TK_DLL_FILE TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_BUILD_STUB_LIB_SPEC TK_SRC_DIR TK_BIN_DIR TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_DBGX CFG_TK_SHARED_LIB_SUFFIX CFG_TK_UNSHARED_LIB_SUFFIX CFG_TK_EXPORT_FILE_SUFFIX TK_SHARED_BUILD DEPARG EXTRA_CFLAGS STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX CC_OBJNAME CC_EXENAME LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LDFLAGS_CONSOLE LDFLAGS_WINDOW RC_OUT RC_TYPE RC_INCLUDE RC_DEFINE RC_DEFINES TK_RES RES LIBS_GUI DLLSUFFIX LIBPREFIX LIBSUFFIX EXESUFFIX LIBRARIES MAKE_LIB POST_MAKE_LIB MAKE_DLL MAKE_EXE TK_LIB_FLAG TK_LIB_SPEC TK_BUILD_LIB_SPEC TK_STUB_LIB_SPEC TK_STUB_LIB_PATH TK_BUILD_STUB_LIB_PATH TK_CC_SEARCH_FLAGS TK_LD_SEARCH_FLAGS LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT AR RANLIB RC SET_MAKE TCL_THREADS CYGPATH DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING CPP EGREP MAN2TCLFLAGS CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_DEFS BUILD_TCLSH TCLSH_PROG TK_VERSION TK_MAJOR_VERSION TK_MINOR_VERSION TK_PATCH_LEVEL TK_DBGX TK_LIB_FILE TK_DLL_FILE TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_BUILD_STUB_LIB_SPEC TK_SRC_DIR TK_BIN_DIR TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_DBGX CFG_TK_SHARED_LIB_SUFFIX CFG_TK_UNSHARED_LIB_SUFFIX CFG_TK_EXPORT_FILE_SUFFIX TK_SHARED_BUILD DEPARG EXTRA_CFLAGS STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX CC_OBJNAME CC_EXENAME LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LDFLAGS_CONSOLE LDFLAGS_WINDOW RC_OUT RC_TYPE RC_INCLUDE RC_DEFINE RC_DEFINES TK_RES RES LIBS_GUI DLLSUFFIX LIBPREFIX LIBSUFFIX EXESUFFIX LIBRARIES MAKE_LIB POST_MAKE_LIB MAKE_DLL MAKE_EXE TK_LIB_FLAG TK_LIB_SPEC TK_BUILD_LIB_SPEC TK_STUB_LIB_SPEC TK_STUB_LIB_PATH TK_BUILD_STUB_LIB_PATH TK_CC_SEARCH_FLAGS TK_LD_SEARCH_FLAGS LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -2542,12 +2542,6 @@ _ACEOF
#define USE_THREAD_ALLOC 1
_ACEOF
- # USE_THREAD_STORAGE tells us to use the new generic thread
- # storage subsystem.
- cat >>confdefs.h <<\_ACEOF
-#define USE_THREAD_STORAGE 1
-_ACEOF
-
else
TCL_THREADS=0
echo "$as_me:$LINENO: result: no (default)" >&5
@@ -3740,6 +3734,14 @@ echo "${ECHO_T}file not found" >&6
+ echo "$as_me:$LINENO: checking for tclsh in Tcl build directory" >&5
+echo $ECHO_N "checking for tclsh in Tcl build directory... $ECHO_C" >&6
+ BUILD_TCLSH=${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}
+ echo "$as_me:$LINENO: result: $BUILD_TCLSH" >&5
+echo "${ECHO_T}$BUILD_TCLSH" >&6
+
+
+
echo "$as_me:$LINENO: checking for tclsh" >&5
echo $ECHO_N "checking for tclsh... $ECHO_C" >&6
@@ -3747,7 +3749,7 @@ echo $ECHO_N "checking for tclsh... $ECHO_C" >&6
echo $ECHO_N "(cached) $ECHO_C" >&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
@@ -3767,16 +3769,11 @@ fi
TCLSH_PROG="$ac_cv_path_tclsh"
echo "$as_me:$LINENO: result: $TCLSH_PROG" >&5
echo "${ECHO_T}$TCLSH_PROG" >&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 "$as_me:$LINENO: result: $TCLSH_PROG" >&5
-echo "${ECHO_T}$TCLSH_PROG" >&6
else
- { { echo "$as_me:$LINENO: error: No tclsh found in PATH: $search_path" >&5
-echo "$as_me: error: No tclsh found in PATH: $search_path" >&2;}
- { (exit 1); exit 1; }; }
+ # It is not an error if an installed version of Tcl can't be located.
+ TCLSH_PROG=""
+ echo "$as_me:$LINENO: result: No tclsh found on PATH" >&5
+echo "${ECHO_T}No tclsh found on PATH" >&6
fi
@@ -4587,6 +4584,7 @@ s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t
s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t
s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t
s,@TCL_DEFS@,$TCL_DEFS,;t t
+s,@BUILD_TCLSH@,$BUILD_TCLSH,;t t
s,@TCLSH_PROG@,$TCLSH_PROG,;t t
s,@TK_VERSION@,$TK_VERSION,;t t
s,@TK_MAJOR_VERSION@,$TK_MAJOR_VERSION,;t t
diff --git a/win/configure.in b/win/configure.in
index ba50cf9..8310ef6 100644
--- a/win/configure.in
+++ b/win/configure.in
@@ -3,10 +3,10 @@
# generate the file "configure", which is run during Tk installation
# to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.60 2005/06/07 14:20:18 dkf Exp $
+# RCS: @(#) $Id: configure.in,v 1.61 2005/08/23 18:25:34 mdejong Exp $
AC_INIT(../generic/tk.h)
-AC_PREREQ(2.57)
+AC_PREREQ(2.59)
# The following define is needed when building with Cygwin since newer
# versions of autoconf incorrectly set SHELL to /bin/bash instead of
@@ -154,6 +154,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 afba219..5b9f8c0 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -257,9 +257,6 @@ AC_DEFUN(SC_ENABLE_THREADS, [
# USE_THREAD_ALLOC tells us to try the special thread-based
# allocator that significantly reduces lock contention
AC_DEFINE(USE_THREAD_ALLOC)
- # USE_THREAD_STORAGE tells us to use the new generic thread
- # storage subsystem.
- AC_DEFINE(USE_THREAD_STORAGE)
else
TCL_THREADS=0
AC_MSG_RESULT([no (default)])
@@ -690,18 +687,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
@@ -715,7 +711,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
@@ -732,17 +728,38 @@ 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)
+])
+
#--------------------------------------------------------------------
# SC_TCL_CFG_ENCODING TIP #59
#