I wrote:
> I would pin the blame here. This code should not be messing with
> the global LDFLAGS.
Looking closer, we've made the same mistake elsewhere.
I think we need something like the attached to ensure
that -L switches coming from libraries' configure helpers
don't override user-specified directories.
regards, tom lane