A detailed explanation of the Linux./configure parameters

Source: Internet
Author: User
Tags syslog install perl gtar

Reprinted from http://blog.csdn.net/zjt289198457/article/details/6918656

A detailed explanation of the Linux./configure parameters

./configure

The script will run some tests to guess some system-related variables and detect special settings for your operating system, and finally create some files in the tree to record what it finds.

The default setting is to make the server and the application, and all the client programs and interfaces that only require the C compiler. By default, all files are installed to/usr/local/pgsql.

You can custom make and install processes by giving one or more of the following configure command line options:


--prefix=prefix
Put all the files under directory prefix instead of/usr/local/pgsql. The actual file will be installed in a different subdirectory, and no file will be installed directly into the PREFIX directory.

If you have special needs, you can also use the following options to client the location of different subdirectories.

--exec-prefix=exec-prefix
You can install system-related files to a different location, Exec-prefix, instead of PREFIX settings.   This makes it easier to share system-related files between different hosts. If you omit these, then the Exec-prefix will be set to equal PREFIX and the system-dependent and system-independent files will be installed under the same directory tree, which may be what you want.

--bindir=directory
Declares the directory for the executable, the default is Exec-prefix/bin, which is usually/usr/local/pgsql/bin.

--datadir=directory
Sets the directory of read-only files required by the installed program.   The default is Prefix/share. Please note that this directory has nothing to do with where you put the database files.

--sysconfdir=directory
A directory for a wide variety of configuration files, default to Prefix/etc.

--libdir=directory
Catalog of library files and dynamic load modules. The default is Exec-prefix/lib.

--includedir=directory
Directories for C and C + + header files. The default is Prefix/include.

--docdir=directory
Document files, (except for "man", will be installed in this directory.) The default is Prefix/doc.

--mandir=directory
Along with PostgreSQL the hand album will be installed into this directory.   In their corresponding Manx subdirectories. The default is Prefix/man.

Note: In order to reduce contamination of shared installation locations (such as/usr/local/include), configure automatically attaches a datadir, sysconfdir,includedir, and Docdir "/postgresql" string, unless fully expanded after the name of the directory already contains the string "Postgres" or "Pgsql". For example, if you choose/usr/local to prefix, then C's header file will be installed to/usr/local/include/postgresql, but if the prefix is/opt/postgres, then they will be put in/op T/postgres/include.




--with-includes=directories
Directories is a series of colon-delimited directories that are added to the compiler's header file search list. If you have some optional packages (such as GNU Readline) installed in non-standard locations, you must use this option, and there may be a corresponding--with-libraries option.

Example:--with-includes=/opt/gnu/include:/usr/sup/include.

--with-libraries=directories
Directories is a series of colon-delimited directories that are used to locate library files. If you have some packages installed in non-standard locations, you may need to use this option (as well as the corresponding--with-includes option).

Example:--with-libraries=/opt/gnu/lib:/usr/sup/lib.

--enable-locale
Open Zone support. Zone support can be a loss of performance, but if you don't use the database in an English-speaking environment, you probably need this option.

--enable-recode
Turns on support for single-byte character set records. See section 5.3 For more information on this feature.

--enable-multibyte
Multi-byte encoding is allowed. This option is mainly used in languages such as Japanese, Korean and Chinese. Read Section 5.2 For more information.

--with-pgport=number
Set number to the default port for the server and client.   The default is 5432. This port can be set at a later time, but if you declare it here, then the server and the client will have the same compiled default value. This will be convenient.

--with-cxx
Make a C + + support library.

--with-perl
Make a Perl interface module. The Perl interface will be installed to the usual installation location of the Perl module (typically/usr/lib/perl), so you must have root permission to perform the installation steps (see step 4). With this option you need to install Perl 5.

--with-python
Make a Python interface module.   You need root permissions to install the Python module to its default location (/USR/LIB/PYTHONX.Y). To use this option, you must already have Python installed and your system must support shared libraries. If you want to create a new complete binary interpreter, you can only make it yourself.

--with-tcl
Make the parts that need TCL/TK, namely libpgtcl,pgtclsh,pgtksh,pgaccess and PL/TCL. You can also look at the following--without-tk.

--without-tk
If you declare--WITH-TCL and this option at the same time, programs that require Tk (that is, Pgtksh and pgaccess) will be excluded.

--with-tclconfig=directory,--with-tkconfig=directory
TCL/TK installation files tclconfig.sh and tkconfig.sh, they contain configuration information for making TCL or Tk module interfaces. Configure usually find these files automatically in their well-known locations, but if you need a different version of TCL or TK, you can also declare that you can find their directory.

--enable-odbc
Make an ODBC driver package.

--with-odbcinst=directory
Declares the path to ODBC's expected Odbcinst.ini configuration file.   The default is/USR/LOCAL/PGSQL/ETC or the content of the--SYSCONFDIR option you declared. The installer will install a default file there.

--with-krb4=directory,--with-krb5=directory
Create something that supports Kerberos authentication.   You can choose Kerberos version 4 or 5, but not two at a time. The directory parameter declares the root directory of the Kerberos installation, and the default assumption is/usr/athena if the associated header and library files are not in the usual parent directory, then you must use the additional--with-includes and--WI Th-libraries option. On the other hand, if the required files are in a default search directory (for example,/usr/lib), then you do not have to enter these parameters.

Configure will check the required header and library files before installing to make sure that your Kerberos installation is complete.

--with-krb-srvnam=name
The name of the Kerberos service master. The default is "Postgres". There is usually no reason to change this value.

--with-openssl=directory
Make a postgres that supports SSL (encrypted) joins.   This option requires the installation of the OpenSSL package. The directory parameter declares the root directory of the OpenSSL installation; the default is/usr/local/ssl.

Configure will check the required header and library files prior to installation to make sure that your OpenSSL installation is adequate.

--with-java
Make the JDBC driver and the associated Java package.   This option requires you to first install Ant (and, of course, a JDK). Please refer to the documentation for the JDBC driver in the Programmer's Manual for more information.

--enable-syslog
Turn on the functionality of the PostgreSQL server using the Syslog log system. (using this feature does not mean that you have to log in a syslog, or that the server lacks the capital to do this, but rather gives you the possibility of using this option at run time.) )

--enable-debug
Compile all Programs and libraries in a way with debug symbols.   This means that you can run the program through a debugger to analyze the problem. This significantly increases the size of the last executable that is installed, and in the case of non-GCC compilers, this usually turns off compiler optimizations, resulting in a decrease in speed. However, if you have these symbol tables, you can greatly help locate the location where the problem might occur. Currently, we think this option is a marginal variable for production purposes, but if you are working on a development or are using a beta version, you should open it.

--enable-cassert
Open the assertion check in the server and it will check for many "impossible" conditions.   It's priceless for the purpose of code development, but these tests slow things down a little bit.   These assertion checks are not necessarily for critical errors, so some relatively harmless bugs can also cause postmaster to restart-as long as it triggers an assertion failure. Currently, we do not recommend using this option in a production environment, but you should open it if you are developing or using a beta version.


If you like to use the different compilers that you find with configure, you can set your environment variables CC and CXX separately and set them as the program you choose. Similarly, you can override the default compiler flags with the CFLAGS and cxxflags variables. Like what:

Env CC=/OPT/BIN/GCC cflags= ' -02-pipe './configure


===========================================================================================

Linux┊configure parameter Options Detailed author: easylife Date: 2006-10-24 02:42
Font size: Small Medium Large
The installation of software in Linux is not an easy task; if it is installed by source code, it is more complicated; now the tutorial of installing various software is very common, but the change of the basic knowledge of the solid grasp, the installation of various software problems will be solved. Configure script Configuration tool is one of the basics, it is the basic application of autoconf tools.

Compared with some skills, configure appears to be based on some, of course, the use and learning is dull, of course, to become a master, the foundation of the familiar can not go beyond oh.

For this I have reproduced a detailed description of the Configure option configuration. For everyone's reference

The ' Configure ' script has a number of command-line options. These options may change for different packages, but many of the basic options will not change. Bring '--help ' option to execute ' configure ' The script can see all the options available. Although many of the options are rarely used, it is beneficial to know that they exist when you configure a package for special needs. Here is a brief introduction to each of these options:

--cache-file=file
' Configure ' will test the existing features (or bug!) on your system. 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, the existence of a good cache file can be a great help.

--help
Output help information. Even experienced users occasionally need to use the '--help ' option because a complex project contains additional options. 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
One of the main functions in ' Configure ' is to make the output file. This option prevents ' configure ' from generating this file. You can think of this as an exercise (dry run), although the cache is still being rewritten.

--quiet
--silent
When ' Configure ' carries out his tests, it will output a brief message telling the user what is being done. This is because ' configure ' may be slower, without which the user will be thrown aside wondering what is happening. Using either of these options will throw you aside. . These two words are more interesting, the original is this: If there was no such output, the user would are left wondering what is happening. By using the option, you too can is left wondering!)

--version
Prints the version number of the autoconf used to generate the ' configure ' script.

--prefix=pewfix
'--prefix ' is the most commonly used option. The system-made ' Makefile ' will look at the parameters passed with this option, and when a package is installed it can completely relocate his structural independent part. For example, when installing a package, say Emacs, the following command will make Emacs Lisp File is installed to "/opt/gnu/share":
$./configure--prefix=/opt/gnu

--exec-prefix=eprefix
Similar to the '--prefix ' option, but he is the installation location of the file used to set up the structure dependency. The compiled ' emacs ' binary is one such question. If this option is not set, the default option value will be set to the same value as the '--prefix ' option.

--bindir=dir
Specifies the location where the binaries are installed. The binaries here are defined as programs that can be executed directly by the user.

--sbindir=dir
Specifies the location where the super binaries are installed. This is a program that is typically executed only by superuser users.

--libexecdir=dir
Specifies the location where executable support files are installed. In contrast to binary files, these files are never executed directly by the user, but can be executed by the binaries mentioned above.

--datadir=dir
Specifies the installation location for the common data file.

--sysconfdir=dir
Specifies the installation location for read-only data that is used on a single machine.

--sharedstatedir=dir
Specifies the installation location of writable data that can be shared across multiple machines.

--localstatedir=dir
Specifies the installation location of writable data that can be used only on a single machine.

--libdir=dir
Specifies the location where the library files are installed.

--includedir=dir
Specifies the installation location of the C header file. This option is also available for other languages such as header files for C + +.

--oldincludedir=dir
Specifies the installation location for the C header files installed in addition to the GCC external compiler.

--infodir=dir
Specifies the location where the info format document is installed. Info is the document format used by the GNU project.

--mandir=dir
Specifies the installation location for the manual page.

--srcdir=dir
This option has no effect on the installation. He will tell the location of the ' configure ' source. In general, this option is not specified because the ' configure ' script is generally in the same directory as the source file.

--program-prefix=prefix
Specifies the prefix that will be added to the name of the installed program. For example, using '--program-prefix=g ' to configure a program called ' tar ' will cause the installed program to be named ' Gtar '. When used with other installation options, this option is only available when he is ' Makefile.in ' files will not work until they are used.

--program-suffix=suffix
Specifies the suffix that will be added to the name of the installed program.

--program-transform-name=program
The program here is an SED script. When an app is installed, his name will go through ' sed-e programs ' to produce the installed name.

--build=build
Specifies the system platform on which the package is installed. If not specified, the default value will be the value of the '--host ' option.

--host=host
Specifies the system platform on which the software runs. If not specified, ' config.guess ' will be run to detect.

--target=garget
Specifies the system platform that the software targets (target to). This is primarily useful in programming language tools such as compilers and assembler contexts. If not specified, the default value of the '--host ' option is used.

--disable-feature
Some packages can choose this option to provide compile-time configuration for large options, such as using a Kerberos authentication system or an experimental compiler optimal configuration. If you provide these features by default, you can disable it by using '--disable-feature ', where ' FEATURE ' is the name of the attribute. For example:
$./configure--disable-gui

-enable-feature[=arg]
Conversely, some packages may provide some default prohibited features that can be used with '--enable-feature '. Here ' FEATURE ' is the name of the feature. An attribute may accept an optional parameter. For example:
$./configure--enable-buffers=128
The '--enable-feature=no ' is synonymous with the above mentioned '--disable-feature '.

--with-package[=arg]
In the free software community, there is an excellent tradition of using existing packages and libraries. When you configure a source tree with ' Configure ', you can provide information about other packages that have already been installed. For example, the BLT Device Toolkit, which relies on Tcl and TK. To configure BLT, you may need to give ' configure ' To provide some information about where we have installed Tcl and TK:
$./configure--with-tcl=/usr/local--with-tk=/usr/local
'--with-package=no ' is synonymous with the '--without-package ' that will be mentioned below.

--without-package
Sometimes you may not want your package to interact with packages that are already in the system. For example, you might not want your new compiler to use the GNU ld. You can do this by using this option:
$./configure--without-gnu-ld

--x-includes=dir
This option is a special case of the '--with-package ' option. When Autoconf was first developed, it was popular to use ' configure ' as a workaround for Imake to make software running on X. ' The--x-includes ' option provides a way to indicate to the ' configure ' script the directory containing the X11 header file.

--x-libraries=dir
Similarly, the '--x-libraries ' option provides a way to indicate to the ' configure ' script the directory containing the X11 library.

It is not necessary to run ' configure ' in the source tree. A good ' Makefile ' produced by ' Configure ' can build a software package that belongs to another tree. The benefit of building a derived file in a tree that is independent of the source is obvious: the derived file , such as the target file, will be messy scattered in the source tree. This also makes it difficult to build the same target file on a different system or with different configuration options. Three trees are recommended: a source tree, a build tree, an installation tree (install Tree). Here is a very close example of using this method to build the GNU malloc package:
$ Gtar ZXF mmalloc-1.0.tar.gz
$ mkdir Build && CD Build
$ .. /mmalloc-1.0/configure
Creating cache./config.cache
Checking for gcc ... gcc
Checking whether the C compiler (GCC) works ... yes
Checking whether the C compiler (GCC) is a cross-compiler ... no
Checking whether we are using the GNU C ... yes
Checking whether GCC accepts-g ... yes
Checking for a BSD compatible install .../usr/bin/install-c
Checking host system Type ... I586-pc-linux-gnu
Checking build system Type ... I586-pc-linux-gnu
Checking for ar ... Ar
Checking for ranlib ... ranlib
Checking how to run the C preprocessor ... gcc-e
Checking for unistd.h ... yes
Checking for getpagesize ... yes
Checking for working mmap ... yes
Checking for limits.h ... yes
Checking for stddef.h ... yes
Updating cache. /config.cache
Creating./config.status
So this tree is configured, below you can continue to build and install this package to the default location '/usr/local ':
$ make all && make install

A detailed explanation of the Linux./configure parameters

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.