Talking to the Windows build system: config.w32
An extension's config.w32 file is similar in usage to the config.m4 file, with two critical differences: first, it is used for Windows builds, and second, it is written in JavaScript. This section makes no attempt to cover JavaScript syntax. For the moment, this section is incomplete in lieu of a Win32 testbed, and an experimental-only port of the example config.m4 is the only example provided.
Example #1 An example config.w32 file
// $Id$ // vim:ft=javascript
ARG_WITH("example", "for example support", "no"); ARG_ENABLE("example-debug", "for debugging support in example", "no") ARG_WITH("example-extra", "for extra functionality in example", "no") if (PHP_EXAMPLE != "no") { if (CHECK_LIB("libexample.lib", "example", PHP_EXAMPLE) && CHECK_HEADER_ADD_INCLUDE("example.h", "CFLAGS_EXAMPLE", PHP_EXAMPLE + "\\include")) { if (PHP_EXAMPLE_DEBUG != "no") { AC_DEFINE('USE_EXAMPLE_DEBUG', 1, 'Debug support in example'); } if (PHP_EXAMPLE_EXTRA != "no" && CHECK_LIB("libexample-extra.lib", "example", PHP_EXAMPLE) && CHECK_HEADER_ADD_INCLUDE("example-extra.h", "CFLAGS_EXAMPLE", PHP_EXAMPLE + ";" + PHP_PHP_BUILD + "\\include") { AC_DEFINE('HAVE_EXAMPLEEXTRA', 1, 'Extra functionality in example'); HAVE_EXTRA = 1; } else { WARNING( "extra example functionality not enabled, lib not found" ); } EXTENSION("example", "example.c"); if (HAVE_EXTRA == 1) { ADD_SOURCES("example-extra.c"); } } else { WARNING( "example not enabled; libraries not found" ); } }
The counter extension's config.w32 file
The counter extension previously documented has a much simpler config.w32 file than that described above, as it doesn't make use of many buildsystem features.
Example #2 counter's config.w32 file
// $Id$ // vim:ft=javascript
ARG_ENABLE("counter", "for counter support", "no"); if (PHP_COUNTER != "no") { EXTENSION("counter", "counter.c"); ADD_SOURCE("counter-util.c"); }
English translation
You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.
Thank you in advance.
Document created the 30/01/2003, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/php-rf-internals2.buildsys.configwin.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.