As far as I can tell, when the core is building extentions, it invokes the Makefile.PL with PERL_CORE=1 on the command line, and from this MakeMaker sets PERL_CORE=1 inside the Makefile. In turn, MakeMaker contains rules to extract files from .PL files.
However, it seems that the information about "building under the core" isn't passed through in any way. Am I right? If so, what's the cleanest way to pass into a .PL file that we're running in a build under the core source directory? I was rather hoping to avoid heuristics, as both "I can't find the installed libraries" and "there is a file "perl.h" $n directory levels up" could go wrong. Nicholas Clark