autoconf.xml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-autoconf" role="wrap">
  8. <?dbhtml filename="autoconf.html"?>
  9. <sect1info condition="script">
  10. <productname>autoconf</productname>
  11. <productnumber>&autoconf-version;</productnumber>
  12. <address>&autoconf-url;</address>
  13. </sect1info>
  14. <title>Autoconf-&autoconf-version;</title>
  15. <indexterm zone="ch-system-autoconf">
  16. <primary sortas="a-Autoconf">Autoconf</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>Autoconf 软件包包含生成能自动配置软件包的 shell
  21. 脚本的程序。</para>
  22. <segmentedlist>
  23. <segtitle>&buildtime;</segtitle>
  24. <segtitle>&diskspace;</segtitle>
  25. <seglistitem>
  26. <seg>&autoconf-ch6-sbu;</seg>
  27. <seg>&autoconf-ch6-du;</seg>
  28. </seglistitem>
  29. </segmentedlist>
  30. </sect2>
  31. <sect2 role="installation">
  32. <title>安装 Autoconf</title>
  33. <para>首先,修复 Perl 5.28 引入的 bug:</para>
  34. <screen><userinput remap="pre">sed '361 s/{/\\{/' -i bin/autoscan.in</userinput></screen>
  35. <para>准备编译 Autoconf:</para>
  36. <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
  37. <para>编译该软件包:</para>
  38. <screen><userinput remap="make">make</userinput></screen>
  39. <para>运行以下命令以测试编译结果:</para>
  40. <screen><userinput remap="test">make check</userinput></screen>
  41. <!--para>这需要比较长的时间,大约 &autoconf-ch6-sbu-tests; SBUs. In addition,
  42. several tests are skipped that use Automake. For full test coverage,
  43. Autoconf can be re-tested after Automake has been installed. In addition,
  44. two tests fail due to changes in libtool-2.4.3 and later.</para-->
  45. <para>这需要消耗大约 &autoconf-ch6-sbu-tests; SBU 的较长时间。
  46. 另外,某些使用 Automake 的测试会被跳过。
  47. 为了完整的测试覆盖率,可以在安装 Automake 后重新测试 Autoconf。
  48. 此外,还有两个测试由于 libtool-2.4.3 及更新版本的变化而失败。</para>
  49. <!--note><para>The test time for autoconf can be reduced significantly on a
  50. system with multiple cores. To do this, append
  51. <command>TESTSUITEFLAGS=-j&lt;N&gt;</command> to the line above. For
  52. instance, using -j4 can reduce the test time by over 60
  53. percent.</para></note-->
  54. <note><para>在多核系统上,可以显著减少 autoconf 的测试时间。
  55. 为此,在以上命令的末尾附加
  56. <command>TESTSUITEFLAGS=-j&lt;N&gt;</command> 选项。
  57. 例如,使用 -j4 可以减少超过 60% 的测试时间。</para></note>
  58. <para>安装该软件包:</para>
  59. <screen><userinput remap="install">make install</userinput></screen>
  60. </sect2>
  61. <sect2 id="contents-autoconf" role="content">
  62. <title>Autoconf 的内容</title>
  63. <segmentedlist>
  64. <segtitle>安装的程序</segtitle>
  65. <segtitle>安装的目录</segtitle>
  66. <seglistitem>
  67. <seg>autoconf, autoheader, autom4te, autoreconf, autoscan, autoupdate,
  68. 以及 ifnames</seg>
  69. <seg>/usr/share/autoconf</seg>
  70. </seglistitem>
  71. </segmentedlist>
  72. <variablelist>
  73. <bridgehead renderas="sect3">简要描述</bridgehead>
  74. <?dbfo list-presentation="list"?>
  75. <?dbhtml list-presentation="table"?>
  76. <varlistentry id="autoconf">
  77. <term><command>autoconf</command></term>
  78. <listitem>
  79. <!--para>Produces shell scripts that automatically configure software
  80. source code packages to adapt to many kinds of Unix-like systems;
  81. the configuration scripts it produces are independent&mdash;running
  82. them does not require the <command>autoconf</command> program</para-->
  83. <para>产生自动配置软件源码包,使其适用于多种类 Unix 系统的
  84. shell 脚本;它产生的脚本可以独立运行 —— 运行它们不需要
  85. <command>autoconf</command> 程序。</para>
  86. <indexterm zone="ch-system-autoconf autoconf">
  87. <primary sortas="b-autoconf">autoconf</primary>
  88. </indexterm>
  89. </listitem>
  90. </varlistentry>
  91. <varlistentry id="autoheader">
  92. <term><command>autoheader</command> </term>
  93. <listitem>
  94. <para>一个创建 C <emphasis>#define</emphasis> 预处理指令的模板,
  95. 以供配置脚本使用的程序</para>
  96. <indexterm zone="ch-system-autoconf autoheader">
  97. <primary sortas="b-autoheader">autoheader</primary>
  98. </indexterm>
  99. </listitem>
  100. </varlistentry>
  101. <varlistentry id="autom4te">
  102. <term><command>autom4te</command></term>
  103. <listitem>
  104. <para>M4 宏处理器的封装器</para>
  105. <indexterm zone="ch-system-autoconf autom4te">
  106. <primary sortas="b-autom4te">autom4te</primary>
  107. </indexterm>
  108. </listitem>
  109. </varlistentry>
  110. <varlistentry id="autoreconf">
  111. <term><command>autoreconf</command></term>
  112. <listitem>
  113. <para>在 <command>autoconf</command> 和
  114. <command>automake</command> 模板文件发生变化时,
  115. 按照正确顺序自动运行 <command>autoconf</command>、
  116. <command>autoheader</command>、<command>aclocal</command>、
  117. <command>automake</command>、<command>gettextize</command>, 以及
  118. <command>libtoolize</command>,以便节省时间。</para>
  119. <indexterm zone="ch-system-autoconf autoreconf">
  120. <primary sortas="b-autoreconf">autoreconf</primary>
  121. </indexterm>
  122. </listitem>
  123. </varlistentry>
  124. <varlistentry id="autoscan">
  125. <term><command>autoscan</command> </term>
  126. <listitem>
  127. <para>帮助用户为软件包创建<filename>configure.in</filename> 文件;
  128. 它检验目录树中的源代码文件,在其中找出一般的移植性问题,
  129. 然后创建一个 <filename>configure.scan</filename> 文件,
  130. 作为软件包的原始 <filename>configure.in</filename> 文件</para>
  131. <indexterm zone="ch-system-autoconf autoscan">
  132. <primary sortas="b-autoscan">autoscan</primary>
  133. </indexterm>
  134. </listitem>
  135. </varlistentry>
  136. <varlistentry id="autoupdate">
  137. <term><command>autoupdate</command></term>
  138. <listitem>
  139. <para>修改仍然使用 <command>autoconf</command>
  140. 宏的旧名称调用它们的 <filename>configure.in</filename> 文件,
  141. 使它使用当前的宏名</para>
  142. <indexterm zone="ch-system-autoconf autoupdate">
  143. <primary sortas="b-autoupdate">autoupdate</primary>
  144. </indexterm>
  145. </listitem>
  146. </varlistentry>
  147. <varlistentry id="ifnames">
  148. <term><command>ifnames</command> </term>
  149. <listitem>
  150. <!--para>Helps when writing <filename>configure.in</filename> files
  151. for a software package; it prints the identifiers that the package
  152. uses in C preprocessor conditionals [If a package has already been set
  153. up to have some portability, this program can help determine what
  154. <command>configure</command> needs to check for. It can also fill in
  155. gaps in a <filename>configure.in</filename> file generated by
  156. <command>autoscan</command>.]</para-->
  157. <para>帮助用户为软件包编写 <filename>configure.in</filename>;
  158. 它打印软件包在 C 预处理器条件中使用的所有标识符
  159. [如果一个软件包已经被设定为有一定的可移植性,
  160. 该程序可以帮助确定 <command>configure</command>
  161. 需要进行哪些测试。它也会填充 <command>autoscan</command>
  162. 生成的 <filename>configure.in</filename> 中留下的空隙。]
  163. </para>
  164. <indexterm zone="ch-system-autoconf ifnames">
  165. <primary sortas="b-ifnames">ifnames</primary>
  166. </indexterm>
  167. </listitem>
  168. </varlistentry>
  169. </variablelist>
  170. </sect2>
  171. </sect1>