The configure script configures the source tree
for compiling and installing the Apache HTTP Server on your
particular platform. Various options allow the compilation of a
server corresponding to your personal requirements.
This script, included in the root directory of the source distribution, is for compilation on Unix and Unix-like systems only. For other platforms, see the platform documentation.
You should call the configure script from within the
root directory of the distribution.
./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.
The following options influence the behavior of
configure itself.
-C--config-cache--cache-file=config.cache--cache-file=FILE-h--help [short|recursive]short only
options specific to this package will displayed. The argument
recursive displays the short help of all the included
packages.-n--no-createconfigure script is run normally but does
not create output files. This is useful to check the test results
before generating makefiles for compilation.-q--quietchecking ... messages during the
configure process.--srcdir=DIRconfigure is located, or
the parent directory.--silent--quietThese options define the installation directory. The installation tree depends on the selected layout.
--prefix=PREFIX/usr/local/apache2.--exec-prefix=EPREFIXBy 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.
--enable-layout=LAYOUTconfig.layout
file contains several example configurations, and you can also create
your own custom configuration following the examples. The different
layouts in this file are grouped into <Layout
FOO>...</Layout> sections and referred to by name as
in FOO. The default layout is Apache.For better control of the installation directories, use the options
below. Please note that the directory defaults are set by
autoconf and are overwritten by the corresponding layout
setting.
--bindir=DIREPREFIX/bin.--datadir=DIRdatadir is set to
PREFIX/share. This option is offered by
autoconf and currently unused.--includedir=DIRincludedir is set to
EPREFIX/include.--infodir=DIRinfodir is set to
PREFIX/info. This option is currently
unused.--libdir=DIRlibdir is set to
EPREFIX/lib.--libexecdir=DIRlibexecdir is set to
EPREFIX/libexec.--localstatedir=DIRlocalstatedir is set to
PREFIX/var. This option is offered by
autoconf and currently unused.--mandir=DIRmandir is set to
EPREFIX/man.--oldincludedir=DIRoldincludedir is set to
/usr/include. This option is offered by
autoconf and currently unused.--sbindir=DIRsbindir is set to
EPREFIX/sbin.--sharedstatedir=DIRsharedstatedir is set to
PREFIX/com. This option is offered by
autoconf and currently unused.--sysconfdir=DIRhttpd.conf, mime.types, etc. in
DIR. By default sysconfdir is set to
PREFIX/conf.These options are used to cross-compile the Apache HTTP Server to run on another system. In normal cases, when building and running the server on the same system, these options are not used.
--build=BUILDconfig.guess.--host=HOST--target=TARGETautoconf and not necessary for the Apache HTTP
Server.These options are used to fine tune the features your HTTP server will have.
Generally you can use the following syntax to enable or disable a feature:
--disable-FEATURE--enable-FEATURE=no.--enable-FEATURE[=ARG]yes.--enable-MODULE=shared--enable-MODULE=staticconfigure will not complain about
--enable-foo even if foo doesn't
exist, so you need to type carefully.
Most modules are compiled by default and have to be disabled
explicitly or by using the keywords few or
none (see --enable-modules,
--enable-mods-shared and --enable-mods-static
below for further explanation) to be removed.
Other modules are not compiled by default and have to be enabled
explicitly or by using the keywords all or
reallyall to be available.
To find out which modules are compiled by default, run
./configure -h or ./configure --help
and look under Optional Features. Suppose you
are interested in
Optional Features: ... --disable-example1 example module 1 --enable-example2 example module 2 ...
Then mod_example1 is enabled by default,
and you would use --disable-example1 to not
compile it. mod_example2 is disabled by
default, and you would use --enable-example2
to compile it.
Multi-Processing Modules, or MPMs, implement the basic behavior of the server. A single MPM must be active in order for the server to function. The list of available MPMs appears on the module index page.
MPMs can be built as DSOs for dynamic loading or statically linked with the server, and are enabled using the following options:
--with-mpm=MPMChoose the default MPM for your server. If MPMs are built as DSO
modules (see --enable-mpms-shared), this directive
selects the MPM which will be loaded in the default configuration
file. Otherwise, this directive selects the only available MPM,
which will be statically linked into the server.
If this option is omitted, the default MPM for your operating system will be used.
--enable-mpms-shared=MPM-LISTEnable a list of MPMs as dynamic shared modules. One of these
modules must be loaded dynamically using the
MPM-LIST is a space-separated list of MPM names enclosed by quotation marks. For example:
Additionally you can use the special keyword all,
which will select all MPMs which support dynamic loading on the
current platform and build them as DSO modules. For example:
To add additional third-party modules use the following options:
--with-module=module-type:module-file[,
module-type:module-file]Add one or more third-party modules to the list of statically linked
modules. The module source file module-file
will be searched in the modules/module-type
subdirectory of your Apache HTTP server source tree. If it is not found
there configure is considering module-file to be
an absolute file path and tries to copy the source file into the
module-type subdirectory. If the subdirectory doesn't
exist it will be created and populated with a standard
Makefile.in.
This option is useful to add small external modules consisting of one source file. For more complex modules you should read the vendor's documentation.
--enable-maintainer-mode--enable-mods-shared=MODULE-LISTDefines a list of modules to be enabled and build as dynamic
shared modules. This mean, these module have to be loaded
dynamically by using the
MODULE-LIST is a space separated list of modulenames
enclosed by quotation marks. The module names are given without the
preceding mod_. For example:
Additionally you can use the special keywords reallyall,
all, most, few and none.
For example,
will compile most modules and build them as DSO modules,
will only compile a very basic set of modules.
The default set is most.
The --enable-foo argument. You can change the set
of loaded modules by activating or deactivating the httpd.conf. In addition the
--enable-load-all-modules.
Caveat:
--enable-mods-shared=all does not actually build all
modules. To build all modules then, one might use:
--enable-mods-static=MODULE-LIST--enable-mods-shared,
but will link the given modules statically. This mean, these modules
will always be present while running --enable-modules=MODULE-LIST--enable-mods-shared,
and will also link the given modules dynamically. The special
keyword none disables the build of all modules.--enable-v4-mapped--with-port=PORThttpd.conf. The default is 80.--with-program-namehttpd.These options are used to define optional packages.
Generally you can use the following syntax to define an optional package:
--with-PACKAGE[=ARG]yes.--without-PACKAGE--with-PACKAGE=no. This option is provided by
autoconf but not very useful for the Apache HTTP
Server.--with-apr=DIR|FILEconfigure the path to the
apr-config script. You may set the absolute path and name
or the directory to the installed APR. apr-config must
exist within this directory or the subdirectory
bin.--with-apr-util=DIR|FILEconfigure the path to the
apu-config script. You may set the absolute path and name
or the directory to the installed APU. apu-config must
exist within this directory or the subdirectory
bin.--with-ssl=DIRconfigure
searches for an installed OpenSSL. You can set the directory path
to the SSL/TLS toolkit instead.--with-z=DIRconfigure searches automatically for an installed
zlib library if your source configuration requires one
(e.g., when Several features of the Apache HTTP Server, including
--with-gdbm[=path]configure will
search for the include files and libraries of a GNU DBM
installation in the usual search paths. An explicit
path will cause configure to look in
path/lib and
path/include for the relevant files.
Finally, the path may specify specific include and
library paths separated by a colon.--with-ndbm[=path]--with-gdbm, but searches for a New DBM
installation.--with-berkeley-db[=path]--with-gdbm, but searches for a Berkeley DB
installation.The DBM options are provided by the APU and passed through to its
configuration script. They are useless when using an already
installed APU defined by --with-apr-util.
You may use more then one DBM implementation together with your HTTP server. The appropriated DBM type will be configured within the runtime configuration at each time.
--enable-static-support--enable-suexecIt is possible to create a statically linked binary of a single support program by using the following options:
--enable-static-ab--enable-static-checkgidcheckgid.--enable-static-htdbm--enable-static-htdigest--enable-static-htpasswd--enable-static-logresolve--enable-static-rotatelogssuexec configuration optionsThe following options are used to fine tune the behavior of
--with-suexec-bin--sbindir (see Fine tuning of installation directories).--with-suexec-caller--with-suexec-docroot--datadir/htdocs.--with-suexec-gidmin--with-suexec-logfilesuexec_log and located in
--logfiledir.--with-suexec-safepathPATH to
be set for processes started by /usr/local/bin:/usr/bin:/bin.--with-suexec-userdirpublic_html.--with-suexec-uidmin--with-suexec-umaskumask for processes started by
There are some useful environment variables to override the choices made by
configure or to help it to find libraries and programs with
nonstandard names or locations.
CCCFLAGSCPPCPPFLAGS-Iincludedir
if you have headers in a nonstandard directory includedir.LDFLAGS-Llibdir if you have
libraries in a nonstandard directory libdir.