On 2016-04-15 00:08:02 -0400, Tom Lane wrote:
> Christoph Berg <myon@debian.org> writes:
> > My idea was to see if pg_config could be rewritten in sh or perl
> > instead so it could run both on the host and the build architecture,
> > but I never got around to actually implementing something. (And
> > there's the obvious problem that pg_config also needs to run on
> > Windows, so sh is probably out, if we'd want to have this included in
> > core. Maybe perl?)
>
> I can't see us taking either of those answers. We haven't been willing
> to accept a hard dependency on perl at build time, why would we do so
> at run time?
>
> Not sure what to do instead though :-(.
We could build pg_config both on the host and build architectures
(presumably with the typical triplet as a prefix). Not sure how to
automatically use that in pg_config --pgxs invocations in extension
makefiles though.