/.../ The question for those more knowledgeable in this magic is: does it seem reasonable to check in the installed headers directory first (most likely $BUILD_BASE, I think), then in the current directory for all situations or would that have an undesirable effect when compiling within the Pike source tree?
If you reverse the order so that it checks the current directory first then it's fine with me. At the end of the configure run, that file is rewritten with the current variable settings. One intended use with this is to be able to rerun configure locally in a module (external or not) and conveniently retain the previous settings.