@@ -142,7 +142,7 @@ configuration header file ``main/php_config.h``.
142
142
143
143
Both utilities produce their results from the ``configure.in `` file (which specifies most of the PHP build process),
144
144
the ``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 >`_ ).
146
146
147
147
The good news is that writing extensions or even doing core modifications will not require much interaction with the
148
148
build 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
211
211
xmlreader
212
212
xmlwriter
213
213
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::
216
216
217
217
~/php-src> ./configure --disable-cgi --disable-tokenizer --without-sqlite3 \
218
218
--enable-opcache --with-gmp
@@ -254,14 +254,15 @@ structures, will be reported.
254
254
255
255
``--enable-maintainer-zts `` enables thread-safety. This switch will define the ``ZTS `` macro, which in turn will enable
256
256
the 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 >`
258
259
259
260
On the other hand you should not use either of these options if you want to perform performance benchmarks for your
260
261
code, as both can cause significant and asymmetrical slowdowns.
261
262
262
263
Note 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) .
265
266
266
267
Due to the ABI incompatibility ``make install `` (and PECL install) will put shared extensions in different directories
267
268
depending on these options:
472
473
~/php-src> make test TESTS="Zend/ ext/reflection/ ext/standard/tests/array/"
473
474
474
475
We 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 >`.
476
477
477
478
Fixing compilation problems and ``make clean ``
478
479
----------------------------------------------
0 commit comments