Index: kitdll/buildsrc/kitdll-0.0/aclocal.m4 ================================================================== --- kitdll/buildsrc/kitdll-0.0/aclocal.m4 +++ kitdll/buildsrc/kitdll-0.0/aclocal.m4 @@ -262,13 +262,19 @@ DC_TEST_WHOLE_ARCHIVE_SHARED_LIB([$ARCHS $libfiles], [ libfiles="${libfiles}" ]) ]) fi + + if test "${proj}" = "mk4tcl"; then + if test -n "$libfilesnostub"; then + AC_DEFINE(KIT_INCLUDES_MK4TCL, [1], [Specify this if you link against mkt4tcl]) + fi + fi if test "$proj" = "tk"; then - if test -n "$libfiles"; then + if test -n "$libfilesnostub"; then DC_DO_TK DC_TEST_WHOLE_ARCHIVE_SHARED_LIB([$ARCHS $libfilesnostub], [ libfiles="${libfilesnostub}" ], [ DC_TEST_WHOLE_ARCHIVE_SHARED_LIB([$ARCHS $libfiles], [ Index: kitdll/buildsrc/kitdll-0.0/kitInit.c ================================================================== --- kitdll/buildsrc/kitdll-0.0/kitInit.c +++ kitdll/buildsrc/kitdll-0.0/kitInit.c @@ -32,10 +32,13 @@ # define KIT_INCLUDES_PWB 1 #endif Tcl_AppInitProc Vfs_Init, Rechan_Init; Tcl_AppInitProc Vfs_kitdll_data_tcl_Init; +#ifdef KIT_INCLUDES_MK4TCL +Tcl_AppInitProc Mk4tcl_Init; +#endif #ifdef KIT_INCLUDES_PWB Tcl_AppInitProc Pwb_Init; #endif #ifdef TCL_THREADS Tcl_AppInitProc Thread_Init; @@ -50,10 +53,13 @@ * that interpreter to do its job. */ static char *preInitCmd = "proc tclKitInit {} {\n" "rename tclKitInit {}\n" +#ifdef KIT_INCLUDES_MK4TCL + "catch { load {} Mk4tcl }\n" +#endif "load {} tclkit::init\n" "load {} rechan\n" "load {} vfs\n" "load {} vfs_kitdll_data_tcl\n" #include "vfs_kitdll.tcl.h" @@ -262,10 +268,13 @@ void __attribute__((constructor)) _Tclkit_Init(void) { Tcl_StaticPackage(0, "tclkit::init", Tclkit_init_Init, NULL); Tcl_StaticPackage(0, "rechan", Rechan_Init, NULL); Tcl_StaticPackage(0, "vfs", Vfs_Init, NULL); Tcl_StaticPackage(0, "vfs_kitdll_data_tcl", Vfs_kitdll_data_tcl_Init, NULL); +#ifdef KIT_INCLUDES_MK4TCL + Tcl_StaticPackage(0, "Mk4tcl", Mk4tcl_Init, NULL); +#endif #ifdef KIT_INCLUDES_PWB Tcl_StaticPackage(0, "pwb", Pwb_Init, NULL); #endif #ifdef TCL_THREADS Tcl_StaticPackage(0, "Thread", Thread_Init, NULL);