Skip to content

Latest commit

 

History

History
3461 lines (3329 loc) · 78.5 KB

configuration.md

File metadata and controls

3461 lines (3329 loc) · 78.5 KB

PHP build system configuration

Index

Build configuration can be passed on the command line at the configuration phase with the -D options:

cmake -DCMAKE_FOO=ON -DPHP_BAR -DZEND_BAZ -DEXT_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 variables

    Path where to look for PackageName, when calling the find_package(<PackageName> ...) command.

    cmake -DIconv_ROOT=/path/to/libiconv -DSQLite3_ROOT=/path/to/sqlite3 -S php-src -B php-build

1. CMake presets

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.

2. CMake configuration

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=OFF|ON

    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 the Debug build type set CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG to OFF.

  • 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=OFF|ON

    Default: OFF

    Show/hide context in configuration log ([ext/foo] Checking for...).

  • BUILD_SHARED_LIBS=OFF|ON

    Default: OFF

    Build all enabled PHP extensions as shared libraries.

  • CMAKE_SKIP_RPATH=OFF|ON

    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=OFF|ON

      Default: OFF

      Disable runtime library search paths (rpath) in build directory executables.

    • CMAKE_SKIP_INSTALL_RPATH=OFF|ON

      Default: OFF

      Disable runtime library search paths (rpath) in installation directory executables.

3. PHP configuration

  • PHP_RE2C_CGOTO=OFF|ON

    Default: OFF

    Enable the goto C statements when using re2c.

  • PHP_BUILD_ARCH

    Default: ${CMAKE_SYSTEM_PROCESSOR}

    Build target architecture displayed in phpinfo.

  • PHP_BUILD_COMPILER

    Default: ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}

    Compiler used for build displayed in phpinfo.

  • PHP_BUILD_PROVIDER

    Default empty

    Build provider displayed in phpinfo.

  • SED_EXECUTABLE

    Default path to the sed on the host system.

    Path to the sed, which can be manually overridden to the sed on the target system. This is only used in generated phpize (and php-config) scripts on *nix systems.

  • PHP_CCACHE=ON|OFF

    Default: ON

    If ccache is installed on the system it will be used for faster compilation time. If not found, it is not used. It can be explicitly turned off with this option or by setting environment variable CCACHE_DISABLE=1. A custom path to the ccache installation directory can be also set with the Ccache_ROOT.

4. Zend engine configuration

5. PHP SAPI modules configuration

6. PHP extensions configuration

  • EXT_ODBC=OFF|ON

    Default: OFF

    Whether to enable the odbc extension.

    • EXT_ODBC_TYPE

      Default: unixODBC

      Select the ODBC type. Can be adabas, dbmaker, empress-bcs, empress, esoob, ibm-db2, iODBC, sapdb, solid, unixODBC, or generic.

    • EXT_ODBC_VERSION

      Force support for the passed ODBC version. A hex number is expected. Set it to empty value to prevent an explicit ODBCVER to be defined. By default it is set to the highest supported ODBC version by PHP.

  • EXT_PDO_MYSQL=OFF|ON

    Default: OFF

    Whether to enable the pdo_mysql extension.

    • EXT_PDO_MYSQL_DRIVER=mysqlnd|mysql

      Default: mysqlnd

      Select the MySQL driver for pdo_mysql extension.

  • EXT_PDO_ODBC=OFF|ON

    Default: OFF

    Whether to enable the pdo_odbc extension.

    • EXT_PDO_ODBC_TYPE=ibm-db2|iODBC|unixODBC|generic

      Default: unixODBC

      Select the ODBC type.

    • EXT_PDO_ODBC_ROOT

      Path to the ODBC library root directory.

    • EXT_PDO_ODBC_LIBRARY

      Set the ODBC library name.

    • EXT_PDO_ODBC_CFLAGS

      A list of additional ODBC library compile flags.

    • EXT_PDO_ODBC_LDFLAGS

      A list of additional ODBC library linker flags.

7. CMake GUI

With CMake there comes also a basic graphical user interface to configure and generate the build system.

Inside a CMake project, run:

cmake-gui .

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.

CMake GUI setup

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.

CMake GUI configuration

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

8. Command-line interface ccmake

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 .

The ccmake GUI

  • c key will run the configuration step
  • g key will run the generation step (you might need to press c 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.

9. Configuration options mapping: Autotools, Windows JScript, and CMake

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_CGOTO=OFF default
 --enable-re2c-cgoto N/A PHP_RE2C_CGOTO=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 N/A default
 --enable-debug-assertions N/A Single configuration generators: CMAKE_BUILD_TYPE=DebugAssertions
Multi configuration generators: cmake --build dir --config DebugAssertions
N/A --disable-debug-pack default
N/A --enable-debug-pack
--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 PHP_DTRACE=OFF default
 --enable-dtrace PHP_DTRACE=ON
--disable-fd-setsize PHP_FD_SETSIZE="" default
 --enable-fd-setsize=NUM PHP_FD_SETSIZE=NUM
--without-valgrind PHP_VALGRIND=OFF default
 --with-valgrind
 [VALGRIND_CFLAGS=...]
 [VALGRIND_LIBS=...]
PHP_VALGRIND=ON
[Valgrind_ROOT=DIR]
--with-libdir=NAME CMAKE_INSTALL_LIBDIR=NAME See GNUInstallDirs
--with-layout=PHP|GNU PHP_LAYOUT=PHP|GNU 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 PHP_DMALLOC=OFF default
 --enable-dmalloc 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 (only for *nix)
 --with-config-file-path=PATH N/A PHP_CONFIG_FILE_PATH=PATH (only for *nix)
--disable-gcov PHP_GCOV=OFF default
 --enable-gcov PHP_GCOV=ON
[Gcov_ROOT=DIR]
--enable-rpath CMAKE_SKIP_RPATH=OFF
CMAKE_SKIP_INSTALL_RPATH=OFF
CMAKE_SKIP_BUILD_RPATH=OFF
default
 --disable-rpath CMAKE_SKIP_RPATH=ON
or CMAKE_SKIP_INSTALL_RPATH=ON
and/or CMAKE_SKIP_BUILD_RPATH=ON
--disable-libgcc PHP_LIBGCC=OFF default
 --enable-libgcc PHP_LIBGCC=ON
--enable-all --enable-snapshot-build Use cmake --preset all-enabled Enables all extensions and some additional configuration
--disable-all --disable-all Use cmake --preset all-disabled Disables all extensions and some additional configuration
Zend engine configuration
--enable-gcc-global-regs N/A ZEND_GCC_GLOBAL_REGS=ON default
 --disable-gcc-global-regs N/A ZEND_GCC_GLOBAL_REGS=OFF
--enable-fiber-asm N/A ZEND_FIBER_ASM=ON default
 --disable-fiber-asm N/A ZEND_FIBER_ASM=OFF
--enable-zend-signals N/A ZEND_SIGNALS=ON default
 --disable-zend-signals N/A ZEND_SIGNALS=OFF
--disable-zend-max-execution-timers N/A ZEND_MAX_EXECUTION_TIMERS=OFF default
 --enable-zend-max-execution-timers N/A ZEND_MAX_EXECUTION_TIMERS=ON
PHP SAPI modules configuration
--without-apxs2 --disable-apache2handler or --disable-apache2-4handler 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 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 SAPI_CGI=ON default
 --disable-cgi --disable-cgi SAPI_CGI=OFF
--enable-cli --enable-cli SAPI_CLI=ON default
 --disable-cli --disable-cli SAPI_CLI=OFF
--disable-cli-win32 SAPI_CLI_WIN_NO_CONSOLE=OFF default; Windows only
--enable-cli-win32 SAPI_CLI_WIN_NO_CONSOLE=ON Windows only
--disable-embed --disable-embed SAPI_EMBED=OFF default
 --enable-embed --enable-embed SAPI_EMBED=ON will be build as shared
 --enable-embed=shared N/A SAPI_EMBED=ON
SAPI_EMBED_SHARED=ON
will be build as shared
 --enable-embed=static --enable-embed SAPI_EMBED=ON
SAPI_EMBED_SHARED=OFF
--disable-fpm N/A SAPI_FPM=OFF default
 --enable-fpm N/A SAPI_FPM=ON
 [--with-fpm-user=USER] N/A [SAPI_FPM_USER=USER] default: nobody
 [--with-fpm-group=GROUP] N/A [SAPI_FPM_GROUP=GROUP] default: nobody
 --without-fpm-systemd N/A SAPI_FPM_SYSTEMD=OFF default
 --with-fpm-systemd
 [SYSTEMD_CFLAGS=...]
 [SYSTEMD_LIBS=...]
N/A SAPI_FPM_SYSTEMD=ON
[Systemd_ROOT=DIR]
 --without-fpm-acl N/A SAPI_FPM_ACL=OFF default
 --with-fpm-acl N/A SAPI_FPM_ACL=ON
[ACL_ROOT=DIR]
 --without-fpm-apparmor N/A SAPI_FPM_APPARMOR=OFF default
 --with-fpm-apparmor N/A SAPI_FPM_APPARMOR=ON
[AppArmor_ROOT=DIR]
 --without-fpm-selinux N/A SAPI_FPM_SELINUX=OFF default
 --with-fpm-selinux N/A SAPI_FPM_SELINUX=ON
[SELinux_ROOT=DIR]
--disable-fuzzer N/A SAPI_FUZZER=OFF default
 --enable-fuzzer
 [LIB_FUZZING_ENGINE=...]
N/A SAPI_FUZZER=ON
--disable-litespeed N/A SAPI_LITESPEED=OFF default
 --enable-litespeed N/A SAPI_LITESPEED=ON
--enable-phpdbg --enable-phpdbg SAPI_PHPDBG=ON default in *nix and CMake (on Windows disabled by default)
 --disable-phpdbg --disable-phpdbg SAPI_PHPDBG=OFF
 --disable-phpdbg-debug --disable-phpdbg-debug SAPI_PHPDBG_DEBUG=OFF default (on Windows since PHP >= 8.4)
 --enable-phpdbg-debug --enable-phpdbg-debug SAPI_PHPDBG_DEBUG=ON (on Windows since PHP >= 8.4)
 --disable-phpdbg-readline N/A SAPI_PHPDBG_READLINE=OFF default
 --enable-phpdbg-readline N/A SAPI_PHPDBG_READLINE=ON
N/A --disable-phpdbgs SAPI_PHPDBG_SHARED=OFF default
N/A --enable-phpdbgs SAPI_PHPDBG_SHARED=ON
PHP extensions
--disable-bcmath --disable-bcmath EXT_BCMATH=OFF default in *nix and CMake (on Windows enabled by default)
 --enable-bcmath --enable-bcmath EXT_BCMATH=ON
 --enable-bcmath=shared --enable-bcmath=shared EXT_BCMATH_SHARED=ON
--without-bz2 --without-bz2 EXT_BZ2=OFF default
 --with-bz2[=DIR] --with-bz2 EXT_BZ2=ON
[BZip2_ROOT=DIR]
 --with-bz2=shared --with-bz2=shared EXT_BZ2_SHARED=ON
--disable-calendar --disable-calendar EXT_CALENDAR=OFF default in *nix and CMake (on Windows enabled by default)
 --enable-calendar --enable-calendar EXT_CALENDAR=ON
 --enable-calendar=shared --enable-calendar=shared EXT_CALENDAR_SHARED=ON
N/A --enable-com-dotnet EXT_COM_DOTNET=ON default; Windows only
N/A --enable-com-dotnet=shared EXT_COM_DOTNET_SHARED=ON Windows only
N/A --disable-com-dotnet EXT_COM_DOTNET=OFF Windows only
--enable-ctype --enable-ctype EXT_CTYPE=ON default
 --enable-ctype=shared --enable-ctype=shared EXT_CTYPE_SHARED=ON
 --disable-ctype --disable-ctype EXT_CTYPE=OFF
--without-curl --without-curl EXT_CURL=OFF default
 --with-curl
 [CURL_CFLAGS=...]
 [CURL_LIBS=...]
 [CURL_FEATURES=...]
--with-curl EXT_CURL=ON
[CURL_ROOT=DIR]
 --with-curl=shared --with-curl=shared EXT_CURL_SHARED=ON
--disable-dba EXT_DBA=OFF default
 --enable-dba EXT_DBA=ON
 --enable-dba=shared EXT_DBA_SHARED=ON
 --with-flatfile EXT_DBA_FLATFILE=ON default
 --without-flatfile EXT_DBA_FLATFILE=OFF
 --with-inifile EXT_DBA_INIFILE=ON default
 --without-inifile EXT_DBA_INIFILE=OFF
 --without-qdbm EXT_DBA_QDBM=OFF default
 --with-qdbm[=DIR] EXT_DBA_QDBM=ON
[QDBM_ROOT=DIR]
 --without-gdbm EXT_DBA_GDBM=OFF default
 --with-gdbm[=DIR] EXT_DBA_GDBM=ON
[GDBM_ROOT=DIR]
 --without-ndbm EXT_DBA_NDBM=OFF default
 --with-ndbm[=DIR] EXT_DBA_NDBM=ON
[Ndbm_ROOT=DIR]
 --without-db4 EXT_DBA_DB=OFF default
 --with-db4[=DIR] EXT_DBA_DB=ON
[BerkeleyDB_ROOT=DIR]
 --without-db3 EXT_DBA_DB3=OFF default
 --with-db3 EXT_DBA_DB3=ON
 --without-db2 EXT_DBA_DB2=OFF default
 --with-db2 EXT_DBA_DB2=ON
 --without-db1 EXT_DBA_DB1=OFF default
 --with-db1 EXT_DBA_DB1=ON
 --without-dbm EXT_DBA_DBM=OFF default
 --with-dbm[=DIR] EXT_DBA_DBM=ON
[Dbm_ROOT=DIR]
 --without-tcadb EXT_DBA_TCADB=OFF default
 --with-tcadb[=DIR] EXT_DBA_TCADB=ON
[TokyoCabinet_ROOT=DIR]
 --without-lmdb EXT_DBA_LMDB=OFF default
 --with-lmdb[=DIR] EXT_DBA_LMDB=ON
[LMDB_ROOT=DIR]
 --with-cdb EXT_DBA_CDB=ON default
 --with-cdb=DIR EXT_DBA_CDB_EXTERNAL=ON
Cdb_ROOT=DIR
 --without-cdb EXT_DBA_CDB=OFF
--disable-dl-test --disable-dl-test EXT_DL_TEST=OFF default
 --enable-dl-test --enable-dl-test EXT_DL_TEST=ON will be shared
 --enable-dl-test=shared --enable-dl-test=shared EXT_DL_TEST=ON will be shared
--enable-dom --enable-dom EXT_DOM=ON default
 --enable-dom=shared --enable-dom=shared EXT_DOM_SHARED=ON
 --disable-dom --disable-dom EXT_DOM=OFF
--without-enchant --without-enchant EXT_ENCHANT=OFF default
 --with-enchant
 [ENCHANT_CFLAGS=...]
 [ENCHANT_LIBS=...]
 [ENCHANT2_CFLAGS=...]
 [ENCHANT2_LIBS=...]
--with-enchant EXT_ENCHANT=ON
[Enchant_ROOT=DIR]
 --with-enchant=shared --with-enchant=shared EXT_ENCHANT_SHARED=ON
--disable-exif --disable-exif EXT_EXIF=OFF default
 --enable-exif --enable-exif EXT_EXIF=ON
 --enable-exif=shared --enable-exif=shared EXT_EXIF_SHARED=ON
--without-ffi --without-ffi EXT_FFI=OFF default
 --with-ffi
 [FFI_CFLAGS=...]
 [FFI_LIBS=...]
--with-ffi EXT_FFI=ON
[FFI_ROOT=DIR]
 --with-ffi=shared --with-ffi=shared EXT_FFI_SHARED=ON
--enable-fileinfo --enable-fileinfo EXT_FILEINFO=ON default in *nix and Cmake (on Windows by default disabled and can be only shared)
 --enable-fileinfo=shared --enable-fileinfo=shared EXT_FILEINFO_SHARED=ON
 --disable-fileinfo --disable-fileinfo EXT_FILEINFO=OFF
--enable-filter --enable-filter EXT_FILTER=ON default
 --enable-filter=shared --enable-filter=shared EXT_FILTER_SHARED=ON
 --disable-filter --disable-filter EXT_FILTER=OFF
--disable-ftp --disable-ftp EXT_FTP=OFF default
 --enable-ftp --enable-ftp EXT_FTP=ON
 --enable-ftp=shared --enable-ftp=shared EXT_FTP_SHARED=ON
 --without-ftp-ssl N/A EXT_FTP_SSL=OFF default, PHP >= 8.4
 --with-ftp-ssl N/A EXT_FTP_SSL=ON PHP >= 8.4
 --without-openssl-dir N/A EXT_FTP_SSL=OFF default, PHP <= 8.3
 --with-openssl-dir N/A EXT_FTP_SSL=ON PHP <= 8.3
--disable-gd EXT_GD=OFF default
 --enable-gd EXT_GD=ON
 --enable-gd=shared EXT_GD_SHARED=ON
 --without-external-gd EXT_GD_EXTERNAL=OFF default
 --with-external-gd
 [GDLIB_CFLAGS=...]
 [GDLIB_LIBS=...]
EXT_GD_EXTERNAL=ON
[GD_ROOT=DIR]
 --without-avif EXT_GD_AVIF=OFF default
 --with-avif
 [AVIF_CFLAGS=...]
 [AVIF_LIBS=...]
EXT_GD_AVIF=ON
[libavif_ROOT=DIR]
 --without-webp EXT_GD_WEBP=OFF default
 --with-webp
 [WEBP_CFLAGS=...]
 [WEBP_LIBS=...]
EXT_GD_WEBP=ON
[WebP_ROOT=DIR]
 --without-jpeg EXT_GD_JPEG=OFF default
 --with-jpeg
 [JPEG_CFLAGS=...]
 [JPEG_LIBS=...]
EXT_GD_JPEG=ON
[JPEG_ROOT=DIR]
 [PNG_CFLAGS=...]
 [PNG_LIBS=...]
[PNG_ROOT=DIR]
 --without-xpm EXT_GD_XPM=OFF default
 --with-xpm
 [XPM_CFLAGS=...]
 [XPM_LIBS=...]
EXT_GD_XPM=ON
[XPM_ROOT=DIR]
 --without-freetype EXT_GD_FREETYPE=OFF default
 --with-freetype
 [FREETYPE2_CFLAGS=...]
 [FREETYPE2_LIBS=...]
EXT_GD_FREETYPE=ON
[Freetype_ROOT=DIR]
 --disable-gd-jis-conv EXT_GD_JIS=OFF default
 --enable-gd-jis-conv EXT_GD_JIS=ON
--without-gettext EXT_GETTEXT=OFF default
 --with-gettext[=DIR] EXT_GETTEXT=ON
[Intl_ROOT=DIR]
 --with-gettext=shared EXT_GETTEXT_SHARED=ON
--without-gmp EXT_GMP=OFF default
 --with-gmp[=DIR] EXT_GMP=ON
[GMP_ROOT=DIR]
 --with-gmp=shared EXT_GMP_SHARED=ON
--without-mhash --without-mhash EXT_HASH_MHASH=OFF default
 --with-mhash --with-mhash EXT_HASH_MHASH=ON
--with-iconv[=DIR] EXT_ICONV=ON
[Iconv_ROOT=DIR]
default
 --with-iconv=shared EXT_ICONV_SHARED=ON
 --without-iconv EXT_ICONV=OFF
--without-imap --without-imap EXT_IMAP=OFF default, PHP <= 8.3
 --with-imap[=DIR] --with-imap EXT_IMAP=ON
[Cclient_ROOT=DIR]
 --without-kerberos N/A EXT_IMAP_KERBEROS=OFF default, PHP <= 8.3
 --with-kerberos
 [KERBEROS_CFLAGS=...]
 [KERBEROS_LIBS=...]
N/A EXT_IMAP_KERBEROS=ON
[Kerberos_ROOT=...]
 --without-imap-ssl N/A EXT_IMAP_SSL=OFF default, PHP <= 8.3
 --with-imap-ssl
 [OPENSSL_CFLAGS=...]
 [OPENSSL_LIBS=...]
N/A EXT_IMAP_SSL=ON
[OPENSSL_ROOT_DIR=DIR]
--disable-intl EXT_INTL=OFF default
 --enable-intl
 [ICU_CFLAGS=...]
 [ICU_LIBS=...]
EXT_INTL=ON
[ICU_ROOT=DIR]
 --enable-intl=shared EXT_INTL_SHARED=ON
--without-ldap EXT_LDAP=OFF default
 --with-ldap[=DIR] EXT_LDAP=ON
[LDAP_ROOT=DIR]
 --with-ldap=shared EXT_LDAP_SHARED=ON
 --without-ldap-sasl EXT_LDAP_SASL=OFF default
 --with-ldap-sasl
 [SASL_CFLAGS=...]
 [SASL_LIBS=...]
EXT_LDAP_SASL=ON
[SASL_ROOT=DIR]
--with-libxml
[LIBXML_CFLAGS=...]
[LIBXML_LIBS=...]
--with-libxml EXT_LIBXML=ON
[LibXml2_ROOT=DIR]
default
 --without-libxml --without-libxml EXT_LIBXML=OFF
--disable-mbstring --disable-mbstring EXT_MBSTRING=OFF default
 --enable-mbstring --enable-mbstring EXT_MBSTRING=ON
 --enable-mbstring=shared --enable-mbstring=shared EXT_MBSTRING_SHARED=ON
 --enable-mbregex
 [ONIG_CFLAGS=...]
 [ONIG_LIBS=...]
--enable-mbregex EXT_MBSTRING_MBREGEX=ON
[Oniguruma_ROOT=DIR]
default in *nix and CMake (on Windows disabled)
 --disable-mbregex --disable-mbregex EXT_MBSTRING_MBREGEX=OFF
--without-mysqli --without-mysqli EXT_MYSQLI=OFF default
 --with-mysqli --with-mysqli EXT_MYSQLI=ON
 --with-mysqli=shared --with-mysqli=shared EXT_MYSQLI_SHARED=ON
--without-mysql-sock N/A EXT_MYSQL_SOCKET=OFF default, not available on Windows
 --with-mysql-sock N/A EXT_MYSQL_SOCKET=ON Not available on Windows
 --with-mysql-sock=SOCKET N/A EXT_MYSQL_SOCKET=ON
EXT_MYSQL_SOCKET_PATH=/path/to/mysql.sock
Not available on Windows
--disable-mysqlnd --without-mysqlnd EXT_MYSQLND=OFF default in *nix and CMake (on Windows enabled by default)
 --enable-mysqlnd --with-mysqlnd EXT_MYSQLND=ON
 --enable-mysqlnd=shared N/A EXT_MYSQLND_SHARED=ON
 --enable-mysqlnd-compression-support N/A (enabled by default) EXT_MYSQLND_COMPRESSION=ON default
 --disable-mysqlnd-compression-support N/A EXT_MYSQLND_COMPRESSION=OFF
--without-mysqlnd-ssl N/A EXT_MYSQLND_SSL=OFF default, PHP >= 8.4
--with-mysqlnd-ssl N/A EXT_MYSQLND_SSL=ON PHP >= 8.4
--without-oci8 N/A EXT_OCI8=OFF default, PHP <= 8.3
 --with-oci8[=DIR] N/A EXT_OCI8=ON
[...]
PHP <= 8.3
 --with-oci8=shared N/A EXT_OCI8_SHARED=ON
N/A --without-oci8-11g EXT_OCI8_11G=OFF
N/A --with-oci8-11g EXT_OCI8_11G=ON
N/A --without-oci8-12c EXT_OCI8_12C=OFF
N/A --with-oci8-12c EXT_OCI8_12C=ON
N/A --without-oci8-19 EXT_OCI8_19=OFF
N/A --with-oci8-19 EXT_OCI8_19=ON
EXT_ODBC=OFF default
EXT_ODBC=ON
 --without-odbcver EXT_ODBC_VERSION="0x0350" default: 0x0350
 --with-odbcver[=HEX] EXT_ODBC_VERSION=HEX default: 0x0350
 --without-adabas default
 --with-adabas EXT_ODBC=ON
EXT_ODBC_TYPE=adabas
 --without-sapdb default
 --with-sapdb EXT_ODBC=ON
EXT_ODBC_TYPE=sapdb
 --without-solid default
 --with-solid EXT_ODBC=ON
EXT_ODBC_TYPE=solid
 --without-ibm-db2 default
 --with-ibm-db2 EXT_ODBC=ON
EXT_ODBC_TYPE=ibm-db2
 --without-empress default
 --with-empress EXT_ODBC=ON
EXT_ODBC_TYPE=empress
 --without-empress-bcs default
 --with-empress-bcs EXT_ODBC=ON
EXT_ODBC_TYPE=empress-bcs
 --without-custom-odbc default
 --with-custom-odbc EXT_ODBC=ON
EXT_ODBC_TYPE=generic
 --without-iodbc default
 --with-iodbc
 [ODBC_CFLAGS=...]
 [ODBC_LIBS=...]
EXT_ODBC=ON
EXT_ODBC_TYPE=iODBC
[ODBC_ROOT=DIR]
 --without-esoob default
 --with-esoob EXT_ODBC=ON
EXT_ODBC_TYPE=esoob
 --without-unixODBC default
 --with-unixODBC
 [ODBC_CFLAGS=...]
 [ODBC_LIBS=...]
EXT_ODBC=ON
EXT_ODBC_TYPE=unixODBC
[ODBC_ROOT=DIR]
 --without-dbmaker default
 --with-dbmaker EXT_ODBC=ON
EXT_ODBC_TYPE=dbmaker
 --with-dbmaker=DIR EXT_ODBC=ON
EXT_ODBC_TYPE=dbmaker
ODBC_ROOT=DIR
--enable-opcache --enable-opcache EXT_OPCACHE=ON default, will be shared
 --enable-opcache=shared --enable-opcache=shared EXT_OPCACHE=ON will be shared
 --disable-opcache --disable-opcache EXT_OPCACHE=OFF
 --enable-huge-code-pages N/A EXT_OPCACHE_HUGE_CODE_PAGES=ON default; For non-Windows platforms
 --disable-huge-code-pages N/A EXT_OPCACHE_HUGE_CODE_PAGES=OFF For non-Windows platforms
 --enable-opcache-jit --enable-opcache-jit EXT_OPCACHE_JIT=ON default
 --disable-opcache-jit --disable-opcache-jit EXT_OPCACHE_JIT=OFF
 --without-capstone N/A EXT_OPCACHE_CAPSTONE=OFF default; For non-Windows platforms
 --with-capstone
 [CAPSTONE_CFLAGS=...]
 [CAPSTONE_LIBS=...]
N/A EXT_OPCACHE_CAPSTONE=ON
[Capstone_ROOT=DIR]
For non-Windows platforms
--without-openssl --without-openssl EXT_OPENSSL=OFF default
 --with-openssl
 [OPENSSL_CFLAGS=...]
 [OPENSSL_LIBS=...]
--with-openssl EXT_OPENSSL=ON
[OPENSSL_ROOT_DIR=DIR]
 --with-openssl=shared --with-openssl=shared EXT_OPENSSL_SHARED=ON
 --without-openssl-legacy-provider --without-openssl-legacy-provider EXT_OPENSSL_LEGACY_PROVIDER=OFF default, PHP >= 8.4
 --with-openssl-legacy-provider --with-openssl-legacy-provider EXT_OPENSSL_LEGACY_PROVIDER=ON PHP >= 8.4
 --without-openssl-argon2 --without-openssl-argon2 EXT_OPENSSL_ARGON2=OFF default, PHP >= 8.4
 --with-openssl-argon2 --with-openssl-argon2 EXT_OPENSSL_ARGON2=ON PHP >= 8.4
 --without-kerberos N/A EXT_OPENSSL_KERBEROS=OFF default, PHP <= 8.3
 --with-kerberos
[KERBEROS_CFLAGS=...]
[KERBEROS_LIBS=...]
N/A EXT_OPENSSL_KERBEROS=ON
[Kerberos_ROOT=DIR]
PHP <= 8.3
 --without-system-ciphers N/A EXT_OPENSSL_SYSTEM_CIPHERS=OFF default
 --with-system-ciphers N/A EXT_OPENSSL_SYSTEM_CIPHERS=ON
--disable-pcntl N/A EXT_PCNTL=OFF default; for *nix platforms only
 --enable-pcntl N/A EXT_PCNTL=ON for *nix platforms only
 --enable-pcntl=shared N/A EXT_PCNTL_SHARED=ON for *nix platforms only
--with-pcre-jit --with-pcre-jit EXT_PCRE_JIT=ON default
 --without-pcre-jit --without-pcre-jit EXT_PCRE_JIT=OFF
 --without-external-pcre N/A EXT_PCRE_EXTERNAL=OFF default
 --with-external-pcre
 [PCRE2_CFLAGS=...]
 [PCRE2_LIBS=...]
N/A EXT_PCRE_EXTERNAL=ON
[PCRE_ROOT=DIR]
--enable-pdo --enable-pdo EXT_PDO=ON default in *nix and CMake (on Windows disabled by default)
 --enable-pdo=shared  --enable-pdo=shared EXT_PDO_SHARED=ON (on Windows can't be built as shared yet)
 --disable-pdo  --disable-pdo EXT_PDO=OFF
 --without-pdo-dblib EXT_PDO_DBLIB=OFF default
 --with-pdo-dblib[=DIR] EXT_PDO_DBLIB=ON
[FreeTDS_ROOT=DIR]
 --with-pdo-dblib=shared EXT_PDO_DBLIB_SHARED=ON
 --without-pdo-firebird EXT_PDO_FIREBIRD=OFF default
 --with-pdo-firebird[=DIR] EXT_PDO_FIREBIRD=ON
[Firebird_ROOT=DIR]
 --with-pdo-firebird=shared EXT_PDO_FIREBIRD_SHARED=ON
 --without-pdo-mysql EXT_PDO_MYSQL=OFF default
 --with-pdo-mysql EXT_PDO_MYSQL=ON
 --with-pdo-mysql=mysqlnd EXT_PDO_MYSQL=ON
 --with-pdo-mysql=shared EXT_PDO_MYSQL_SHARED=ON
 --with-pdo-mysql=/usr EXT_PDO_MYSQL=ON
EXT_PDO_MYSQL_DRIVER=mysql
 --with-pdo-mysql=DIR EXT_PDO_MYSQL=ON
EXT_PDO_MYSQL_DRIVER=mysql
MySQL_ROOT=DIR
 --with-pdo-mysql=path/to/mysql_config EXT_PDO_MYSQL=ON
EXT_PDO_MYSQL_DRIVER=mysql
MySQL_CONFIG_EXECUTABLE=path/to/mysql_config
 --without-pdo-oci  --without-pdo-oci EXT_PDO_OCI=OFF default, PHP <= 8.3
 --with-pdo-oci[=DIR]  --with-pdo-oci[=DIR] EXT_PDO_OCI=ON
[...]
 --with-pdo-oci=shared  --with-pdo-oci=shared EXT_PDO_OCI_SHARED=ON
 --without-pdo-odbc EXT_PDO_ODBC=OFF default
 --with-pdo-odbc=flavor EXT_PDO_ODBC=ON
EXT_PDO_ODBC_TYPE=flavor
Default flavor: unixODBC
 --with-pdo-odbc=flavor,dir,libname,ldflags,cflags EXT_PDO_ODBC=ON
EXT_PDO_ODBC_TYPE=flavor
EXT_PDO_ODBC_ROOT=dir
EXT_PDO_ODBC_LIBRARY=libname
EXT_PDO_ODBC_LDFLAGS=ldflags
EXT_PDO_ODBC_CFLAGS=cflags
 --with-pdo-odbc=shared EXT_PDO_ODBC_SHARED=ON
 --without-pdo-pgsql --without-pdo-pgsql EXT_PDO_PGSQL=OFF default
 --with-pdo-pgsql[=DIR]
 [PGSQL_CFLAGS=...]
 [PGSQL_LIBS=...]
--with-pdo-pgsql 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 EXT_PDO_PGSQL_SHARED=ON
 --with-pdo-sqlite
 [SQLITE_CFLAGS=...]
 [SQLITE_LIBS=...]
--with-pdo-sqlite 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 EXT_PDO_SQLITE_SHARED=ON
 --without-pdo-sqlite --without-pdo-sqlite EXT_PDO_SQLITE=OFF
--without-pgsql --without-pgsql EXT_PGSQL=OFF default
 --with-pgsql[=DIR]
 [PGSQL_CFLAGS=...]
 [PGSQL_LIBS=...]
--with-pgsql EXT_PGSQL=ON
[PostgreSQL_ROOT=DIR]
Autotools PGSQL_CFLAGS and PGSQL_LIBS available since PHP >= 8.4
 --with-pgsql=shared --with-pgsql=shared EXT_PGSQL_SHARED=ON
--enable-phar --enable-phar EXT_PHAR=ON default
 --enable-phar=shared --enable-phar=shared EXT_PHAR_SHARED=ON
 --disable-phar --disable-phar 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 EXT_POSIX=ON default; for *nix platforms only
 --enable-posix=shared N/A EXT_POSIX_SHARED=ON for *nix platforms only
 --disable-posix N/A EXT_POSIX=OFF for *nix platforms only
--without-pspell EXT_PSPELL=OFF default, PHP <= 8.3
 --with-pspell[=DIR] EXT_PSPELL=ON
[Aspell_ROOT=DIR]
 --with-pspell=shared EXT_PSPELL_SHARED=ON
--without-libedit --without-readline EXT_READLINE=OFF default
 --with-libedit
 [EDIT_CFLAGS=...]
 [EDIT_LIBS=...]
--with-readline EXT_READLINE=ON
[Editline_ROOT=DIR]
 --with-libedit=shared --with-readline=shared EXT_READLINE_SHARED=ON
 --without-readline --without-readline EXT_READLINE=OFF default
 --with-readline[=DIR] N/A EXT_READLINE=ON
EXT_READLINE_LIBREADLINE=ON
[Readline_ROOT=DIR]
 --with-readline=shared N/A EXT_READLINE=ON
EXT_READLINE_SHARED=ON
EXT_READLINE_LIBREADLINE=ON
--enable-session --enable-session EXT_SESSION=ON default
 --enable-session=shared N/A EXT_SESSION_SHARED=ON
 --disable-session --disable-session EXT_SESSION=OFF
 --without-mm N/A EXT_SESSION_MM=OFF default
 --with-mm[=DIR] N/A EXT_SESSION_MM=ON
[MM_ROOT=DIR]
--disable-shmop --disable-shmop EXT_SHMOP=OFF default
 --enable-shmop --enable-shmop EXT_SHMOP=ON
 --enable-shmop=shared --enable-shmop=shared EXT_SHMOP_SHARED=ON
--enable-simplexml --with-simplexml EXT_SIMPLEXML=ON default
 --enable-simplexml=shared --with-simplexml=shared EXT_SIMPLEXML_SHARED=ON
 --disable-simplexml --without-simplexml EXT_SIMPLEXML=OFF
--without-snmp EXT_SNMP=OFF default
 --with-snmp[=DIR] EXT_SNMP=ON
[NetSnmp_ROOT=DIR]
 --with-snmp=shared EXT_SNMP_SHARED=ON
--disable-soap --disable-soap EXT_SOAP=OFF default
 --enable-soap --enable-soap EXT_SOAP=ON
 --enable-soap=shared --enable-soap=shared EXT_SOAP_SHARED=ON
--disable-sockets --disable-sockets EXT_SOCKETS=OFF default
 --enable-sockets --enable-sockets EXT_SOCKETS=ON
 --enable-sockets=shared --enable-sockets=shared EXT_SOCKETS_SHARED=ON
--without-sodium --without-sodium EXT_SODIUM=OFF default
 --with-sodium
 [LIBSODIUM_CFLAGS=...]
 [LIBSODIUM_LIBS=..]
--with-sodium EXT_SODIUM=ON
[Sodium_ROOT=DIR]
 --with-sodium=shared --with-sodium=shared EXT_SODIUM_SHARED=ON
--with-sqlite3
[SQLITE_CFLAGS=...]
[SQLITE_LIBS=...]
--with-sqlite3 EXT_SQLITE3=ON
[SQLite3_ROOT=DIR]
default in *nix and CMake (on Windows disabled by default)
 --with-sqlite3=shared --with-sqlite3=shared EXT_SQLITE3_SHARED
 --without-sqlite3 --without-sqlite3 EXT_SQLITE3=OFF
--without-external-libcrypt N/A EXT_STANDARD_EXTERNAL_LIBCRYPT=OFF default
 --with-external-libcrypt N/A EXT_STANDARD_EXTERNAL_LIBCRYPT=ON
 --without-password-argon2 --without-password-argon2 EXT_STANDARD_ARGON2=OFF default
 --with-password-argon2
 [ARGON2_CFLAGS=...]
 [ARGON2_LIBS=...]
--with-password-argon2 EXT_STANDARD_ARGON2=ON
[Argon2_ROOT=DIR]
--disable-sysvmsg N/A EXT_SYSVMSG=OFF default; for *nix platforms only
 --enable-sysvmsg N/A EXT_SYSVMSG=ON for *nix platforms only
 --enable-sysvmsg=shared N/A EXT_SYSVMSG_SHARED=ON for *nix platforms only
--disable-sysvsem N/A EXT_SYSVSEM=OFF default; for *nix platforms only
 --enable-sysvsem N/A EXT_SYSVSEM=ON for *nix platforms only
 --enable-sysvsem=shared N/A EXT_SYSVSEM_SHARED=ON for *nix platforms only
--disable-sysvshm --disable-sysvshm EXT_SYSVSHM=OFF default
 --enable-sysvshm --enable-sysvshm EXT_SYSVSHM=ON
 --enable-sysvshm=shared --enable-sysvshm=shared EXT_SYSVSHM_SHARED=ON
--without-tidy EXT_TIDY=OFF default
 --with-tidy[=DIR] EXT_TIDY=ON
[Tidy_ROOT=DIR]
 --with-tidy=shared EXT_TIDY_SHARED=ON
--enable-tokenizer --enable-tokenizer EXT_TOKENIZER=ON default
 --enable-tokenizer=shared --enable-tokenizer=shared EXT_TOKENIZER_SHARED=ON
 --disable-tokenizer --disable-tokenizer EXT_TOKENIZER=OFF
--enable-xml --with-xml EXT_XML=ON default
 --enable-xml=shared --with-xml=shared EXT_XML_SHARED=ON
 --disable-xml --without-xml EXT_XML=OFF
 --without-expat N/A EXT_XML_EXPAT=OFF default
 --with-expat
 [EXPAT_CFLAGS=...]
 [EXPAT_LIBS=...]
N/A EXT_XML_EXPAT=ON
[EXPAT_ROOT=DIR]
--enable-xmlreader --enable-xmlreader EXT_XMLREADER=ON default
 --enable-xmlreader=shared --enable-xmlreader=shared EXT_XMLREADER_SHARED=ON
 --disable-xmlreader --disable-xmlreader EXT_XMLREADER=OFF
--enable-xmlwriter --enable-xmlwriter EXT_XMLWRITER=ON default
 --enable-xmlwriter=shared --enable-xmlwriter=shared EXT_XMLWRITER_SHARED=ON
 --disable-xmlwriter --disable-xmlwriter EXT_XMLWRITER=OFF
--without-xsl --without-xsl EXT_XSL=OFF default
 --with-xsl
 [XSL_CFLAGS=...]
 [XSL_LIBS=...]
 [EXSLT_CFLAGS=...]
 [EXSLT_LIBS=...]
--with-xsl EXT_XSL=ON
[LibXslt_ROOT=DIR]
[CMAKE_PREFIX_PATH=DIR]
 --with-xsl=shared --with-xsl=shared EXT_XSL_SHARED=ON
--disable-zend-test --disable-zend-test EXT_ZEND_TEST=OFF default
 --enable-zend-test --enable-zend-test EXT_ZEND_TEST=ON
 --enable-zend-test=shared --enable-zend-test=shared EXT_ZEND_TEST_SHARED=ON
--without-zip --disable-zip EXT_ZIP=OFF default in *nix and CMake (on Windows enabled and shared by default)
 --with-zip
 [LIBZIP_CFLAGS=...]
 [LIBZIP_LIBS=...]
--enable-zip EXT_ZIP=ON
libzip_ROOT=DIR
 --with-zip=shared --enable-zip=shared EXT_ZIP_SHARED=ON
--without-zlib --disable-zlib EXT_ZLIB=OFF default in *nix and CMake (on Windows enabled by default)
 --with-zlib
 [ZLIB_CFLAGS=...]
 [ZLIB_LIBS=...]
--enable-zlib EXT_ZLIB=ON
[ZLIB_ROOT=DIR]
 --with-zlib=shared --enable-zlib=shared EXT_ZLIB_SHARED=ON
PEAR configuration
--without-pear PHP_PEAR=OFF default
 --with-pear[=DIR] PHP_PEAR=ON
[PHP_PEAR_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
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="..." CMAKE_INSTALL_PREFIX="..." Override the installation dir
or cmake --install --prefix