The GNU build system, also known as the Autotools, is a suite of programming tools designed to assist in making source-code packages portable to many Unix-like systems.
It can be difficult to make a software program portable: the C compiler differs from system to system; certain library functions are missing on some systems; header files may have different names. One way to handle this is write conditional code, with code blocks selected by means of preprocessor directives (#ifdef
); but because of the wide variety of build environments this approach quickly becomes unmanageable. The GNU build system is designed to address this problem more manageably.
The GNU build system is part of the GNU toolchain and is widely used in many free-software and open-source packages. The tools comprising the GNU build system are free-software-licensed under the GNU General Public License with special license exceptions permitting use of the GNU build system with proprietary software.
The GNU build system comprises the GNU utility programs Autoconf, Automake, and Libtool. Other related tools frequently used with the GNU build system are GNU’s make program, GNU gettext, pkg-config, and the GNU Compiler Collection, also called GCC.
configure
script based on the contents of a configure.ac
file which characterizes a particular body of source code. The configure
script, when run, scans the build environment and generates a subordinate config.status
script which, in turn, converts other input files and most commonly Makefile.in
into output files (Makefile
) which are appropriate for that build environment. Finally the make
program uses Makefile
to generate executable programs from source code.
The complexity of the GNU build system reflects the variety of circumstances under which a body of source code may be built.
make
which only re-compiles that part of the body of the source code affected by the change..in
file has changed then it suffices to re-run config.status
and make
.configure
(which runs config.status
) and make
. (For this reason source code using the GNU build system is normally distributed without the files that configure
generates.)configure.ac
and the .in
files need to be changed and all subsequent steps also followed.To process files, autoconf uses the GNU implementation of the m4 macro system.
Autoconf comes with several auxiliary programs such as Autoheader, which is used to help manage C header files; Autoscan, which can create an initial input file for Autoconf; and ifnames
, which can list C pre-processor identifiers used in the program.
Makefile
s, which are in turn processed with the make utility. It takes its input as Makefile.am
, and turns it into Makefile.in
, which is used by the configure script to generate the file Makefile
output.
configure
script which has no dependencies other than the presence of a Bourne-compatible shell.
Cross-compiling software to run on a Windows host from a GNU/Linux or other Unix-like build system is also possible, using MinGW, however native compilation is often desirable on operating systems (such as the Microsoft Windows family of systems) that cannot run Bourne shell scripts on their own. This makes building such software on the Windows operating system a bit harder than on a Unix-like system which provides the Bourne shell as a standard component. One can install the Cygwin or MSYS system on top of Windows to provide a Unix-like compatibility layer, though, allowing configure scripts to run. Cygwin also provides the GNU Compiler Collection, GNU make, and other software that provides a nearly complete Unix-like system within Windows; MSYS also provides GNU make and other tools designed to work with the MinGW version of GCC.
Projects which use the GNU build system may or may not provide a configure script within their Version control systems (such as CVS or Subversion). If a project that uses the GNU build system does not have a generated ./configure
file available for the user, the user must generate it. One possible way this can be done is to execute the autoreconf tool at a shell prompt:
$ autoreconf
This will invoke aclocal, autoconf, autoheader and automake as needed. In some cases, more commands may be necessary. Another common convention is then to provide a script, often named autogen.sh
or bootstrap
, that runs all the needed pre-build tools.
One limitation has been that the autoconf-generated configure
can be slow because it executes programs like the C compiler many times in order to test whether various libraries, header files, and language features are present.
Build system Category:Compiling tools Category:Build automation Category:Unix
ar:نظام بناء جنو de:GNU Build System es:GNU build system fr:Autotools ja:Autotools pl:Autotools ru:AutotoolsThis text is licensed under the Creative Commons CC-BY-SA License. This text was originally published on Wikipedia and was developed by the Wikipedia community.
The World News (WN) Network, has created this privacy statement in order to demonstrate our firm commitment to user privacy. The following discloses our information gathering and dissemination practices for wn.com, as well as e-mail newsletters.
We do not collect personally identifiable information about you, except when you provide it to us. For example, if you submit an inquiry to us or sign up for our newsletter, you may be asked to provide certain information such as your contact details (name, e-mail address, mailing address, etc.).
When you submit your personally identifiable information through wn.com, you are giving your consent to the collection, use and disclosure of your personal information as set forth in this Privacy Policy. If you would prefer that we not collect any personally identifiable information from you, please do not provide us with any such information. We will not sell or rent your personally identifiable information to third parties without your consent, except as otherwise disclosed in this Privacy Policy.
Except as otherwise disclosed in this Privacy Policy, we will use the information you provide us only for the purpose of responding to your inquiry or in connection with the service for which you provided such information. We may forward your contact information and inquiry to our affiliates and other divisions of our company that we feel can best address your inquiry or provide you with the requested service. We may also use the information you provide in aggregate form for internal business purposes, such as generating statistics and developing marketing plans. We may share or transfer such non-personally identifiable information with or to our affiliates, licensees, agents and partners.
We may retain other companies and individuals to perform functions on our behalf. Such third parties may be provided with access to personally identifiable information needed to perform their functions, but may not use such information for any other purpose.
In addition, we may disclose any information, including personally identifiable information, we deem necessary, in our sole discretion, to comply with any applicable law, regulation, legal proceeding or governmental request.
We do not want you to receive unwanted e-mail from us. We try to make it easy to opt-out of any service you have asked to receive. If you sign-up to our e-mail newsletters we do not sell, exchange or give your e-mail address to a third party.
E-mail addresses are collected via the wn.com web site. Users have to physically opt-in to receive the wn.com newsletter and a verification e-mail is sent. wn.com is clearly and conspicuously named at the point of
collection.If you no longer wish to receive our newsletter and promotional communications, you may opt-out of receiving them by following the instructions included in each newsletter or communication or by e-mailing us at michaelw(at)wn.com
The security of your personal information is important to us. We follow generally accepted industry standards to protect the personal information submitted to us, both during registration and once we receive it. No method of transmission over the Internet, or method of electronic storage, is 100 percent secure, however. Therefore, though we strive to use commercially acceptable means to protect your personal information, we cannot guarantee its absolute security.
If we decide to change our e-mail practices, we will post those changes to this privacy statement, the homepage, and other places we think appropriate so that you are aware of what information we collect, how we use it, and under what circumstances, if any, we disclose it.
If we make material changes to our e-mail practices, we will notify you here, by e-mail, and by means of a notice on our home page.
The advertising banners and other forms of advertising appearing on this Web site are sometimes delivered to you, on our behalf, by a third party. In the course of serving advertisements to this site, the third party may place or recognize a unique cookie on your browser. For more information on cookies, you can visit www.cookiecentral.com.
As we continue to develop our business, we might sell certain aspects of our entities or assets. In such transactions, user information, including personally identifiable information, generally is one of the transferred business assets, and by submitting your personal information on Wn.com you agree that your data may be transferred to such parties in these circumstances.