- 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-buildThe -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-buildTo 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>_ROOTvariablesPath 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
CMake presets are a convenient way to save and share common build configurations
in the project. Instead of typing long cmake -DVAR=value commands every time,
presets can define reusable named setups in JSON files like
CMakePresets.json. This makes builds more
consistent across machines and CI systems, and simplifies local development too.
In this repository, 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 -jCMake 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.
Custom local build configuration can be also stored in a Git-ignored file
CMakeUserPresets.json intended to override the defaults in
CMakePresets.json. For example, creating the following CMakeUserPresets.json
file at the root of the repository, provides customizing the defaults:
{
"version": 4,
"configurePresets": [
{
"name": "my-windows",
"inherits": "windows",
"displayName": "My Windows configuration",
"binaryDir": "${sourceDir}/php-build/default",
"installDir": "c:/tmp",
"cacheVariables": {
"PHP_EXT_FOO": true,
"PHP_...": true,
}
}
]
}Some useful overridable configuration options built into CMake itself. All these
CMAKE_* variables are also documented in the CMake documentation.
-
CMAKE_EXPORT_COMPILE_COMMANDS=ON|OFFDefault:
OFFCreate compilation database file
compile_commands.jsonduring generation. Various other development tools can then use it. For example,clang-check. -
CMAKE_INTERPROCEDURAL_OPTIMIZATION=ON|OFFDefault:
ONRun link-time optimizer on all targets if interprocedural optimization (IPO) is supported by the compiler and PHP code.
-
CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG>=ON|OFFEnable or disable IPO based on the build type (
CMAKE_BUILD_TYPE). For example, to disable IPO for theDebugbuild type setCMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUGtoOFF.
-
-
CMAKE_LIBRARY_PATHDefault: 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|OFFDefault:
OFFShow/hide context in configuration log ([ext/foo] Checking for...).
-
CMAKE_SKIP_RPATH=ON|OFFDefault:
OFFControls 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/libraryat build time.See the RUNPATH in the executable:
objdump -x ./php-src/sapi/cli/php | grep 'R.*PATH'
-
CMAKE_SKIP_BUILD_RPATH=ON|OFFDefault:
OFFDisable runtime library search paths (rpath) in build directory executables.
-
CMAKE_SKIP_INSTALL_RPATH=ON|OFFDefault:
OFFDisable runtime library search paths (rpath) in installation directory executables.
-
PHP_ZEND_FIBER_ASMPHP_ZEND_GLOBAL_REGISTER_VARIABLESPHP_ZEND_MAX_EXECUTION_TIMERSPHP_ZEND_SIGNALS
bcmathbz2calendarcom_dotnetctypecurldatedbadl_testdomenchantexifffifileinfofilterftpgdgettextgmphashiconvintljsonldaplibxmlmbstringmysqlimysqlndodbcopcacheopensslpcntlpcrepdopdo_dblibpdo_firebirdpdo_mysqlpdo_odbcpdo_pgsqlpdo_sqlitepgsqlpharposixrandomreadlinereflectionsessionshmopsimplexmlskeletonsnmpsoapsocketssodiumsplsqlite3standardsysvmsgsysvsemsysvshmtidytokenizerxmlxmlreaderxmlwriterxslzend_testzipzlib
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 defaultThe 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-directoryckey will run the configuration stepgkey will run the generation step (you might need to presscagain)
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 -jccmake 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 in Autotools and JScript Windows, in CMake default build type is Debug | |
| --enable-debug | --enable-debug |
Single configuration generators: CMAKE_BUILD_TYPE=DebugMulti 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=PhpRelWithDebInfoMulti configuration generators: cmake --build dir --config PhpRelWithDebInfo
|
|
| --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_COVERAGE=OFF | default |
| --enable-gcov | N/A | PHP_COVERAGE=ON | |
| --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 | |
| --disable-system-glob | N/A | PHP_SYSTEM_GLOB=OFF | default, PHP >= 8.5 |
| --enable-system-glob | N/A | PHP_SYSTEM_GLOB=ON | PHP >= 8.5 |
| --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 | PHP_ZEND_GLOBAL_REGISTER_VARIABLES=ON | default |
| --disable-gcc-global-regs | N/A | PHP_ZEND_GLOBAL_REGISTER_VARIABLES=OFF | |
| --enable-fiber-asm | N/A | PHP_ZEND_FIBER_ASM=ON | default, *nix only |
| --disable-fiber-asm | N/A | PHP_ZEND_FIBER_ASM=OFF | *nix only |
| --enable-zend-signals | N/A | PHP_ZEND_SIGNALS=ON | default, *nix only |
| --disable-zend-signals | N/A | PHP_ZEND_SIGNALS=OFF | *nix only |
| --disable-zend-max-execution-timers | N/A | PHP_ZEND_MAX_EXECUTION_TIMERS=OFF | default, *nix only |
| --enable-zend-max-execution-timers | N/A | PHP_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 |
| N/A | N/A | PHP_SAPI_APACHE2HANDLER_INSTALL_DIR=<dir> | |
| --disable-apache2-conf | N/A | PHP_SAPI_APACHE2HANDLER_INSTALL_CONFIG=OFF | Default in CMake; In Autotools since PHP >= 8.6 |
| --enable-apache2-conf | N/A | PHP_SAPI_APACHE2HANDLER_INSTALL_CONFIG=ON | Default in Autotools; In Autotools since PHP >= 8.6 |
| --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 | In Autotools will be build as shared, in CMake shared and static |
| --enable-embed=shared | N/A | PHP_SAPI_EMBED=ON | |
| --enable-embed=static | --enable-embed | PHP_SAPI_EMBED=ON | |
| --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 | |
| 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 | |
| --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 | |
| --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 | |
| 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 | Windows only |
| N/A | --disable-com-dotnet | PHP_EXT_COM_DOTNET=OFF | Windows only |
| N/A | N/A | PHP_EXT_COM_DOTNET_ENABLE_DOTNET=ON | default; Windows only; enables the .NET Framework support |
| N/A | N/A | PHP_EXT_COM_DOTNET_ENABLE_DOTNET=OFF | Windows only; disables the .NET Framework support |
| --enable-ctype | --enable-ctype | PHP_EXT_CTYPE=ON | default |
| --enable-ctype=shared | --enable-ctype=shared | PHP_EXT_CTYPE=shared | |
| --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 | |
| --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 | |
| --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 | N/A | default |
| --with-gdbm[=DIR] | N/A | N/A | |
| --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 | |
| --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 | |
| --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 | |
| --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 | |
| --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 | |
| --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 | |
| --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 | |
| --without-ftp-ssl | N/A | PHP_EXT_FTP_SSL=OFF | PHP >= 8.4 (default in Autotools) |
| --with-ftp-ssl | N/A | PHP_EXT_FTP_SSL=ON | PHP >= 8.4 (default in CMake) |
| --without-openssl-dir | N/A | PHP_EXT_FTP_SSL=OFF | PHP <= 8.3 (default in Autotools) |
| --with-openssl-dir | N/A | PHP_EXT_FTP_SSL=ON | PHP <= 8.3 (default in CMake) |
| --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 | 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-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] |
|
| --without-heif | --without-heif | PHP_EXT_GD_HEIF=OFF | PHP >= 8.6; default in Autotools and CMake |
|
--with-heif [HEIF_CFLAGS=...] [HEIF_LIBS=...] |
--with-heif |
PHP_EXT_GD_HEIF=ON [libheif_DIR=DIR] |
PHP >= 8.6; default in JScript Windows |
| --without-imagequant | --without-imagequant | PHP_EXT_GD_IMAGEQUANT=OFF | PHP >= 8.6; default |
| --with-imagequant | --with-imagequant |
PHP_EXT_GD_IMAGEQUANT=ON [Imagequant_ROOT=DIR] |
PHP >= 8.6 |
| --disable-gd-jis-conv | N/A | PHP_EXT_GD_JIS=OFF | default |
| --enable-gd-jis-conv | N/A | PHP_EXT_GD_JIS=ON | |
| --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] |
|
| N/A | --without-jxl | PHP_EXT_GD_JXL=OFF | PHP >= 8.6; default in CMake |
| N/A | --with-jxl |
PHP_EXT_GD_JXL=ON [JXL_ROOT=DIR] |
PHP >= 8.6; default in JScript Windows |
|
[PNG_CFLAGS=...] [PNG_LIBS=...] [ZLIB_CFLAGS=...] [ZLIB_LIBS=...] |
N/A |
[PNG_ROOT=DIR] [ZLIB_ROOT=DIR] |
|
| --without-tiff | --without-tiff | PHP_EXT_GD_TIFF=OFF | PHP >= 8.6; default |
|
--with-tiff [TIFF_CFLAGS=...] [TIFF_LIBS=...] |
--with-tiff |
PHP_EXT_GD_TIFF=ON [TIFF_ROOT=DIR] |
PHP >= 8.6 |
| --without-uhdr | --without-uhdr | PHP_EXT_GD_UHDR=OFF | PHP >= 8.6; default in Autotools and CMake |
|
--with-uhdr [UHDR_CFLAGS=...] [UHDR_LIBS=...] |
--with-uhdr |
PHP_EXT_GD_UHDR=ON [UHDR_ROOT=DIR] |
PHP >= 8.6; 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-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-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 | |
| --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 | |
| --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 | |
| --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 | |
| --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 | |
| --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 | |
|
--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 | |
| --without-mysql-sock | N/A | PHP_EXT_MYSQLI_SOCKET=OFF | default, not available on Windows |
| --with-mysql-sock | N/A | PHP_EXT_MYSQLI_SOCKET=ON | Not available on Windows |
| --with-mysql-sock=SOCKET | N/A | PHP_EXT_MYSQLI_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 | |
| --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 | PHP >= 8.4 (default in Autotools) |
| --with-mysqlnd-ssl | N/A | PHP_EXT_MYSQLND_SSL=ON | PHP >= 8.4 (default in CMake) |
| --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 | |
| 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 | |
| --without-odbcver | --without-odbcver | PHP_EXT_ODBC_VERSION="0x0350" | default: 0x0350; removed since PHP >= 8.5 |
| --with-odbcver[=HEX] | --with-odbcver[=HEX] | PHP_EXT_ODBC_VERSION=HEX | default: 0x0350; removed since PHP >= 8.5 |
| --without-adabas | N/A | default; removed since PHP >= 8.5 | |
| --with-adabas | N/A |
PHP_EXT_ODBC=ON PHP_EXT_ODBC_TYPE=adabas ODBC_LIBRARY=... |
removed since PHP >= 8.5 |
| --without-sapdb | N/A | default; removed since PHP >= 8.5 | |
| --with-sapdb | N/A |
PHP_EXT_ODBC=ON PHP_EXT_ODBC_TYPE=sapdb ODBC_LIBRARY=... |
removed since PHP >= 8.5 |
| --without-solid | N/A | default; removed since PHP >= 8.5 | |
| --with-solid | N/A |
PHP_EXT_ODBC=ON PHP_EXT_ODBC_TYPE=solid ODBC_LIBRARY=... |
removed since PHP >= 8.5 |
| --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; removed since PHP >= 8.5 | |
| --with-empress | N/A |
PHP_EXT_ODBC=ON PHP_EXT_ODBC_TYPE=empress ODBC_LIBRARY=... |
removed since PHP >= 8.5 |
| --without-empress-bcs | N/A | default; removed since PHP >= 8.5 | |
| --with-empress-bcs | N/A |
PHP_EXT_ODBC=ON PHP_EXT_ODBC_TYPE=empress-bcs ODBC_LIBRARY=... |
removed since PHP >= 8.5 |
| --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; removed since PHP >= 8.5 | |
| --with-esoob | N/A |
PHP_EXT_ODBC=ON PHP_EXT_ODBC_TYPE=esoob ODBC_LIBRARY=... |
removed since PHP >= 8.5 |
| --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; removed since PHP >= 8.5 | |
| --with-dbmaker[=DIR] | N/A |
PHP_EXT_ODBC=ON PHP_EXT_ODBC_TYPE=dbmaker ODBC_LIBRARY=... |
removed since PHP >= 8.5 |
| --enable-opcache | --enable-opcache | PHP_EXT_OPCACHE=ON | default, will be shared; removed since PHP >= 8.5 |
| --enable-opcache=shared | --enable-opcache=shared | PHP_EXT_OPCACHE=ON | will be shared; removed since PHP >= 8.5 |
| --disable-opcache | --disable-opcache | PHP_EXT_OPCACHE=OFF | removed since PHP >= 8.5 |
| --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 | |
| --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 | 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 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 | |
| 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 | |
| --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 | |
| --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 |
|
| N/A | N/A | PHP_EXT_PDO_MYSQL_SOCKET=OFF | default, not available on Windows |
| N/A | N/A | PHP_EXT_PDO_MYSQL_SOCKET=ON | Not available on Windows |
| N/A | N/A | PHP_EXT_PDO_MYSQL_SOCKET_PATH=/path/to/mysql.sock | Not available on Windows |
| --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 | |
| --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 | |
| --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 | |
|
--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 | |
| --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 | |
| --enable-phar | --enable-phar | PHP_EXT_PHAR=ON | default |
| --enable-phar=shared | --enable-phar=shared | PHP_EXT_PHAR=shared | |
| --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 | 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 | |
| --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 | |
| --without-readline | --without-readline | PHP_EXT_READLINE=OFF | default |
| --with-readline[=DIR] | N/A | N/A | |
| --with-readline=shared | N/A | N/A | |
| --enable-session | --enable-session | PHP_EXT_SESSION=ON | default |
| --enable-session=shared | N/A | PHP_EXT_SESSION=shared | |
| --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 | |
| --enable-simplexml | --with-simplexml | PHP_EXT_SIMPLEXML=ON | default |
| --enable-simplexml=shared | --with-simplexml=shared | PHP_EXT_SIMPLEXML=shared | |
| --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 | |
| --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 | |
| --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 | |
| --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 | |
|
--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 | 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 | 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 | |
| --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 | |
| --enable-tokenizer | --enable-tokenizer | PHP_EXT_TOKENIZER=ON | default |
| --enable-tokenizer=shared | --enable-tokenizer=shared | PHP_EXT_TOKENIZER=shared | |
| --disable-tokenizer | --disable-tokenizer | PHP_EXT_TOKENIZER=OFF | |
| --without-external-uriparser | N/A | PHP_EXT_URI_EXTERNAL=OFF | default; PHP >= 8.5 |
|
--with-external-uriparser [LIBURIPARSER_CFLAGS=...] [LIBURIPARSER_LIBS=...] |
N/A |
PHP_EXT_URI_EXTERNAL=ON [URIPARSER_ROOT=...] |
PHP >= 8.5 |
| --enable-xml | --with-xml | PHP_EXT_XML=ON | default |
| --enable-xml=shared | --with-xml=shared | PHP_EXT_XML=shared | |
| --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 | |
| --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 | |
| --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 | |
| --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 | |
| --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 | |
| --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 | |
| PEAR configuration | |||
| --without-pear | N/A | PHP_PEAR=OFF | default |
| --with-pear[=DIR] | N/A |
PHP_PEAR=ON [PHP_PEAR_INSTALL_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 | ||
| --enable-pic | N/A | N/A | PHP >= 8.6 |
| --disable-pic | N/A | N/A | PHP >= 8.6 |
| --with-pic | N/A | N/A | removed since PHP >= 8.6 (replaced with --enable-pic) |
| --without-pic | N/A | N/A | removed since PHP >= 8.6 (replaced with --disable-pic) |
| --with-tags=TAGS | N/A | ||
| Windows JScript options | |||
| N/A | --with-verbosity=1 | CMAKE_VERBOSE_MAKEFILE=OFF | default |
| N/A | --with-verbosity=2 | CMAKE_VERBOSE_MAKEFILE=ON | |
| N/A | --without-verbosity | CMAKE_VERBOSE_MAKEFILE=OFF | |
| N/A | --with-toolset=vs | default | |
| N/A | --with-toolset=clang | cmake -G "Visual Studio 2022" -T ClangCL | default |
| N/A | --with-toolset=icc | cmake -G Ninja -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx | |
| N/A | --without-toolset | ||
| N/A | --with-cygwin[='\\cygwin'] | N/A | default |
| N/A | --without-cygwin | N/A | |
| N/A | --disable-object-out-dir | N/A | default |
| N/A | --enable-object-out-dir=DIR | N/A | |
| N/A | --enable-pgi | ||
| N/A | --with-pgo | ||
| N/A | --with-mp | ||
| N/A | --with-php-build | ||
| N/A | --without-extra-includes | N/A | default |
| N/A | --with-extra-includes | N/A | |
| N/A | --without-extra-libs | N/A | default |
| N/A | --with-extra-libs | N/A | |
| N/A | --with-analyzer | ||
| N/A | --with-snapshot-template | ||
| N/A | --disable-security-flags | ||
| N/A | --without-uncritical-warn-choke | Removed since PHP >= 8.4 | |
| N/A | --with-uncritical-warn-choke | Automatically enabled when using Clang. Removed since PHP >= 8.4 | |
| 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=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_INIT="..." CMAKE_MODULE_LINKER_FLAGS_INIT="..." CMAKE_SHARED_LINKER_FLAGS_INIT="..." CMAKE_STATIC_LINKER_FLAGS_INIT="..." |
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 |



