On Sat, Jan 31, 2026 at 11:00:41PM +0100, Patrice Dumas wrote:
> On Sat, Jan 31, 2026 at 09:40:13PM +0000, Gavin Smith wrote:
> > On Sat, Jan 31, 2026 at 09:51:43PM +0100, Patrice Dumas wrote:
> > > > These options were introduced in the following commit:
> > > >
> > > > commit b2db2c2acf88fc21d844cebb3b58234b93399924
> > > > Author: Patrice Dumas <[email protected]>
> > > > Date: 2025-07-16 08:29:08 +0200
> > > >
> > > > Integrate Perl SWIG interface in the build system
> > > >
> > > > Are these options really useful?
> > >
> > > --enable-perl-install-mode allows to change the Perl modules
> > > installation directories, using a similar interface to MakeMaker. I did
> > > not have any other idea to give the same interface, which translates to
> > > those possibilities for installation. This looks necessary to me for
> > > the installation of Perl modules that are supposed to be regular Perl
> > > modules (and not hidden modules, as are the Texinfo::* modules).
> > >
> > > Then the --enable-install* actually does the same as --libdir and so on,
> > > but for the Perl modules installation directories. In the default case,
> > > these directories are taken from Perl -V, but I think that we need to
> > > make them customizable.
> >
> > Thanks for explaining. So as I understand it, it is for installing public
> > Perl modules, as would be installed by a MakeMaker build system (a
> > frequently
> > used build system for Perl). In order to match how Perl modules are usually
> > installed, these directories should be configurable. There seemed
> > to be a module called Texinfo.pm which was built under tta/swig/perl/
> > which is probably what this is for.
>
> Exactly, it is for this module and the associated XS module. They
> implement the SWIG interface in Perl.
We could also allow the user to provide these on the configure line,
like "./configure SWIG_PERL_INSTALLDIRS=vendor". This would seem to be
a better interface than "./configure --enable-perl-install-mode=vendor",
especially for the other directory variables.
I am not familiar with ExtUtils::MakeMaker, but looking at some of its
documentation, this would seem more similar to the MakeMaker interface
we are emulating. That takes its configuration parameters as key-value
pairs:
The Makefile to be produced may be altered by adding arguments of
the form KEY=VALUE. E.g.
perl Makefile.PL INSTALL_BASE=~
https://metacpan.org/pod/ExtUtils::MakeMaker#Default-Makefile-Behaviour
The equivalent variables that we are emulating with --enable-* flags
are documented here: https://metacpan.org/pod/ExtUtils::MakeMaker#make-install