tcl::pkgconfig

tcl::pkgconfig, proposed by TIP 59, a built-in Tcl command, first appeared in Tcl version 8.5.

There is no good reason ever to use tcl::pkgconfig for anything except building.
- Twylite, ::tcl::pkgconfig error , TCT mailing list, 2012-11-14

dbohdan 2015-03-12: As of Tcl 8.6.3 the following information is available in through ::tcl::pkgconfig on Linux (with example values from Fedora 21).

name value
debug 1
threaded 1
profiled 0
64bit 0
optimized 0
mem_debug 0
compile_debug 0
compile_stats 0
libdir,runtime /usr/lib64
bindir,runtime /usr/bin
scriptdir,runtime /usr/share/tcl8.6
includedir,runtime /usr/include
docdir,runtime /usr/share/man
libdir,install /usr/lib64
bindir,install /usr/bin
scriptdir,install /usr/share/tcl8.6
includedir,install /usr/include
docdir,install /usr/share/man

I found the *,runtime values useful in building a Tcl extension without having to resort to autoconf on systems where no information about Tcl is available from pkg-config (e.g, Ubuntu).

dbohdan 2015-03-17: On Debian 7:

name value
debug 1
threaded 1
profiled 0
64bit 0
optimized 1
mem_debug 0
compile_debug 0
compile_stats 0
libdir,runtime /usr/lib
bindir,runtime /usr/bin
scriptdir,runtime /usr/share/tcltk/tcl8.5
includedir,runtime /usr/include/tcl8.5
scriptdir,runtime /usr/share/tcltk/tcl8.5
includedir,runtime /usr/include/tcl8.5
docdir,runtime /usr/share/man
libdir,install /usr/lib
bindir,install /usr/bin
scriptdir,install /usr/share/tcltk/tcl8.5
includedir,install /usr/include/tcl8.5
docdir,install /usr/share/man