espie@ who adjusted things so the build doesn't depend on Tcl (which was added as a build dependency in 3.6.17).
for solved libtool issue and add fix for tests on big-endian arches looks good to espie@ requested, bulk-tested and ok by bernd@
- merge espie's patches - fix apps such as p5-DBD-SQLite, by adding weak pthread functions. also include some bug fixes from kurt@. the work has been done by kurt@, and espie@. thanks! ok kurt@, espie@, bernd@