PHP 编译安装基础参数说明

2015-03-01 0 By admin

PHP源码编译安装的过程:configure设置编译参数;make 和make install 安装完成。
其中主要的过程为设置好适当的编译参数,即configure 过程中。
Usage: ./configure [OPTION]... [VAR=VALUE]...

一、Configuration:命令使用

-h, --help display this help and exit
-V, --version display version information and exit
-q, --quiet, --silent do not print `checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for `--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or `..']

1.1、安装目录设置(Installation directories)

–prefix=PREFIX install architecture-independent files in PREFIX [/usr/local]
–exec-prefix=EPREFIX install architecture – dependent files in EPREFIX [PREFIX]

By default, `make install’ will install all the files in `/usr/local/bin’, `/usr/local/lib’ etc.

1.2、服务其他文件目录设置

–bindir=DIR user executables [EPREFIX/bin]
–sbindir=DIR system admin executables [EPREFIX/sbin]
–libexecdir=DIR program executables [EPREFIX/libexec]
–sysconfdir=DIR read-only single-machine data [PREFIX/etc]
–sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
–localstatedir=DIR modifiable single-machine data [PREFIX/var]
–libdir=DIR object code libraries [EPREFIX/lib]
–includedir=DIR C header files [PREFIX/include]
–oldincludedir=DIR C header files for non-gcc [/usr/include]
–datadir=DIR read-only architecture-independent data [DATAROOTDIR]

其他目录参数设置省略。

1.3、主机系统类型(Host types)

–build=BUILD configure for building on BUILD [guessed]
–host=HOST cross-compile to build programs to run on HOST [BUILD]
–target=TARGET configure for building compilers for TARGET [HOST]

1.4、扩展包和特性选项(Optional Features and Packages)

–disable-option-checking ignore unrecognized –enable/–with options
–disable-FEATURE do not include FEATURE (same as –enable-FEATURE=no)
–enable-FEATURE[=ARG] include FEATURE [ARG=yes]
–with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
–without-PACKAGE do not use PACKAGE (same as –with-PACKAGE=no)
–with-libdir=NAME Look for libraries in …/NAME rather than …/lib
–disable-rpath Disable passing additional runtime library search paths
–enable-re2c-cgoto Enable -g flag to re2c to use computed goto gcc extension