Autoconf has always been a bit of a mystery to me. While working through the MailCore 2/libetpan stuff, I once again got reacquainted with Autotools and had to dive a bit deeper. John Calcote’s Autotools is an awesome reference that I found on O'Reilly Safari today.
This is mostly a set of rapid fire notes that I will probably refer back to in the future for my own reference.
Tools
Automake - takes
Makefile.am
files and turns them intoMakefile.in
files.Autoconf - takes
configure.ac
,aclocal.m4
,acsite.m4
and uses them to generate theconfigure
script. Configure script takes.in
files and outputs them with the.in
stripped (e.g.Makefile.in -> Makefile
)
So that’s the general flow of things here. Automake goes from .am
to
.in
, Autoconf takes .ac
and .m4
to generate the configure
script (and config.h.in
). Finally, ./configure
takes the .in
files and generates the output with the .in
removed (Makefile.in ->
Makefile
, config.h.in -> config.h
).