On Thu, Nov 13, 2025 at 07:25:13PM +0000, Gavin Smith wrote:
 
> You can see that the -I/opt/csw/include option is given on the first
> run of "cc".  On this system, this directory contains a GNU "libintl.h"
> file which appears to redefine "gettext" as "libintl_gettext".  This flag
> appears to come from the Perl configuration values:
> 
> perl_conf_CFLAGS='-D_REENTRANT -xO3 -m32 -xarch=pentium_pro 
> -xchip=pentium_pro -I/opt/csw/bdb48/include -I/opt/csw/include 
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -KPIC'
> 
> But this is not used for the tests in tta/configure.ac.  Code to use this
> value in the value of CFLAGS is commented out:
> 
>   # The usual configure checks use the Autoconf/Gnulib includes, but do not   
>   
>   # compile nor link against Perl.  The result of those checks are used for   
>   
>   # code never compiled with the Perl flags.  Therefore we do not set the 
> Perl  
>   # more specific flags, but use the user-defined.                            
>   
>   CFLAGS=$PERL_EXT_CFLAGS                                                     
>   
>   CPPFLAGS=$PERL_EXT_CPPFLAGS                                                 
>   
>   LDFLAGS=$PERL_EXT_LDFLAGS                                                   
>   
>   # Specific checks against Perl should not have the Autoconf/Gnulib includes 
>   
>   # but could set the following:                                              
>   
>   #CFLAGS="$PERL_EXT_CFLAGS $perl_conf_CFLAGS"                                
>   
>   #LDFLAGS="$PERL_EXT_LDFLAGS $perl_conf_LDFLAGS"   
> 
> This was changed on 2025-01-31 (commit b1ecc743d), and further changed on
> 2025-07-14 (commit 1c8d0009d64).
> 
 
I see that you (Patrice) edited the comments around this code today.

I found by testing on the Solaris 11 system that the $perl_conf_CFLAGS were
needed in CFLAGS, and the build would succeed with this.

I was going to commit a change to use these flags, but it conflicts with
your change.

Would using these flags break anything on any platforms?

In the past, all the code under tp/Texinfo/XS was built with the Perl flags,
as far as I remember.

Following the code reorganisation in February 2025, which you referred to
in this message:

https://lists.gnu.org/archive/html/bug-texinfo/2025-02/msg00002.html

- I understand that what was tp/Texinfo/XS/configure.ac became
tta/configure.ac.  But it seems that this is not solely for XS any more, and
so you don't want to use the flags from the Perl configuration for all the
configure checks.

Perhaps the organisation of the code needs to be tweaked to separate XS and
non-XS C code more, so they don't share the same configure checks?

Here's what you wrote in a private mail on 2025-01-19, explaining how
the code would be reorganised:

    I had another quite different idea, which would be to have a toplevel
    texi2any (or t2a for brievity), that would contain a configure.ac, which
    would be more or less the current Texinfo/XS configure.ac, tests and
    some common data, and would contain a perl directory for texi2any.pl,
    the Texinfo modules and the XS interfaces in the XS directory, and a
    C directory that would contain texi2any.c and all the lib and code
    currently in Texinfo/XS except for the .xs that would be in the perl
    subdirectory.  The code would be build in the C directory first to build
    all the libraries and in the perl directory afterwards.  The only
    inter-directories dependency would be the .la needed by the perl XS
    modules.

Reply via email to