LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

autoconf

Generate configure scripts from templates

TLDR

Generate configure script
$ autoconf
copy
Generate with specific template
$ autoconf -o [configure] [configure.ac]
copy
Trace a specific macro in configure.ac
$ autoconf --trace=[AC_CHECK_LIB]
copy
Show version
$ autoconf --version
copy

SYNOPSIS

autoconf [-o output] [input]

DESCRIPTION

autoconf generates configure scripts from templates (configure.ac or configure.in). These scripts probe the system for available features, libraries, and tools, producing Makefiles tailored to the build environment.Autoconf is part of the GNU Build System (autotools), used by thousands of open source projects.

PARAMETERS

-o file

Output file (default: configure)
-W category
Warning category
-I dir
Add directory to search path
-f, --force
Force regeneration
-v, --verbose
Verbose output
--trace=macro
Trace macro calls in configure.ac
-B dir
Prepend directory to search path

WORKFLOW

1. Write configure.ac2. Run autoconf to generate configure3. Distribute configure with source4. Users run ./configure to generate Makefile

CAVEATS

Requires M4 macro processor. Complex syntax based on M4. Generated configure scripts are large. Learning curve is steep.

HISTORY

Autoconf was created by David MacKenzie in 1991 to address the portability problems of Unix software. It became the standard build system for GNU and many other projects.

SEE ALSO

automake(1), autoreconf(1), configure(1), m4(1), libtool(1)

Copied to clipboard
Kai