Autoconf Macro Archive - Project CVS - Download
Macro Index
- AM Support
- C++ Support
- C Support
- Fortran Support
- Java Support
- Cross Compilation
- Installed Packages
- Miscellaneous
- LaTeX Support
- Uncategorized
- archive macros
- adl's macros
- bkorb's macros
- guidod's macros
- latex's macros
- other's macros
- rleigh's macros
- obsoleted macros
- released macros
- search index

- Contribute!
- History
- acincludedir m4
- acinclude (tool)
- macro howto
- ax tricks
- maintainers
- License
- Topics


(C) 2007 guidod

`acinclude` - the tool

Please use the `acincludedir` tool now!

With more and more macros to show up in the ac-archive however the limitations of the "aclocals" installoption became more and more inconvenient to handle - the merged series of user-centric macros with the heap of macros out of the ac-archive was just a bit much. With the growing popularity (partly through the fame of being a gnu project) the number of macros in the ac-archive multiplied and it was unfair to have 200 macros being handled in the "share/aclocal" directory. The ac-archive website had been broken into six subcategories for a reason and with more and more macros showing up, we do actually consider to add more subcategories in order to handle the bulk of macros more easily.

Furthermore, it became known that more and more projects started to get another dependency on the ac-archive project, or more specifically, the sfnet branch for any maintainer-clean of those projects since for convience these projects did not ship the m4 ac-archive macros but they did just use the aclocal.m4 file being generated by "aclocal" itself. But any maintainer-clean will sweep that file, and if a bootstrap build of a project did not preinstall the ac-archive then a number of unresolved autoconf macros will be the result (debian autobuild maintainers may have seen these).

To overcome this problem area, Guido Draheim did develop the "acinclude" tool recently - which is actually a copy of "aclocal" modified for the needs of the "ac-archive". This tool will (as the name suggests) create a file called "acinclude.m4" in the project directory which will be left untouched by any maintainer-sweeps *and* which automake will see and automatically include in a tarball of the resp. project directory. Furthermore, this "acinclude" tool will not just scan one directory like "aclocal" would but it will scan for m4-files in the subdirectories of any of its "-I"-options - with a default to look for m4-files in the subdirectories (!!) of "share/aclocal" which the original "aclocal" tool will ignore.

That way, the new "acinclude" installoption will copy the ac-archive to the "share/aclocal" path as it is - with all its subcategories represented in the form of subdirectories. Furthermore, these directories are always searched in alphabetic order with any macro found in later directories to overwrite the previous ones - and since the official ac-archive directories are starting in big-caps, any developer can start out with his own subdir to hold his specific macros or some experimental extension to the official ones.

Now have a look back into the previous section where we talked about the sequence of tools the files that they create. This sequence is now simply enlarged with a third tool - and it reads now like this:
(a) "autoconf" tool will use all the macros in "share/autoconf/" directory plus the macros in "aclocal.m4" in the project directory - creating "configure".
(b) "aclocal" will use all the macros in "share/aclocal/" plus the macros in "acinclude.m4" in the project directory. - creating "aclocal.m4"
(c) "acinclude" will use all the macros in "share/aclocal/*/" (the subdirectoires of "share/aclocal" plus the macros in "acpackage.m4"
- creating "acinclude.m4"
and the "acinclude.m4" file will then be known to carry cross-project macros coming either directly from the ac-archive's official subcategories or from a user-specific subcategories where examples can see be seen in the sfnet branch for some well-known developers. However, please note: the "acinclude" tool is a quick hack that just does what is should do - so please report any problems or ideas about it as you would do for any beta software.

Update: the `acinclude` tool has evolved ever since, it can detect now some obsoleted macros and informs the user of the new one. The old ones are kept in the ac-archive for some time (sorry if it gets removed in the ac-archive but I do not have access about that place anymore.