Hi Olly, On Mon, Sep 30, 2013 at 2:45 AM, Olly Betts <o...@survex.com> wrote: > On Mon, Sep 30, 2013 at 01:49:14AM +0400, Sergei Golovan wrote: >> > Is there a way to automatically discover if this extra library needs >> > to be linked for the Tcl version being built against? >> >> For now things will be simple. If you're using USE_TCL_STUBS macro >> you'll have to link the library to libtclstub8.6.a. > > I'm looking for a solution that will work upstream, so it needs to work > with older Tcl versions too. Unconditionally trying to link with > libtclstub8.6.a isn't a suitable approach there.
Well, Tcl stubs are designed to allow Tcl extensions be linked with them instead of the main Tcl library. This way, an extension can be loaded into different versions of tclsh. So, in your case (of building the extension xapian.so, and not embedding libtcl into your application) upstream can safely link to libtclstub<whatever version is installed>.a (the spec is located in TCL_STUB_LIB_SPEC in tclConfig.sh). As you can see. libtclspec is static, so your extension will not be tied to any specific Tcl version. libtclstub contains a table of pointers to all important functions located in libtcl and an init function which initializes them. Cheers! -- Sergei Golovan -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org