Index: CMake/cmVTKWrapTcl2Command.c
===================================================================
RCS file: /cvsroot/VTK/VTK/CMake/cmVTKWrapTcl2Command.c,v
retrieving revision 1.19
diff -u -r1.19 cmVTKWrapTcl2Command.c
--- CMake/cmVTKWrapTcl2Command.c	31 Oct 2003 21:52:27 -0000	1.19
+++ CMake/cmVTKWrapTcl2Command.c	19 Nov 2004 15:13:49 -0000
@@ -47,6 +47,12 @@
     }
   
   fprintf(fout,"#include \"vtkTclUtil.h\"\n");
+  if (!strcmp(kitName,"Vtkrenderingtcl"))
+    {
+    fprintf(fout,"#ifdef USE_TK_STUBS\n"
+                   "  #include \"vtkTk.h\"\n"
+                   "#endif\n");
+    }
   fprintf(fout,"#include \"vtkVersion.h\"\n");
   fprintf(fout,"#define VTK_TCL_TO_STRING(x) VTK_TCL_TO_STRING0(x)\n");
   fprintf(fout,"#define VTK_TCL_TO_STRING0(x) #x\n");
@@ -118,6 +124,23 @@
   
   fprintf(fout,"\n\nint VTK_EXPORT %s_Init(Tcl_Interp *interp)\n{\n",
           kitName);
+
+  /* for stubs enabled vtk libraries... */
+  fprintf(fout,"\n  #ifdef USE_TCL_STUBS\n"
+          "    if (Tcl_InitStubs(interp, \"8.1\", 0) == NULL) {\n"
+          "      return TCL_ERROR;\n"
+          "    }\n"
+          "  #endif\n");
+          
+  if (!strcmp(kitName,"Vtkrenderingtcl"))
+    {
+    fprintf(fout,"\n  #ifdef USE_TK_STUBS\n"
+            "    if (Tk_InitStubs(interp, \"8.1\", 0) == NULL) {\n"
+            "      return TCL_ERROR;\n"
+            "    }\n"
+            "  #endif\n\n");
+    }
+
   if (!strcmp(kitName,"Vtkcommontcl"))
     {
     fprintf(fout,
