Chapter 5. Initialization and Output Files

Autoconf-generated configure scripts need some information about how to initialize, such as how to find the package's source files; and about the output files to produce. The following sections describe initialization and the creation of output files.

Initializing configure

Every configure script must call AC_INIT before doing anything else. The only other required macro is AC_OUTPUT (the section called “Outputting Files”).

function>AC_INIT/function> (package, version, [bug-report], [tarname]) Process any command-line arguments and perform various initializations and verifications.

Set the name of the package and its version. These are typically used in -version support, including that of configure. The optional argument bug-report should be the email to which users should send bug reports. The package tarname differs from package: the latter designates the full package name (e.g., GNU Autoconf), while the former is meant for distribution tar ball names (e.g., autoconf). It defaults to package once GNU strip, lower cased, and all non alphanumeric character mapped onto -.

It is preferable that these arguments be static, i.e., there should not be any shell computation, but they can be computed by M4. The following M4 macros (e.g., AC_PACKAGE_NAME), output variables (e.g., PACKAGE_NAME), and preprocessor symbols (e.g., PACKAGE_NAME) are then defined:

AC_PACKAGE_NAME, PACKAGE_NAME

Exactly package.

AC_PACKAGE_TARNAME, PACKAGE_TARNAME

Exactly tarname.

AC_PACKAGE_VERSION, PACKAGE_VERSION

Exactly version.

AC_PACKAGE_STRING, PACKAGE_STRING

Exactly packageversion.

AC_PACKAGE_BUGREPORT, PACKAGE_BUGREPORT

Exactly bug-report.