@@ -142,7 +142,7 @@ configuration header file ``main/php_config.h``.
142142
143143Both utilities produce their results from the ``configure.in `` file (which specifies most of the PHP build process),
144144the ``acinclude.m4 `` file (which specifies a large number of PHP-specific M4 macros) and the ``config.m4 `` files of
145- individual extensions and SAPIs (as well as a bunch of other `` m4 `` files).
145+ individual extensions and SAPIs (as well as a bunch of other `m4 files < http://www.gnu.org/software/m4/m4.html >`_ ).
146146
147147The good news is that writing extensions or even doing core modifications will not require much interaction with the
148148build system. You will have to write small ``config.m4 `` files later on, but those usually just use two or three of the
@@ -211,8 +211,8 @@ your PHP binary contains using the ``-m`` option. For a default PHP 7.0 build th
211211 xmlreader
212212 xmlwriter
213213
214- If you now wanted to stop compiling the CGI SAPI, as well as the tokenizer and sqlite3 extensions and instead enable
215- opcache and gmp, the corresponding configure command would be::
214+ If you now wanted to stop compiling the CGI SAPI, as well as the * tokenizer * and * sqlite3 * extensions and instead enable
215+ * opcache * and * gmp * , the corresponding configure command would be::
216216
217217 ~/php-src> ./configure --disable-cgi --disable-tokenizer --without-sqlite3 \
218218 --enable-opcache --with-gmp
@@ -254,14 +254,15 @@ structures, will be reported.
254254
255255``--enable-maintainer-zts `` enables thread-safety. This switch will define the ``ZTS `` macro, which in turn will enable
256256the whole TSRM (thread-safe resource manager) machinery used by PHP. Writing thread-safe extensions for PHP is very
257- simple, but only if make sure to enable this switch.
257+ simple, but only if make sure to enable this switch. If you need more information about thread safety and global
258+ memory management in PHP, you should read :doc: `the globals management chapter <../extensions_design/globals_management >`
258259
259260On the other hand you should not use either of these options if you want to perform performance benchmarks for your
260261code, as both can cause significant and asymmetrical slowdowns.
261262
262263Note that ``--enable-debug `` and ``--enable-maintainer-zts `` change the ABI of the PHP binary, e.g. by adding additional
263- arguments to many functions. As such shared extensions compiled in debug mode will not be compatible with a PHP binary
264- built in release mode. Similarly a thread-safe extension is not compatible with a thread-unsafe PHP build.
264+ arguments to many functions. As such, shared extensions compiled in debug mode will not be compatible with a PHP binary
265+ built in release mode. Similarly a thread-safe extension (ZTS) is not compatible with a non- thread-safe PHP build (NTS) .
265266
266267Due to the ABI incompatibility ``make install `` (and PECL install) will put shared extensions in different directories
267268depending on these options:
472473 ~/php-src> make test TESTS="Zend/ ext/reflection/ ext/standard/tests/array/"
473474
474475We will take a more detailed look at the ``run-tests.php `` system later, in particular also talk about how to write your
475- own tests and how to debug test failures.
476+ own tests and how to debug test failures. :doc: ` See the dedicated tests chapter < ../../tests/introduction >`.
476477
477478Fixing compilation problems and ``make clean ``
478479----------------------------------------------
0 commit comments