Index: Makefile.in ================================================================== --- Makefile.in +++ Makefile.in @@ -13,15 +13,19 @@ tcltls.@SHOBJEXT@: tls.o tlsBIO.o tlsIO.o tlsX509.o $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o tcltls.@SHOBJEXT@ tls.o tlsBIO.o tlsIO.o tlsX509.o $(LIBS) install: tcltls.@SHOBJEXT@ pkgIndex.tcl -tls.o: @srcdir@/tls.c @srcdir@/tlsInt.h @srcdir@/tclOpts.h +tls.o: @srcdir@/tls.c @srcdir@/tlsInt.h @srcdir@/tclOpts.h @srcdir@/tls.tcl.h tlsBIO.o: @srcdir@/tlsBIO.c @srcdir@/tlsInt.h tlsIO.o: @srcdir@/tlsIO.c @srcdir@/tlsInt.h tlsX509.o: @srcdir@/tlsX509.c @srcdir@/tlsInt.h +@srcdir@/tls.tcl.h: tls.tcl + xxd -i < tls.tcl > '@srcdir@/tls.tcl.h.new' + mv '@srcdir@/tls.tcl.h.new' '@srcdir@/tls.tcl.h' + %.o: @srcdir@/%.c $(CC) $(CPPFLAGS) $(CFLAGS) -o "$@" -c "$<" clean: rm -f tls.o tlsBIO.o tlsIO.o tlsX509.o @@ -30,10 +34,11 @@ distclean: clean rm -f config.log config.status rm -f Makefile pkgIndex.tcl mrproper: distclean + rm -f @srcdir@/tls.tcl.h rm -f @srcdir@/configure @srcdir@/config.sub @srcdir@/config.guess @srcdir@/install-sh rm -f @srcdir@/aclocal.m4 rm -rf @srcdir@/aclocal @srcdir@/autom4te.cache .PHONY: all install clean distclean mrproper Index: tls.c ================================================================== --- tls.c +++ tls.c @@ -1658,10 +1658,14 @@ int Tls_Init(Tcl_Interp *interp) /* Interpreter in which the package is * to be made available. */ { + const unsigned char tlsTclInitScript[] = { +#include "tls.tcl.h" + }; + int major, minor, patchlevel, release; /* * The original 8.2.0 stacked channel implementation (and the patch * that preceded it) had problems with scalability and robustness. @@ -1716,10 +1720,14 @@ Tcl_CreateObjCommand(interp, "tls::version", VersionObjCmd, (ClientData) 0, (Tcl_CmdDeleteProc *) NULL); Tcl_CreateObjCommand(interp, "tls::misc", MiscObjCmd, (ClientData) 0, (Tcl_CmdDeleteProc *) NULL); + + if (interp) { + Tcl_Eval(interp, tlsTclInitScript); + } return Tcl_PkgProvide(interp, PACKAGE_NAME, PACKAGE_VERSION); } /*