Examples of Aclocal Command in Linux


aclocal is a command used to automatically generate aclocal.m4 files from configure.in file. autoconf macros contained in automake must be defined in aclocal.m4. Otherwise, autoconf cannot access them.

When executed the aclocal command will scan the macro definitions in the .m4 file in its default directory /usr/share/aclocal and in the acinclude.m4 file, then it will check the macros used in the configure.in file. and it will eventually create an aclocal.m4 file containing the definitions of all the m4 macros required by autoconf.

And here is a guide to using the aclocal command in Linux.

Syntax of aclocal command

$ aclocal [, OPTION/]... [, SRCDIR/]

options:

-acdir=dir search macro files in directory dir

-help display the help messages and exits

$ aclocal --help

Output:

alocal-command-linux

-I DIRECTORY the specified folders will be added to the list of searched folders .m4 files

-system-acdir=dir show a directory of third-party system-wide files

-output=FILE put the output into specified FILE instead of aclocal.m4 file

-diff allows running diff command on mutable m4 files

-verbose the filename it checks will be printed

-version display version then exits

$ aclocal --version

Output:

alocal-command-linux

Conclusion

You have just seen a detailed tutorial on how to use the aclocal command in Linux.

Thank you for reading.

Print Friendly, PDF & Email