One way would be to first run all pike's configurescripts. The nettle and gmp modules could use some PIKE_NEED_BUNDLED_LIB, which would (i) add necessary link and cpp flags to uses the bundled libraries, and (ii) write some file indicating to the top level Makefile which bundled libraries are needed.
Then make of the top level should build the bundled libraries and install them in some proper place in the buildtree, before running make in pike's build tree.
Installation of bundled libraries seem a little tricky. Either then can be installed in the build tree, and link the corresponding modules statically. Or we link dynamically and install (at make install time, not earlier!) them in some proper place on the system, and then we'll need some additional trickery to have a working pike before make install time.
/ Niels Möller (vässar rödpennan)
Previous text:
2004-02-18 13:28: Subject: Crypto
If we put some libraries in e.g. ./bundle then the configure/Makefile in that directory could just decide to build its children if no system counterpart was found. Perhaps that can be made general and abstract enough so that one can just drop in libraries with minimal extra configurations. But perhaps that would be too good to hope for...
/ Martin Nilsson (saturator)