Configure script: Difference between revisions

Content deleted Content added
m History: no need for bolding
Usage: improved flow, removed unencyclopaedic instructions, and ./ does not need writing out in this way
Line 6:
 
==Usage==
Obtaining software directly from the source code (is a standardcommon procedure on [[Unix]] computers), and generally involves the following three steps: configuring the [[makefile]], compiling the code, and finally installing the executable into the appropriatestandard placeslocations. A configure script accomplishes the first of these steps. Using configure scripts is an automated method of generating [[makefile]]s before compilation to tailor the software to the system on which the executable is to be compiled and run. The final executable software is most commonly obtained by executing the following commands in a shell that is currently pointing to the directory containing the source code:
 
./configure
Line 12:
make install
 
One must type <code>./configure</code> (''dot slash'' configure) rather than simply <code>configure</code> to indicate to the shell that the script is in ".", i.e. the current directory. By default, for security reasons, [[Unix]] operating systems do not search the current directory for executables so one must give the full path explicitly to avoid an error.<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 |accessdate=20 November 2010}}</ref>
 
Upon its completion, <code>configure</code> prints a report to <code>config.log</code>. Running <code>./configure --help</code> gives a list of command line arguments, for enabling or disabling additional features such as:
Line 19:
./configure --prefix=/home/myname/apps
 
The first line includes the <code>mpfr</code> and <code>gmp</code> libraries. The second line tells [[make (software)|make]] to install the final version in <code>/home/myname/apps</code>. Note that if you have a space character in your argument, you will need to enclose the text in quotation marks as shown on the first line. The <code>INSTALL</code> file contains instructions should the prescribed steps fail.
 
==Generating <code>configure</code>==