Autoconf
GNU Autoconf is a software development tool for generating a configure script that in turn generates files for building a codebase and for packaging or installing the resulting files. Autoconf is part of the GNU Build System – along with Automake, Libtool, Autoheader and other tools. Autoconf is agnostic about the programming language of the codebase to build. None-the-less, it is primarily used with C, C++, Fortran, Erlang, or Objective-C. A configure script configures a software package for installation on a particular target system. After running a series of tests on the target system, the configure script generates header files and a makefile from templates, thus customizing the software package for the target system. Usage overview![]() The developer specifies the desired behaviour of the configure script by writing a list of instructions in the GNU m4 language in a file called "configure.ac". A library of pre-defined m4 macros is available to describe common configure script instructions. Autoconf transforms the instructions in "configure.ac" into a portable configure script. The system that will be doing the building need not have Autoconf installed: Autoconf is needed only to build the configure script, that is usually shipped with the software. HistoryAutoconf was begun in the summer of 1991 by David Mackenzie to support his work at the Free Software Foundation. In the subsequent years it grew to include enhancements from a variety of authors and became the most widely used build configuration system for writing portable free or open-source software. ApproachAutoconf is similar to the Metaconfig package used by Perl. The imake system formerly used by the X Window System (up to X11R6.9) is closely related, but has a different philosophy. The Autoconf approach to portability is to test for features, not for versions. For example, the native C compiler on SunOS 4 did not support ISO C. However, it is possible for the user or administrator to have installed an ISO C-compliant compiler. A pure version-based approach would not detect the presence of the ISO C compiler, but a feature-testing approach would be able to discover the ISO C compiler the user had installed. The rationale of this approach is to gain the following advantages:
Autoconf provides extensive documentation around the non-portability of many POSIX shell constructs to older shells and bugs therein. It also provides M4SH, a macro-based replacement for shell syntax.[2] BehaviorAutoconf generates a The complexity of Autotools reflects the variety of circumstances under which a body of source code may be built.
To process files, autoconf uses the GNU implementation of the m4 macro system. Autoconf comes with several auxiliary programs such as CriticismThere is some criticism that states that Autoconf uses dated technologies, has a lot of legacy restrictions, and complicates simple scenarios unnecessarily for the author of configure.ac scripts. In particular, often cited weak points of Autoconf are:
Due to these limitations, several projects that used GNU Build System switched to different build systems, such as CMake and SCons.[3][9] See also
References
External links
|
Portal di Ensiklopedia Dunia