autoconf.xml 7.9 KB

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