Index: kitdll/buildsrc/kitdll-0.0/configure.ac ================================================================== --- kitdll/buildsrc/kitdll-0.0/configure.ac +++ kitdll/buildsrc/kitdll-0.0/configure.ac @@ -18,21 +18,21 @@ dnl Determine how to create a shared object DC_GET_SHOBJFLAGS dnl Find the appropriate Tcl headers and libraries DC_DO_TCL + +dnl Find required libs +DC_FIND_TCLKIT_LIBS dnl Check for Tcl features SAVE_LIBS="${LIBS}" LIBS="${ARCHS} ${LIBS}" dnl Check for the ability to get the current system encoding AC_CHECK_FUNCS(Tcl_GetEncodingNameFromEnvironment Tcl_SetSystemEncoding) LIBS="${SAVE_LIBS}" -dnl Find required libs -DC_FIND_TCLKIT_LIBS - dnl Find extra objects we need to link as a part of "libtclkit" AC_SUBST(EXTRA_OBJS) dnl Check for optional headers AC_HEADER_STDC Index: kitdll/buildsrc/kitdll-0.0/kitInit.c ================================================================== --- kitdll/buildsrc/kitdll-0.0/kitInit.c +++ kitdll/buildsrc/kitdll-0.0/kitInit.c @@ -202,10 +202,14 @@ * This function exists to allow C code to initialize a particular * interpreter. */ static int tclkit_init_initinterp(ClientData cd, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { char *kitdll_path; +#ifdef TCLKIT_CAN_SET_ENCODING + Tcl_DString encodingName; +#endif /* TCLKIT_CAN_SET_ENCODING */ + #ifdef _WIN32 Tcl_SetVar(interp, "tcl_rcFileName", "~/tclkitrc.tcl", TCL_GLOBAL_ONLY); #else Tcl_SetVar(interp, "tcl_rcFileName", "~/.tclkitrc", TCL_GLOBAL_ONLY); @@ -222,11 +226,11 @@ #ifdef TCLKIT_CAN_SET_ENCODING /* Set the encoding from the Environment */ Tcl_GetEncodingNameFromEnvironment(&encodingName); Tcl_SetSystemEncoding(NULL, Tcl_DStringValue(&encodingName)); - Tcl_SetVar(interp, "tclkit_system_encoding", Tcl_DStringValue(&encodingName), 0); + Tcl_SetVar(interp, "tclkit_system_encoding", Tcl_DStringValue(&encodingName), TCL_GLOBAL_ONLY); Tcl_DStringFree(&encodingName); #endif return(TCL_OK); }