1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
|
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 297078 $ -->
<sect1 xml:id="internals2.buildsys.configwin" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Talking to the Windows build system: config.w32</title>
<para>
An extension's <filename>config.w32</filename> file is similar in usage to
the <filename>config.m4</filename> 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 <filename>config.m4</filename> is the
only example provided.
</para>
<example xml:id="internals2.buildsys.configwin.sample-config">
<title>An example config.w32 file</title>
<programlisting role="javascript">
// $Id$
// vim:ft=javascript
<![CDATA[
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" );
}
}
]]>
</programlisting>
</example>
<sect2 xml:id="internals2.buildsys.configwin.counter">
<title>The counter extension's config.w32 file</title>
<para>
The counter extension previously documented has a much simpler
<filename>config.w32</filename> file than that described above, as it
doesn't make use of many buildsystem features.
</para>
<example xml:id="internals2.buildsys.configwin.counter.configwin">
<title>counter's config.w32 file</title>
<programlisting role="autoconf">
// $Id$
// vim:ft=javascript
<![CDATA[
ARG_ENABLE("counter", "for counter support", "no");
if (PHP_COUNTER != "no") {
EXTENSION("counter", "counter.c");
ADD_SOURCE("counter-util.c");
}
]]>
</programlisting>
</example>
</sect2>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
|