- 1. CMake presets
- 2. CMake configuration
- 3. PHP configuration
- 4. Zend Engine configuration
- 5. PHP SAPI modules configuration
- 6. PHP extensions configuration
- 7. CMake GUI
- 8. Command-line interface ccmake
- 9. Configuration options mapping: Autotools, Windows JScript, and CMake
Build configuration can be passed on the command line at the configuration
phase with the -D
options:
cmake -DCMAKE_FOO=ON -DPHP_BAR=ON -DPHP_EXT_NAME=ON ... -S php-src -B php-build
The -LH
and -LAH
command-line options list all available configuration cache
variables with help texts after CMake configures cache:
# List configuration
cmake -LH -S php-src -B php-build
# List also advanced cache variables
cmake -LAH -S php-src -B php-build
# Another option is to use ccmake or cmake-gui tool
ccmake -S php-src -B php-build
To override the paths to dependencies, for example, when using a manual installation of a library, there are two main options to consider:
-
CMAKE_PREFIX_PATH="DIR_1;DIR_2;..."
A semicolon separated list of additional directories where packages can be found by
find_*()
commands.For example, to pass manual paths for iconv and SQLite3 libraries:
cmake -DCMAKE_PREFIX_PATH="/path/to/libiconv;/path/to/sqlite3" -S php-src -B php-build
-
<PACKAGENAME>_ROOT
variablesPath where to look for
PackageName
, when calling thefind_package(<PackageName> ...)
command.cmake -DICONV_ROOT=/path/to/libiconv -DSQLITE3_ROOT=/path/to/sqlite3 -S php-src -B php-build
Instead of manually passing variables on the command line with
cmake -DFOO=BAR ...
, configuration options can be simply stored and shared in
a JSON file CMakePresets.json
at the project root directory.
The CMakePresets.json file incorporates some common
build configuration for development, continuous integration, bug reporting, etc.
Additional configure presets are included from the cmake/presets
directory.
To use the CMake presets:
# List all available configure presets
cmake --list-presets
# Configure project; replace "default" with the name of the "configurePresets"
cmake --preset default
# Build project using the "default" build preset in parallel (-j)
cmake --build --preset default -j
Custom local build configuration can be also stored in a Git-ignored file
CMakeUserPresets.json
intended to override the defaults in
CMakePresets.json
.
CMake presets have been available since CMake 3.19, and depending on the
version
JSON field, the minimum required CMake version may vary based on the
used JSON scheme.
Some useful overridable configuration options built into CMake itself. All these
CMAKE_*
and BUILD_SHARED_LIBS
variables are also documented in the CMake
documentation.
-
CMAKE_EXPORT_COMPILE_COMMANDS=ON|OFF
Default:
OFF
Create compilation database file
compile_commands.json
during generation. Various other development tools can then use it. For example,clang-check
. -
CMAKE_INTERPROCEDURAL_OPTIMIZATION=ON|OFF
Default:
ON
Run link-time optimizer on all targets if interprocedural optimization (IPO) is supported by the compiler and PHP code.
-
CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG>=ON|OFF
Enable or disable IPO based on the build type (
CMAKE_BUILD_TYPE
). For example, to disable IPO for theDebug
build type setCMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG
toOFF
.
-
-
CMAKE_LIBRARY_PATH
Default: empty
Specify additional semicolon-separated paths where to look for system libraries if default locations searched by CMake is not sufficient in some build case scenario.
-
CMAKE_LINKER_TYPE
(CMake 3.29+)Default: empty
Specify which linker will be used for the link step.
# For example, to use the mold linker: cmake -S php-src -B php-build -DCMAKE_LINKER_TYPE=MOLD
-
CMAKE_MESSAGE_CONTEXT_SHOW=ON|OFF
Default:
OFF
Show/hide context in configuration log ([ext/foo] Checking for...).
-
BUILD_SHARED_LIBS=ON|OFF
Default:
OFF
Build all enabled PHP extensions as shared libraries.
-
CMAKE_SKIP_RPATH=ON|OFF
Default:
OFF
Controls whether to add additional runtime library search paths (runpaths or rpath) to executables in build directory and installation directory. These are passed in form of
-Wl,-rpath,/additional/path/to/library
at build time.See the RUNPATH in the executable:
objdump -x ./php-src/sapi/cli/php | grep 'R.*PATH'
-
CMAKE_SKIP_BUILD_RPATH=ON|OFF
Default:
OFF
Disable runtime library search paths (rpath) in build directory executables.
-
CMAKE_SKIP_INSTALL_RPATH=ON|OFF
Default:
OFF
Disable runtime library search paths (rpath) in installation directory executables.
-
bcmath
bz2
calendar
com_dotnet
ctype
curl
date
dba
dl_test
dom
enchant
exif
ffi
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
intl
json
ldap
libxml
mbstring
mysqli
mysqlnd
odbc
opcache
openssl
pcntl
pcre
pdo
pdo_dblib
pdo_firebird
pdo_mysql
pdo_odbc
pdo_pgsql
pdo_sqlite
pgsql
phar
posix
random
readline
reflection
session
shmop
simplexml
skeleton
snmp
soap
sockets
sodium
spl
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
xml
xmlreader
xmlwriter
xsl
zend_test
zip
zlib
With CMake there comes also a basic graphical user interface to configure and generate the build system.
Inside a CMake project, run:
cmake-gui .
Here the build configuration can be done, such as enabling the PHP extensions, adjusting the build options and similar.
CMake GUI makes it simpler to see available build options and settings and it also conveniently hides and sets the dependent options. For example, if some PHP extension provides multiple configuration options and it is disabled, the dependent options won't be displayed after configuration.
After setting up, press the Configure
button to start the configuration phase
and prepare the build configuration. The Generate
buttons can then generate
the chosen build system.
GUI is only meant to configure and generate the build in user-friendly way. Building the sources into binaries can be then done using the command line or an IDE.
cmake --build --preset default
The CMake curses interface (ccmake
) is a command-line GUI, similar to the
CMake GUI, that simplifies the project configuration process in an intuitive and
straightforward manner.
# Run ccmake:
ccmake -S source-directory -B build-directory
# For in-source builds:
ccmake .
c
key will run the configuration stepg
key will run the generation step (you might need to pressc
again)
Much like the CMake GUI, the build step is executed on the command line afterward.
# Build the project sources from the specified build directory:
cmake --build build-directory -j
ccmake
does not support presets but can be utilized for simpler configurations
during development and for similar workflows.
A list of Autoconf configure
command-line configuration options, Windows
configure.bat
options and their CMake alternatives.
configure | configure.bat | CMake | Notes |
---|---|---|---|
PHP configuration | |||
--disable-re2c-cgoto | N/A | PHP_RE2C_COMPUTED_GOTOS=OFF | default |
--enable-re2c-cgoto | N/A | PHP_RE2C_COMPUTED_GOTOS=ON | |
--disable-debug | --disable-debug | default | |
--enable-debug | --enable-debug |
Single configuration generators: CMAKE_BUILD_TYPE=Debug Multi configuration generators: cmake --build dir --config Debug
|
|
--disable-debug-assertions | --disable-debug-pack | default | |
--enable-debug-assertions | --enable-debug-pack |
Single configuration generators: CMAKE_BUILD_TYPE=DebugAssertions Multi configuration generators: cmake --build dir --config DebugAssertions
|
|
--disable-sigchild | N/A | PHP_SIGCHILD=OFF | default (not available on Windows) |
--enable-sigchild | N/A | PHP_SIGCHILD=ON | (not available on Windows) |
--enable-ipv6 | --enable-ipv6 | PHP_IPV6=ON | default |
--disable-ipv6 | --disable-ipv6 | PHP_IPV6=OFF | |
--disable-rtld-now | N/A | PHP_USE_RTLD_NOW=OFF | default (not available on Windows) |
--enable-rtld-now | N/A | PHP_USE_RTLD_NOW=ON | (not available on Windows) |
--enable-short-tags | N/A | PHP_DEFAULT_SHORT_OPEN_TAG=ON | default |
--disable-short-tags | N/A | PHP_DEFAULT_SHORT_OPEN_TAG=OFF | |
--disable-zts | --disable-zts | PHP_THREAD_SAFETY=OFF | default in *nix and CMake (on Windows enabled by default) |
--enable-zts | --enable-zts | PHP_THREAD_SAFETY=ON | |
--disable-dtrace | N/A | PHP_DTRACE=OFF | default |
--enable-dtrace | N/A |
PHP_DTRACE=ON [DTRACE_ROOT=DIR] |
|
--disable-fd-setsize | --disable-fd-setsize | PHP_FD_SETSIZE="" | default |
--enable-fd-setsize=NUM | --enable-fd-setsize=256 | PHP_FD_SETSIZE=NUM | default on Windows |
--without-valgrind | N/A | PHP_VALGRIND=OFF | default |
--with-valgrind [VALGRIND_CFLAGS=...] [VALGRIND_LIBS=...] |
N/A |
PHP_VALGRIND=ON [VALGRIND_ROOT=DIR] |
|
--with-libdir=NAME | N/A | CMAKE_LIBRARY_PATH=NAME | |
--with-layout=PHP|GNU | N/A | N/A | Autotools default: PHP |
--disable-werror | N/A | --compile-no-warning-as-error | default |
--enable-werror | CFLAGS=/WX | CMAKE_COMPILE_WARNING_AS_ERROR=ON | |
--disable-memory-sanitizer | PHP_MEMORY_SANITIZER=OFF | default | |
--enable-memory-sanitizer | PHP_MEMORY_SANITIZER=ON | ||
--disable-address-sanitizer | PHP_ADDRESS_SANITIZER=OFF | default | |
--enable-address-sanitizer | PHP_ADDRESS_SANITIZER=ON | ||
--disable-undefined-sanitizer | PHP_UNDEFINED_SANITIZER=OFF | default | |
--enable-undefined-sanitizer | PHP_UNDEFINED_SANITIZER=ON | ||
--disable-dmalloc | N/A | PHP_DMALLOC=OFF | default |
--enable-dmalloc | N/A |
PHP_DMALLOC=ON [DMALLOC_ROOT=DIR] |
|
--without-config-file-scan-dir | --without-config-file-scan-dir | PHP_CONFIG_FILE_SCAN_DIR="" | default |
--with-config-file-scan-dir=DIR | --with-config-file-scan-dir=DIR | PHP_CONFIG_FILE_SCAN_DIR=DIR | |
--without-config-file-path | N/A | PHP_CONFIG_FILE_PATH="" | default, *nix only |
--with-config-file-path=PATH | N/A | PHP_CONFIG_FILE_PATH=PATH | *nix only |
--disable-gcov | N/A | PHP_GCOV=OFF | default |
--enable-gcov | N/A |
PHP_GCOV=ON [GCOV_ROOT=DIR] |
|
--enable-rpath | N/A |
CMAKE_SKIP_RPATH=OFF CMAKE_SKIP_INSTALL_RPATH=OFF CMAKE_SKIP_BUILD_RPATH=OFF |
default |
--disable-rpath | N/A |
CMAKE_SKIP_RPATH=ON or CMAKE_SKIP_INSTALL_RPATH=ON and/or CMAKE_SKIP_BUILD_RPATH=ON |
|
--disable-libgcc | N/A | PHP_LIBGCC=OFF | default |
--enable-libgcc | N/A | PHP_LIBGCC=ON | |
--enable-all | --enable-snapshot-build | Use cmake --preset all-enabled |
Enables all extensions and some additional configuration |
--disable-all | --disable-snapshot-build | Use cmake --preset all-disabled |
Disables all extensions and some additional configuration |
Zend Engine configuration | |||
--enable-gcc-global-regs | N/A | ZEND_GLOBAL_REGISTER_VARIABLES=ON | default |
--disable-gcc-global-regs | N/A | ZEND_GLOBAL_REGISTER_VARIABLES=OFF | |
--enable-fiber-asm | N/A | ZEND_FIBER_ASM=ON | default, *nix only |
--disable-fiber-asm | N/A | ZEND_FIBER_ASM=OFF | *nix only |
--enable-zend-signals | N/A | ZEND_SIGNALS=ON | default, *nix only |
--disable-zend-signals | N/A | ZEND_SIGNALS=OFF | *nix only |
--disable-zend-max-execution-timers | N/A | ZEND_MAX_EXECUTION_TIMERS=OFF | default, *nix only |
--enable-zend-max-execution-timers | N/A | ZEND_MAX_EXECUTION_TIMERS=ON | *nix only |
PHP SAPI modules configuration | |||
--without-apxs2 |
--disable-apache2handler or --disable-apache2-4handler |
PHP_SAPI_APACHE2HANDLER=OFF |
default, in PHP >= 8.4 --disable-apache2handler is for
Apache 2.4 and not Apache 2.0 anymore
|
--with-apxs2[=PATH_TO_APXS] |
--enable-apache2handler or --enable-apache2-4handler |
PHP_SAPI_APACHE2HANDLER=ON [APACHE_ROOT=PATH_TO_APACHE] [Apache_APXS_EXECUTABLE=PATH_TO_APXS] |
|
N/A | --disable-apache2handler | N/A | default, in PHP <= 8.3 this was for Apache 2.0 |
N/A | --enable-apache2handler | N/A | in PHP <= 8.3 this was for Apache 2.0 |
N/A | --disable-apache2-2handler | N/A | default, removed since PHP >= 8.4 |
N/A | --enable-apache2-2handler | N/A | removed since PHP >= 8.4 |
--enable-cgi | --enable-cgi | PHP_SAPI_CGI=ON | default |
--disable-cgi | --disable-cgi | PHP_SAPI_CGI=OFF | |
--enable-cli | --enable-cli | PHP_SAPI_CLI=ON | default |
--disable-cli | --disable-cli | PHP_SAPI_CLI=OFF | |
N/A | --disable-cli-win32 | PHP_SAPI_CLI_WIN_NO_CONSOLE=OFF | default; Windows only |
N/A | --enable-cli-win32 | PHP_SAPI_CLI_WIN_NO_CONSOLE=ON | Windows only |
--disable-embed | --disable-embed | PHP_SAPI_EMBED=OFF | default |
--enable-embed | --enable-embed | PHP_SAPI_EMBED=ON | will be build as shared |
--enable-embed=shared | N/A |
PHP_SAPI_EMBED=ON PHP_SAPI_EMBED_SHARED=ON |
will be build as shared |
--enable-embed=static | --enable-embed |
PHP_SAPI_EMBED=ON PHP_SAPI_EMBED_SHARED=OFF |
|
--disable-fpm | N/A | PHP_SAPI_FPM=OFF | default |
--enable-fpm | N/A | PHP_SAPI_FPM=ON | |
[--with-fpm-user=USER] | N/A | [PHP_SAPI_FPM_USER=USER] | default: nobody |
[--with-fpm-group=GROUP] | N/A | [PHP_SAPI_FPM_GROUP=GROUP] | default: nobody |
--without-fpm-systemd | N/A | PHP_SAPI_FPM_SYSTEMD=OFF | default |
--with-fpm-systemd [SYSTEMD_CFLAGS=...] [SYSTEMD_LIBS=...] |
N/A |
PHP_SAPI_FPM_SYSTEMD=ON [SYSTEMD_ROOT=DIR] |
|
--without-fpm-acl | N/A | PHP_SAPI_FPM_ACL=OFF | default |
--with-fpm-acl | N/A |
PHP_SAPI_FPM_ACL=ON [ACL_ROOT=DIR] |
|
--without-fpm-apparmor | N/A | PHP_SAPI_FPM_APPARMOR=OFF | default |
--with-fpm-apparmor | N/A |
PHP_SAPI_FPM_APPARMOR=ON [APPARMOR_ROOT=DIR] |
|
--without-fpm-selinux | N/A | PHP_SAPI_FPM_SELINUX=OFF | default |
--with-fpm-selinux | N/A |
PHP_SAPI_FPM_SELINUX=ON [SELINUX_ROOT=DIR] |
|
--disable-fuzzer | N/A | PHP_SAPI_FUZZER=OFF | default |
--enable-fuzzer [LIB_FUZZING_ENGINE=...] |
N/A | PHP_SAPI_FUZZER=ON | |
--disable-litespeed | N/A | PHP_SAPI_LITESPEED=OFF | default |
--enable-litespeed | N/A | PHP_SAPI_LITESPEED=ON | |
--enable-phpdbg | --enable-phpdbg | PHP_SAPI_PHPDBG=ON | default in *nix and CMake (on Windows disabled by default) |
--disable-phpdbg | --disable-phpdbg | PHP_SAPI_PHPDBG=OFF | |
--disable-phpdbg-debug | --disable-phpdbg-debug | PHP_SAPI_PHPDBG_DEBUG=OFF | default (on Windows since PHP >= 8.4) |
--enable-phpdbg-debug | --enable-phpdbg-debug | PHP_SAPI_PHPDBG_DEBUG=ON | (on Windows since PHP >= 8.4) |
--disable-phpdbg-readline | N/A | PHP_SAPI_PHPDBG_READLINE=OFF | default |
--enable-phpdbg-readline | N/A | PHP_SAPI_PHPDBG_READLINE=ON | |
N/A | --disable-phpdbgs | PHP_SAPI_PHPDBG_SHARED=OFF | default |
N/A | --enable-phpdbgs | PHP_SAPI_PHPDBG_SHARED=ON | |
PHP extensions | |||
--disable-bcmath | --disable-bcmath | PHP_EXT_BCMATH=OFF | default in *nix and CMake (on Windows enabled by default) |
--enable-bcmath | --enable-bcmath | PHP_EXT_BCMATH=ON | |
--enable-bcmath=shared | --enable-bcmath=shared | PHP_EXT_BCMATH_SHARED=ON | |
--without-bz2 | --without-bz2 | PHP_EXT_BZ2=OFF | default |
--with-bz2[=DIR] | --with-bz2 |
PHP_EXT_BZ2=ON [BZIP2_ROOT=DIR] |
|
--with-bz2=shared | --with-bz2=shared | PHP_EXT_BZ2_SHARED=ON | |
--disable-calendar | --disable-calendar | PHP_EXT_CALENDAR=OFF | default in *nix and CMake (on Windows enabled by default) |
--enable-calendar | --enable-calendar | PHP_EXT_CALENDAR=ON | |
--enable-calendar=shared | --enable-calendar=shared | PHP_EXT_CALENDAR_SHARED=ON | |
N/A | --enable-com-dotnet | PHP_EXT_COM_DOTNET=ON | default; Windows only |
N/A | --enable-com-dotnet=shared (default PHP >= 8.5) | PHP_EXT_COM_DOTNET_SHARED=ON | Windows only |
N/A | --disable-com-dotnet | PHP_EXT_COM_DOTNET=OFF | Windows only |
--enable-ctype | --enable-ctype | PHP_EXT_CTYPE=ON | default |
--enable-ctype=shared | --enable-ctype=shared | PHP_EXT_CTYPE_SHARED=ON | |
--disable-ctype | --disable-ctype | PHP_EXT_CTYPE=OFF | |
--without-curl | --without-curl | PHP_EXT_CURL=OFF | default |
--with-curl [CURL_CFLAGS=...] [CURL_LIBS=...] [CURL_FEATURES=...] |
--with-curl |
PHP_EXT_CURL=ON [CURL_ROOT=DIR] |
|
--with-curl=shared | --with-curl=shared | PHP_EXT_CURL_SHARED=ON | |
--disable-dba | --without-dba | PHP_EXT_DBA=OFF | default |
--enable-dba | --with-dba[=DIR] | PHP_EXT_DBA=ON | |
--enable-dba=shared | --with-dba=shared | PHP_EXT_DBA_SHARED=ON | |
--enable-flatfile | N/A | PHP_EXT_DBA_FLATFILE=ON | default |
--disable-flatfile | N/A | PHP_EXT_DBA_FLATFILE=OFF | |
--enable-inifile | N/A | PHP_EXT_DBA_INIFILE=ON | default |
--disable-inifile | N/A | PHP_EXT_DBA_INIFILE=OFF | |
--without-qdbm | --without-qdbm | PHP_EXT_DBA_QDBM=OFF | default |
--with-qdbm[=DIR] | --with-qdbm |
PHP_EXT_DBA_QDBM=ON [QDBM_ROOT=DIR] |
|
--without-gdbm | N/A | PHP_EXT_DBA_GDBM=OFF (PHP <= 8.3) | default |
--with-gdbm[=DIR] | N/A |
PHP_EXT_DBA_GDBM=ON (PHP <= 8.3) [GDBM_ROOT=DIR] (PHP <= 8.3) |
|
--without-ndbm | N/A | PHP_EXT_DBA_NDBM=OFF | default |
--with-ndbm[=DIR] | N/A |
PHP_EXT_DBA_NDBM=ON [NDBM_ROOT=DIR] |
|
--without-db4 | N/A | PHP_EXT_DBA_DB=OFF | default |
--with-db4[=DIR] | N/A |
PHP_EXT_DBA_DB=ON [BERKELEYDB_ROOT=DIR] |
|
--without-db3 | --without-db | PHP_EXT_DBA_DB=OFF | default |
--with-db3[=DIR] | --with-db |
PHP_EXT_DBA_DB=ON [BERKELEYDB_ROOT=DIR] |
|
--without-db2 | N/A | PHP_EXT_DBA_DB=OFF | default |
--with-db2[=DIR] | N/A |
PHP_EXT_DBA_DB=ON [BERKELEYDB_ROOT=DIR] |
|
--without-db1 | N/A | PHP_EXT_DBA_DB1=OFF | default |
--with-db1[=DIR] | N/A |
PHP_EXT_DBA_DB1=ON PHP_EXT_DBA_DB=ON [BERKELEYDB_ROOT=DIR] |
|
--without-dbm | N/A | PHP_EXT_DBA_DBM=OFF | default |
--with-dbm[=DIR] | N/A |
PHP_EXT_DBA_DBM=ON [DBM_ROOT=DIR] |
|
--without-lmdb | --without-lmdb | PHP_EXT_DBA_LMDB=OFF | default |
--with-lmdb[=DIR] | --with-lmdb |
PHP_EXT_DBA_LMDB=ON [LMDB_ROOT=DIR] |
|
--without-tcadb | N/A | PHP_EXT_DBA_TCADB=OFF | default |
--with-tcadb[=DIR] | N/A |
PHP_EXT_DBA_TCADB=ON [TOKYOCABINET_ROOT=DIR] |
|
--with-cdb | N/A | PHP_EXT_DBA_CDB=ON | default |
--with-cdb=DIR | N/A |
PHP_EXT_DBA_CDB_EXTERNAL=ON [CDB_ROOT=DIR] |
|
--without-cdb | N/A | PHP_EXT_DBA_CDB=OFF | |
--disable-dl-test | --disable-dl-test | PHP_EXT_DL_TEST=OFF | default |
--enable-dl-test | --enable-dl-test | PHP_EXT_DL_TEST=ON | will be shared |
--enable-dl-test=shared | --enable-dl-test=shared | PHP_EXT_DL_TEST=ON | will be shared |
--enable-dom | --with-dom | PHP_EXT_DOM=ON | default |
--enable-dom=shared | --with-dom=shared | PHP_EXT_DOM_SHARED=ON | |
--disable-dom | --without-dom | PHP_EXT_DOM=OFF | |
--without-enchant | --without-enchant | PHP_EXT_ENCHANT=OFF | default |
--with-enchant [ENCHANT_CFLAGS=...] [ENCHANT_LIBS=...] [ENCHANT2_CFLAGS=...] [ENCHANT2_LIBS=...] |
--with-enchant |
PHP_EXT_ENCHANT=ON [ENCHANT_ROOT=DIR] |
|
--with-enchant=shared | --with-enchant=shared | PHP_EXT_ENCHANT_SHARED=ON | |
--disable-exif | --disable-exif | PHP_EXT_EXIF=OFF | default |
--enable-exif | --enable-exif | PHP_EXT_EXIF=ON | |
--enable-exif=shared | --enable-exif=shared | PHP_EXT_EXIF_SHARED=ON | |
--without-ffi | --without-ffi | PHP_EXT_FFI=OFF | default |
--with-ffi [FFI_CFLAGS=...] [FFI_LIBS=...] |
--with-ffi |
PHP_EXT_FFI=ON [FFI_ROOT=DIR] |
|
--with-ffi=shared | --with-ffi=shared | PHP_EXT_FFI_SHARED=ON | |
--enable-fileinfo | --enable-fileinfo | PHP_EXT_FILEINFO=ON | default in *nix and Cmake (on Windows by default disabled and can be only shared) |
--enable-fileinfo=shared | --enable-fileinfo=shared | PHP_EXT_FILEINFO_SHARED=ON | |
--disable-fileinfo | --disable-fileinfo | PHP_EXT_FILEINFO=OFF | |
--enable-filter | --enable-filter | PHP_EXT_FILTER=ON | default |
--enable-filter=shared | --enable-filter=shared | PHP_EXT_FILTER_SHARED=ON | |
--disable-filter | --disable-filter | PHP_EXT_FILTER=OFF | |
--disable-ftp | --disable-ftp | PHP_EXT_FTP=OFF | default |
--enable-ftp | --enable-ftp | PHP_EXT_FTP=ON | |
--enable-ftp=shared | --enable-ftp=shared | PHP_EXT_FTP_SHARED=ON | |
--without-ftp-ssl | N/A | PHP_EXT_FTP_SSL=OFF | default, PHP >= 8.4 |
--with-ftp-ssl | N/A | PHP_EXT_FTP_SSL=ON | PHP >= 8.4 |
--without-openssl-dir | N/A | PHP_EXT_FTP_SSL=OFF | default, PHP <= 8.3 |
--with-openssl-dir | N/A | PHP_EXT_FTP_SSL=ON | PHP <= 8.3 |
--disable-gd | --without-gd | PHP_EXT_GD=OFF | default in Autotools and CMake |
--enable-gd | --with-gd | PHP_EXT_GD=ON | |
--enable-gd=shared | --with-gd=shared | PHP_EXT_GD_SHARED=ON | default in Windows JScript |
--without-external-gd | N/A | PHP_EXT_GD_EXTERNAL=OFF | default |
--with-external-gd [GDLIB_CFLAGS=...] [GDLIB_LIBS=...] |
--with-gd=DIR |
PHP_EXT_GD_EXTERNAL=ON [GD_ROOT=DIR] |
|
--without-avif | --without-libavif | PHP_EXT_GD_AVIF=OFF | default in Autotools and CMake |
--with-avif [AVIF_CFLAGS=...] [AVIF_LIBS=...] |
--with-libavif |
PHP_EXT_GD_AVIF=ON [LIBAVIF_ROOT=DIR] |
default in JScript Windows |
--without-webp | --without-libwebp | PHP_EXT_GD_WEBP=OFF | default in Autotools and CMake |
--with-webp [WEBP_CFLAGS=...] [WEBP_LIBS=...] |
--with-libwebp |
PHP_EXT_GD_WEBP=ON [WEBP_ROOT=DIR] |
default in JScript Windows |
--without-jpeg | N/A | PHP_EXT_GD_JPEG=OFF | default |
--with-jpeg [JPEG_CFLAGS=...] [JPEG_LIBS=...] |
N/A |
PHP_EXT_GD_JPEG=ON [JPEG_ROOT=DIR] |
|
[PNG_CFLAGS=...] [PNG_LIBS=...] |
N/A | [PNG_ROOT=DIR] | |
--without-xpm | N/A | PHP_EXT_GD_XPM=OFF | default |
--with-xpm [XPM_CFLAGS=...] [XPM_LIBS=...] |
N/A |
PHP_EXT_GD_XPM=ON [XPM_ROOT=DIR] |
|
--without-freetype | N/A | PHP_EXT_GD_FREETYPE=OFF | default |
--with-freetype [FREETYPE2_CFLAGS=...] [FREETYPE2_LIBS=...] |
N/A |
PHP_EXT_GD_FREETYPE=ON [FREETYPE_ROOT=DIR] |
|
--disable-gd-jis-conv | N/A | PHP_EXT_GD_JIS=OFF | default |
--enable-gd-jis-conv | N/A | PHP_EXT_GD_JIS=ON | |
--without-gettext | --without-gettext | PHP_EXT_GETTEXT=OFF | default |
--with-gettext[=DIR] | --with-gettext |
PHP_EXT_GETTEXT=ON [INTL_ROOT=DIR] |
|
--with-gettext=shared | --with-gettext=shared | PHP_EXT_GETTEXT_SHARED=ON | |
--without-gmp | --without-gmp | PHP_EXT_GMP=OFF | default |
--with-gmp[=DIR] | --with-gmp |
PHP_EXT_GMP=ON [GMP_ROOT=DIR] |
|
--with-gmp=shared | --with-gmp=shared | PHP_EXT_GMP_SHARED=ON | |
--without-mhash | --without-mhash | PHP_EXT_HASH_MHASH=OFF | default |
--with-mhash | --with-mhash | PHP_EXT_HASH_MHASH=ON | |
--with-iconv[=DIR] | --with-iconv |
PHP_EXT_ICONV=ON [ICONV_ROOT=DIR] |
default |
--with-iconv=shared | --with-iconv=shared | PHP_EXT_ICONV_SHARED=ON | |
--without-iconv | --without-iconv | PHP_EXT_ICONV=OFF | |
--without-imap | --without-imap | PHP_EXT_IMAP=OFF | default, PHP <= 8.3 |
--with-imap[=DIR] | --with-imap |
PHP_EXT_IMAP=ON [CCLIENT_ROOT=DIR] |
|
--without-kerberos | N/A | PHP_EXT_IMAP_KERBEROS=OFF | default, PHP <= 8.3 |
--with-kerberos [KERBEROS_CFLAGS=...] [KERBEROS_LIBS=...] |
N/A |
PHP_EXT_IMAP_KERBEROS=ON [KERBEROS_ROOT=...] |
|
--without-imap-ssl | N/A | PHP_EXT_IMAP_SSL=OFF | default, PHP <= 8.3 |
--with-imap-ssl [OPENSSL_CFLAGS=...] [OPENSSL_LIBS=...] |
N/A |
PHP_EXT_IMAP_SSL=ON [OPENSSL_ROOT_DIR=DIR] |
|
--disable-intl | --disable-intl | PHP_EXT_INTL=OFF | default |
--enable-intl [ICU_CFLAGS=...] [ICU_LIBS=...] |
--enable-intl |
PHP_EXT_INTL=ON [ICU_ROOT=DIR] |
|
--enable-intl=shared | --enable-intl=shared | PHP_EXT_INTL_SHARED=ON | |
--without-ldap | --without-ldap | PHP_EXT_LDAP=OFF | default |
--with-ldap[=DIR] | --with-ldap |
PHP_EXT_LDAP=ON [LDAP_ROOT=DIR] |
|
--with-ldap=shared | --with-ldap=shared | PHP_EXT_LDAP_SHARED=ON | |
--without-ldap-sasl | N/A | PHP_EXT_LDAP_SASL=OFF | default |
--with-ldap-sasl [SASL_CFLAGS=...] [SASL_LIBS=...] |
N/A |
PHP_EXT_LDAP_SASL=ON [SASL_ROOT=DIR] |
|
--with-libxml [LIBXML_CFLAGS=...] [LIBXML_LIBS=...] |
--with-libxml |
PHP_EXT_LIBXML=ON [LIBXML2_ROOT=DIR] |
default |
--without-libxml | --without-libxml | PHP_EXT_LIBXML=OFF | |
--disable-mbstring | --disable-mbstring | PHP_EXT_MBSTRING=OFF | default |
--enable-mbstring | --enable-mbstring | PHP_EXT_MBSTRING=ON | |
--enable-mbstring=shared | --enable-mbstring=shared | PHP_EXT_MBSTRING_SHARED=ON | |
--enable-mbregex [ONIG_CFLAGS=...] [ONIG_LIBS=...] |
--enable-mbregex |
PHP_EXT_MBSTRING_MBREGEX=ON [ONIGURUMA_ROOT=DIR] |
default in *nix and CMake (on Windows disabled) |
--disable-mbregex | --disable-mbregex | PHP_EXT_MBSTRING_MBREGEX=OFF | |
--without-mysqli | --without-mysqli | PHP_EXT_MYSQLI=OFF | default |
--with-mysqli | --with-mysqli | PHP_EXT_MYSQLI=ON | |
--with-mysqli=shared | --with-mysqli=shared | PHP_EXT_MYSQLI_SHARED=ON | |
--without-mysql-sock | N/A | PHP_EXT_MYSQL_SOCKET=OFF | default, not available on Windows |
--with-mysql-sock | N/A | PHP_EXT_MYSQL_SOCKET=ON | Not available on Windows |
--with-mysql-sock=SOCKET | N/A |
PHP_EXT_MYSQL_SOCKET=ON PHP_EXT_MYSQL_SOCKET_PATH=/path/to/mysql.sock |
Not available on Windows |
--disable-mysqlnd | --without-mysqlnd | PHP_EXT_MYSQLND=OFF | default in *nix and CMake (on Windows enabled by default) |
--enable-mysqlnd | --with-mysqlnd | PHP_EXT_MYSQLND=ON | |
--enable-mysqlnd=shared | N/A | PHP_EXT_MYSQLND_SHARED=ON | |
--enable-mysqlnd-compression-support | N/A (enabled by default) | PHP_EXT_MYSQLND_COMPRESSION=ON | default |
--disable-mysqlnd-compression-support | N/A | PHP_EXT_MYSQLND_COMPRESSION=OFF | |
--without-mysqlnd-ssl | N/A | PHP_EXT_MYSQLND_SSL=OFF | default, PHP >= 8.4 |
--with-mysqlnd-ssl | N/A | PHP_EXT_MYSQLND_SSL=ON | PHP >= 8.4 |
--without-oci8 | N/A | PHP_EXT_OCI8=OFF | default, PHP <= 8.3 |
--with-oci8[=DIR] | N/A |
PHP_EXT_OCI8=ON [...] |
PHP <= 8.3 |
--with-oci8=shared | N/A | PHP_EXT_OCI8_SHARED=ON | |
N/A | --without-oci8-11g | PHP_EXT_OCI8_11G=OFF | |
N/A | --with-oci8-11g | PHP_EXT_OCI8_11G=ON | |
N/A | --without-oci8-12c | PHP_EXT_OCI8_12C=OFF | |
N/A | --with-oci8-12c | PHP_EXT_OCI8_12C=ON | |
N/A | --without-oci8-19 | PHP_EXT_OCI8_19=OFF | |
N/A | --with-oci8-19 | PHP_EXT_OCI8_19=ON | |
N/A | --disable-odbc | PHP_EXT_ODBC=OFF | default |
N/A | --enable-odbc | PHP_EXT_ODBC=ON | |
N/A | --enable-odbc=shared | PHP_EXT_ODBC_SHARED=ON | |
--without-odbcver | --without-odbcver | PHP_EXT_ODBC_VERSION="0x0350" | default: 0x0350 |
--with-odbcver[=HEX] | --with-odbcver[=HEX] | PHP_EXT_ODBC_VERSION=HEX | default: 0x0350 |
--without-adabas | N/A | default | |
--with-adabas | N/A |
PHP_EXT_ODBC=ON PHP_EXT_ODBC_TYPE=adabas ODBC_LIBRARY=... |
|
--without-sapdb | N/A | default | |
--with-sapdb | N/A |
PHP_EXT_ODBC=ON PHP_EXT_ODBC_TYPE=sapdb ODBC_LIBRARY=... |
|
--without-solid | N/A | default | |
--with-solid | N/A |
PHP_EXT_ODBC=ON PHP_EXT_ODBC_TYPE=solid ODBC_LIBRARY=... |
|
--without-ibm-db2 | N/A | default | |
--with-ibm-db2 | N/A |
PHP_EXT_ODBC=ON PHP_EXT_ODBC_TYPE=ibm-db2 ODBC_LIBRARY=... |
|
--without-empress | N/A | default | |
--with-empress | N/A |
PHP_EXT_ODBC=ON PHP_EXT_ODBC_TYPE=empress ODBC_LIBRARY=... |
|
--without-empress-bcs | N/A | default | |
--with-empress-bcs | N/A |
PHP_EXT_ODBC=ON PHP_EXT_ODBC_TYPE=empress-bcs ODBC_LIBRARY=... |
|
--without-custom-odbc | N/A | default | |
--with-custom-odbc | N/A |
PHP_EXT_ODBC=ON PHP_EXT_ODBC_TYPE=custom ODBC_LIBRARY=... |
|
--without-iodbc | N/A | default | |
--with-iodbc [ODBC_CFLAGS=...] [ODBC_LIBS=...] |
N/A |
PHP_EXT_ODBC=ON PHP_EXT_ODBC_TYPE=iODBC [ODBC_ROOT=DIR] |
|
--without-esoob | N/A | default | |
--with-esoob | N/A |
PHP_EXT_ODBC=ON PHP_EXT_ODBC_TYPE=esoob ODBC_LIBRARY=... |
|
--without-unixODBC | N/A | default | |
--with-unixODBC [ODBC_CFLAGS=...] [ODBC_LIBS=...] |
N/A |
PHP_EXT_ODBC=ON PHP_EXT_ODBC_TYPE=unixODBC [ODBC_ROOT=DIR] |
|
--without-dbmaker | N/A | default | |
--with-dbmaker[=DIR] | N/A |
PHP_EXT_ODBC=ON PHP_EXT_ODBC_TYPE=dbmaker ODBC_LIBRARY=... |
|
--enable-opcache | --enable-opcache | PHP_EXT_OPCACHE=ON | default, will be shared |
--enable-opcache=shared | --enable-opcache=shared | PHP_EXT_OPCACHE=ON | will be shared |
--disable-opcache | --disable-opcache | PHP_EXT_OPCACHE=OFF | |
--enable-huge-code-pages | N/A | PHP_EXT_OPCACHE_HUGE_CODE_PAGES=ON | default; For non-Windows platforms |
--disable-huge-code-pages | N/A | PHP_EXT_OPCACHE_HUGE_CODE_PAGES=OFF | For non-Windows platforms |
--enable-opcache-jit | --enable-opcache-jit | PHP_EXT_OPCACHE_JIT=ON | default |
--disable-opcache-jit | --disable-opcache-jit | PHP_EXT_OPCACHE_JIT=OFF | |
--without-capstone | N/A | PHP_EXT_OPCACHE_CAPSTONE=OFF | default; For non-Windows platforms |
--with-capstone [CAPSTONE_CFLAGS=...] [CAPSTONE_LIBS=...] |
N/A |
PHP_EXT_OPCACHE_CAPSTONE=ON [CAPSTONE_ROOT=DIR] |
For non-Windows platforms |
--without-openssl | --without-openssl | PHP_EXT_OPENSSL=OFF | default |
--with-openssl [OPENSSL_CFLAGS=...] [OPENSSL_LIBS=...] |
--with-openssl |
PHP_EXT_OPENSSL=ON [OPENSSL_ROOT_DIR=DIR] |
|
--with-openssl=shared | --with-openssl=shared | PHP_EXT_OPENSSL_SHARED=ON | |
--without-openssl-argon2 | --without-openssl-argon2 | PHP_EXT_OPENSSL_ARGON2=OFF | default, PHP >= 8.4 |
--with-openssl-argon2 | --with-openssl-argon2 | PHP_EXT_OPENSSL_ARGON2=ON | PHP >= 8.4 |
--without-openssl-legacy-provider | --without-openssl-legacy-provider | PHP_EXT_OPENSSL_LEGACY_PROVIDER=OFF | default, PHP >= 8.4 |
--with-openssl-legacy-provider | --with-openssl-legacy-provider | PHP_EXT_OPENSSL_LEGACY_PROVIDER=ON | PHP >= 8.4 |
--without-kerberos | N/A | PHP_EXT_OPENSSL_KERBEROS=OFF | default, PHP <= 8.3 |
--with-kerberos [KERBEROS_CFLAGS=...] [KERBEROS_LIBS=...] |
N/A |
PHP_EXT_OPENSSL_KERBEROS=ON [KERBEROS_ROOT=DIR] |
PHP <= 8.3 |
--without-system-ciphers | N/A | PHP_EXT_OPENSSL_SYSTEM_CIPHERS=OFF | default |
--with-system-ciphers | N/A | PHP_EXT_OPENSSL_SYSTEM_CIPHERS=ON | |
--disable-pcntl | N/A | PHP_EXT_PCNTL=OFF | default; for *nix platforms only |
--enable-pcntl | N/A | PHP_EXT_PCNTL=ON | for *nix platforms only |
--enable-pcntl=shared | N/A | PHP_EXT_PCNTL_SHARED=ON | for *nix platforms only |
--with-pcre-jit | --with-pcre-jit | PHP_EXT_PCRE_JIT=ON | default |
--without-pcre-jit | --without-pcre-jit | PHP_EXT_PCRE_JIT=OFF | |
--without-external-pcre | N/A | PHP_EXT_PCRE_EXTERNAL=OFF | default |
--with-external-pcre [PCRE2_CFLAGS=...] [PCRE2_LIBS=...] |
N/A |
PHP_EXT_PCRE_EXTERNAL=ON [PCRE_ROOT=DIR] |
|
--enable-pdo | --enable-pdo | PHP_EXT_PDO=ON | default in *nix and CMake (on Windows disabled by default) |
--enable-pdo=shared | --enable-pdo=shared | PHP_EXT_PDO_SHARED=ON | (on Windows can't be built as shared yet) |
--disable-pdo | --disable-pdo | PHP_EXT_PDO=OFF | |
--without-pdo-dblib | --without-pdo-dblib | PHP_EXT_PDO_DBLIB=OFF | default |
--with-pdo-dblib[=DIR] | --with-pdo-dblib |
PHP_EXT_PDO_DBLIB=ON [FREETDS_ROOT=DIR] |
|
--with-pdo-dblib=shared | --with-pdo-dblib=shared | PHP_EXT_PDO_DBLIB_SHARED=ON | |
N/A | --without-pdo-mssql | default | |
N/A | --with-pdo-mssql | ||
N/A | --with-pdo-mssql=shared | ||
--without-pdo-firebird | --without-pdo-firebird | PHP_EXT_PDO_FIREBIRD=OFF | default |
--with-pdo-firebird[=DIR] | --with-pdo-firebird |
PHP_EXT_PDO_FIREBIRD=ON [FIREBIRD_ROOT=DIR] |
|
--with-pdo-firebird=shared | --with-pdo-firebird=shared | PHP_EXT_PDO_FIREBIRD_SHARED=ON | |
--without-pdo-mysql | --without-pdo-mysql | PHP_EXT_PDO_MYSQL=OFF | default |
--with-pdo-mysql | --with-pdo-mysql | PHP_EXT_PDO_MYSQL=ON | |
--with-pdo-mysql=mysqlnd | --with-pdo-mysql=mysqlnd | PHP_EXT_PDO_MYSQL=ON | |
--with-pdo-mysql=shared | --with-pdo-mysql=shared | PHP_EXT_PDO_MYSQL_SHARED=ON | |
--with-pdo-mysql=/usr | --with-pdo-mysql=[DIR] |
PHP_EXT_PDO_MYSQL=ON PHP_EXT_PDO_MYSQL_DRIVER=mysql |
|
--with-pdo-mysql=DIR | --with-pdo-mysql=[DIR] |
PHP_EXT_PDO_MYSQL=ON PHP_EXT_PDO_MYSQL_DRIVER=mysql MYSQL_ROOT=DIR |
|
--with-pdo-mysql=path/to/mysql_config | N/A |
PHP_EXT_PDO_MYSQL=ON PHP_EXT_PDO_MYSQL_DRIVER=mysql MySQL_CONFIG_EXECUTABLE=path/to/mysql_config |
|
--without-pdo-oci | --without-pdo-oci | PHP_EXT_PDO_OCI=OFF | default, PHP <= 8.3 |
--with-pdo-oci[=DIR] | --with-pdo-oci[=DIR] |
PHP_EXT_PDO_OCI=ON [...] |
|
--with-pdo-oci=shared | --with-pdo-oci=shared | PHP_EXT_PDO_OCI_SHARED=ON | |
--without-pdo-odbc | --without-pdo-odbc | PHP_EXT_PDO_ODBC=OFF | default |
--with-pdo-odbc=type | --with-pdo-odbc |
PHP_EXT_PDO_ODBC=ON [PHP_EXT_PDO_ODBC_TYPE=type] |
Default type: unixODBC (Autotools), auto (CMake) |
--with-pdo-odbc=type,dir,libname,ldflags,cflags | --with-pdo-odbc |
PHP_EXT_PDO_ODBC=ON PHP_EXT_PDO_ODBC_TYPE=type [ODBC_ROOT=dir] ODBC_LIBRARY=libname [ODBC_INCLUDE_DIR=includedir] [ODBC_LINK_OPTIONS=ldflags] [ODBC_COMPILE_OPTIONS=cflags] [ODBC_COMPILE_DEFINITIONS=...] |
|
--with-pdo-odbc=shared | --with-pdo-odbc=shared | PHP_EXT_PDO_ODBC_SHARED=ON | |
--without-pdo-pgsql | --without-pdo-pgsql | PHP_EXT_PDO_PGSQL=OFF | default |
--with-pdo-pgsql[=DIR] [PGSQL_CFLAGS=...] [PGSQL_LIBS=...] |
--with-pdo-pgsql |
PHP_EXT_PDO_PGSQL=ON [POSTGRESQL_ROOT=DIR] |
Autotools PGSQL_CFLAGS and PGSQL_LIBS available since PHP >= 8.4 |
--with-pdo-pgsql=shared | --with-pdo-pgsql=shared | PHP_EXT_PDO_PGSQL_SHARED=ON | |
--with-pdo-sqlite [SQLITE_CFLAGS=...] [SQLITE_LIBS=...] |
--with-pdo-sqlite |
PHP_EXT_PDO_SQLITE=ON [SQLITE3_ROOT=DIR] |
default in *nix and CMake (on Windows disabled by default) |
--with-pdo-sqlite=shared | --with-pdo-sqlite=shared | PHP_EXT_PDO_SQLITE_SHARED=ON | |
--without-pdo-sqlite | --without-pdo-sqlite | PHP_EXT_PDO_SQLITE=OFF | |
--without-pgsql | --without-pgsql | PHP_EXT_PGSQL=OFF | default |
--with-pgsql[=DIR] [PGSQL_CFLAGS=...] [PGSQL_LIBS=...] |
--with-pgsql |
PHP_EXT_PGSQL=ON [POSTGRESQL_ROOT=DIR] |
Autotools PGSQL_CFLAGS and PGSQL_LIBS available since PHP >= 8.4 |
--with-pgsql=shared | --with-pgsql=shared | PHP_EXT_PGSQL_SHARED=ON | |
--enable-phar | --enable-phar | PHP_EXT_PHAR=ON | default |
--enable-phar=shared | --enable-phar=shared | PHP_EXT_PHAR_SHARED=ON | |
--disable-phar | --disable-phar | PHP_EXT_PHAR=OFF | |
N/A | --disable-phar-native-ssl | N/A | default |
N/A | --enable-phar-native-ssl | N/A | |
N/A | --enable-phar-native-ssl=shared | N/A | |
--enable-posix | N/A | PHP_EXT_POSIX=ON | default; for *nix platforms only |
--enable-posix=shared | N/A | PHP_EXT_POSIX_SHARED=ON | for *nix platforms only |
--disable-posix | N/A | PHP_EXT_POSIX=OFF | for *nix platforms only |
--without-pspell | --without-pspell | PHP_EXT_PSPELL=OFF | default, PHP <= 8.3 |
--with-pspell[=DIR] | --with-pspell |
PHP_EXT_PSPELL=ON [ASPELL_ROOT=DIR] |
|
--with-pspell=shared | --with-pspell=shared | PHP_EXT_PSPELL_SHARED=ON | |
--without-libedit | --without-readline | PHP_EXT_READLINE=OFF | default |
--with-libedit [EDIT_CFLAGS=...] [EDIT_LIBS=...] |
--with-readline |
PHP_EXT_READLINE=ON [EDITLINE_ROOT=DIR] |
|
--with-libedit=shared | --with-readline=shared | PHP_EXT_READLINE_SHARED=ON | |
--without-readline | --without-readline | PHP_EXT_READLINE=OFF (PHP <= 8.3) | default |
--with-readline[=DIR] | N/A |
PHP_EXT_READLINE=ON PHP_EXT_READLINE_LIBREADLINE=ON (PHP <= 8.3) [READLINE_ROOT=DIR] (PHP <= 8.3) |
|
--with-readline=shared | N/A |
PHP_EXT_READLINE=ON PHP_EXT_READLINE_SHARED=ON PHP_EXT_READLINE_LIBREADLINE=ON (PHP <= 8.3) |
|
--enable-session | --enable-session | PHP_EXT_SESSION=ON | default |
--enable-session=shared | N/A | PHP_EXT_SESSION_SHARED=ON | |
--disable-session | --disable-session | PHP_EXT_SESSION=OFF | |
--without-mm | N/A | PHP_EXT_SESSION_MM=OFF | default |
--with-mm[=DIR] | N/A |
PHP_EXT_SESSION_MM=ON [MM_ROOT=DIR] |
|
--disable-shmop | --disable-shmop | PHP_EXT_SHMOP=OFF | default |
--enable-shmop | --enable-shmop | PHP_EXT_SHMOP=ON | |
--enable-shmop=shared | --enable-shmop=shared | PHP_EXT_SHMOP_SHARED=ON | |
--enable-simplexml | --with-simplexml | PHP_EXT_SIMPLEXML=ON | default |
--enable-simplexml=shared | --with-simplexml=shared | PHP_EXT_SIMPLEXML_SHARED=ON | |
--disable-simplexml | --without-simplexml | PHP_EXT_SIMPLEXML=OFF | |
--without-snmp | --without-snmp | PHP_EXT_SNMP=OFF | default |
--with-snmp[=DIR] | --with-snmp[=DIR] |
PHP_EXT_SNMP=ON [NETSNMP_ROOT=DIR] |
|
--with-snmp=shared | --with-snmp=shared | PHP_EXT_SNMP_SHARED=ON | |
--disable-soap | --disable-soap | PHP_EXT_SOAP=OFF | default |
--enable-soap | --enable-soap | PHP_EXT_SOAP=ON | |
--enable-soap=shared | --enable-soap=shared | PHP_EXT_SOAP_SHARED=ON | |
--disable-sockets | --disable-sockets | PHP_EXT_SOCKETS=OFF | default |
--enable-sockets | --enable-sockets | PHP_EXT_SOCKETS=ON | |
--enable-sockets=shared | --enable-sockets=shared | PHP_EXT_SOCKETS_SHARED=ON | |
--without-sodium | --without-sodium | PHP_EXT_SODIUM=OFF | default |
--with-sodium [LIBSODIUM_CFLAGS=...] [LIBSODIUM_LIBS=..] |
--with-sodium |
PHP_EXT_SODIUM=ON [SODIUM_ROOT=DIR] |
|
--with-sodium=shared | --with-sodium=shared | PHP_EXT_SODIUM_SHARED=ON | |
--with-sqlite3 [SQLITE_CFLAGS=...] [SQLITE_LIBS=...] |
--with-sqlite3 |
PHP_EXT_SQLITE3=ON [SQLITE3_ROOT=DIR] |
default in *nix and CMake (on Windows disabled by default) |
--with-sqlite3=shared | --with-sqlite3=shared | PHP_EXT_SQLITE3_SHARED | |
--without-sqlite3 | --without-sqlite3 | PHP_EXT_SQLITE3=OFF | |
--without-external-libcrypt | N/A | PHP_EXT_STANDARD_CRYPT_EXTERNAL=OFF | default |
--with-external-libcrypt | N/A | PHP_EXT_STANDARD_CRYPT_EXTERNAL=ON | |
--without-password-argon2 | --without-password-argon2 | PHP_EXT_STANDARD_ARGON2=OFF | default |
--with-password-argon2 [ARGON2_CFLAGS=...] [ARGON2_LIBS=...] |
--with-password-argon2 |
PHP_EXT_STANDARD_ARGON2=ON [ARGON2_ROOT=DIR] |
|
--disable-sysvmsg | N/A | PHP_EXT_SYSVMSG=OFF | default; for *nix platforms only |
--enable-sysvmsg | N/A | PHP_EXT_SYSVMSG=ON | for *nix platforms only |
--enable-sysvmsg=shared | N/A | PHP_EXT_SYSVMSG_SHARED=ON | for *nix platforms only |
--disable-sysvsem | N/A | PHP_EXT_SYSVSEM=OFF | default; for *nix platforms only |
--enable-sysvsem | N/A | PHP_EXT_SYSVSEM=ON | for *nix platforms only |
--enable-sysvsem=shared | N/A | PHP_EXT_SYSVSEM_SHARED=ON | for *nix platforms only |
--disable-sysvshm | --disable-sysvshm | PHP_EXT_SYSVSHM=OFF | default |
--enable-sysvshm | --enable-sysvshm | PHP_EXT_SYSVSHM=ON | |
--enable-sysvshm=shared | --enable-sysvshm=shared | PHP_EXT_SYSVSHM_SHARED=ON | |
--without-tidy | --without-tidy | PHP_EXT_TIDY=OFF | default |
--with-tidy[=DIR] | --with-tidy |
PHP_EXT_TIDY=ON [TIDY_ROOT=DIR] |
|
--with-tidy=shared | --with-tidy=shared | PHP_EXT_TIDY_SHARED=ON | |
--enable-tokenizer | --enable-tokenizer | PHP_EXT_TOKENIZER=ON | default |
--enable-tokenizer=shared | --enable-tokenizer=shared | PHP_EXT_TOKENIZER_SHARED=ON | |
--disable-tokenizer | --disable-tokenizer | PHP_EXT_TOKENIZER=OFF | |
--enable-xml | --with-xml | PHP_EXT_XML=ON | default |
--enable-xml=shared | --with-xml=shared | PHP_EXT_XML_SHARED=ON | |
--disable-xml | --without-xml | PHP_EXT_XML=OFF | |
--without-expat | N/A | PHP_EXT_XML_EXPAT=OFF | default |
--with-expat [EXPAT_CFLAGS=...] [EXPAT_LIBS=...] |
N/A |
PHP_EXT_XML_EXPAT=ON [EXPAT_ROOT=DIR] |
|
--enable-xmlreader | --enable-xmlreader | PHP_EXT_XMLREADER=ON | default |
--enable-xmlreader=shared | --enable-xmlreader=shared | PHP_EXT_XMLREADER_SHARED=ON | |
--disable-xmlreader | --disable-xmlreader | PHP_EXT_XMLREADER=OFF | |
--enable-xmlwriter | --enable-xmlwriter | PHP_EXT_XMLWRITER=ON | default |
--enable-xmlwriter=shared | --enable-xmlwriter=shared | PHP_EXT_XMLWRITER_SHARED=ON | |
--disable-xmlwriter | --disable-xmlwriter | PHP_EXT_XMLWRITER=OFF | |
--without-xsl | --without-xsl | PHP_EXT_XSL=OFF | default |
--with-xsl [XSL_CFLAGS=...] [XSL_LIBS=...] [EXSLT_CFLAGS=...] [EXSLT_LIBS=...] |
--with-xsl |
PHP_EXT_XSL=ON [LIBXSLT_ROOT=DIR] [CMAKE_PREFIX_PATH=DIR] |
|
--with-xsl=shared | --with-xsl=shared | PHP_EXT_XSL_SHARED=ON | |
--disable-zend-test | --disable-zend-test | PHP_EXT_ZEND_TEST=OFF | default |
--enable-zend-test | --enable-zend-test | PHP_EXT_ZEND_TEST=ON | |
--enable-zend-test=shared | --enable-zend-test=shared | PHP_EXT_ZEND_TEST_SHARED=ON | |
--without-zip | --disable-zip | PHP_EXT_ZIP=OFF | default in *nix and CMake (on Windows enabled and shared by default) |
--with-zip [LIBZIP_CFLAGS=...] [LIBZIP_LIBS=...] |
--enable-zip |
PHP_EXT_ZIP=ON LIBZIP_ROOT=DIR |
|
--with-zip=shared | --enable-zip=shared | PHP_EXT_ZIP_SHARED=ON | |
--without-zlib | --disable-zlib | PHP_EXT_ZLIB=OFF | default in *nix and CMake (on Windows enabled by default) |
--with-zlib [ZLIB_CFLAGS=...] [ZLIB_LIBS=...] |
--enable-zlib |
PHP_EXT_ZLIB=ON [ZLIB_ROOT=DIR] |
|
--with-zlib=shared | --enable-zlib=shared | PHP_EXT_ZLIB_SHARED=ON | |
PEAR configuration | |||
--without-pear | N/A | PHP_PEAR=OFF | default |
--with-pear[=DIR] | N/A |
PHP_PEAR=ON [PHP_PEAR_DIR=DIR] [PHP_PEAR_TEMP_DIR=DIR] |
|
Autoconf options | |||
--program-prefix=prefix | N/A | PHP_PROGRAM_PREFIX="prefix" | |
--program-suffix=suffix | N/A | PHP_PROGRAM_SUFFIX="suffix" | |
--program-transform-name=expression | N/A | N/A | |
Libtool options | |||
--enable-shared=PKGS | N/A | ||
--enable-static=PKGS | N/A | ||
--enable-fast-install=PKGS | N/A | ||
--with-gnu-ld | N/A | ||
--disable-libtool-lock | N/A | ||
--with-pic | N/A | ||
--with-tags=TAGS | N/A | ||
Windows JScript options | |||
N/A | --with-verbosity | ||
N/A | --without-verbosity | ||
N/A | --with-toolset | ||
N/A | --without-toolset | ||
N/A | --with-cygwin | ||
N/A | --enable-object-out-dir | ||
N/A | --enable-pgi | ||
N/A | --with-pgo | ||
N/A | --with-mp | ||
N/A | --with-php-build | ||
N/A | --with-extra-includes | ||
N/A | --with-extra-libs | ||
N/A | --with-analyzer | ||
N/A | --with-snapshot-template | ||
N/A | --disable-security-flags | ||
N/A | --without-uncritical-warn-choke | ||
N/A | --enable-sanitizer | ||
N/A | --with-codegen-arch | ||
N/A | --with-all-shared | ||
N/A | --with-config-profile | ||
N/A | --disable-test-ini | ||
N/A | --with-test-ini-ext-exclude | ||
N/A | --enable-native-intrinsics | ||
N/A | --disable-vs-link-compat | ||
Other options | |||
--prefix=PREFIX | --with-prefix=PREFIX | CMAKE_INSTALL_PREFIX | |
Influential variables | |||
CC="..." | CMAKE_C_COMPILER="..." | C compiler command | |
CXX="..." | CMAKE_CXX_COMPILER="..." | C++ compiler command | |
CFLAGS="..." | CFLAGS="..." | CFLAGS (environment variable) or CMAKE_C_FLAGS | C compiler flags |
CXXFLAGS="..." | CXXFLAGS (environment variable) or CMAKE_CXX_FLAGS | C++ compiler flags | |
CPPFLAGS="..." | N/A | preprocessor flags | |
CPP="..." | C preprocessor | ||
CXXCPP="..." | C++ preprocessor | ||
LDFLAGS="..." | LDFLAGS="..." |
CMAKE_EXE_LINKER_FLAGS="..." CMAKE_SHARED_LINKER_FLAGS="..." |
linker flags |
LIBS="..." | CMAKE_<LANG>_STANDARD_LIBRARIES | libraries to pass to the linker | |
PHP_EXTRA_VERSION="-acme" | PHP_VERSION_LABEL="-acme" | -dev or empty | |
PHP_UNAME="ACME Linux" | PHP_UNAME="ACME Linux" | uname -a output override |
|
PHP_BUILD_SYSTEM="ACME Linux" | PHP_BUILD_SYSTEM="Microsoft Windows..." | PHP_BUILD_SYSTEM="..." | Builder system name, defaults to uname -a output |
PHP_BUILD_PROVIDER="ACME" | PHP_BUILD_PROVIDER="ACME" | PHP_BUILD_PROVIDER="ACME" | Build provider |
PHP_BUILD_COMPILER="..." | PHP_BUILD_COMPILER="..." | PHP_BUILD_COMPILER="..." | Compiler used for build |
PHP_BUILD_ARCH="..." | PHP_BUILD_ARCH="..." | PHP_BUILD_ARCH="..." | Build architecture |
EXTENSION_DIR="path/to/ext" | PHP_EXTENSION_DIR="path/to/ext" | Override the INI extension_dir | |
PKG_CONFIG="path/to/pkgconf" | PKG_CONFIG_EXECUTABLE="path/to/pkgconf" | path to pkg-config utility | |
PKG_CONFIG_PATH="..." | ENV{PKG_CONFIG_PATH}="..." (environment variable) | directories to add to pkg-config's search path | |
PKG_CONFIG_LIBDIR="..." | path overriding pkg-config's built-in search path |
When running make VAR=VALUE
commands, the following environment variables can
be used:
make with Autotools | CMake | Default value/notes |
---|---|---|
EXTRA_CFLAGS="..." |
Append additional CFLAGS | |
EXTRA_LDFLAGS="..." |
Append additional LDFLAGS | |
INSTALL_ROOT=... |
DESTDIR=... |
Override the installation dir |
or DESTDIR=... cmake --install |