Further improve consistency of configure's program searching.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: b21c569cea58a1396d9ffd8a7e7a84aa991a1123
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2017-08-01T15:40:08Z
Releases: 10.0
Further improve consistency of configure's program searching.

Peter Eisentraut noted that commit 40b9f1921 had broken a configure
behavior that some people might rely on: AC_CHECK_PROGS(FOO,...) will
allow the search to be overridden by specifying a value for FOO on
configure's command line or in its environment, but AC_PATH_PROGS(FOO,...)
accepts such an override only if it's an absolute path.  We had worked
around that behavior for some, but not all, of the pre-existing uses
of AC_PATH_PROGS by just skipping the macro altogether when FOO is
already set.  Let's standardize on that workaround for all uses of
AC_PATH_PROGS, new and pre-existing, by wrapping AC_PATH_PROGS in a
new macro PGAC_PATH_PROGS.  While at it, fix a deficiency of the old
workaround code by making sure we report the setting to configure's log.

Eventually I'd like to improve PGAC_PATH_PROGS so that it converts
non-absolute override inputs to absolute form, eg "PYTHON=python3"
becomes, say, PYTHON = /usr/bin/python3.  But that will take some
nontrivial coding so it doesn't seem like a thing to do in late beta.

Discussion: https://postgr.es/m/90a92a7d-938e-507a-3bd7-ecd2b4004689@2ndquadrant.com

Files

PathChange+/−
config/docbook.m4 modified +1 −1
config/perl.m4 modified +1 −4
config/programs.m4 modified +23 −8
config/python.m4 modified +3 −3
config/tcl.m4 modified +1 −1
configure modified +225 −22
configure.in modified +13 −13

Discussion