[ACCEPTED]-What's the point of aclocal?-autotools
See Alexandre Duret Lutz's Autotools tutorial, a must read.
It contains diagrams explaining 31 how the different files of an autotools 30 project interact with each other and by 29 which tool they are used:
EDIT: John 28 Calcote also explains the purpose of aclocal 27 and aclocal.m4 in the first chapter of his book about Autotools: Chapter 1: A brief introduction to the GNU Autotools:
The 26 aclocal utility is actually documented by 25 the GNU manuals as a temporary work-around 24 for a certain lack of flexibility in Autoconf. Autoconf 23 was designed and written first, and then 22 a few years later, the idea for Automake 21 was conceived as an add-on for Autoconf. But 20 Autoconf was really not designed to be extensible 19 on the scale required by Automake.
Essentially, aclocal’s 18 job is to create an aclocal.m4 file by consolidating 17 various macro files from installed Autotool 16 packages and user-specified locations, such 15 that Autoconf can find them all in one place.
However, the 14 latest documentation from both sets of tools 13 suggests that the entire aclocal/acinclude 12 paradigm is now obsolete, in favor of a 11 newer method of specifying a directory containing 10 m4 macro files. The current recommendation 9 is that you create a directory in your project 8 directory called simply m4 (acinclude seems 7 more appropriate to this author), and add 6 macros in the form of individual .m4 files 5 to this directory. All files in this directory 4 will be gathered into aclocal.m4 before 3 Autoconf processes your configure.ac file. Ultimately, aclocal 2 will be replaced by functionality in Autoconf 1 itself.
In my software,
aclocal.m4 collects the various non-standard 17 Autoconf macros that I use during the builds 16 of my software. One such set of macros 15 deals with sub-second timing - choosing 14 the best of the available options (according 13 to some pre-determined criterion for what 12 is 'best'); another such set of macros deals 11 with the intricacies of the IBM Informix 10 ESQL/C compilation system as it has evolved 9 over the last two decades (it handles ESQL/C 8 5.20, where version 5.00 was released in 7 1990, and it also handles the latest versions 6 of IBM Informix ClientSDK 3.50 - which, much 5 to my chagrin, contains ESQL/C 3.50 even 4 though it was released in 2008).
aclocal.m4 is 3 for local macros that are not necessarily 2 part of regular Autoconf but which are used 1 by your specific software.
The link to John Calcote's article as given 7 by http://freesoftwaremagazine.com/articles/brief_introduction_to_gnu_autotools/. I would have commented on that post 6 but my reputation here is too low.
The essential 5 paragraph:
Essentially, aclocal's job is 4 to create an aclocal.m4 file by consolidating 3 various macro files from installed Autotool 2 packages and user-specified locations, such 1 that Autoconf can find them all in one place.
More Related questions