$ ./configure
PHP extensions can be bundled into the core executable (prevents wrong execution order, failed dependencies etc.) or compiled as shared objects to be included at runtime through php.ini.
Defaults are determined by the config.[m4|w32] files that can be found in ext/ directories.
--enable-foo [typically disabled by default]
--disable-foo [typically enabled by default]
--with-foo [requires external lib, typically disabled by default]
--without-foo [requires external lib, typically enabled by default]
Some support the shared option
--enable-foo=shared
--with-foo=shared,/path/to/lib
$ cd ~/php-src && mkdir custom-build && cd custom-build && ~/php-src/configure --my-flags
$ ./buildconfig
$ ./configure --flags
$ make
Reports memory leaks via detection of lost memory blocks that are cleaned up post execution. Also includes the debugging symbols for GDB.
--enable-debug
Requires lcov and genhtml available on the path and gcov installed. See lcov state files. Enables code coverage analysis and report generation.
--enable-gcov
Enables the zend thread safety layer, slower but useful for debugging.
--enable-maintainer-zts
Thanks to @derickr and @johannes for their patience and tutelage!