System command introduction: Detailed configuration command

  

There are a lot of commands under the Linux system, and each one is powerful. Therefore, it is best to learn some system commands when learning to use the Linux system. For example, the command to be introduced to you today, the configure command. Software installation in a Linux environment is not an easy task; if you install it after source code compilation, of course, things are more complicated; now the tutorials for installing various software are very common; The solid grasp of the basic knowledge, the problem of installing various software will be solved. The Configure Script Configuration Tool is one of the foundations and is the basic application of the autoconf tool.

Compared with some techniques, Configure seems to be basic. Of course, it is boring to use and learn. Of course, to become a master, the familiarity of the basics cannot be surpassed. For this I have reproduced a detailed description of the configuration of the Configure option for your reference.

The 'configure' script has a large number of command line options. These options may change for different packages. But many of the basic options are not changed. Take the '--help' option and execute the 'configure' script to see all the options available. Although many options are rarely used, when you order for special needs When configuring a package, it is very beneficial to know their existence. Here is a brief introduction to each option:

--cache-file=FILE

'configure' will be Test the existing features (or bugs!) on your system. In order to speed up the subsequent configuration, the results of the test are stored in a cache file. When configure a complex source tree with a 'configure' script in each subtree When a good cache file exists, it will help a lot.

--help

Output help information. Even experienced users occasionally need to use '--help 'Options because a complex project will contain additional selections For example, the 'configure' script in the GCC package contains options that allow you to control whether to generate and use the GNU assembler in GCC.

--no-create

'configure A major function in 'will make an output file. This option prevents 'configure' from generating this file. You can think of this as a dry run, although the cache is still overwritten.

--quiet

--silent

When 'configure' performs his tests, it will output a brief message telling the user what is being done. This is because 'configure' might compare Slow, without this output, the user will be thrown aside and wonder what is going on. Using either of these options will throw you aside. (Annotation: These two sentences are more interesting, the original is this: If there was no such output, the user would be left wondering what is happening. By using this option, you too can be left wondering!)

--version

Print is used to generate ' The version number of the Autoconf for the configure' script.

--prefix=PEWFIX

'--prefix' is the most commonly used option. The 'Makefile' created will look at the parameters passed with this option, and when a package is installed, it can completely relocate its structurally separate parts. As an example, when installing a Packages, such as Emacs, the following command will cause Emacs Lisp file to be installed to "/opt/gnu/share":

$ ./configure --prefix=/opt/gnu

--exec-prefix=EPREFIX

Similar to the '--prefix' option, but it is used to set the installation location of the file that the structure depends on. The compiled 'emacs' binary is such a question. If the option is not set, the default option value will be set to the same value as the '--prefix' option.

--bindir=DIR

Specify the installation of the binary Location. The binary here is defined as a program that can be directly executed by the user.

--sbindir=DIR

Specifies the location where the super binary is installed. This is usually only available to superusers. Executed program.

Copyright © Windows knowledge All Rights Reserved