6.25. M4-1.4.10

The M4 package contains a macro processor.

User Notes: http://wiki.linuxfromscratch.org/hlfs/wiki/m4

6.25.1. Installation of M4

This version of M4 has a bug in GnuLib which causes a buffer overflow in the configure tests. This patch is from upstream: http://cvs.savannah.gnu.org/viewvc/gnulib/m4/printf.m4?root=gnulib&r1=1.35&r2=1.36. Apply this patch with the following command:

patch -Np1 -i ../m4-1.4.10-fixes-1.patch

Prepare M4 for compilation:

./configure --prefix=/usr

Compile the package:

make

To test the results, issue: make check.

Install the package:

make install

6.25.2. Contents of M4

Installed program: m4

Short Descriptions

m4

copies the given files while expanding the macros that they contain. These macros are either built-in or user-defined and can take any number of arguments. Besides performing macro expansion, m4 has built-in functions for including named files, running Unix commands, performing integer arithmetic, manipulating text, recursion, etc. The m4 program can be used either as a front-end to a compiler or as a macro processor in its own right.