If you want to write a library for distribution on most Un*x-like systems, chances are you'll want to use GNU Autotools. I have for a long time been curious how these tools work, and how the seemingly indecipherable syntaxes of @Makefile.am@ and @configure.ac@ were interpreted. And what is the relationship between @automake@, @autoconf@ and @aclocal@?
The following online book is well worth the read:
* "GNU Autoconf, Automake, and Libtool":https://sourceware.org/autobook/autobook/autobook_toc.html
So far the general idea is the following:
* aclocal generates an @aclocal.m4@ by scanning @configure.ac@ (from the @man@ page)
* autoconf is for generating @./configure@ which figures out the configuration of the installation system; while
* automake is for generating a @Makefile.in@, a Makefile template
A common pattern in C header files is the following: