Ticket #4399: configure.ac: introduce PERL_FOR_BUILD
commit6b67d231a2f447cf5f33180c618c2a67849e6d15
authorSergei Trofimovich <slyich@gmail.com>
Thu, 18 Aug 2022 09:40:20 +0000 (18 10:40 +0100)
committerAndrew Borodin <aborodin@vmail.ru>
Sat, 20 Aug 2022 05:26:24 +0000 (20 08:26 +0300)
tree2f1663593ca5c685532c5cb28ebf417aebd399af
parent08cca8aae8c2f36e26ff99174f5cc40e551a98ab
Ticket #4399: configure.ac: introduce PERL_FOR_BUILD

Most of mc uses of PERL is to embed path to the interpreter in VFS
helpers. There we can use path to perl for --host. But
`date-of-man-include.am` is the place where perl is used for --build.

On most systems both paths are expected to be /usr/bin/perl.
But on some systems paths might differ a bit. Most prominent
example is NixOS, where packages get installed into unique prefixes:

$ file /nix/store/...-perl-5.36.0/bin/perl \
       /nix/store/...-perl-powerpc64-unknown-linux-gnu-5.36.0/bin/perl
/nix/store/...-perl-5.36.0/bin/perl:
  ELF 64-bit LSB executable, x86-64, version 1 (SYSV), ...
/nix/store/...-perl-powerpc64-unknown-linux-gnu-5.36.0/bin/perl:
  ELF 64-bit MSB executable, 64-bit PowerPC or cisco 7500, ...

This allows running both binaries via qemu-user if needed for tests.

The change introduces PERL_FOR_BUILD (similar to autoconf's CC_FOR_BUILD
and friends) to allow passing both PERLs when needed.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
configure.ac
doc/man/date-of-man-include.am
src/man2hlp/man2hlp.in