Linux下編譯PHP時(shí)選項參數相當多,今天下決心./configure --help > help.txt導出一份編譯選項清單并翻譯了,方便以后查閱.
SAPI modules(PHP SAPI接口模塊的選項):
大部分與apache、nginx等web服務(wù)有關(guān)
--with-aolserver=DIR AOLserver的安裝路徑 --with-apxs=FILE 編譯出apache1.x版本的共享模塊所存放的路徑 --with-apache=DIR 編譯出apache1.x版本的模塊,這里設定為apache軟件根目錄 --enable-mod-charset 啟用apache的mod_charset(俄文apache用的) --with-apxs2filter=FILE 編譯apache2.0的共享過(guò)濾模塊,這里設定為apache apxs工具的路徑 --with-apxs2=FILE 編譯共享apache2.0處理程序的模塊,這里設定為apache apxs工具的路徑 --with-apache-hooks=FILE共享的apache1.0的鉤子模塊,這里設定為apache apxs工具的路徑 --with-apache-hooks-static=DIR 這里設定為apache apxs工具的路徑 --disable-cli 禁用命令行模式(php-cli) --with-continuity=DIR 編譯php為連續服務(wù)模塊。參數為安裝Continuity Server的根目錄 --enable-embed=TYPE 建立內嵌的SAPI庫。參數為shared、static --enable-fpm 開(kāi)啟fpm模式(nginx等服務(wù)用的) --with-fpm-user=USER fpm運行的用戶(hù),默認為nobody --with-fpm-group=GRP fpm運行的組,默認為nobody --with-fpm-systemd 激活系統集成功能,開(kāi)啟后fpm可以上報給系統一些信息 --with-fpm-acl 使用POSIX 訪(fǎng)問(wèn)控制列表,5.6.5版本起有效 --with-isapi=DIR 為Zeus web服務(wù)器建立ISAPI模塊 --with-litespeed 編譯PHP為litespeed模塊 --with-milter=DIR 編譯PHP為Milter應用程序 --with-nsapi=DIR 為Netscape/iPlanet/Sun Web服務(wù)器編譯PHP為NSAPI模塊 --enable-phpdbg 編譯開(kāi)啟phpdbg調試器 --enable-phpdbg-debug 編譯phpdbg調試器為debug模式 --with-phttpd=DIR 編譯PHP為phttpd模塊 --with-pi3web=DIR 編譯PHP為pi3web模塊 --with-roxen=DIR 編譯PHP為roxen模塊 --enable-roxen-zts 編譯PHP為roxen模塊,線(xiàn)程安全 --with-thttpd=SRCDIR 編譯PHP為thttpd模塊 --with-tux=MODULEDIR 編譯PHP為tux模塊 --with-webjames=SRCDIR 編譯PHP為webjames模塊 --disable-cgi 禁用cgiGeneral settings(綜合設置):
--enable-gcov 開(kāi)啟gcov支持(測試代碼覆蓋率功能,) --enable-debug Compile with debugging symbols --with-layout=TYPE Set how installed files will be laid out. Type can be either PHP or GNU [PHP] --with-config-file-path=PATH php.ini文件位置[PREFIX/lib] --with-config-file-scan-dir=PATH 掃描配置文件的路徑 --enable-sigchild 使用PHP自帶的SIGCHLD處理器 --enable-libgcc 啟用libgcc的精確鏈接 --disable-short-tags 默認禁用短形式的<?作為php代碼的開(kāi)始標記 --enable-dmalloc 啟用dmalloc(dmalloc是Linux C編程偵測記憶體溢出工具) --disable-ipv6 關(guān)閉ipv6支持 --enable-dtrace 開(kāi)啟DTrace(動(dòng)態(tài)跟蹤)支持 --enable-fd-setsize 設置描述集的大小Extensions(擴展):
Extensions: --with-EXTENSION=shared[,PATH] 并非所有擴展都能編譯成共享方式 NOTE: Not all extensions can be build as 'shared'. 給個(gè)例子,如何把擴展編譯成共享模式: Example: --with-foobar=shared,/usr/local/foobar/ o Builds the foobar extension as shared extension. o foobar package install prefix is /usr/local/foobar/ --disable-all 關(guān)閉默認為啟用的所有擴展功能 --with-regex=TYPE 正則表達式庫類(lèi)型。選項:system|php(默認) 警告:如果你不知道這是干嘛的就別動(dòng)這個(gè)選項了! --disable-libxml 禁用LIBXML支持 --with-libxml-dir=DIR LIBXML安裝目錄 --with-openssl=DIR 啟用openssl支持 (OpenSSL版本號必須大于等于 0.9.6) --with-kerberos=DIR OPENSSL: 包含kerberos支持 --with-system-ciphers OPENSSL: 用系統自帶的密碼清單(cipher list)去替代硬編碼(hard coded) --with-pcre-regex=DIR 引用pear兼容的正則表達式庫 --without-sqlite3=DIR 不開(kāi)啟sqlite3支持 --with-zlib=DIR 開(kāi)啟ZLIB支持 (ZLIB版本號必須大于等于 1.0.9) --with-zlib-dir=<DIR> ZLIB的安裝路徑 --enable-bcmath 啟用bcmatch(公元前風(fēng)格精度數學(xué)) --with-bz2=DIR 開(kāi)啟BZip2 --enable-calendar 啟用日歷轉換支持 --disable-ctype 禁用ctype功能 --with-curl=DIR 啟用cURL支持 --enable-dba 構架捆綁模塊的DBA。要建立擴展的共享模塊使用--enable-dba=shared參數。 --with-qdbm=DIR DBA: QDBM support --with-gdbm=DIR DBA: GDBM support --with-ndbm=DIR DBA: NDBM support --with-db4=DIR DBA: Oracle Berkeley DB 4.x or 5.x support --with-db3=DIR DBA: Oracle Berkeley DB 3.x support --with-db2=DIR DBA: Oracle Berkeley DB 2.x support --with-db1=DIR DBA: Oracle Berkeley DB 1.x support/emulation --with-dbm=DIR DBA: DBM support --with-tcadb=DIR DBA: Tokyo Cabinet abstract DB support --without-cdb=DIR DBA: CDB support (bundled)(捆綁方式) --disable-inifile DBA: INI support (bundled)(捆綁方式) --disable-flatfile DBA: FlatFile support (bundled)(捆綁方式) --disable-dom 禁用DOM支持 --with-libxml-dir=DIR DOM: 啟用libxml2并指定其安裝目錄 --with-enchant=DIR 啟用 enchant 支持.GNU Aspell 版本號必須高于 1.1.3 --enable-exif 啟用EXIF支持(從圖片中獲取元數據) --disable-fileinfo 關(guān)閉fileinfo支持 --disable-filter 關(guān)閉 input filter 支持 --with-pcre-dir FILTER: pcre install prefix --enable-ftp 開(kāi)啟ftp支持 --with-openssl-dir=DIR FTP: openssl install prefix --with-gd=DIR 開(kāi)啟GD圖像處理庫 --with-vpx-dir=DIR GD: 指定libvpx的安裝目錄 --with-jpeg-dir=DIR GD: 指定libjpeg的安裝目錄 --with-png-dir=DIR GD: 指定libpng的安裝目錄 --with-zlib-dir=DIR GD: 指定libz的安裝目錄 --with-xpm-dir=DIR GD: 指定libXpm的安裝目錄 --with-freetype-dir=DIR GD: 指定FreeType2的安裝目錄 --with-t1lib=DIR GD: 指定T1lib支持 --enable-gd-native-ttf GD: 啟用TureType字符功能 --enable-gd-jis-conv GD: 啟用JIS-mapped日語(yǔ)字體支持 --with-gettext=DIR 包含GNU gettext支持 --with-gmp=DIR 啟用GNU MP支持 --with-mhash=DIR 指定mhash的目錄 --disable-hash 禁用hash支持 --without-iconv=DIR 禁用iconv支持 --with-imap=DIR 包含IMAP支持。指定c-client安裝目錄 --with-kerberos=DIR IMAP: 啟用kerberos支持并指定其目錄 --with-imap-ssl=DIR IMAP: 啟用ssl支持并指定openssl目錄 --with-interbase=DIR 啟用interbase支持并指定其目錄 --enable-intl 開(kāi)啟國際化支持(internationalization) --with-icu-dir=DIR Specify where ICU libraries and headers can be found --disable-json 關(guān)閉json支持 --with-ldap=DIR 開(kāi)啟 LDAP 支持 --with-ldap-sasl=DIR LDAP: 開(kāi)啟 Cyrus SASL 支持 --enable-mbstring 啟用多字節字符串的支持 --disable-mbregex MBSTRING: 禁用多字節正則表達式的支持 --disable-mbregex-backtrack MBSTRING: 禁用多字節正則表達式回溯檢查 --with-libmbfl=DIR MBSTRING: 使用外部的libmbfl并制定其目錄 --with-onig=DIR MBSTRING: 使用外部的onig并制定其目錄 --with-mcrypt=DIR 包含mcrypt支持 --with-mssql=DIR 包含MSSQL-DB支持,并指定FreeTDS軟件目錄 --with-mysql-sock=SOCKPATH 定位mysql的unix 套接字指針。如果未指定,則按默認位置搜索。 --with-zlib-dir=DIR MySQL: 設置zlib的安裝目錄 --with-mysqli=FILE 包含MySQLi支持。參數為mysql_config的位置 --enable-embedded-mysqli MYSQLi: 啟用embedded支持。 --with-oci8=DIR 包含Oracle支持。如果使用Oracle客戶(hù)端安裝則使用--with-oci8=instantclient,/path/to/oic/lib --with-odbcver=HEX Force support for the passed ODBC version. A hex number is expected, default 0x0300. Use the special value of 0 to prevent an explicit ODBCVER to be defined. --with-adabas=DIR Include Adabas D support /usr/local --with-sapdb=DIR Include SAP DB support /usr/local --with-solid=DIR Include Solid support /usr/local/solid --with-ibm-db2=DIR Include IBM DB2 support /home/db2inst1/sqllib --with-ODBCRouter=DIR Include ODBCRouter.com support /usr --with-empress=DIR Include Empress support \$EMPRESSPATH (Empress Version >= 8.60 required) --with-empress-bcs=DIR Include Empress Local Access support \$EMPRESSPATH (Empress Version >= 8.60 required) --with-birdstep=DIR Include Birdstep support /usr/local/birdstep --with-custom-odbc=DIR Include user defined ODBC support. DIR is ODBC install base directory /usr/local. Make sure to define CUSTOM_ODBC_LIBS and have some odbc.h in your include dirs. f.e. you should define following for Sybase SQL Anywhere 5.5.00 on QNX, prior to running this configure script: CPPFLAGS=\"-DODBC_QNX -DSQLANY_BUG\" LDFLAGS=-lunix CUSTOM_ODBC_LIBS=\"-ldblib -lodbc\" --with-iodbc=DIR Include iODBC support /usr/local --with-esoob=DIR Include Easysoft OOB support /usr/local/easysoft/oob/client --with-unixODBC=DIR Include unixODBC support /usr/local --with-dbmaker=DIR Include DBMaker support --enable-opcache Enable Zend OPcache support --enable-pcntl Enable pcntl support (CLI/CGI only) --disable-pdo Disable PHP Data Objects support --with-pdo-dblib=DIR PDO: DBLIB-DB support. DIR is the FreeTDS home directory --with-pdo-firebird=DIR PDO: Firebird support. DIR is the Firebird base install directory /opt/firebird --with-pdo-mysql=DIR PDO: MySQL support. DIR is the MySQL base directory If no value or mysqlnd is passed as DIR, the MySQL native driver will be used --with-zlib-dir=DIR PDO_MySQL: Set the path to libz install prefix --with-pdo-oci=DIR PDO: Oracle OCI support. DIR defaults to \$ORACLE_HOME. Use --with-pdo-oci=instantclient,prefix,version for an Oracle Instant Client SDK. For example on Linux with 11.2 RPMs use: --with-pdo-oci=instantclient,/usr,11.2 With 10.2 RPMs use: --with-pdo-oci=instantclient,/usr,10.2.0.4 --with-pdo-odbc=flavour,dir PDO: Support for 'flavour' ODBC driver. include and lib dirs are looked for under 'dir'. 'flavour' can be one of: ibm-db2, iODBC, unixODBC, generic If ',dir' part is omitted, default for the flavour you have selected will be used. e.g.: --with-pdo-odbc=unixODBC will check for unixODBC under /usr/local. You may attempt to use an otherwise unsupported driver using the \"generic\" flavour. The syntax for generic ODBC support is: --with-pdo-odbc=generic,dir,libname,ldflags,cflags When built as 'shared' the extension filename is always pdo_odbc.so --with-pdo-pgsql=DIR PDO: PostgreSQL support. DIR is the PostgreSQL base install directory or the path to pg_config --without-pdo-sqlite=DIR PDO: sqlite 3 support. DIR is the sqlite base install directory BUNDLED --with-pgsql=DIR Include PostgreSQL support. DIR is the PostgreSQL base install directory or the path to pg_config --disable-phar Disable phar support --disable-posix Disable POSIX-like functions --with-pspell=DIR Include PSPELL support. GNU Aspell version 0.50.0 or higher required --with-libedit=DIR Include libedit readline replacement (CLI/CGI only) --with-readline=DIR Include readline support (CLI/CGI only) --with-recode=DIR Include recode support --disable-session Disable session support --with-mm=DIR SESSION: Include mm support for session storage --enable-shmop Enable shmop support --disable-simplexml Disable SimpleXML support --with-libxml-dir=DIR SimpleXML: libxml2 install prefix --with-snmp=DIR Include SNMP support --with-openssl-dir=DIR SNMP: openssl install prefix --enable-soap Enable SOAP support --with-libxml-dir=DIR SOAP: libxml2 install prefix --enable-sockets Enable sockets support --with-sybase-ct=DIR Include Sybase-CT support. DIR is the Sybase home directory /home/sybase --enable-sysvmsg Enable sysvmsg support --enable-sysvsem Enable System V semaphore support --enable-sysvshm Enable the System V shared memory support --with-tidy=DIR Include TIDY support --disable-tokenizer Disable tokenizer support --enable-wddx Enable WDDX support --with-libxml-dir=DIR WDDX: libxml2 install prefix --with-libexpat-dir=DIR WDDX: libexpat dir for XMLRPC-EPI (deprecated) --disable-xml Disable XML support --with-libxml-dir=DIR XML: libxml2 install prefix --with-libexpat-dir=DIR XML: libexpat install prefix (deprecated) --disable-xmlreader Disable XMLReader support --with-libxml-dir=DIR XMLReader: libxml2 install prefix --with-xmlrpc=DIR Include XMLRPC-EPI support --with-libxml-dir=DIR XMLRPC-EPI:ibxml2 install prefix --with-libexpat-dir=DIR XMLRPC-EPI: libexpat dir for XMLRPC-EPI (deprecated) --with-iconv-dir=DIR XMLRPC-EPI: iconv dir for XMLRPC-EPI --disable-xmlwriter Disable XMLWriter support --with-libxml-dir=DIR XMLWriter: libxml2 install prefix --with-xsl=DIR Include XSL support. DIR is the libxslt base install directory (libxslt >= 1.1.0 required) --enable-zip Include Zip read/write support --with-zlib-dir=DIR ZIP: Set the path to libz install prefix --with-pcre-dir ZIP: pcre install prefix --with-libzip=DIR ZIP: use libzip --enable-mysqlnd Enable mysqlnd explicitly, will be done implicitly when required by other extensions --disable-mysqlnd-compression-support Disable support for the MySQL compressed protocol in mysqlnd --with-zlib-dir=DIR mysqlnd: Set the path to libz install prefix
php-linux-環(huán)境-開(kāi)發(fā)