Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 29b3ac7

Browse files
committed
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
1 parent 80971bc commit 29b3ac7

File tree

6 files changed

+18
-3
lines changed

6 files changed

+18
-3
lines changed

config/perl.m4

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# --------------
66
AC_DEFUN([PGAC_PATH_PERL],
77
[PGAC_PATH_PROGS(PERL, perl)
8+
AC_ARG_VAR(PERL, [Perl program])dnl
89
910
if test "$PERL"; then
1011
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']`

config/programs.m4

+1
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ AC_DEFUN([PGAC_CHECK_GETTEXT],
245245
AC_CHECK_HEADER([libintl.h], [],
246246
[AC_MSG_ERROR([header file <libintl.h> is required for NLS])])
247247
PGAC_PATH_PROGS(MSGFMT, msgfmt)
248+
AC_ARG_VAR(MSGFMT, [msgfmt program for NLS])dnl
248249
if test -z "$MSGFMT"; then
249250
AC_MSG_ERROR([msgfmt is required for NLS])
250251
fi

config/python.m4

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
# newer version.
1818
AC_DEFUN([PGAC_PATH_PYTHON],
1919
[PGAC_PATH_PROGS(PYTHON, [python python3 python2])
20+
AC_ARG_VAR(PYTHON, [Python program])dnl
2021
if test x"$PYTHON" = x""; then
2122
AC_MSG_ERROR([Python not found])
2223
fi

config/tcl.m4

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
AC_DEFUN([PGAC_PATH_TCLSH],
77
[PGAC_PATH_PROGS(TCLSH, [tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84])
8+
AC_ARG_VAR(TCLSH, [Tcl interpreter program (tclsh)])dnl
89
if test x"$TCLSH" = x""; then
910
AC_MSG_ERROR([Tcl shell not found])
1011
fi

configure

+13-3
Original file line numberDiff line numberDiff line change
@@ -887,8 +887,13 @@ PKG_CONFIG_PATH
887887
PKG_CONFIG_LIBDIR
888888
ICU_CFLAGS
889889
ICU_LIBS
890+
XML2_CONFIG
890891
LDFLAGS_EX
891-
LDFLAGS_SL'
892+
LDFLAGS_SL
893+
PERL
894+
PYTHON
895+
MSGFMT
896+
TCLSH'
892897

893898

894899
# Initialize some variables set by options.
@@ -1586,8 +1591,13 @@ Some influential environment variables:
15861591
path overriding pkg-config's built-in search path
15871592
ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
15881593
ICU_LIBS linker flags for ICU, overriding pkg-config
1594+
XML2_CONFIG path to xml2-config utility
15891595
LDFLAGS_EX extra linker flags for linking executables only
15901596
LDFLAGS_SL extra linker flags for linking shared libraries only
1597+
PERL Perl program
1598+
PYTHON Python program
1599+
MSGFMT msgfmt program for NLS
1600+
TCLSH Tcl interpreter program (tclsh)
15911601

15921602
Use these variables to override the choices made by `configure' or to help
15931603
it to find libraries and programs with nonstandard names/locations.
@@ -8185,7 +8195,7 @@ $as_echo_n "checking for XML2_CONFIG... " >&6; }
81858195
$as_echo "$XML2_CONFIG" >&6; }
81868196
fi
81878197

8188-
if test -n "$XML2_CONFIG"; then
8198+
if test -n "$XML2_CONFIG"; then
81898199
for pgac_option in `$XML2_CONFIG --cflags`; do
81908200
case $pgac_option in
81918201
-I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
@@ -18097,7 +18107,7 @@ $as_echo_n "checking for MSGFMT... " >&6; }
1809718107
$as_echo "$MSGFMT" >&6; }
1809818108
fi
1809918109

18100-
if test -z "$MSGFMT"; then
18110+
if test -z "$MSGFMT"; then
1810118111
as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
1810218112
fi
1810318113
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5

configure.in

+1
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,7 @@ PGAC_ARG_BOOL(with, libxml, no, [build with XML support],
917917

918918
if test "$with_libxml" = yes ; then
919919
PGAC_PATH_PROGS(XML2_CONFIG, xml2-config)
920+
AC_ARG_VAR(XML2_CONFIG, [path to xml2-config utility])dnl
920921
if test -n "$XML2_CONFIG"; then
921922
for pgac_option in `$XML2_CONFIG --cflags`; do
922923
case $pgac_option in

0 commit comments

Comments
 (0)