Re: avoiding AC_DEFINE in AC_RUN_IFELSE for Perl C code

2025-01-11 Thread Paul Eggert
On 2025-01-11 06:19, Patrice Dumas wrote: OK, how about just writing your own code, instead of using AC_RUN_IFELSE? Because it is better not to reinvent good code? I reused the configure code generated by AC_LINK_IFELSE: Thanks, that's the sort of thing I had in mind (though I expressed it p

Re: avoiding AC_DEFINE in AC_RUN_IFELSE for Perl C code

2025-01-11 Thread Patrice Dumas
On Fri, Jan 10, 2025 at 04:35:19PM -0800, Paul Eggert wrote: > On 2025-01-10 15:35, Patrice Dumas wrote: > > > How about if you don't use either AC_LANG_PROGRAM or AC_LANG_SOURCE? Just > > > use exactly the source code that you want. > > confdefs.h is still used in that case. > > OK, how about jus

Re: avoiding AC_DEFINE in AC_RUN_IFELSE for Perl C code

2025-01-10 Thread Patrice Dumas
On Fri, Jan 10, 2025 at 03:07:15PM -0800, Paul Eggert wrote: > On 2025-01-10 12:57, Patrice Dumas wrote: > > To avoid this, the test should instead be performed > > without the AC_DEFINE results performed previously includes, although > > this is the default of AC_LANG_CONFTEST, and of AC_LANG_PROG

Re: avoiding AC_DEFINE in AC_RUN_IFELSE for Perl C code

2025-01-10 Thread Paul Eggert
On 2025-01-10 15:35, Patrice Dumas wrote: How about if you don't use either AC_LANG_PROGRAM or AC_LANG_SOURCE? Just use exactly the source code that you want. confdefs.h is still used in that case. Oh, good point. OK, how about just writing your own code, instead of using AC_RUN_IFELSE?

Re: avoiding AC_DEFINE in AC_RUN_IFELSE for Perl C code

2025-01-10 Thread Paul Eggert
On 2025-01-10 12:57, Patrice Dumas wrote: To avoid this, the test should instead be performed without the AC_DEFINE results performed previously includes, although this is the default of AC_LANG_CONFTEST, and of AC_LANG_PROGRAM or AC_LINK_IFELSE. I couldn't find a way to do that. How about if

avoiding AC_DEFINE in AC_RUN_IFELSE for Perl C code

2025-01-10 Thread Patrice Dumas
Hello, In GNU Texinfo, we have two types of C code files when it comes to portability. The first type is usual C code that makes use of Autoconf and Gnulib portability features, through the include of config.h. The second type corresponds to C code that includes Perl headers, this code do not us