m4 is a powerful (Turing-equivalent, unlike CPP) macro-expansion
program designed as a preprocessor to more stubborn *(programming language)s.
It's ugly, but it's fairly standard, and available on most platforms,
including a fine _(GNU) version.

The semantics of m4 are bad. it uses back-door evaluation in a
dynamically-bound global environment as the only way to program, without
any way to safely quote text (not to speak about quasiquotation).
Thus, users who want to do complex things often find they must compile
manually to continuation passing style with manual fluid-bindings. Avoid
m4 but for quick hacks, and when the environment has already been setup
for it (e.g. FvwmM4, sendmail configuration, etc).

<UL CLASS="implementations">
<LI><A HREF="http://www.gnu.org/software/m4/m4.html">GNU M4</A></LI>
</UL>