On Mon, Feb 02, 2026 at 09:44:14PM +0000, Gavin Smith wrote: > On Mon, Feb 02, 2026 at 10:18:28PM +0100, Patrice Dumas wrote: > > Maybe we should change the name of the conditional, then, for example to > > BUILD_C_LIBRARIES? > > XS modules are still a C library.
Ok. So what about BUILD_SHARED_TXI_LIBRARIES Or maybe even better SHARED_TXI_LIBRARIES_BUILT > I thought the removal of the HAVE_ICONV conditional was supposed to be a > simplification, but it seems not to be, if we still have different objects > being built depending on the setting thereof. > > Before, we had the DISABLE_XS condition and the HAVE_ICONV condition. > Currently, > we have BUILD_C_CODE and DISABLE_XS which, as far as I understand, interact > so to produce the same results (but in a more obscure way). To me it is clearer. Indeed, the HAVE_ICONV was used to mean that some code depends indirectly on the iconv library through the shared libraries. A conditional like SHARED_TXI_LIBRARIES_BUILT is clearer to me as it the texinfo shared libraries are a direct dependency of the code that may not use iconv directly. > If we we want the HAVE_ICONV check to still only to apply to certain XS > modules, then my preference would be to reinstate the HAVE_ICONV conditionals > as they were, and make BUILD_C_CODE the overriding conditional that is not > dependent on HAVE_ICONV. I may be missing something, but doesn't that mean that in some cases, we would have constructs like if HAVE_ICONV if BUILD_C_CODE ... endif endif instead of simply (since the condition is determined once for all in configure): if BUILD_C_CODE ... endif > So we'd get rid of the 'if test "x$am_func_iconv" = "xyes"' check in > tta/configure.ac and put back all the "if HAVE_ICONV" conditions > in tta/perl/XSTexinfo/Makefile.am (that were changed to "if BUILD_C_CODE"). I may have missed something, but in most cases, both HAVE_ICONV and BUILD_C_CODE are needed. > > To me the DISABLE_XS and BUILD_C_CODE conditions are logical: gnulib is > > used directly by some XS modules and is also needed by the C libraries. > > When I see the following in tta/perl/XSTexinfo/Makefile.am: > > if BUILD_C_CODE > xs_LTLIBRARIES += DocumentXS.la > endif > > - the obvious implication is that DocumentXS.la is "C code" that should > only be built if we are building C code. Is it based on the name of the conditional, or something deeper about the conditional? > You are viewing it a different way, which would be hard for anybody to > infer: the object DocumentXS.la *depends* on a category of C library that > you consider to be "C code" - but the object is not itself considered > to be, necessarily, C code. > > Hopefully it's fairly easy for you to see how confusion could arise here. I see that the name is not so good, but even with this name, I do not fully see the confusion, as the fact that the object is C code seems to be quite clear irrespective of the conditional existence (or name). But I may be missing something. -- Pat
