On 11/11/21 15:44, Tom Lane wrote:
> Alvaro Herrera <alvhe...@alvh.no-ip.org> writes:
>> On 2021-Nov-11, Andrew Dunstan wrote:
>>> Perhaps we could add a line to one of the TAP tests that would spit out
>>> the version on the log?
>> Maybe have it spit out the version of *all* the modules we require
>> (which aren't all that many), not just Test::More?
> Yeah ... configure is already checking those versions, so maybe we could
> make it print them out along the way?  I'd been thinking of doing exactly
> this just for documentation purposes, so if there's a concrete need for
> it, let's get it done.
>

The attached seems to do the trick:


checking for perl module IPC::Run 0.79... 20200505.0
checking for perl module Test::More 0.87... 1.302183
checking for perl module Time::HiRes 1.52... 1.9764


>
> I have no objection to updating prairiedog to whatever new minimum
> version we settle on.  But if there are other buildfarm animals with
> old versions, that might be a reason not to change it.
>
>                       



Yeah, let's see what's actually in use and then we can decide.


cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com
diff --git a/config/ax_prog_perl_modules.m4 b/config/ax_prog_perl_modules.m4
index 70b3230ebd..03c25c3ab2 100644
--- a/config/ax_prog_perl_modules.m4
+++ b/config/ax_prog_perl_modules.m4
@@ -55,12 +55,12 @@ if test "x$PERL" != x; then
     AC_MSG_CHECKING(for perl module $ax_perl_module)
 
     # 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
+    modversion=`$PERL -e "use $ax_perl_module; my \\\$x=q($ax_perl_module); \\\$x =~ s/ .*/::VERSION/; eval qq{print \\\\$\\\$x\\n}; exit;" 2>/dev/null`
     if test $? -ne 0; then
       AC_MSG_RESULT(no);
       ax_perl_modules_failed=1
    else
-      AC_MSG_RESULT(ok);
+      AC_MSG_RESULT($modversion);
     fi
   done
 
diff --git a/configure b/configure
index 7d4e42dd62..d0f0f88a1b 100755
--- a/configure
+++ b/configure
@@ -19301,14 +19301,14 @@ if test "x$PERL" != x; then
 $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
+    modversion=`$PERL -e "use $ax_perl_module; my \\\$x=q($ax_perl_module); \\\$x =~ s/ .*/::VERSION/; eval qq{print \\\\$\\\$x\\n}; exit;" 2>/dev/null`
     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; };
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $modversion" >&5
+$as_echo "$modversion" >&6; };
     fi
   done
 

Reply via email to