Content deleted Content added
Stevebroshar (talk | contribs) It's for/from autotools |
Stevebroshar (talk | contribs) This is about GNU Build System; not something more general |
||
Line 1:
{{Short description|
{{Lowercase title}}
[[Image:Autoconf-automake-process.svg|thumb|280px|Flow diagram including configure, [[autoconf]] and [[automake]], three tools in the GNU Build System]]
As generated by the [[GNU Build System]], a '''configure script''' is an [[Bash (Unix shell)|Bash shell]] script that generates [[software build|build]] configuration files for a [[codebase]] to facilitate cross-platform support. It matches the [[Library (computer science)|libraries]] on the build host computer with those required by the codebase before the [[source code]] is [[compiler|compiled]].
==
Obtaining software directly from the source code is a common procedure on [[Unix]] and [[Unix-like]] environements. It generally involves the following steps:
# Generate a [[makefile]]
# Compile the code
# Install the result to an accessible ___location
A configure script accomplishes the first step. The script automates generating a [[makefile]]; allowing for tailoring it and the resulting software to the system on which it is compiled and run.
<syntaxhighlight lang="sh">
Line 15 ⟶ 23:
</syntaxhighlight>
A report of the configuration operation can be found in file ''config.log''. Running <code>./configure --help</code> outputs command line syntax options.
▲One must type <code>./configure</code> rather than simply <code>configure</code> to indicate to the shell that the script is in the current directory. This is because, as a security precaution, [[Unix]] configurations don't search the current directory for executables. So, to execute programs in that directory, one must explicitly specify their ___location.<ref>{{cite web |url=http://www.control-escape.com/linux/lx-swinstall-tar.html |title=Compiling Linux Software from Source Code |publisher=Control-Escape's Linux Help Engine |access-date=20 November 2010}}</ref>
Often, a document with instructions is included
▲Often, a document with instructions is included. This can be helpful if <code>configure</code> fails. This file is commonly named <code>INSTALL</code>.
▲== Generating <code>configure</code> ==
▲Software developers simplify the challenge of [[cross-platform software]] development by using [[GNU Autotools]].<ref>{{cite web |url=https://www.gnu.org/software/autoconf/ |title=Autoconf - GNU Project - Free Software Foundation (FSF) |publisher=GNU Operating System |access-date=20 November 2010}}</ref> These scripts query the system on which they run for environment settings, platform architecture, and the existence and ___location of required build and runtime dependencies. They store the gathered information in <code>configure.ac</code> or the now deprecated <code>configure.in</code> to be read by <code>configure</code> during the installation phase.
== Dependency checking ==
Line 38 ⟶ 37:
Since then, an ecosystem of programs has grown up to automate the creation of configure scripts as far as possible, of which the most common is the [[Autoconf|GNU Autoconf]] system.
== References ==
|