mirror of
https://github.com/postgres/postgres.git
synced 2025-04-18 13:44:19 +03:00
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, XML2_CONFIG Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/30672.1546816567@sss.pgh.pa.us
This commit is contained in:
parent
80971bc206
commit
29b3ac7546
@ -5,6 +5,7 @@
|
|||||||
# --------------
|
# --------------
|
||||||
AC_DEFUN([PGAC_PATH_PERL],
|
AC_DEFUN([PGAC_PATH_PERL],
|
||||||
[PGAC_PATH_PROGS(PERL, perl)
|
[PGAC_PATH_PROGS(PERL, perl)
|
||||||
|
AC_ARG_VAR(PERL, [Perl program])dnl
|
||||||
|
|
||||||
if test "$PERL"; then
|
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']`
|
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']`
|
||||||
|
@ -245,6 +245,7 @@ AC_DEFUN([PGAC_CHECK_GETTEXT],
|
|||||||
AC_CHECK_HEADER([libintl.h], [],
|
AC_CHECK_HEADER([libintl.h], [],
|
||||||
[AC_MSG_ERROR([header file <libintl.h> is required for NLS])])
|
[AC_MSG_ERROR([header file <libintl.h> is required for NLS])])
|
||||||
PGAC_PATH_PROGS(MSGFMT, msgfmt)
|
PGAC_PATH_PROGS(MSGFMT, msgfmt)
|
||||||
|
AC_ARG_VAR(MSGFMT, [msgfmt program for NLS])dnl
|
||||||
if test -z "$MSGFMT"; then
|
if test -z "$MSGFMT"; then
|
||||||
AC_MSG_ERROR([msgfmt is required for NLS])
|
AC_MSG_ERROR([msgfmt is required for NLS])
|
||||||
fi
|
fi
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
# newer version.
|
# newer version.
|
||||||
AC_DEFUN([PGAC_PATH_PYTHON],
|
AC_DEFUN([PGAC_PATH_PYTHON],
|
||||||
[PGAC_PATH_PROGS(PYTHON, [python python3 python2])
|
[PGAC_PATH_PROGS(PYTHON, [python python3 python2])
|
||||||
|
AC_ARG_VAR(PYTHON, [Python program])dnl
|
||||||
if test x"$PYTHON" = x""; then
|
if test x"$PYTHON" = x""; then
|
||||||
AC_MSG_ERROR([Python not found])
|
AC_MSG_ERROR([Python not found])
|
||||||
fi
|
fi
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
AC_DEFUN([PGAC_PATH_TCLSH],
|
AC_DEFUN([PGAC_PATH_TCLSH],
|
||||||
[PGAC_PATH_PROGS(TCLSH, [tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84])
|
[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
|
if test x"$TCLSH" = x""; then
|
||||||
AC_MSG_ERROR([Tcl shell not found])
|
AC_MSG_ERROR([Tcl shell not found])
|
||||||
fi
|
fi
|
||||||
|
16
configure
vendored
16
configure
vendored
@ -887,8 +887,13 @@ PKG_CONFIG_PATH
|
|||||||
PKG_CONFIG_LIBDIR
|
PKG_CONFIG_LIBDIR
|
||||||
ICU_CFLAGS
|
ICU_CFLAGS
|
||||||
ICU_LIBS
|
ICU_LIBS
|
||||||
|
XML2_CONFIG
|
||||||
LDFLAGS_EX
|
LDFLAGS_EX
|
||||||
LDFLAGS_SL'
|
LDFLAGS_SL
|
||||||
|
PERL
|
||||||
|
PYTHON
|
||||||
|
MSGFMT
|
||||||
|
TCLSH'
|
||||||
|
|
||||||
|
|
||||||
# Initialize some variables set by options.
|
# Initialize some variables set by options.
|
||||||
@ -1586,8 +1591,13 @@ Some influential environment variables:
|
|||||||
path overriding pkg-config's built-in search path
|
path overriding pkg-config's built-in search path
|
||||||
ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
|
ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
|
||||||
ICU_LIBS linker flags for ICU, overriding pkg-config
|
ICU_LIBS linker flags for ICU, overriding pkg-config
|
||||||
|
XML2_CONFIG path to xml2-config utility
|
||||||
LDFLAGS_EX extra linker flags for linking executables only
|
LDFLAGS_EX extra linker flags for linking executables only
|
||||||
LDFLAGS_SL extra linker flags for linking shared libraries 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
|
Use these variables to override the choices made by `configure' or to help
|
||||||
it to find libraries and programs with nonstandard names/locations.
|
it to find libraries and programs with nonstandard names/locations.
|
||||||
@ -8185,7 +8195,7 @@ $as_echo_n "checking for XML2_CONFIG... " >&6; }
|
|||||||
$as_echo "$XML2_CONFIG" >&6; }
|
$as_echo "$XML2_CONFIG" >&6; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -n "$XML2_CONFIG"; then
|
if test -n "$XML2_CONFIG"; then
|
||||||
for pgac_option in `$XML2_CONFIG --cflags`; do
|
for pgac_option in `$XML2_CONFIG --cflags`; do
|
||||||
case $pgac_option in
|
case $pgac_option in
|
||||||
-I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
|
-I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
|
||||||
@ -18097,7 +18107,7 @@ $as_echo_n "checking for MSGFMT... " >&6; }
|
|||||||
$as_echo "$MSGFMT" >&6; }
|
$as_echo "$MSGFMT" >&6; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -z "$MSGFMT"; then
|
if test -z "$MSGFMT"; then
|
||||||
as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
|
as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
|
||||||
fi
|
fi
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
|
||||||
|
@ -917,6 +917,7 @@ PGAC_ARG_BOOL(with, libxml, no, [build with XML support],
|
|||||||
|
|
||||||
if test "$with_libxml" = yes ; then
|
if test "$with_libxml" = yes ; then
|
||||||
PGAC_PATH_PROGS(XML2_CONFIG, xml2-config)
|
PGAC_PATH_PROGS(XML2_CONFIG, xml2-config)
|
||||||
|
AC_ARG_VAR(XML2_CONFIG, [path to xml2-config utility])dnl
|
||||||
if test -n "$XML2_CONFIG"; then
|
if test -n "$XML2_CONFIG"; then
|
||||||
for pgac_option in `$XML2_CONFIG --cflags`; do
|
for pgac_option in `$XML2_CONFIG --cflags`; do
|
||||||
case $pgac_option in
|
case $pgac_option in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user