Linux./configure Parameters

Source: Internet
Author: User
Tags syslog install perl gtar

./Configure

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

The default setting will create servers and applications, and all client programs and interfaces that only require the C compiler. All files will be installed to/usr/local/pgsql.

You can customize the production and installation process by providing one or more options in the following configure command line options:


-- Prefix = prefix
Install all the files under the prefix directory instead of/usr/local/pgsql. The actual files will be installed in different subdirectories. Even none of the files will be directly installed in the prefix directory.

If you have special requirements, you can also use the options below to customize the location of different subdirectories.

-- Exec-Prefix = EXEC-PREFIX
You can install system-related files to a different location, EXEC-PREFIX, rather than a prefix setting place. this allows you to easily share system-related files between different hosts. if you omit this, the EXEC-PREFIX will be set to equal to the prefix and system-related and system-independent files will be installed under the same directory tree, which may be what you want.

-- Bindir = directory
Executable program declaration directory, the default is EXEC-PREFIX/bin, usually/usr/local/pgsql/bin.

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

-- Sysconfdir = directory
Used for directories of various configuration files. The default value is prefix/etc.

-- Libdir = directory
Library file and directory of the dynamic loading module. The default is EXEC-PREFIX/lib.

-- Includedir = directory
Directory of the C and C ++ header files. The default value is prefix/include.

-- Docdir = directory
Document files (except man (manual page) will be installed in this directory. The default is prefix/Doc.

-- Mandir = directory
The manual page that comes with PostgreSQL will be installed in this directory. In their corresponding Manx sub-directories, the default is prefix/man.

Note: To reduce pollution to shared installation locations (such as/usr/local/include), configure automatically attaches a "/PostgreSQL" string to datadir, sysconfdir, includedir, and docdir, unless the expanded directory name already contains the string "s" or "pgsql ". for example, if you select/usr/local as the prefix, the header file of C will be installed in/usr/local/include/PostgreSQL, but if the prefix is/opt/Postgres, then they will be put into/opt/S/include.




-- With-nodes des = Directories
Directories is a series of colon-separated directories that will be 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 possibly have the corresponding -- With-libraries option.

Example: -- With-except des =/opt/GNU/include:/usr/sup/include.

-- With-libraries = Directories
Directories is a series of colon-separated directories used to find library files. if you have some packages installed in non-standard locations, you may need to use this option (and the corresponding -- With-supported des option ).

Example: -- With-libraries =/opt/GNU/lib:/usr/sup/lib.

-- Enable-locale
Opening regional support may cause performance loss. However, if you are not using a database in an English-speaking environment, you may need this option.

-- Enable-recode
Open support for single-byte character set records. See section 5.3 For details about 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 details.

-- With-pgport = Number
Set number to the default port of the server and client. the default value is 5432. this port can be set later, but if you declare it here, the server and client will have the same default value compiled. this makes it easier.

-- With-cxx
Create a C ++ support library.

-- With-perl
Create a Perl interface module. the Perl interface will be installed in the usual installation location of the Perl module (typical location is/usr/lib/perl ), therefore, you must have the root permission to perform the installation steps (see step 4 ). to use this option, you need to install Perl 5.

-- With-Python
Create a python interface module. you need the root permission to install the python module to its default location (/usr/lib/pythonx. Y ). to use this option, you must have installed Python and your system must support shared libraries. if you want to create a new Complete Binary interpreter, you can only make it manually.

-- With-tcl
Make components that require Tcl/TK, including libpgtcl, pgtclsh, pgtksh, pgaccess, and PL/TCL. You can also take a look at the following -- without-TK.

-- Without-TK
If you declare -- With-tcl and this option at the same time, programs that require TK (I .e. pgtksh and pgaccess) will be excluded.

-- With-tclconfig = directory, -- With-tkconfig = directory
Tcl/tk Installation File tclconfig. SH and tkconfig. sh, which contains the configuration information for making TCL or TK module interfaces. configure usually finds these files automatically in their well-known locations, but if you need a different version of TCL or TK, you can also declare that they can find their directories.

-- Enable-ODBC
Create an ODBC driver package.

-- With-odbcinst = directory
Declare the expected odbcinst of ODBC. ini configuration file path. the default value is/usr/local/pgsql/etc or the -- sysconfdir option you declare. the installer installs a default file there.

-- With-krb4 = directory, -- with-krb5 = directory
Create something that supports Kerberos authentication. you can select Kerberos version 4 or 5, but not two. the DIRECTORY parameter declares the root directory for Kerberos installation. The default assumption is/usr/Athena. If the related header files and library files are not in the common parent directory, then you must use the attached -- With-provided des and -- With-libraries options. on the other hand, if the required file is located in a default search directory (for example,/usr/lib), you do not need to enter these parameters.

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

-- With-krb-srvnam = Name
Name of the Kerberos service master. The default value is "s". There is no reason to change this value.

-- With-OpenSSL = directory
Create ipvs that supports SSL (encrypted) connections. This option requires the installation of the OpenSSL package. DIRECTORY parameter Declaration of the root directory installed by OpenSSL; lack of time-saving/usr/local/SSL.

Configure will check the required header files and library files before installation to ensure that your OpenSSL installation is sufficient.

-- With-Java
Make the JDBC driver and related Java packages. This option requires you to install ant first (of course, JDK is required). Please refer to the JDBC driver documentation in the programmer's manual for more information.

-- Enable-syslog
Enable the function of using the syslog log system on the PostgreSQL server. (using this function does not mean that you must use syslog for logs. It does not mean that the server will do this by default. Instead, it gives you the possibility to use this option during runtime .)

-- Enable-Debug
Compile all programs and libraries with debugging symbols. this means you can use a debugger to run a program to analyze the problem. this significantly increases the size of the last installed executable file and usually disables Compiler Optimization on non-GCC compilers, resulting in a speed reduction. however, if you have these symbol tables, it can help you locate possible problems. currently, we think this option is a marginal variable for production purposes, but if you are developing or using the beta version, you should open it.

-- Enable-cassert
Enable the assertion check on the server. It checks many "impossible" conditions. it is invaluable for the use of code development, but these tests have slowed down a little. these assertion checks are not necessarily intended for serious errors, so some relatively harmless bugs may also cause the Postmaster to restart-as long as it triggers an assertion failure. currently, this option is not recommended in the production environment, but should be enabled if you are developing or using the beta version.


If you like to use different compilers than configure found, you can set your environment variables CC and cxx respectively and set them as the programs you choose. similarly, you can use the cflags and cxxflags variables to overwrite the default compiler flag. for example:

Env cc =/opt/bin/GCC cflags = '-02-pipe'./configure

 

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

Detailed description of Parameter options for Linux kernel configure by easylife Date:
Font size: medium or large
Installing software in Linux environment is not an easy task. If the software is installed after source code compilation, of course it is more complicated. Currently, various software installation tutorials are common; however, if you have a solid understanding of the basic knowledge, you can solve the problems of installing various software. The configure script configuration tool is one of the basics. It is the basic application of the Autoconf tool.

Compared with some techniques, configure is more basic. Of course, it is boring to use and learn. Of course, to become a master, you must be familiar with the basics.

For this reason, I have reproduced a detailed introduction to the configuration of configure options. For your reference

The 'configure 'script has a large number of command line options. for different software packages, these options may change, but many basic options will not change. run the '-- help' script to view all available options. although many options are rarely used, it is very helpful to know their existence when you configure a package for special needs. next we will give a brief introduction to each option:

-- Cache-file = File
'Configure 'will test the existing features (or bugs!) on your system !). To accelerate subsequent configuration, the test results are stored in a cache file. when configure has a complex source code tree with the 'configure 'script in each subtree, the existence of a good cache file will be very helpful.

-- 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 contains options that allow you to control whether to generate and use the GNU Compiler in GCC.

-- No-create
A major function in 'configure 'creates an output file. this option prevents 'configure 'from generating this file. you can think of it as a dry run, although the cache is still rewritten.

-- Quiet
-- Silent
When 'configure 'is tested, a brief message is output to tell the user what is being done. this is because 'configure 'may be slow, and users will be thrown aside to wonder what is happening without such output. using either of the two options will throw you aside. the two sentences are interesting. The original Article is like this: if there was no such output, the user wocould be left wondering what is happening. by using this option, you too can be left wondering !)

-- Version
Print the Autoconf version used to generate the 'configure 'script.

-- Prefix = pewfix
'-- Prefix' is the most common option. the generated 'makefile' will view the parameters passed with this option. When a package is installed, it can completely reset its structure independence. for example, to install a package, for example, emacs, the following command will install Emacs lisp file to "/opt/GNU/share ":
$./Configure -- prefix =/opt/gnu

-- Exec-Prefix = eprefix
It is similar to the '-- prefix' option, but it is used to set the installation location of the file on which the structure depends. the compiled 'memacs' binary file is such a question. if this option is not set, the default option value will be set to the same as the '-- prefix' option value.

-- Bindir = dir
Specifies the installation location of the binary file. The binary file here is defined as a program that can be directly executed by the user.

-- Sbindir = dir
Specifies the installation location of the Super binary file. This is a program that can only be executed by the Super User.

-- Libexecdir = dir
Specifies the installation location of executable support files. Unlike binary files, these files are never directly executed by users, but can be executed by the binary files mentioned above.

-- Datadir = dir
Specifies the installation location of common data files.

-- Sysconfdir = dir
Specifies the installation location of read-only data used on a single machine.

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

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

-- Libdir = dir
Specifies the installation location of the library file.

-- Includedir = dir
Specifies the installation location of the C header file. This option can also be used for header files in other languages such as C ++.

-- Oldincludedir = dir
Specifies the installation location of the C header file installed by the compiler except GCC.

-- Infodir = dir
Specifies the installation location of the Info format document. info is the document format used by the GNU project.

-- Mandir = dir
Specifies the installation location of the manual page.

-- Srcdir = dir
This option does not work for installation. It will tell the location of the 'configure 'source code. Generally, this option is not required because the 'configure' script is usually in the same directory as the source code file.

-- Program-Prefix = prefix
Specifies the prefix that will be added to the name of the installed program. for example, if you use '-- Program-Prefix = G' to configure a program named 'tar', the installed program will be named 'gtar '. this option is used only when it is used with other installation options. in 'file used only.

-- 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 a sed script. When a program is installed, its name will go through 'sed-e program 'to generate the installation name.

-- Build = build
The system platform where the software package is installed. If not specified, the default value is the value of the '-- host' option.

-- Host = Host
The system platform where the software runs. If this parameter is not specified, 'config. Guess 'is run to detect the platform.

-- Target = garget
Specify the target to system platform of the software. This mainly plays a role in the context of programming language tools such as compilers and compilers. If not specified, the value of the '-- host' option is used by default.

-- Disable-feature
Some software packages can choose this option to provide compilation configuration for large options, such as using the Kerberos authentication system or an experimental compiler optimal configuration. if these features are provided by default, you can use '-- disable-feature' to disable them. Here 'feature 'is the name of the feature. for example:
$./Configure -- disable-Gui

-Enable-feature [= Arg]
On the contrary, some software packages may provide some features that are disabled by default. You can use '-- enable-feature' to use it. here, 'feature 'is the feature name. A feature may accept an optional parameter. for example:
$./Configure -- enable-Buffers = 128
'-- Enable-feature = no' is synonymous with' -- disable-feature 'mentioned above.

-- With-package [= Arg]
In the free software community, there are excellent traditions of using existing software packages and libraries. when you use 'configure 'to configure a source code tree, you can provide information about other installed software packages. for example, the BLT device toolkit that relies on vivo tcl and TK. to configure the BLT, you may need to provide the 'configure 'with some information about where we installed the Tcl and TK:
$./Configure -- With-tcl =/usr/local -- With-TK =/usr/local
'-- With-package = no' is synonymous with' -- without-package.

-- Without-Package
Sometimes you may not want your software package to interact with the existing software package of the system. For example, you may not want your new compiler to use GNU lD. You can do this by using this option:
$./Configure -- without-GNU-LD

-- X-regiondes = dir
This option is a special case of the '-- With-package' option. when Autoconf was initially developed, it was popular to use 'configure 'as a work und for imake to create software running on X. the '-- X-uploads' option specifies the directory containing the X11 header file to the 'configure' script.

-- X-libraries = dir
Similarly, the '-- X-libraries' option provides a method for specifying the directory containing the X11 Library to the 'configure' script.

Running 'configure 'in the source code tree is unnecessary and bad. A good 'makefile' generated by 'configure 'can build a software package whose source code belongs to another tree. the benefit of constructing a derived file in a tree independent of the source code is obvious: derived files, such as the target file, will be scattered in the source code tree in disorder. this makes it very difficult to build the same target file in another system or with different configuration options. we recommend that you use three trees: A source tree, a build tree, and an 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 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
In this way, the build tree is configured. You can continue to build and install the package to the default location '/usr/local ':
$ Make all & make install

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.