On 2/17/22 15:46, Andres Freund wrote: > On 2022-02-17 15:23:36 -0500, Andrew Dunstan wrote: >> Very well. I think the easiest way will be to stash $host_os in the >> environment and let the script pick it up similarly to what I suggested >> with MSYSTEM. > WFM.
OK, here's a patch. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com
diff --git a/config/check_modules.pl b/config/check_modules.pl index cc0a7ab0e7..470c3e9c14 100644 --- a/config/check_modules.pl +++ b/config/check_modules.pl @@ -6,6 +6,7 @@ # use strict; use warnings; +use Config; use IPC::Run 0.79; @@ -19,5 +20,9 @@ diag("IPC::Run::VERSION: $IPC::Run::VERSION"); diag("Test::More::VERSION: $Test::More::VERSION"); diag("Time::HiRes::VERSION: $Time::HiRes::VERSION"); +# Check that if prove is using msys perl it is for an msys target +ok(($ENV{__CONFIG_HOST_OS__} || "") eq 'msys', + "Msys perl used for correct target") + if $Config{osname} eq 'msys'; ok(1); done_testing(); diff --git a/configure b/configure index ba635a0062..5e3af5c35b 100755 --- a/configure +++ b/configure @@ -19453,6 +19453,7 @@ fi # installation than perl, eg on MSys, so we have to check using prove. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl modules required for TAP tests" >&5 $as_echo_n "checking for Perl modules required for TAP tests... " >&6; } + __CONFIG_HOST_OS__=$host_os; export __CONFIG_HOST_OS__ modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null` if test $? -eq 0; then # log the module version details, but don't show them interactively diff --git a/configure.ac b/configure.ac index 16167329fc..d00e92357e 100644 --- a/configure.ac +++ b/configure.ac @@ -2396,6 +2396,7 @@ if test "$enable_tap_tests" = yes; then # AX_PROG_PERL_MODULES here, but prove might be part of a different Perl # installation than perl, eg on MSys, so we have to check using prove. AC_MSG_CHECKING(for Perl modules required for TAP tests) + __CONFIG_HOST_OS__=$host_os; export __CONFIG_HOST_OS__ [modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`] if test $? -eq 0; then # log the module version details, but don't show them interactively