Evaluating arithmetic expressions with macros (eval)

Sébastien Hinderer <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.general
Message-ID <[email protected]>
Dear all,

I find myself stuck with something which I assume is trivial. I define:

m4_define([X], [9])
m4_define([Y], [3])

And I would like to define Z as being the arithmetic sum of X and Y and
can seem to get it.

I tried several variations of eval but had no success. I understand
that all the macros need to be expanded before eval is called but I
don't understand how to do it.

Any help warmly appreciated.

Thanks in advance,

Seb.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.