apache configure选项

`configure’ configures this package to adapt to many kinds of systems.

Usage: ./configure [OPTION]… [VAR=VALUE]…

To assign environment variables (e.g., CC, CFLAGS…), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, –help              display this help and exit
      –help=short        display options specific to this package
      –help=recursive    display the short help of all the included packages
  -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 `..’]

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

By default, `make install’ will install all the files in
`/usr/local/apache2/bin’, `/usr/local/apache2/lib’ etc.  You can specify
an installation prefix other than `/usr/local/apache2′ using `–prefix’,
for instance `–prefix=$HOME’.

For better control, use the options below.

Fine tuning of the installation directories:
  –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]
  –datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  –datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  –infodir=DIR           info documentation [DATAROOTDIR/info]
  –localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
  –mandir=DIR            man documentation [DATAROOTDIR/man]
  –docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
  –htmldir=DIR           html documentation [DOCDIR]
  –dvidir=DIR            dvi documentation [DOCDIR]
  –pdfdir=DIR            pdf documentation [DOCDIR]
  –psdir=DIR             ps documentation [DOCDIR]

System 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]

Optional Features:
  –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]
  –enable-layout=LAYOUT
  –enable-v4-mapped      Allow IPv6 sockets to handle IPv4 connections
  –enable-exception-hook Enable fatal exception hook
  –enable-maintainer-mode
                          Turn on debugging and compile time warnings
  –enable-pie            Build httpd as a Position Independent Executable
  –enable-modules=MODULE-LIST
                          Space-separated list of modules to enable | “all” |
                          “most”
  –enable-mods-shared=MODULE-LIST
                          Space-separated list of shared modules to enable |
                          “all” | “most”
  –disable-authn-file    file-based authentication control
  –enable-authn-dbm      DBM-based authentication control
  –enable-authn-anon     anonymous user authentication control
  –enable-authn-dbd      SQL-based authentication control
  –disable-authn-default authentication backstopper
  –enable-authn-alias    auth provider alias
  –disable-authz-host    host-based authorization control
  –disable-authz-groupfile
                          ‘require group’ authorization control
  –disable-authz-user    ‘require user’ authorization control
  –enable-authz-dbm      DBM-based authorization control
  –enable-authz-owner    ‘require file-owner’ authorization control
  –enable-authnz-ldap    LDAP based authentication
  –disable-authz-default authorization control backstopper
  –disable-auth-basic    basic authentication
  –enable-auth-digest    RFC2617 Digest authentication
  –enable-isapi          isapi extension support
  –enable-file-cache     File cache
  –enable-cache          dynamic file caching
  –enable-disk-cache     disk caching module
  –enable-mem-cache      memory caching module
  –enable-dbd            Apache DBD Framework
  –enable-bucketeer      buckets manipulation filter
  –enable-dumpio         I/O dump filter
  –enable-echo           ECHO server
  –enable-example        example and demo module
  –enable-case-filter    example uppercase conversion filter
  –enable-case-filter-in example uppercase conversion input filter
  –enable-reqtimeout     Limit time waiting for request from client
  –enable-ext-filter     external filter module
  –disable-include       Server Side Includes
  –disable-filter        Smart Filtering
  –enable-substitute     response content rewrite-like filtering
  –disable-charset-lite  character set translation
  –enable-charset-lite   character set translation
  –enable-deflate        Deflate transfer encoding support
  –enable-ldap           LDAP caching and connection pooling services
  –disable-log-config    logging configuration
  –enable-log-forensic   forensic logging
  –enable-logio          input and output logging
  –disable-env           clearing/setting of ENV vars
  –enable-mime-magic     automagically determining MIME type
  –enable-cern-meta      CERN-type meta files
  –enable-expires        Expires header control
  –enable-headers        HTTP header control
  –enable-ident          RFC 1413 identity check
  –enable-usertrack      user-session tracking
  –enable-unique-id      per-request unique ids
  –disable-setenvif      basing ENV vars on headers
  –disable-version       determining httpd version in config files
  –enable-proxy          Apache proxy module
  –enable-proxy-connect  Apache proxy CONNECT module
  –enable-proxy-ftp      Apache proxy FTP module
  –enable-proxy-http     Apache proxy HTTP module
  –enable-proxy-scgi     Apache proxy SCGI module
  –enable-proxy-ajp      Apache proxy AJP module
  –enable-proxy-balancer Apache proxy BALANCER module
  –enable-ssl            SSL/TLS support (mod_ssl)
  –enable-distcache      Select distcache support in mod_ssl
  –enable-optional-hook-export
                          example optional hook exporter
  –enable-optional-hook-import
                          example optional hook importer
  –enable-optional-fn-import
                          example optional function importer
  –enable-optional-fn-export
                          example optional function exporter
  –enable-static-support Build a statically linked version of the support
                          binaries
  –enable-static-htpasswd
                          Build a statically linked version of htpasswd
  –enable-static-htdigest
                          Build a statically linked version of htdigest
  –enable-static-rotatelogs
                          Build a statically linked version of rotatelogs
  –enable-static-logresolve
                          Build a statically linked version of logresolve
  –enable-static-htdbm   Build a statically linked version of htdbm
  –enable-static-ab      Build a statically linked version of ab
  –enable-static-checkgid
                          Build a statically linked version of checkgid
  –enable-static-htcacheclean
                          Build a statically linked version of htcacheclean
  –enable-static-httxt2dbm
                          Build a statically linked version of httxt2dbm
  –enable-http           HTTP protocol handling
  –disable-mime          mapping of file-extension to MIME
  –enable-dav            WebDAV protocol handling
  –disable-status        process/thread monitoring
  –disable-autoindex     directory listing
  –disable-asis          as-is filetypes
  –enable-info           server information
  –enable-suexec         set uid and gid for spawned processes
  –disable-cgid          CGI scripts
  –enable-cgi            CGI scripts
  –disable-cgi           CGI scripts
  –enable-cgid           CGI scripts
  –enable-dav-fs         DAV provider for the filesystem
  –enable-dav-lock       DAV provider for generic locking
  –enable-vhost-alias    mass virtual hosting module
  –disable-negotiation   content negotiation
  –disable-dir           directory request handling
  –enable-imagemap       server-side imagemaps
  –disable-actions       Action triggering on requests
  –enable-speling        correct common URL misspellings
  –disable-userdir       mapping of requests to user-specific directories
  –disable-alias         mapping of requests to different filesystem parts
  –enable-rewrite        rule based URL manipulation
  –enable-so             DSO capability

Optional Packages:
  –with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  –without-PACKAGE       do not use PACKAGE (same as –with-PACKAGE=no)
  –with-included-apr     Use bundled copies of APR/APR-Util
  –with-apr=PATH         prefix for installed APR or the full path to
                             apr-config
  –with-apr-util=PATH    prefix for installed APU or the full path to
                             apu-config
  –with-pcre=PATH        Use external PCRE library
  –with-port=PORT        Port on which to listen (default is 80)
  –with-sslport=SSLPORT  Port on which to securelisten (default is 443)
  –with-z=DIR            use a specific zlib library
  –with-sslc=DIR         RSA SSL-C SSL/TLS toolkit
  –with-ssl=DIR          OpenSSL SSL/TLS toolkit
  –with-mpm=MPM          Choose the process model for Apache to use.
                          MPM={beos|event|worker|prefork|mpmt_os2}
  –with-module=module-type:module-file
                          Enable module-file in the modules/<module-type>
                          directory.
  –with-program-name     alternate executable name
  –with-suexec-bin       Path to suexec binary
  –with-suexec-caller    User allowed to call SuExec
  –with-suexec-userdir   User subdirectory
  –with-suexec-docroot   SuExec root directory
  –with-suexec-uidmin    Minimal allowed UID
  –with-suexec-gidmin    Minimal allowed GID
  –with-suexec-logfile   Set the logfile
  –with-suexec-safepath  Set the safepath
  –with-suexec-umask     umask for suexec’d process

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CPP         C preprocessor

Use these variables to override the choices made by `configure’ or to help
it to find libraries and programs with nonstandard names/locations.


语法
你必须在源代码树的根目录下调用configure脚本,语法如下:

./configure [OPTION]… [VAR=VALUE]…

若要指定环境变量(比如:CC, CFLAGS …),请使用 VAR=VALUE 的格式。下面有一些有用的环境变量说明。

配置选项
下列选项会影响configure脚本自身的行为。方括号”[]”内是默认值。

-C
–config-cache
等价于 –cache-file=config.cache
–cache-file=FILE
在FILE文件中缓存测试结果(默认禁用)。
-h
–help [short|recursive]
显示帮助信息然后退出。使用short参数将只显示正在运行的当前脚本的选项,而不能列出适用于Apache配置脚本所运行的外部配置脚本的选项。使用recursive参数将显示所有程序包的简短描述。
-n
–no-create
configure脚本运行结束后不输出结果文件,常用于正式编译前的测试。
-q
–quiet
不显示脚本工作期间输出的”checking …”消息。
–srcdir=DIR
指定源代码所在目录DIR 。[configure脚本所在目录或父目录]
–silent
等价于 –quiet
-V
–version
显示版权信息后退出。
安装目录
这些选项控制着安装目录的结构。安装目录的结构取决于所选择的布局。方括号”[]”内是默认值。

–prefix=PREFIX
体系无关文件的顶级安装目录PREFIX ,也就Apache的安装目录。[/usr/local/apache2]
–exec-prefix=EPREFIX
体系相关文件的顶级安装目录EPREFIX ,把体系相关的文件安装到不同的位置可以方便地在不同主机之间共享体系相关的文件。[PREFIX]
默认情况下,make install 将会把所有文件分别安装到/usr/local/apache2/bin , /usr/local/apache2/lib 目录下。可以用 –prefix 指定一个不同于/usr/local/apache2的安装前缀,比如:–prefix=$HOME 。

定义一个目录布局
–enable-layout=LAYOUT
使用名为LAYOUT的布局配置所有源代码和编译脚本。这样就允许你在安装Apache时分别指定不同文件的安装位置。config.layout文件中包含了默认布局的示例,你可以根据它创建你自己的布局。这个文件中的不同布局使用<Layout FOO>…</Layout>段进行分组,其中的FOO就是布局名。默认的布局是Apache 。
安装目录微调
可以使用下面的选项微调安装目录。下列选项的默认值由autoconf自动设置并在方括号”[]”内说明。

–bindir=DIR
用户可执行目录DIR 。用于存放对网站管理员很有帮助的htpasswd, dbmmanage之类的支持程序。
[EPREFIX/bin]
–datadir=DIR
Web服务器只读的体系无关数据目录DIR 。虽然autoconf提供了该选项,但Apache并未使用它。
[PREFIX/share]
–includedir=DIR
Apache的C头文件目录DIR 。
[EPREFIX/include]
–infodir=DIR
信息文档目录DIR 。虽然autoconf提供了该选项,但Apache并未使用它。
[PREFIX/info]
–libdir=DIR
对象代码库目录DIR 。
[EPREFIX/lib]
–libexecdir=DIR
程序可执行目录DIR ,也就是动态加载模块目录。
[EPREFIX/libexec]
–localstatedir=DIR
可写的单一机器数据目录DIR 。虽然autoconf提供了该选项,但Apache并未使用它。
[PREFIX/var]
–mandir=DIR
手册文档目录DIR 。
[EPREFIX/man]
–oldincludedir=DIR
非gcc的C头文件目录DIR 。虽然autoconf提供了该选项,但Apache并未使用它。
[/usr/include]
–sbindir=DIR
系统管理员可执行目录DIR ,用于存放运行HTTP服务器所必须的httpd, apachectl, suexec之类的服务程序。
[EPREFIX/sbin]
–sharedstatedir=DIR
可写的体系无关数据目录DIR 。虽然autoconf提供了该选项,但Apache并未使用它。
[PREFIX/com]
–sysconfdir=DIR
只读的单一机器数据目录DIR ,用于存放httpd.conf和mime.types之类的服务器配置文件。
[PREFIX/etc]
系统类型
这些选项用于交叉编译在其他平台上运行的Apache HTTP服务器。在同一平台上编译和运行Apache HTTP服务器通常不需要使用这些选项,脚本会自动检测并设置。方括号”[]”内是默认值。

–build=BUILD
指定编译工具所在系统的系统类型BUILD 。
[config.guess脚本的检测结果]
–host=HOST
指定Apache HTTP服务器将要运行的目标系统类型HOST 。
[BUILD]
–target=TARGET
configure for building compilers for TARGET类型的系统。虽然autoconf提供了该选项,但Apache并未使用它。
[HOST]
模块选项
有两种使用模块的方法:一是静态连接进核心,二是作为DSO模块动态加载;如果编译中包含任何DSO模块,则mod_so会被自动包含进核心。如果希望核心能够装载DSO,但不实际编译任何DSO模块,则需明确指定”–enable-so=static”。

一般语法
一般情况下你可以使用如下语法启用或者禁用某个模块:

–disable-MODULE
禁用MODULE模块(仅用于基本模块)
–enable-MODULE=shared
将MODULE编译为DSO(可用于所有模块)
–enable-MODULE=static
将MODULE静态连接进核心(仅用于扩展和实验模块)
–enable-mods-shared=MODULE-LIST
将MODULE-LIST中的所有模块都编译成DSO(可用于所有模块)
–enable-modules=MODULE-LIST
将MODULE-LIST静态连接进核心(可用于所有模块)

上述 MODULE-LIST 可以是:
(1)用引号界定并且用空格分隔的模块名列表

–enable-mods-shared=’headers rewrite dav’

(2)”most”(大多数模块)   (3)”all”(所有模块)

–enable-mods-shared=most

注意
configure将忽略MODULE和MODULE-LIST中的拼写错误,注意仔细拼写。用于MODULE和MODULE-LIST中的名称是”mod_NAME”中去掉”mod_”并将剩余部分中的下划线”_”替换为连字符”-“以后的结果,比如”mod_log_config”模块应当表示为”log-config”。
模块列表
基本(B)模块默认包含,必须明确禁用;扩展(E)/实验(X)模块默认不包含,必须明确启用。

模块名称 状态 简要描述
mod_actions (B) 基于媒体类型或请求方法,为执行CGI脚本而提供
mod_alias (B) 提供从文件系统的不同部分到文档树的映射和URL重定向
mod_asis (B) 发送自己包含HTTP头内容的文件
mod_auth_basic (B) 使用基本认证
mod_authn_default (B) 在未正确配置认证模块的情况下简单拒绝一切认证信息
mod_authn_file (B) 使用纯文本文件为认证提供支持
mod_authz_default (B) 在未正确配置授权支持模块的情况下简单拒绝一切授权请求
mod_authz_groupfile (B) 使用纯文本文件为组提供授权支持
mod_authz_host (B) 供基于主机名、IP地址、请求特征的访问控制
mod_authz_user (B) 基于每个用户提供授权支持
mod_autoindex (B) 自动对目录中的内容生成列表,类似于”ls”或”dir”命令
mod_cgi (B) 在非线程型MPM(prefork)上提供对CGI脚本执行的支持
mod_cgid (B) 在线程型MPM(worker)上用一个外部CGI守护进程执行CGI脚本
mod_dir (B) 指定目录索引文件以及为目录提供”尾斜杠”重定向
mod_env (B) 允许Apache修改或清除传送到CGI脚本和SSI页面的环境变量
mod_filter (B) 根据上下文实际情况对输出过滤器进行动态配置
mod_imagemap (B) 处理服务器端图像映射
mod_include (B) 实现服务端包含文档(SSI)处理
mod_isapi (B) 仅限于在Windows平台上实现ISAPI扩展
mod_log_config (B) 允许记录日志和定制日志文件格式
mod_mime (B) 根据文件扩展名决定应答的行为(处理器/过滤器)和内容(MIME类型/语言/字符集/编码)
mod_negotiation (B) 提供内容协商支持
mod_nw_ssl (B) 仅限于在NetWare平台上实现SSL加密支持
mod_setenvif (B) 根据客户端请求头字段设置环境变量
mod_status (B) 生成描述服务器状态的Web页面
mod_userdir (B) 允许用户从自己的主目录中提供页面(使用”/~username”)
mod_auth_digest (X) 使用MD5摘要认证(更安全,但是只有最新的浏览器才支持)
mod_authn_alias (E) 基于实际认证支持者创建扩展的认证支持者,并为它起一个别名以便于引用
mod_authn_anon (E) 提供匿名用户认证支持
mod_authn_dbd (E) 使用SQL数据库为认证提供支持
mod_authn_dbm (E) 使用DBM数据库为认证提供支持
mod_authnz_ldap (E) 允许使用一个LDAP目录存储用户名和密码数据库来执行基本认证和授权
mod_authz_dbm (E) 使用DBM数据库文件为组提供授权支持
mod_authz_owner (E) 基于文件的所有者进行授权
mod_cache (E) 基于URI键的内容动态缓冲(内存或磁盘)
mod_cern_meta (E) 允许Apache使用CERN httpd元文件,从而可以在发送文件时对头进行修改
mod_charset_lite (X) 允许对页面进行字符集转换
mod_dav (E) 允许Apache提供DAV协议支持
mod_dav_fs (E) 为mod_dav访问服务器上的文件系统提供支持
mod_dav_lock (E) 为mod_dav锁定服务器上的文件提供支持
mod_dbd (E) 管理SQL数据库连接,为需要数据库功能的模块提供支持
mod_deflate (E) 压缩发送给客户端的内容
mod_disk_cache (E) 基于磁盘的缓冲管理器
mod_dumpio (E) 将所有I/O操作转储到错误日志中
mod_echo (X) 一个很简单的协议演示模块
mod_example (X) 一个很简单的Apache模块API演示模块
mod_expires (E) 允许通过配置文件控制HTTP的”Expires:”和”Cache-Control:”头内容
mod_ext_filter (E) 使用外部程序作为过滤器
mod_file_cache (X) 提供文件描述符缓存支持,从而提高Apache性能
mod_headers (E) 允许通过配置文件控制任意的HTTP请求和应答头信息
mod_ident (E) 实现RFC1413规定的ident查找
mod_info (E) 生成Apache配置情况的Web页面
mod_ldap (E) 为其它LDAP模块提供LDAP连接池和结果缓冲服务
mod_log_forensic (E) 实现”对比日志”,即在请求被处理之前和处理完成之后进行两次记录
mod_logio (E) 对每个请求的输入/输出字节数以及HTTP头进行日志记录
mod_mem_cache (E) 基于内存的缓冲管理器
mod_mime_magic (E) 通过读取部分文件内容自动猜测文件的MIME类型
mod_proxy (E) 提供HTTP/1.1的代理/网关功能支持
mod_proxy_ajp (E) mod_proxy的扩展,提供Apache JServ Protocol支持
mod_proxy_balancer (E) mod_proxy的扩展,提供负载平衡支持
mod_proxy_connect (E) mod_proxy的扩展,提供对处理HTTP CONNECT方法的支持
mod_proxy_ftp (E) mod_proxy的FTP支持模块
mod_proxy_http (E) mod_proxy的HTTP支持模块
mod_rewrite (E) 一个基于一定规则的实时重写URL请求的引擎
mod_so (E) 允许运行时加载DSO模块
mod_speling (E) 自动纠正URL中的拼写错误
mod_ssl (E) 使用安全套接字层(SSL)和传输层安全(TLS)协议实现高强度加密传输
mod_suexec (E) 使用与调用web服务器的用户不同的用户身份来运行CGI和SSI程序
mod_unique_id (E) 为每个请求生成唯一的标识以便跟踪
mod_usertrack (E) 使用Session跟踪用户(会发送很多Cookie),以记录用户的点击流
mod_version (E) 提供基于版本的配置段支持
mod_vhost_alias (E) 提供大批量虚拟主机的动态配置支持

多路处理模块(MPM)
必须有而且只能有一个MPM被静态包含进核心,你可以使用下面的配置选项进行选择:

–with-mpm=MPM
其中,MPM是你想要使用的多路处理模块的名字。如果你不使用这个选项,那么将会使用对应于各平台的默认MPM,可选的MPM如下:beos, mpmt_os2, prefork, worker
第三方模块
有至少两种方法可以添加第三方模块,最简单的方法是作为配置参数提供,语法如下:

–with-module=module-type:module-file[, module-type:module-file]
module-file是模块的源代码文件名,该文件必须位于Apahe源代码目录树的”modules/module-type”目录下,如果configure没有在那里找到module-file ,则将它看作一个绝对路径名并尝试将其复制到”modules/module-type”目录中,如果”modules/module-type”目录不存在,configure将新建一个”modules/module-type”目录并在其中放置一个标准的Makefile.in文件。这种方法有两个明显的缺陷:

模块的源代码必须是单一文件
模块只能静态连接进核心,而不能作为DSO模块

所以一般并不使用此方法,而是使用apxs(Apache扩展工具)来添加第三方模块支持。

杂项选项
–enable-nonportable-atomics
若只打算在486以上的CPU上运行Apache ,那么使用该选项可以启用更加高效的基于互斥执行的原子操作。
–enable-v4-mapped
使用相同的套接字同时处理IPv4和IPv6的连接,也就是启用地址映射。在FreeBSD、NetBSD、OpenBSD以外的平台上是默认值。
–disable-v4-mapped
使用不同的套接字分别处理IPv4和IPv6的连接,也就是禁用地址映射。在FreeBSD、NetBSD、OpenBSD上是默认值。
–enable-maintainer-mode
使用所有警告和调试符号编译源代码,请勿用于正式服务器,它会影响性能。
–enable-exception-hook
允许在子进程崩溃以后启用一个钩子来运行异常处理程序。参见EnableExceptionHook指令
–with-port=PORT
设定httpd的默认的监听端口[默认为:80],该值仅在生成默认配置文件httpd.conf时使用。
–with-program-name=NAME
指定可执行程序的名字[默认为:httpd],若使用此选项则默认配置文件的名字将同时变成”NAME.conf”。
传递给apr-config脚本的选项
译者注:下述三个选项并未出现在官方手册中,译者不保证其真实性,译者本人亦未使用过,仅供有兴趣的玩家参考。

–disable-threads
禁用线程支持,如果不使用线程化的MPM ,可以关闭它以减少系统开销。
–disable-ipv6
禁用IPv6支持
–disable-dso
禁用DSO支持
特殊程序包选项
这些指令用于定义特殊程序包相关的选项。

–with-apr=DIR|FILE
Apache可移植运行时(APR)是httpd源码的一部分并会自动与httpd一起创建。如果你想使用一个已经存在的APR ,就必须在这里指定apr-config脚本的路径。可以使用此脚本的绝对路径或已有的APR安装目录(apr-config必须位于此目录或者其下的”bin”子目录中)。
–with-apr-util=DIR|FILE
Apache可移植运行时工具包(APU)是httpd源码的一部分并会自动与httpd一起创建。如果你想使用一个已经存在的APU ,就必须在这里指定apu-config脚本的路径。可以使用此脚本的绝对路径或已有的APU安装目录(apu-config必须位于此目录或者其下的”bin”子目录中)。
–with-ssl=DIR
如果启用了mod_ssl ,configure脚本将会自动搜寻已经安装的OpenSSL ,你可以在这里指定SSL/TLS工具包的安装路径。
–with-z=DIR
如果你启用了压缩模块(比如mod_deflate),configure脚本将会自动搜寻已经安装的zlib库,你可以在这里指定它的安装路径。
–with-perl=DIR
有些用Perl写的支持脚本,如apxs或dbmmanage ,需要Perl5解释器(5.003或以上的版本就足够了)。如果系统中存在多个Perl解释器,比如有系统提供的Perl 4 ,还有你自己安装的Perl 5 ,推荐你使用该选项来指定正确的版本。如果没有Perl 5也没关系,这并不影响Apache httpd的编译和安装,只是相关的支持脚本不能使用而已。
–with-pcre=DIR
5.0版的Perl兼容正则表达式库(PCRE)已经被包含进来了,如果你想使用系统中已经安装好的PCRE ,就可以在这里指定其安装路径。
–with-ldap=DIR
一些Apache模块,比如mod_ldap和mod_authnz_ldap需要APU支持LDAP(默认并不支持),只要使用其中之一,就要使用该选项指定LDAP的安装路径。
一些Apache模块,比如mod_authn_dbm和mod_rewrite需要使用DBM数据库,APU中已经包含了SDBM ,所以这个数据库总是可用的。如果你想使用其他类型的数据库,就要使用以下选项:

–with-gdbm[=path]
使用GNU DBM代替SDBM;如果不指定path ,则configure脚本将会在默认路径上搜索GNU DBM的包含文件和库的位置。如果指定path ,则configure脚本会在path/lib和path/include目录中搜索GNU DBM的包含文件和库。还可以使用”inc-path:lib-path”的形式分别指定GNU DBM的包含文件和库的位置。
–with-ndbm[=path]
使用New DBM代替SDBM;如果不指定path ,则configure脚本将会在默认路径上搜索New DBM的包含文件和库的位置。如果指定path ,则configure脚本会在path/lib和path/include目录中搜索New DBM的包含文件和库。还可以使用”inc-path:lib-path”的形式分别指定New DBM的包含文件和库的位置。
–with-berkeley-db[=path]
使用Berkeley DB代替SDBM;如果不指定path ,则configure脚本将会在默认路径上搜索Berkeley DB的包含文件和库的位置。如果指定path ,则configure脚本会在path/lib和path/include目录中搜索Berkeley DB的包含文件和库。还可以使用”inc-path:lib-path”的形式分别指定Berkeley DB的包含文件和库的位置。
注意
DBM数据库选项是由APU提供并传递给APU配置脚本的。所以如果使用 –with-apr-util 指定一个已安装的APU来代替,那么这些选项便无效。你可以同时使用几种不同的DBM实现,然后使用运行时配置动态选择其中之一。

支持程序选项
–enable-static-support
使用静态连接(默认为动态连接)编译所有二进制支持程序。若不使用该选项也可以使用下面的选项分别指定每个支持程序:
–enable-static-ab
使用静态连接编译ab
–enable-static-checkgid
使用静态连接编译checkgid
–enable-static-htdbm
使用静态连接编译htdbm
–enable-static-htdigest
使用静态连接编译htdigest
–enable-static-htpasswd
使用静态连接编译htpasswd
–enable-static-logresolve
使用静态连接编译logresolve
–enable-static-rotatelogs
使用静态连接编译rotatelogs
suexec配置选项
–enable-suexec
使用这个选项以启用suexec ,它可以允许你为CGI程序指定uid和gid 。如果你不精通suexec的工作机制,请不要使用它!
仅在启用了上述选项的情况下,才可以使用以下选项微调suexec的各种特性。方括号”[]”内是默认值。参见配置和安装suEXEC以获得更多信息。

–with-suexec-bin
suexec二进制文件目录[–sbindir]
–with-suexec-caller
允许调用suexec的用户,必须和运行httpd子进程的用户相同。
–with-suexec-docroot
允许suexec对其中的文件具有执行权限的根目录[–datadir/htdocs]
–with-suexec-gidmin
允许执行suexec的最小GID[100]
–with-suexec-logfile
suexec日志文件名[默认文件名为:suexec_log ,位于–logfiledir目录下]
–with-suexec-safepath
对suexec”安全”的PATH环境变量的值[/usr/local/bin:/usr/bin:/bin]
–with-suexec-userdir
用户主目录下允许suexec对其中的文件具有执行权限的子目录,仅在将suexec和用户网站目录(由mod_userdir提供支持)一起使用的情况下才需要设置此选项。[public_html]
–with-suexec-uidmin
允许执行suexec的最小UID[100]
–with-suexec-umask
suexec进程的umask[取决于系统的设定]

环境变量
可以通过指定某些环境变量来修改configure脚本的默认选择,或者帮助configure脚本找到名字和/或位置不标准的库和程序。

CC
C编译器
CFLAGS
C编译器的flags
CPP
C预处理程序
CPPFLAGS
C/C++预处理程序flags,比如使用”-Iincludedir”指定一个非标准的头文件目录includedir 。
LDFLAGS
连接器flags,比如使用”-L-Llibdir”指定一个非标准的库文件目录libdir 。

0 0 投票数
文章评分
订阅评论
提醒
guest

0 评论
内联反馈
查看所有评论
0
希望看到您的想法,请您发表评论x