aclocal command in Linux is used to automatically generate
aclocal.m4 files from
configure.in file.
automake in Linux contain a lot of
autoconf macros that can be used in the different packages. These macros must be defined in the
aclocal.m4. If not, then it can’t be accessed by the
autoconf.
The aclocal command first scans for macro definitions in the
.m4 files in its default directory (/usr/share/aclocal on some systems) and also in the file
acinclude.m4 after which it scans for macros used in the
configure.in file. It will generate an
aclocal.m4 file that contains definitions of all the
m4 macros required by autoconf.
Syntax:
aclocal [, OPTION/]... [, SRCDIR/]
Options:
- –acdir=dir : This option is used to search macro files in directory dir instead of the default directory.
- –help: Display the help message and then exits.

- -I DIRECTORY: Add the directory DIR to the list of directories searched for the .m4 files.
- –system-acdir=dir: Shows the directory holding third party system wide files.
- –output=FILE: Cause the output to be put into specified FILE instead of aclocal.m4.
- –diff: Runs the command diff on m4 files that might be changed.
- –verbose: It prints the names of the files it examines.

- –print-ac-dir: Prints the name of the directory to be searched for m4 files, then exit.
- –force: Always updates the output file.
- –dry-run: Pretends to update the files.
- –version: Shows the version number and then exits.

- -W or –warnings: Reports the warning’s falling in the category.
The warning categories are:

Last Updated :
15 May, 2019
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...