summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-03-28 07:36:44 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-03-28 07:36:44 (GMT)
commit0198f40eb58a938f901dac686a48e9635c8d1156 (patch)
tree209d2a079e30e4becaca7dbdbdc4f8575328eb14
parentd2775095f0bf50afa0506eca7153d42d0667806a (diff)
downloadtk-0198f40eb58a938f901dac686a48e9635c8d1156.zip
tk-0198f40eb58a938f901dac686a48e9635c8d1156.tar.gz
tk-0198f40eb58a938f901dac686a48e9635c8d1156.tar.bz2
Easier solution, with proper protection and configure warnings.
-rw-r--r--generic/tkCmds.c7
-rw-r--r--generic/tkMain.c2
-rw-r--r--generic/tkWindow.c2
-rwxr-xr-xunix/configure6
-rw-r--r--unix/configure.in4
-rwxr-xr-xwin/configure6
-rw-r--r--win/configure.in4
7 files changed, 23 insertions, 8 deletions
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index 09c1d67..a655341 100644
--- a/generic/tkCmds.c
+++ b/generic/tkCmds.c
@@ -23,12 +23,7 @@
#endif
#if (TCL_MAJOR_VERSION==8) && (TCL_MINOR_VERSION<6)
-# if defined(STATIC_BUILD)
-# define Tcl_Canceled(interp, flags) (TCL_OK)
-# else
-# define Tcl_Canceled \
- (tclStubsPtr->tclCanceled) /* 581 */
-# endif
+# define Tcl_Canceled(interp, flags) (TCL_OK)
#endif
/*
diff --git a/generic/tkMain.c b/generic/tkMain.c
index cb1fb5e..8bebb3d 100644
--- a/generic/tkMain.c
+++ b/generic/tkMain.c
@@ -135,7 +135,7 @@ Tk_MainEx(
* Ensure that we are getting a compatible version of Tcl.
*/
- if (Tcl_InitStubs(interp, "8.5.0", 0) == NULL) {
+ if (Tcl_InitStubs(interp, TCL_VERSION ".0", 0) == NULL) {
if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
abort();
} else {
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 2901256..d40e7de 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, TCL_VERSION ".0", 0) == NULL) {
return TCL_ERROR;
}
diff --git a/unix/configure b/unix/configure
index 93c2451..01274fe 100755
--- a/unix/configure
+++ b/unix/configure
@@ -1603,6 +1603,12 @@ 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
+if test "${TCL_MINOR_VERSION}" != "${TK_MINOR_VERSION}"; then
+ { echo "$as_me:$LINENO: WARNING: ${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}.
+Building Tk ${TK_VERSION} this way results in a binary which is no longer loadable in Tcl ${TK_VERSION}" >&5
+echo "$as_me: WARNING: ${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}.
+Building Tk ${TK_VERSION} this way results in a binary which is no longer loadable in Tcl ${TK_VERSION}" >&2;}
+fi
#------------------------------------------------------------------------
# Handle the --prefix=... option
diff --git a/unix/configure.in b/unix/configure.in
index 0e7db3c..6c6e68b 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -49,6 +49,10 @@ if test "${TCL_MINOR_VERSION}" -lt "${TK_MINOR_VERSION}"; then
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
+if test "${TCL_MINOR_VERSION}" != "${TK_MINOR_VERSION}"; then
+ AC_MSG_WARN([${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}.
+Building Tk ${TK_VERSION} this way results in a binary which is no longer loadable in Tcl ${TK_VERSION}])
+fi
#------------------------------------------------------------------------
# Handle the --prefix=... option
diff --git a/win/configure b/win/configure
index 9e6acbd..33030b9 100755
--- a/win/configure
+++ b/win/configure
@@ -3302,6 +3302,12 @@ 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
+if test "${TCL_MINOR_VERSION}" != "${TK_MINOR_VERSION}"; then
+ { echo "$as_me:$LINENO: WARNING: ${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}.
+Building Tk ${TK_VERSION} this way results in a binary which is no longer loadable in Tcl ${TK_VERSION}" >&5
+echo "$as_me: WARNING: ${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}.
+Building Tk ${TK_VERSION} this way results in a binary which is no longer loadable in Tcl ${TK_VERSION}" >&2;}
+fi
#--------------------------------------------------------------------
# The statements below define a collection of compile flags. This
diff --git a/win/configure.in b/win/configure.in
index 87826fb..c5f09cc 100644
--- a/win/configure.in
+++ b/win/configure.in
@@ -91,6 +91,10 @@ if test "${TCL_MINOR_VERSION}" -lt "${TK_MINOR_VERSION}"; then
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
+if test "${TCL_MINOR_VERSION}" != "${TK_MINOR_VERSION}"; then
+ AC_MSG_WARN([${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}.
+Building Tk ${TK_VERSION} this way results in a binary which is no longer loadable in Tcl ${TK_VERSION}])
+fi
#--------------------------------------------------------------------
# The statements below define a collection of compile flags. This