I've managed to bodge a solution to my own question. Maybe someone can help with tidying it up?
make USE_PGXS=1
formats a series of flags and then calls gcc with the flags it's calculated. So, I copied and pasted the line gcc...
above and then changed the path after -isysroot
to be one where the standard header files are found. Then the command runs properly, and compiles the file it's been told to.
I had to do this several times, once for each file to be compiled, until a full set exists, and then repeat the exercise using make install
instead.
After many runs at this, I ended up with the shared object I needed in the right location, and then resumed following the instructions from Joe Conway's wiki.
It works great now. It would be great to know how to stop/change the -isysroot setting permanently.