<s>
m4	B-Device
is	O
a	O
general-purpose	B-Application
macro	I-Application
processor	I-Application
included	O
in	O
most	O
Unix-like	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
,	O
and	O
is	O
a	O
component	O
of	O
the	O
POSIX	O
standard	O
.	O
</s>
<s>
The	O
language	O
was	O
designed	O
by	O
Brian	O
Kernighan	O
and	O
Dennis	O
Ritchie	O
for	O
the	O
original	O
versions	O
of	O
UNIX	B-Application
.	O
</s>
<s>
It	O
is	O
an	O
extension	O
of	O
an	O
earlier	O
macro	B-Application
processor	I-Application
,	O
m3	O
,	O
written	O
by	O
Ritchie	O
for	O
an	O
unknown	O
AP-3	O
minicomputer	O
.	O
</s>
<s>
The	O
macro	O
preprocessor	B-General_Concept
operates	O
as	O
a	O
text-replacement	O
tool	O
.	O
</s>
<s>
It	O
is	O
employed	O
to	O
re-use	O
text	O
templates	B-Language
,	O
typically	O
in	O
computer	B-General_Concept
programming	I-General_Concept
applications	O
,	O
but	O
also	O
in	O
text	O
editing	O
and	O
text-processing	O
applications	O
.	O
</s>
<s>
Most	O
users	O
require	O
m4	B-Device
as	O
a	O
dependency	O
of	O
GNU	B-Application
autoconf	I-Application
.	O
</s>
<s>
Macro	B-Application
processors	I-Application
became	O
popular	O
when	O
programmers	B-Application
commonly	O
used	O
assembly	B-Language
language	I-Language
.	O
</s>
<s>
In	O
those	O
early	O
days	O
of	O
programming	O
,	O
programmers	B-Application
noted	O
that	O
much	O
of	O
their	O
programs	O
consisted	O
of	O
repeated	O
text	O
,	O
and	O
they	O
invented	O
simple	O
means	O
for	O
reusing	O
this	O
text	O
.	O
</s>
<s>
Programmers	B-Application
soon	O
discovered	O
the	O
advantages	O
not	O
only	O
of	O
reusing	O
entire	O
blocks	O
of	O
text	O
,	O
but	O
also	O
of	O
substituting	O
different	O
values	O
for	O
similar	O
parameters	O
.	O
</s>
<s>
This	O
defined	O
the	O
usage	O
range	O
of	O
macro	B-Application
processors	I-Application
.	O
</s>
<s>
In	O
the	O
1960s	O
,	O
an	O
early	O
general-purpose	B-Application
macro	I-Application
processor	I-Application
,	O
M6	O
,	O
was	O
in	O
use	O
at	O
AT&T	O
Bell	O
Laboratories	O
,	O
which	O
was	O
developed	O
by	O
Douglas	O
McIlroy	O
,	O
Robert	O
Morris	O
and	O
Andrew	O
Hall	O
.	O
</s>
<s>
Kernighan	O
and	O
Ritchie	O
developed	O
m4	B-Device
in	O
1977	O
,	O
basing	O
it	O
on	O
the	O
ideas	O
of	O
Christopher	O
Strachey	O
.	O
</s>
<s>
The	O
implementation	O
of	O
Rational	B-Language
Fortran	I-Language
used	O
m4	B-Device
as	O
its	O
macro	O
engine	O
from	O
the	O
beginning	O
,	O
and	O
most	O
Unix	B-Application
variants	O
ship	O
with	O
it	O
.	O
</s>
<s>
many	O
applications	O
continue	O
to	O
use	O
m4	B-Device
as	O
part	O
of	O
the	B-Application
GNU	I-Application
Project	I-Application
's	O
autoconf	B-Application
.	O
</s>
<s>
It	O
also	O
appears	O
in	O
the	O
configuration	O
process	O
of	O
sendmail	B-Application
(	O
a	O
widespread	O
mail	B-Protocol
transfer	I-Protocol
agent	I-Protocol
)	O
and	O
for	O
generating	O
footprints	O
in	O
the	O
gEDA	B-Application
toolsuite	O
.	O
</s>
<s>
The	O
SELinux	B-Application
Reference	O
Policy	O
relies	O
heavily	O
on	O
the	O
m4	B-Device
macro	B-Application
processor	I-Application
.	O
</s>
<s>
m4	B-Device
has	O
many	O
uses	O
in	O
code	B-Application
generation	I-Application
,	O
but	O
(	O
as	O
with	O
any	O
macro	B-Application
processor	I-Application
)	O
problems	O
can	O
be	O
hard	O
to	O
debug	O
.	O
</s>
<s>
m4	B-Device
offers	O
these	O
facilities	O
:	O
</s>
<s>
Unlike	O
most	O
earlier	O
macro	B-Application
processors	I-Application
,	O
m4	B-Device
does	O
not	O
target	O
any	O
particular	O
computer	O
or	O
human	O
language	O
;	O
historically	O
,	O
however	O
,	O
its	O
development	O
originated	O
for	O
supporting	O
the	O
Ratfor	B-Language
dialect	O
of	O
Fortran	B-Application
.	O
</s>
<s>
Unlike	O
some	O
other	O
macro	B-Application
processors	I-Application
,	O
m4	B-Device
is	O
Turing-complete	O
as	O
well	O
as	O
a	O
practical	O
programming	O
language	O
.	O
</s>
<s>
Unlike	O
most	O
languages	O
,	O
strings	O
in	O
m4	B-Device
are	O
quoted	O
using	O
the	O
backtick	O
( `	O
)	O
as	O
the	O
starting	O
delimiter	B-Algorithm
,	O
and	O
apostrophe	B-Language
( 	O
 '	O
)	O
as	O
the	O
ending	O
delimiter	B-Algorithm
.	O
</s>
<s>
Separate	O
starting	O
and	O
ending	O
delimiters	B-Algorithm
allows	O
the	O
arbitrary	O
nesting	O
of	O
quotation	O
marks	O
in	O
strings	O
to	O
be	O
used	O
,	O
allowing	O
a	O
fine	O
degree	O
of	O
control	O
of	O
how	O
and	O
when	O
macro	O
expansion	O
takes	O
place	O
in	O
different	O
parts	O
of	O
a	O
string	O
.	O
</s>
<s>
The	O
following	O
fragment	O
gives	O
a	O
simple	O
example	O
that	O
could	O
form	O
part	O
of	O
a	O
library	O
for	O
generating	O
HTML	B-Language
code	I-Language
.	O
</s>
<s>
Processing	O
this	O
code	O
with	O
m4	B-Device
generates	O
the	O
following	O
text	O
:	O
</s>
<s>
FreeBSD	B-Operating_System
,	O
NetBSD	B-Device
,	O
and	O
OpenBSD	B-Operating_System
provide	O
independent	O
implementations	O
of	O
the	O
m4	B-Device
language	O
.	O
</s>
<s>
Furthermore	O
,	O
the	O
Heirloom	B-Device
Project	I-Device
Development	O
Tools	O
includes	O
a	O
free	O
version	O
of	O
the	O
m4	B-Device
language	O
,	O
derived	O
from	O
OpenSolaris	B-Operating_System
.	O
</s>
<s>
M4	B-Device
has	O
been	O
included	O
in	O
the	O
Inferno	B-Operating_System
operating	I-Operating_System
system	I-Operating_System
.	O
</s>
<s>
This	O
implementation	O
is	O
more	O
closely	O
related	O
to	O
the	O
original	O
m4	B-Device
developed	O
by	O
Kernighan	O
and	O
Ritchie	O
in	O
Version	B-Operating_System
7	I-Operating_System
Unix	I-Operating_System
than	O
its	O
more	O
sophisticated	O
relatives	O
in	O
UNIX	B-Operating_System
System	I-Operating_System
V	I-Operating_System
and	O
POSIX	O
.	O
</s>
<s>
GNU	B-Operating_System
m4	B-Device
is	O
an	O
implementation	O
of	O
m4	B-Device
for	O
the	B-Application
GNU	I-Application
Project	I-Application
.	O
</s>
<s>
It	O
is	O
designed	O
to	O
avoid	O
many	O
kinds	O
of	O
arbitrary	O
limits	O
found	O
in	O
traditional	O
m4	B-Device
implementations	O
,	O
such	O
as	O
maximum	O
line	O
lengths	O
,	O
maximum	O
size	O
of	O
a	O
macro	O
and	O
number	O
of	O
macros	O
.	O
</s>
<s>
Removing	O
such	O
arbitrary	O
limits	O
is	O
one	O
of	O
the	O
stated	O
goals	O
of	O
the	B-Application
GNU	I-Application
Project	I-Application
.	O
</s>
<s>
The	O
GNU	B-Application
Autoconf	I-Application
package	O
makes	O
extensive	O
use	O
of	O
the	O
features	O
of	O
GNU	B-Operating_System
m4	B-Device
.	O
</s>
<s>
GNU	B-Operating_System
m4	B-Device
is	O
currently	O
maintained	O
by	O
Gary	O
V	O
.	O
Vaughan	O
and	O
Eric	O
Blake	O
.	O
</s>
<s>
Released	O
under	O
the	O
terms	O
of	O
the	O
GNU	B-License
General	I-License
Public	I-License
License	I-License
,	O
GNU	B-Operating_System
m4	B-Device
is	O
free	B-Application
software	I-Application
.	O
</s>
