On Mon, Feb 02, 2026 at 09:35:28PM +0100, Patrice Dumas wrote:
> I think that the problem is that if enable_xs is yes, the XSParagraph
> code requires Gnulib being built, but if BUILD_C_CODE is no it is not
> built since the commit 05bcc5cf10e, which lead to, in tta/Makefile.am:
>
> -SUBDIRS = gnulib/lib
> +SUBDIRS =
> +
> +if BUILD_C_CODE
> +SUBDIRS += gnulib/lib
> +endif
You're right (and I wrote my other email before I saw yours).
> > I notice in tta/perl/XSTexinfo/Makefile.am, XSParagraph.la and MiscXS.la
> > are anomalous in not being contained within an "if BUILD_C_CODE"
> > conditional.
>
> It is not anomalous, "if BUILD_C_CODE" is only needed for the XS modules
> that require the C libraries, XSParagraph.la and MiscXS.la do not.
>
> I propose to change to the following:
>
> SUBDIRS =
>
> if BUILD_C_CODE
> SUBDIRS += gnulib/lib
> else
> if ! DISABLE_XS
> SUBDIRS += gnulib/lib
> endif
> endif
>
I find having both the DISABLE_XS and BUILD_C_CODE conditions confusing.
gnulib, XSParagraph.la and MiscXS.la are C code, so you would naively
expect them to not to be built if BUILD_C_CODE is false. That's what
I thought the point of the conditional was.
I expect there is some combination of features or configure checks where
it makes sense to build XSParagraph.la and MiscXS.la but not the other
XS modules, but what that combination is is not at all obvious to me.
You add gnulib for the case when BUILD_C_CODE is false and DISABLE_XS
is also false. As far as I can see from the following in tta/configure.ac,
this is only the case when iconv is not available. Is that the case you
were thinking of or was it something else?
build_C_code=no
if test "x$am_func_iconv" = "xyes"; then
test "z$enable_xs" = zyes && build_C_code=yes
test "z$enable_additional_tests" = zyes && build_C_code=yes
test "z$with_swig" = zyes && build_C_code=yes
fi
AM_CONDITIONAL([BUILD_C_CODE], [test "z$build_C_code" = zyes])
AC_SUBST([build_C_code])