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

<sect1 id="ch-temp-system-gettext" role="wrap">
  <?dbhtml filename="gettext.html"?>

  <title>Gettext-&gettext-version;</title>

  <indexterm zone="ch-temp-system-gettext">
    <primary sortas="a-Gettext">Gettext</primary>
    <secondary>temporary system</secondary>
  </indexterm>

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

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/common/gettext.xml"
    xpointer="xpointer(//*[@role='package']/para[1])"/>

    <segmentedlist>
      <segtitle>&buildtime;</segtitle>
      <segtitle>&diskspace;</segtitle>

      <seglistitem>
        <seg>Not checked yet</seg>
        <seg>Not checked yet</seg>
      </seglistitem>
    </segmentedlist>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/common/gettext.xml"
    xpointer="xpointer(//*[@role='package']/segmentedlist[2])"/>

  </sect2>

  <sect2 role="installation">
    <title>Installation of Gettext</title>

    <para os="a">Gettext has an issue with cross-compiling where it
    can't find getline. So we fix it here:</para>

<screen os="b"><userinput>echo "am_cv_func_working_getline=yes" &gt;&gt; config.cache</userinput></screen>

    <para>Prepare Gettext for compilation:</para>

<screen><userinput>./configure --prefix=/tools \
   --host=${LFS_TARGET} --disable-libasprintf \
   --without-csharp --cache-file=config.cache</userinput></screen>

    <variablelist os="c">
      <title>The meaning of the configure options:</title>

      <varlistentry os="c1">
        <term><parameter>--disable-libasprintf</parameter></term>
        <listitem>
          <para>This flag tells Gettext not to build the <filename
          class="libraryfile">asprintf</filename> library. Because
          nothing in this chapter or the next requires this library a
          nd Gettext gets rebuilt later, exclude it to save time
          and space.</para>
        </listitem>
      </varlistentry>

      <varlistentry os="c2">
        <term><parameter>--without-csharp</parameter></term>
        <listitem>
          <para>This ensures that Gettext does not build support for the C#
          compiler which may be present on the host but will not be available
          when building the final system.</para>
        </listitem>
      </varlistentry>

    </variablelist>

    <para>Compile the package:</para>

<screen><userinput>make</userinput></screen>

    <para>Install the package:</para>

<screen><userinput>make install</userinput></screen>

  </sect2>

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

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

  </sect2>

</sect1>
