From 0e6d3cae9c929071afbef4c2fdca75d4ea7631b3 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 15 Jan 2013 23:01:37 +0000 Subject: more minor tweaks, getting it to run with Tcl 9.0 when compiled against 8.5 or 8.6 headers --- generic/tkConsole.c | 2 +- generic/tkMain.c | 2 +- generic/tkWindow.c | 2 +- unix/Makefile.in | 2 +- unix/configure | 4 +++- unix/configure.in | 4 +++- win/Makefile.in | 2 +- 7 files changed, 11 insertions(+), 7 deletions(-) diff --git a/generic/tkConsole.c b/generic/tkConsole.c index f894638..9192c99 100644 --- a/generic/tkConsole.c +++ b/generic/tkConsole.c @@ -224,7 +224,7 @@ Tk_InitConsoleChannels( * only an issue when Tk is loaded dynamically. */ - if (Tcl_InitStubs(interp, "8.5.0", 0) == NULL) { + if (Tcl_InitStubs(interp, "8.5.0-", 0) == NULL) { return; } diff --git a/generic/tkMain.c b/generic/tkMain.c index b2496d8..352aa18 100644 --- a/generic/tkMain.c +++ b/generic/tkMain.c @@ -144,7 +144,7 @@ Tk_MainEx( * only an issue when Tk is loaded dynamically. */ - if (Tcl_InitStubs(interp, "8.5.0", 0) == NULL) { + if (Tcl_InitStubs(interp, "8.5.0-", 0) == NULL) { abort(); } diff --git a/generic/tkWindow.c b/generic/tkWindow.c index ac69455..49efdeb 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -3024,7 +3024,7 @@ Initialize( * Ensure that we are getting a compatible version of Tcl. */ - if (Tcl_InitStubs(interp, "8.5.0", 0) == NULL) { + if (Tcl_InitStubs(interp, "8.5.0-", 0) == NULL) { return TCL_ERROR; } diff --git a/unix/Makefile.in b/unix/Makefile.in index 1da2d72..aaa940c 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -699,7 +699,7 @@ install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) ${WISH_EXE} echo "Creating package index $(PKG_INDEX)"; \ rm -f "$(PKG_INDEX)"; \ (\ - echo "if {[catch {package present Tcl 8.5.0}]} return";\ + echo "if {[catch {package present Tcl 8.5.0-}]} return";\ relative=`echo | awk '{ORS=" "; split("$(TK_PKG_DIR)",a,"/"); for (f in a) {print ".."}}'`;\ if test "x$(DLL_INSTALL_DIR)" != "x$(BIN_INSTALL_DIR)"; then \ echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}$(TK_LIB_FILE)]] Tk]";\ diff --git a/unix/configure b/unix/configure index cc918fa..4e1a16f 100755 --- a/unix/configure +++ b/unix/configure @@ -1585,7 +1585,8 @@ echo "${ECHO_T}$BUILD_TCLSH" >&6 -if test "${TCL_VERSION}" != "${TK_VERSION}"; then +if test "${TCL_MAJOR_VERSION}" == "${TK_MAJOR_VERSION}"; then +if test "${TCL_MINOR_VERSION}" -lt "${TK_MINOR_VERSION}"; then { { echo "$as_me:$LINENO: error: ${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}. Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl ${TK_VERSION}. Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl ${TK_VERSION}." >&5 @@ -1594,6 +1595,7 @@ Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl ${TK_VERSION}. Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl ${TK_VERSION}." >&2;} { (exit 1); exit 1; }; } fi +fi #------------------------------------------------------------------------ # Handle the --prefix=... option diff --git a/unix/configure.in b/unix/configure.in index d052675..c615494 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -39,11 +39,13 @@ SC_LOAD_TCLCONFIG SC_PROG_TCLSH SC_BUILD_TCLSH -if test "${TCL_VERSION}" != "${TK_VERSION}"; then +if test "${TCL_MAJOR_VERSION}" == "${TK_MAJOR_VERSION}"; then +if test "${TCL_MINOR_VERSION}" -lt "${TK_MINOR_VERSION}"; then AC_MSG_ERROR([${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}. Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl ${TK_VERSION}. Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl ${TK_VERSION}.]) fi +fi #------------------------------------------------------------------------ # Handle the --prefix=... option diff --git a/win/Makefile.in b/win/Makefile.in index 550e6ae..c05608f 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -482,7 +482,7 @@ install-binaries: binaries @echo "Creating package index $(PKG_INDEX)"; @$(RM) $(PKG_INDEX); @(\ - echo "if {[catch {package present Tcl 8.5.0}]} return";\ + echo "if {[catch {package present Tcl 8.5.0-}]} return";\ echo "if {(\$$::tcl_platform(platform) eq \"unix\") && ([info exists ::env(DISPLAY)]";\ echo " || ([info exists ::argv] && (\"-display\" in \$$::argv)))} {";\ echo " package ifneeded Tk $(VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir .. .. bin libtk$(VERSION).dll]] Tk]";\ -- cgit v0.12