<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;
]>

<sect1 id="ch-cross-tools-pkg-config-lite" role="wrap">
  <?dbhtml filename="pkg-config-lite.html"?>

  <title>Pkg-config-lite-&pkg-config-lite-version;</title>

  <indexterm zone="ch-cross-tools-pkg-config-lite">
    <primary sortas="a-Pkg-config-lite">Pkg-config-lite</primary>
    <secondary>cross tools</secondary>
  </indexterm>

  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  href="../../final-system/common/pkg-config-lite.xml"
  xpointer="xpointer(//*[@role='package'])"/>

  <sect2 role="installation">
    <title>Installation of Pkg-config-lite</title>

    <para os="a">Several packages in the temporary system will use
    <command>pkg-config</command> to find various required and optional
    dependencies. Unfortunately, this could result in those packages
    finding libraries on the host system and trying to link against them,
    which will not work. To avoid this problem, we will install
    a <command>pkg-config</command> binary in
    <filename class="directory">/cross-tools</filename> and configure it so
    that it will look for Pkg-config files only in
    <filename class="directory">/tools</filename>.</para>

    <para os="b">Prepare Pkg-config-lite for compilation:</para>

<screen os="c"><userinput>./configure --prefix=/cross-tools --host=${CLFS_TARGET}\
    --with-pc-path=/tools/lib/pkgconfig:/tools/share/pkgconfig</userinput></screen>

    <variablelist os="d">
      <title>The meaning of the new configure option:</title>

      <varlistentry>
        <term><parameter>--with-pc-path</parameter></term>
        <listitem>
          <para>This sets the default PKG_CONFIG_PATH to
          <filename class="directory">/tools/lib/pkgconfig</filename> and
          <filename class="directory">/tools/share/pkgconfig</filename>.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><parameter>--host=${CLFS_TARGET}</parameter></term>
        <listitem>
          <para>Several packages that we will cross-compile later will try to
          search for <command>${CLFS_TARGET}-pkg-config</command>. Setting
          this option ensures that Pkg-config-lite will create a hard
          link in <filename class="directory">/cross-tools/bin</filename> with
          this name, so that it will be used instead of any similarly-named
          program that might exist on the host.</para>
        </listitem>
      </varlistentry>

    </variablelist>

    <para os="e">Compile the package:</para>

<screen os="f"><userinput>make</userinput></screen>

    <para os="g">Install the package:</para>

<screen os="h"><userinput>make install</userinput></screen>

  </sect2>

  <sect2 role="content">
    <title/>

    <para>Details on this package are located in <xref
    linkend="contents-pkg-config-lite" role="."/></para>

  </sect2>

</sect1>
