From 90307605832ae8bf5cd7ec028c9b485fbdfe77d7 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 10 Dec 2012 18:45:42 +0000 Subject: Set of changes that permits Tk 8.5.14 to build against the released header files of Tcl 8.6.0. Developed and tested only on linux so far. A step in the saga to decouple Tcl and Tk releases. --- generic/tk.h | 10 +++++++++- generic/tkWindow.c | 2 ++ unix/Makefile.in | 2 +- unix/configure | 11 ++++++++++- unix/configure.in | 7 ++++++- 5 files changed, 28 insertions(+), 4 deletions(-) diff --git a/generic/tk.h b/generic/tk.h index 8c13df2..3d20e02 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -17,10 +17,18 @@ #define _TK #include -#if (TCL_MAJOR_VERSION != 8) || (TCL_MINOR_VERSION != 5) +#if (TCL_MAJOR_VERSION != 8) || (TCL_MINOR_VERSION < 5) # error Tk 8.5 must be compiled with tcl.h from Tcl 8.5 #endif +#ifndef _ANSI_ARGS_ +# ifndef NO_PROTOTYPES +# define _ANSI_ARGS_(x) x +# else +# define _ANSI_ARGS_(x) () +# endif +#endif + /* * For C++ compilers, use extern "C" */ diff --git a/generic/tkWindow.c b/generic/tkWindow.c index 995f71f..79f0ae3 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -3281,9 +3281,11 @@ Initialize( Tcl_SetMainLoop(Tk_MainLoop); +/* #undef Tk_InitStubs Tk_InitStubs(interp, TK_VERSION, 1); +*/ /* * Initialized the themed widget set diff --git a/unix/Makefile.in b/unix/Makefile.in index c530368..37fabf9 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -373,7 +373,7 @@ TTK_OBJS = \ ttkTagSet.o ttkTheme.o ttkTrace.o ttkTrack.o ttkTreeview.o \ ttkWidget.o ttkStubInit.o -STUB_OBJS = tkStubInit.o tkStubLib.o +STUB_OBJS = tkStubInit.o STUB_LIB_OBJS = tkStubLib.o ttkStubLib.o diff --git a/unix/configure b/unix/configure index cc918fa..3fa4f75 100755 --- a/unix/configure +++ b/unix/configure @@ -1585,7 +1585,16 @@ echo "${ECHO_T}$BUILD_TCLSH" >&6 -if test "${TCL_VERSION}" != "${TK_VERSION}"; then +if test "${TCL_MAJOR_VERSION}" != "${TK_MAJOR_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 +echo "$as_me: 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}." >&2;} + { (exit 1); exit 1; }; } +fi +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 diff --git a/unix/configure.in b/unix/configure.in index d052675..deb271e 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -39,7 +39,12 @@ 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 + 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 +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}.]) -- cgit v0.12