Using stub versions of Tcl and Tk libraries is highly recommended
by the Tcl/Tk community.
Therefore, implement a USE_TCL_TK_STUBS option to use the Tcl/Tk stubs
libraries. This option currently defaults to OFF because it is only
partially implemented (only the USE_TCL_STUBS part of this has been
implemented so far).
Part of this change is a backwards incompatible change in
libplplottcltk; the functions in tclMain.c (notably pltclMain) are
split off from that library since they are only used by the pltcl
executable, and the call of Tcl_FindExecutable within pltclMain
appears not to be compatible with linking with libtclstub8.6, i.e.,
Tcl_FindExecutable has been completely removed from the stub tables
for Tcl8.6. I think all this simply means that only Tcl/Tk extensions
(but not code for an an executable like pltcl.c and tclMain.c) are
considered to be good candidates for linking with libtclstub8.x so
splitting out tclMain.c from the rest of the source code for
libplplottcltk seems the correct thing to do.
Tested by Alan W. Irwin <firstname.lastname@example.org> on Linux
with the -DENABLE_tk=OFF and -DUSE_TCL_TK_STUBS=ON cmake options
and the two targets test_tcl_standard_examples and