mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Make configure check for IPC::Run when --enable-tap-tests is specified.
The TAP tests mostly don't work without IPC::Run, and the reason for the failure is not immediately obvious from the error messages you get. So teach configure to reject --enable-tap-tests unless IPC::Run exists. Mostly this just involves adding ax_prog_perl_modules.m4 from the GNU autoconf archives. This was discussed last year, but we held off on the theory that we might be switching to CMake soon. That's evidently not happening for v10, so let's absorb this now. Eugene Kazakov and Michael Paquier Discussion: https://postgr.es/m/56BDDC20.9020506@postgrespro.ru Discussion: https://postgr.es/m/CAB7nPqRVKG_CR4Dy_AMfE6DXcr6F7ygy2goa2atJU4XkerDRUg@mail.gmail.com
This commit is contained in:
78
configure
vendored
78
configure
vendored
@ -16245,6 +16245,84 @@ done
|
||||
if test -z "$PERL"; then
|
||||
as_fn_error $? "Perl not found" "$LINENO" 5
|
||||
fi
|
||||
# Check for necessary modules
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Make sure we have perl
|
||||
if test -z "$PERL"; then
|
||||
# Extract the first word of "perl", so it can be a program name with args.
|
||||
set dummy perl; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_PERL+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$PERL"; then
|
||||
ac_cv_prog_PERL="$PERL" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_PERL="perl"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
PERL=$ac_cv_prog_PERL
|
||||
if test -n "$PERL"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
|
||||
$as_echo "$PERL" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
if test "x$PERL" != x; then
|
||||
ax_perl_modules_failed=0
|
||||
for ax_perl_module in 'IPC::Run' ; do
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
|
||||
$as_echo_n "checking for perl module $ax_perl_module... " >&6; }
|
||||
|
||||
# Would be nice to log result here, but can't rely on autoconf internals
|
||||
$PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
|
||||
if test $? -ne 0; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; };
|
||||
ax_perl_modules_failed=1
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
|
||||
$as_echo "ok" >&6; };
|
||||
fi
|
||||
done
|
||||
|
||||
# Run optional shell commands
|
||||
if test "$ax_perl_modules_failed" = 0; then
|
||||
:
|
||||
|
||||
else
|
||||
:
|
||||
as_fn_error $? "Perl module IPC::Run is required to run TAP tests" "$LINENO" 5
|
||||
fi
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
|
||||
$as_echo "$as_me: WARNING: could not find perl" >&2;}
|
||||
fi
|
||||
fi
|
||||
|
||||
# Thread testing
|
||||
|
Reference in New Issue
Block a user