Configure script: Difference between revisions

Content deleted Content added
m Reverted edits by 45.114.88.179 (talk) (HG) (3.3.1)
Line 8:
Obtaining software directly from the source code is a common procedure on [[Unix]] computers, and generally involves the following three steps: configuring the [[makefile]], compiling the code, and finally installing the executable to standard locations. 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:
 
<source lang="sh">
<pre>
./configure
make
make install
</presource>
 
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. 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>
Line 19:
 
<source lang="sh">
./configure --libs="-lmpfr -lgmp"
./configure --prefix=/home/myname/apps
</source>