Re: Evaluating arithmetic expressions with macros (eval)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 12, 2023 at 04:33:54PM +0100, Peter Hull wrote:
> On Thu, 12 Oct 2023 at 15:56, Sébastien Hinderer
> <Sebastien.Hinderer@xxxxxxxx> wrote:
> > So according to that, I expected that autoconf would call m4 with the -P
> > option and looked at my /usr/bin/autoconf script but it does not seem to
> > contain any occurrence of -P. But perhaps that appears in a sourced file
> > or so.
> You're right! Possibly it is done by 'lib/m4sugar/m4sugar.m4' in the
> source code. I'll leave it to someone who knows what they're talking
> about to reply!

Autoconf intentionally provides m4_ prefixes as the preferred spelling
for the majority of m4 builtin macros - but it does so via the m4sugar
prelude that manually renames things, rather than via m4 -P.  In some
cases, the original builtin name is still available as well, but
intentionally undocumented.  Thus, in your configure.ac file, both
m4_eval(...) and eval(...) will do the same actions, but only
m4_eval(...) complies with the manual (and although unlikely due to
back-compat reasons, some future release of autoconf could decide to
make eval(...) no longer do what you want).

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org





[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux