internals2.buildsys.configwin.html
来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 93 行
HTML
93 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Talking to the Windows build system: config.w32</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="internals2.buildsys.html">The PHP 5 build system</a></div> <div class="next" style="text-align: right; float: right;"><a href="internals2.structure.html">Extension structure</a></div> <div class="up"><a href="internals2.buildsys.html">The PHP 5 build system</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="internals2.buildsys.configwin" class="sect1"> <h2 class="title">Talking to the Windows build system: config.w32</h2> <p class="para"> An extension's <var class="filename">config.w32</var> file is similar in usage to the <var class="filename">config.m4</var> 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 <var class="filename">config.m4</var> is the only example provided. </p> <div class="example" id="internals2.buildsys.configwin.sample-config" name="internals2.buildsys.configwin.sample-config"> <p><b>Example #1 An example config.w32 file</b></p> <div class="example-contents"><div class="cdata"><pre>// $Id$// vim:ft=javascript</pre></div><div class="cdata"><pre>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" ); }}</pre></div> </div> </div> <div id="internals2.buildsys.configwin.counter" class="sect2"> <h3 class="title">The counter extension's config.w32 file</h3> <p class="para"> The counter extension previously documented has a much simpler <var class="filename">config.w32</var> file than that described above, as it doesn't make use of many buildsystem features. </p> <div class="example" id="internals2.buildsys.configwin.counter.configwin" name="internals2.buildsys.configwin.counter.configwin"> <p><b>Example #2 counter's config.w32 file</b></p> <div class="example-contents"><div class="cdata"><pre>// $Id$// vim:ft=javascript</pre></div><div class="cdata"><pre>ARG_ENABLE("counter", "for counter support", "no");if (PHP_COUNTER != "no") { EXTENSION("counter", "counter.c"); ADD_SOURCE("counter-util.c");}</pre></div> </div> </div> </div> </div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="internals2.buildsys.html">The PHP 5 build system</a></div> <div class="next" style="text-align: right; float: right;"><a href="internals2.structure.html">Extension structure</a></div> <div class="up"><a href="internals2.buildsys.html">The PHP 5 build system</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?