From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Python versions (was Re: RHEL 8.0 build)
Date: Wed, 16 Jan 2019 10:15:11 +0100
Message-ID: <701bb2e6-1caf-46fe-afdb-42edf73408eb@2ndquadrant.com> (raw)
In-Reply-To: <30672.1546816567@sss.pgh.pa.us>
References: <da27307e-d451-9d16-7b4c-bee0c0f07dbc@wizmail.org>
<30378.1543092565@sss.pgh.pa.us>
<20181125215109.2gvd2qdkugvi74sv@alap3.anarazel.de>
<1457.1543184081@sss.pgh.pa.us>
<5b0db65c-4865-4a63-67a2-f575f56a227c@2ndquadrant.com>
<20181127173012.hgvrkqd7gncwyfmw@alap3.anarazel.de>
<044b778b-2086-1c3e-4ee0-fb688a7b0b80@2ndquadrant.com>
<16186.1543441296@sss.pgh.pa.us>
<d5df4850-bb47-935d-2da9-d66b3d3ba0a5@2ndquadrant.com>
<27383.1543505646@sss.pgh.pa.us>
<77431a1e-be15-36aa-d15f-112f099d5717@2ndquadrant.com>
<30672.1546816567@sss.pgh.pa.us>
On 07/01/2019 00:16, Tom Lane wrote:
> BTW, this is a pre-existing problem not the fault of this patch,
> but while we're fooling with the behavior of python lookup would
> be a great time to fix it: we should add something like
>
> AC_ARG_VAR([PYTHON], [path to Python executable])
>
> Aside from improving the "configure --help" documentation, this
> will prevent insane results from using inapplicable cached
> conclusions about what Python we've got. Since more and more
> people seem to be using configure cache files, I think we need
> to be more careful about declaring relevant variables.
Patch attached.
I went through the environment variables listed in installation.sgml and
came up with the following that would affect subsequent cacheable tests:
MSGFMT
PERL
PYTHON
TCLSH
The following are listed but don't affect any other tests, so I didn't
include them:
BISON
DTRACE
DTRACEFLAGS
FLEX
XML2_CONFIG
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachments:0001-configure-More-use-of-AC_ARG_VAR.patch (text/plain, 3.4K) download
From 9ba9c7f7e56714535290776cb622a610bc599d8d Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Wed, 16 Jan 2019 10:05:42 +0100
Subject: [PATCH] configure: More use of AC_ARG_VAR
AC_ARG_VAR is necessary if an environment variable influences a
configure result that is then used by other tests that are cached.
With AC_ARG_VAR, a change in the variable is detected on subsequent
configure runs and the user is then advised to remove the cache.
This adds AC_ARG_VAR calls for: MSGFMT, PERL, PYTHON, TCLSH
---
config/perl.m4 | 1 +
config/programs.m4 | 1 +
config/python.m4 | 1 +
config/tcl.m4 | 1 +
configure | 12 ++++++++++--
5 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/config/perl.m4 b/config/perl.m4index caefb0705e..059e31c476 100644--- a/config/perl.m4+++ b/config/perl.m4@@ -5,6 +5,7 @@
# --------------
AC_DEFUN([PGAC_PATH_PERL],
[PGAC_PATH_PROGS(PERL, perl)
+AC_ARG_VAR(PERL, [Perl program])dnl
if test "$PERL"; then
pgac_perl_version=`$PERL -v 2>/dev/null | sed -n ['s/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p']`
diff --git a/config/programs.m4 b/config/programs.m4index aa84bfdb9e..21888cb68f 100644--- a/config/programs.m4+++ b/config/programs.m4@@ -245,6 +245,7 @@ AC_DEFUN([PGAC_CHECK_GETTEXT],
AC_CHECK_HEADER([libintl.h], [],
[AC_MSG_ERROR([header file <libintl.h> is required for NLS])])
PGAC_PATH_PROGS(MSGFMT, msgfmt)
+ AC_ARG_VAR(MSGFMT, [msgfmt program for NLS])dnl
if test -z "$MSGFMT"; then
AC_MSG_ERROR([msgfmt is required for NLS])
fi
diff --git a/config/python.m4 b/config/python.m4index 9a4d12112e..c51aa4e332 100644--- a/config/python.m4+++ b/config/python.m4@@ -17,6 +17,7 @@
# newer version.
AC_DEFUN([PGAC_PATH_PYTHON],
[PGAC_PATH_PROGS(PYTHON, [python python3 python2])
+AC_ARG_VAR(PYTHON, [Python program])dnl
if test x"$PYTHON" = x""; then
AC_MSG_ERROR([Python not found])
fi
diff --git a/config/tcl.m4 b/config/tcl.m4index 581471f338..9de31a5715 100644--- a/config/tcl.m4+++ b/config/tcl.m4@@ -5,6 +5,7 @@
AC_DEFUN([PGAC_PATH_TCLSH],
[PGAC_PATH_PROGS(TCLSH, [tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84])
+AC_ARG_VAR(TCLSH, [Tcl interpreter program (tclsh)])dnl
if test x"$TCLSH" = x""; then
AC_MSG_ERROR([Tcl shell not found])
fi
diff --git a/configure b/configureindex 06fc3c6835..f3639c1363 100755--- a/configure+++ b/configure@@ -888,7 +888,11 @@ PKG_CONFIG_LIBDIR
ICU_CFLAGS
ICU_LIBS
LDFLAGS_EX
-LDFLAGS_SL'+LDFLAGS_SL+PERL+PYTHON+MSGFMT+TCLSH'
# Initialize some variables set by options.
@@ -1588,6 +1592,10 @@ Some influential environment variables:
ICU_LIBS linker flags for ICU, overriding pkg-config
LDFLAGS_EX extra linker flags for linking executables only
LDFLAGS_SL extra linker flags for linking shared libraries only
+ PERL Perl program+ PYTHON Python program+ MSGFMT msgfmt program for NLS+ TCLSH Tcl interpreter program (tclsh)
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -18097,7 +18105,7 @@ $as_echo_n "checking for MSGFMT... " >&6; }
$as_echo "$MSGFMT" >&6; }
fi
- if test -z "$MSGFMT"; then+ if test -z "$MSGFMT"; then
as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
--
2.20.1
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: peter.eisentraut@2ndquadrant.com, tgl@sss.pgh.pa.us
Subject: Re: Python versions (was Re: RHEL 8.0 build)
In-Reply-To: <701bb2e6-1caf-46fe-afdb-42edf73408eb@2ndquadrant.com>
References: <da27307e-d451-9d16-7b4c-bee0c0f07dbc@wizmail.org> <30378.1543092565@sss.pgh.pa.us> <20181125215109.2gvd2qdkugvi74sv@alap3.anarazel.de> <1457.1543184081@sss.pgh.pa.us> <5b0db65c-4865-4a63-67a2-f575f56a227c@2ndquadrant.com> <20181127173012.hgvrkqd7gncwyfmw@alap3.anarazel.de> <044b778b-2086-1c3e-4ee0-fb688a7b0b80@2ndquadrant.com> <16186.1543441296@sss.pgh.pa.us> <d5df4850-bb47-935d-2da9-d66b3d3ba0a5@2ndquadrant.com> <27383.1543505646@sss.pgh.pa.us> <77431a1e-be15-36aa-d15f-112f099d5717@2ndquadrant.com> <30672.1546816567@sss.pgh.pa.us> <701bb2e6-1caf-46fe-afdb-42edf73408eb@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox