On Mon, Jan 19, 2026 at 03:26:05PM +0100, [email protected] wrote:
> It is less important as the Perl implementation is the one that will be
> used by most users, but we propose the C implementation of texi2any too,
> and I would like to know if it works on mingw. My gut feeling is that
> it does not work because it cannot find the libraries it was linked
> against, but there could be a good surprise. I would be interested
> to know both if the tests in source work, and if it works after being
> installed.
>
> As you know now, this means calling configure with
> --enable-using-c-texi2any.
>
> If it does not work out of the box, I do not think that we should invest
> much energy in making it work, this could be left to the next release.
> But we would change the wordings to make clear that the C implementation
> of texi2any is experimental.
I do not understand the value to the user of ctexi2any, as it is.
It makes sense to me as part of a potential rewrite from texi2any from
Perl to C. We've discussed in the past the idea of progressing texi2any
from a Perl program to a Perl program that embeds C, to a C program that
embeds Perl, to a pure C program with optional Perl extensions.
(Whether this will ever actually happen is unknown.) This process
entails all the code being duplicated in both languages and complex
interactions between the two parts of the program, but in theory could
lead to a simple result at the end. In short, it's a bigger mess created
in the process of cleaning up a smaller mess. The mess is yet to be
cleaned up.
The use or non-use of XS modules in texi2any is already a significant
complication for users, and the ctexi2any option adds to this,
unnecessarily. Users can bump against it when reading INSTALL or the
output of "configure --help". We've already have confusion on this list
about the role of ctexi2any in the functioning of the texi2any program.
Text in INSTALL:
* The `texi2any' (makeinfo) program is a Perl program in the default case.
If you prefer a C implementation of the texi2any program, you can give
the --enable-using-c-texi2any flag to `configure'. The C implementation
will
only be actually used if all the prerequisites are found, which includes
a working iconv library, the possibility to embed a Perl interpreter
and enabled Perl extension modules, known as XS modules.
Why should users "prefer a C implementation"? Users shouldn't need to care
about texi2any internals or alternate implementations.
As far as I remember, ctexi2any was not significantly faster than texi2any.pl
(or even slightly slower), so does not add value for the user.
The --enable-using-c-texi2any flag is an abuse of the configuration interface.
Node "Configuration" in the GNU Coding Standards:
No ‘--enable’ option should *ever* cause one feature to replace
another. No ‘--enable’ option should ever substitute one useful
behavior for another useful behavior. The only proper use for
‘--enable’ is for questions of whether to build part of the program
or exclude it.
...
You will note that the categories ‘--with-’ and ‘--enable-’ are
narrow: they *do not* provide a place for any sort of option you might
think of. That is deliberate. We want to limit the possible
configuration options in GNU software. We do not want GNU programs to
have idiosyncratic configuration options.
Similarly, in the GNU Autoconf manual:
These options allow users to choose which optional features to build
and install. ‘--enable-FEATURE’ options should never make a feature
behave differently or cause one feature to replace another. They should
only cause parts of the program to be built rather than left out.
So if we want to provide some way to use ctexi2any as the texi2any
implementation, I'd suggest we find some other way of doing it than
a configure option. The only idea I have is to use an environment variable
instead. texi2any.pl could detect this environment variable and delegate
to ctexi2any.
If we had an --enable-ctexi2any option this would control whether the
ctexi2any program is built and installed. It does not seem of much
interest to users to build the ctexi2any program in the build tree only
and not install it.