Check-in [399b8095e3]
Overview
Comment:Updated to use public interface for SetStartupScript/GetStartupScript if it is found, otherwise use the old interface.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:399b8095e3d6779bca096c47fdd13bb43a3c354c
User & Date: rkeene on 2010-09-26 04:38:35
Other Links: manifest | tags
Context
2010-09-26
04:38
Added support for specifying what version of Tcl to build

Updated documentation check-in: c151e65b1d user: rkeene tags: trunk

04:38
Updated to use public interface for SetStartupScript/GetStartupScript if it is found, otherwise use the old interface. check-in: 399b8095e3 user: rkeene tags: trunk
04:38
Added patch to allow Metakit to compile under Tcl 8.6, doesn't hurt compilation on other versions of Tcl so it is applied to all check-in: 91e82d9be9 user: rkeene tags: trunk
Changes

Modified kitsh/buildsrc/kitsh-0.0/configure.ac from [ea43bce0fb] to [3b08b8978d].

    18     18   dnl Find archives we need to link to
    19     19   DC_FIND_TCLKIT_LIBS
    20     20   
    21     21   dnl Find the appropriate libraries to link to
    22     22   AC_SEARCH_LIBS(inflate, z zlib,, [ AC_MSG_WARN([Couldn't find inflate (normally in zlib)!]) ])
    23     23   AC_SEARCH_LIBS(acos, m,, [ AC_MSG_WARN([Couldn't find acos (normally in libm)!]) ])
    24     24   AC_SEARCH_LIBS(dlsym, dl,, [ AC_MSG_WARN([Couldn't find dlsym (normally in libdl)!]) ])
           25  +
           26  +dnl Determine if we have "Tcl_SetStartupScript" (8.6.x) or "TclSetStartupScriptPath" (8.4.x)
           27  +SAVE_LIBS="${LIBS}"
           28  +LIBS="${ARCHS} ${LIBS}"
           29  +AC_CHECK_FUNCS(Tcl_SetStartupScript TclSetStartupScriptPath)
           30  +LIBS="${SAVE_LIBS}"
    25     31   
    26     32   dnl Produce output
    27     33   AC_OUTPUT(Makefile)

Modified kitsh/buildsrc/kitsh-0.0/kitInit.c from [56adb92a48] to [04b049978f].

   174    174       if (Tk_CreateConsoleWindow(interp) == TCL_ERROR)
   175    175           goto error;
   176    176   #endif
   177    177   #endif
   178    178   
   179    179         /* messy because TclSetStartupScriptPath is called slightly too late */
   180    180       if (Tcl_Eval(interp, initScript) == TCL_OK) {
   181         -        Tcl_Obj* path = TclGetStartupScriptPath();
          181  +        Tcl_Obj* path;
          182  +#ifdef HAVE_TCLSETSTARTUPSCRIPTPATH
          183  +        path = TclGetStartupScriptPath();
          184  +	TclSetStartupScriptPath(Tcl_GetObjResult(interp));
          185  +#else
          186  +#  ifdef HAVE_TCL_SETSTARTUPSCRIPT
          187  +        path = Tcl_GetStartupScriptPath(NULL);
   182    188   	TclSetStartupScriptPath(Tcl_GetObjResult(interp));
          189  +#  endif
          190  +#endif
   183    191   	if (path == NULL)
   184    192   	  Tcl_Eval(interp, "incr argc -1; set argv [lrange $argv 1 end]");
   185    193       }
   186    194   
   187    195       Tcl_SetVar(interp, "errorInfo", "", TCL_GLOBAL_ONLY);
   188    196       Tcl_ResetResult(interp);
   189    197       return TCL_OK;