List of core configure options

Below is a partial list of configure options used by the PHP configure scripts when compiling in Unix-like environments. Most configure options are listed in their appropriate locations on the extension reference pages and not here. For a complete up-to-date list of configure options, run ./configure --help in your PHP source directory after running autoconf (see also the Installation chapter). You may also be interested in reading the » GNU configure documentation for information on additional configure options such as --prefix=PREFIX.


These are only used at compile time. If you want to alter PHP's runtime configuration, please see the chapter on Runtime Configuration.

Configure Options in PHP

Misc options


Compile with debugging symbols.


Sets how installed files will be laid out. Type is one of PHP (default) or GNU. Note that if installing manpages under PREFIX (default), choose the GNU style in order for them to be found in the search path of manpath utility.


Install PEAR in DIR (default PREFIX/lib/php).


Do not install PEAR.


Enable PHP's own SIGCHLD handler.


Disable passing additional runtime library search paths.


Enable explicitly linking against libgcc.


Include experimental PHP streams. Do not use unless you are testing the code!


Define the location of zlib install directory.


Use POSIX threads (default).


Build shared libraries [default=yes].


Build static libraries [default=yes].


Optimize for fast installation [default=yes].


Assume the C compiler uses GNU ld [default=no].


Avoid locking (might break parallel builds).


Try to use only PIC/non-PIC objects [default=use both].


Export only required symbols. See INSTALL for more information.

PHP options


Enable make rules and dependencies not useful (and sometimes confusing) to the casual installer.


Sets the path in which to look for php.ini, defaults to PREFIX/lib.


Disable the short-form <? start tag by default.


Specifies the directory where the libraries to build PHP exist on a Unix system. For 64bit systems, its needed to specify this argument to the lib64 directory like: --with-libdir=lib64.


Enables thread safety. Prior to PHP 8.0.0 on non-Windows systems, the option was called --enable-maintainer-zts.

SAPI options

The following list contains the available SAPI&s (Server Application Programming Interface) for PHP.


Build shared Apache module. FILE is the optional pathname to the Apache apxs tool; defaults to apxs. Make sure you specify the version of apxs that is actually installed on your system and NOT the one that is in the apache source tarball.


Build a static Apache module. DIR is the top-level Apache build directory, defaults to /usr/local/apache.


Enable transfer tables for mod_charset (Russian Apache).


Build shared Apache 2.0 module. FILE is the optional pathname to the Apache apxs tool; defaults to apxs.


Disable building the CLI version of PHP (this forces --without-pear). More information is available in the section about Using PHP from the command line.


Enable phpdbg interactive debugger SAPI module support.


Enable building of the embedded SAPI library. TYPE is either shared or static, which defaults to shared.


Include servlet support. DIR is the base install directory for the JSDK. This SAPI requires the java extension must be built as a shared dl.


Disable building CGI version of PHP.

This argument also enables FastCGI.

add a note

User Contributed Notes 2 notes

atesin () gmail ! com
3 years ago
i'll answer myself (FINALLY!)

current "configure options" can be viewed with "php-config" shell script, aside with other compile time options too =D!!! ...

in some distributions it comes with the "php-devel" package... but until in this online manual "php-config" is mentioned in pecl extensions documentation (i couldn't find on pecl site), idk if that "php-devel" has something to do with this

... however i noticed they are literal strings inside the script, i hope the script itself were built together with php compilation o_O

in the previous page "configure options" (link shown above ^), there is an editor note with additional info about it
atesin () gmail ! com
3 years ago
please somebody tell me how to display configure options used in php actual binary

it was shown in phpinfo() some years before, it was very useful, specially with 'phpize' recompilation and to enable some pecl/pear module :/

please tell me also which ctriteria had php guys used to suddenly decided to hide (or obfuscate) this info :/

thanks in advance
To Top