The installation of the source code is generally composed of 3 steps: Configuration (Configure), compile (make), installation (make install), the specific installation method is generally the author will give the document, here is the main discussion configuration (configure). Configure is an executable script that has many options for using commands./configure–help output A detailed list of options, as follows:
-bash-3.00#./configure--help
usage:configure [Options] [host]
Options: [Defaults in brackets after descriptions]
Configuration:
--cache-file=file cache test results in file
--HELP Print this message
--no-create do not create output files
--quiet,--silent do not print ' checking ... ' messages
--version Print the version of autoconf that created configure
Directory and file names:
--prefix=prefix install architecture-independent files in prefix
[/usr/local]
--exec-prefix=eprefix install architecture-dependent files in Eprefix
[Same as prefix]
--bindir=dir user executables in DIR [Eprefix/bin]
.... (Omit a few)
A lot of options, personally think, you can ignore everything else, but please add-prefix. To install supersparrow-0.0.0 as an example, we intend to install it to directory/usr/local/supersparrow, and then execute the script with options in the supersparrow-0.0.0 directory./configure-- Prefix=/usr/local/supersparrow, the execution succeeds, then compiles, installs (Make,make installs), the installation completes automatically generates the directory Supersparrow, and all the files of the software are copied to this directory. Why do you want to specify this installation directory? is for the future maintenance convenience, if not with this option, after the installation process, the software required to be copied to a different system directory, it is difficult to find out exactly where those files copied, where to copy to-basically a mess.
Another benefit of using the-PREFIX option is uninstalling the software or porting the software. When an installed software is no longer needed, simply remove the installation directory, you can uninstall the software cleanly; the porting software simply copies the entire directory to another machine (the same operating system).
A small option has such a convenient role, it is recommended to use more in the actual work
Linux./configure--prefix command