pkgconfig.xml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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-pkgconfig" role="wrap">
  8. <?dbhtml filename="pkg-config.html"?>
  9. <sect1info condition="script">
  10. <productname>pkgconfig</productname>
  11. <productnumber>&pkgconfig-version;</productnumber>
  12. <address>&pkgconfig-url;</address>
  13. </sect1info>
  14. <title>Pkg-config-&pkgconfig-version;</title>
  15. <indexterm zone="ch-system-pkgconfig">
  16. <primary sortas="a-pkgconfig">Pkgconfig</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <!--para> The pkg-config package contains a tool for passing the include path
  21. and/or library paths to build tools during the configure and make file
  22. execution.</para-->
  23. <para>pkg-config 软件包提供一个在 configure 和
  24. make 文件执行过程中向构建工具传递头文件和/或库文件路径的工具。
  25. </para>
  26. <segmentedlist>
  27. <segtitle>&buildtime;</segtitle>
  28. <segtitle>&diskspace;</segtitle>
  29. <seglistitem>
  30. <seg>&pkgconfig-ch6-sbu;</seg>
  31. <seg>&pkgconfig-ch6-du;</seg>
  32. </seglistitem>
  33. </segmentedlist>
  34. </sect2>
  35. <sect2 role="installation">
  36. <title>安装 Pkg-config</title>
  37. <para>准备安装 Pkg-config:</para>
  38. <screen><userinput remap="configure">./configure --prefix=/usr \
  39. --with-internal-glib \
  40. --disable-host-tool \
  41. --docdir=/usr/share/doc/pkg-config-&pkgconfig-version;</userinput></screen>
  42. <variablelist>
  43. <title>新的配置选项的含义:</title>
  44. <varlistentry>
  45. <term><parameter>--with-internal-glib</parameter></term>
  46. <listitem>
  47. <para>该选项允许 pkg-config 使用它内部的 Glib 版本,
  48. 因为 LFS 不提供外部的 Glib 。</para>
  49. </listitem>
  50. </varlistentry>
  51. <varlistentry>
  52. <term><parameter>--disable-host-tool</parameter></term>
  53. <listitem>
  54. <para>该选项防止创建一个指向 pkg-config 程序的不需要的硬链接。
  55. </para>
  56. </listitem>
  57. </varlistentry>
  58. </variablelist>
  59. <para>编译该软件包:</para>
  60. <screen><userinput remap="make">make</userinput></screen>
  61. <para>运行以下命令以测试编译结果:</para>
  62. <screen><userinput remap="test">make check</userinput></screen>
  63. <para>安装该软件包:</para>
  64. <screen><userinput remap="install">make install</userinput></screen>
  65. </sect2>
  66. <sect2 id="contents-pkgconfig" role="content">
  67. <title>Pkg-config 的内容</title>
  68. <segmentedlist>
  69. <segtitle>安装的程序</segtitle>
  70. <segtitle>安装的目录</segtitle>
  71. <seglistitem>
  72. <seg>pkg-config</seg>
  73. <seg>/usr/share/doc/pkg-config-&pkgconfig-version;</seg>
  74. </seglistitem>
  75. </segmentedlist>
  76. <variablelist>
  77. <bridgehead renderas="sect3">简要描述</bridgehead>
  78. <?dbfo list-presentation="list"?>
  79. <?dbhtml list-presentation="table"?>
  80. <varlistentry id="pkgconfig">
  81. <!-- Don't remove the extra space, it prevents a FOP warning. -->
  82. <term><command>pkg-config </command></term>
  83. <listitem>
  84. <para>返回某个库或软件包的元数据信息
  85. </para>
  86. <indexterm zone="ch-system-pkgconfig pkgconfig">
  87. <primary sortas="b-pkgconfig">pkg-config</primary>
  88. </indexterm>
  89. </listitem>
  90. </varlistentry>
  91. </variablelist>
  92. </sect2>
  93. </sect1>