Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2017-08-01 15:40:00 +0000
committerTom Lane2017-08-01 15:40:08 +0000
commitb21c569cea58a1396d9ffd8a7e7a84aa991a1123 (patch)
tree5240b9abeb9a4c41dcf8ef9b2ea4739ac048059a /config/python.m4
parent4de6216877a32e869fe1cf168c1fe1ffb8c3d576 (diff)
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
Diffstat (limited to 'config/python.m4')
-rw-r--r--config/python.m46
1 files changed, 3 insertions, 3 deletions
diff --git a/config/python.m4 b/config/python.m4
index 953d7093053..f3c76422296 100644
--- a/config/python.m4
+++ b/config/python.m4
@@ -6,10 +6,10 @@
# PGAC_PATH_PYTHON
# ----------------
-# Look for Python and set the output variable 'PYTHON'
-# to 'python' if found, empty otherwise.
+# Look for Python and set the output variable 'PYTHON' if found,
+# fail otherwise.
AC_DEFUN([PGAC_PATH_PYTHON],
-[AC_PATH_PROG(PYTHON, python)
+[PGAC_PATH_PROGS(PYTHON, python)
if test x"$PYTHON" = x""; then
AC_MSG_ERROR([Python not found])
fi