Make /etc/localtime a symlink in System V Book
[linux_from_scratch.git] / chapter05 / expect.xml
blobae6f50026fa7b6256a015e1d649c57289ca38070
1 <?xml version="1.0" encoding="ISO-8859-1"?>
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 ]>
8 <sect1 id="ch-tools-expect" role="wrap">
9   <?dbhtml filename="expect.html"?>
11   <sect1info condition="script">
12     <productname>expect</productname>
13     <productnumber>&expect-version;</productnumber>
14     <address>&expect-url;</address>
15   </sect1info>
17   <title>Expect-&expect-version;</title>
19   <indexterm zone="ch-tools-expect">
20     <primary sortas="a-Expect">Expect</primary>
21   </indexterm>
23   <sect2 role="package">
24     <title/>
26     <para>The Expect package contains a program for carrying out scripted
27     dialogues with other interactive programs.</para>
29     <segmentedlist>
30       <segtitle>&buildtime;</segtitle>
31       <segtitle>&diskspace;</segtitle>
33       <seglistitem>
34         <seg>&expect-ch5-sbu;</seg>
35         <seg>&expect-ch5-du;</seg>
36       </seglistitem>
37     </segmentedlist>
39   </sect2>
41   <sect2 role="installation">
42     <title>Installation of Expect</title>
44     <para>First, force Expect's configure script to use <filename>/bin/stty</filename>
45     instead of a <filename>/usr/local/bin/stty</filename> it may find on the host system.
46     This will ensure that our test suite tools remain sane for the final builds of our
47     toolchain:</para>
49 <screen><userinput remap="pre">cp -v configure{,.orig}
50 sed 's:/usr/local/bin:/bin:' configure.orig &gt; configure</userinput></screen>
52     <para>Now prepare Expect for compilation:</para>
54 <screen><userinput remap="configure">./configure --prefix=/tools       \
55             --with-tcl=/tools/lib \
56             --with-tclinclude=/tools/include</userinput></screen>
58     <variablelist>
59       <title>The meaning of the configure options:</title>
61       <varlistentry>
62         <term><parameter>--with-tcl=/tools/lib</parameter></term>
63         <listitem>
64           <para>This ensures that the configure script finds the Tcl
65           installation in the temporary tools location instead of possibly
66           locating an existing one on the host system.</para>
67         </listitem>
68       </varlistentry>
70       <varlistentry>
71         <term><parameter>--with-tclinclude=/tools/include</parameter></term>
72         <listitem>
73           <para>This explicitly tells Expect where to find Tcl's internal
74           headers. Using this option avoids conditions where
75           <command>configure</command> fails because it cannot automatically
76           discover the location of Tcl's headers.</para>
77         </listitem>
78       </varlistentry>
80     </variablelist>
82     <para>Build the package:</para>
84 <screen><userinput remap="make">make</userinput></screen>
86     <para>Compilation is now complete. As discussed earlier, running the test
87     suite is not mandatory for the temporary tools here in this chapter. To run
88     the Expect test suite anyway, issue the following command:</para>
90 <screen><userinput remap="test">make test</userinput></screen>
92     <para>Note that the Expect test suite is known to experience failures under
93     certain host conditions that are not within our control. Therefore,
94     test suite failures here are not surprising and are not considered
95     critical.</para>
97     <para>Install the package:</para>
99 <screen><userinput remap="install">make SCRIPTS="" install</userinput></screen>
101     <variablelist>
102       <title>The meaning of the make parameter:</title>
104       <varlistentry>
105         <term><parameter>SCRIPTS=""</parameter></term>
106         <listitem>
107           <para>This prevents installation of the supplementary Expect
108           scripts, which are not needed.</para>
109         </listitem>
110       </varlistentry>
112     </variablelist>
114   </sect2>
116   <sect2 id="contents-expect" role="content">
117     <title>Contents of Expect</title>
119     <segmentedlist>
120       <segtitle>Installed program</segtitle>
121       <segtitle>Installed library</segtitle>
123       <seglistitem>
124         <seg>expect</seg>
125         <seg>libexpect-&expect-lib-version;.so</seg>
126       </seglistitem>
127     </segmentedlist>
129     <variablelist>
130       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
131       <?dbfo list-presentation="list"?>
132       <?dbhtml list-presentation="table"?>
134       <varlistentry id="expect">
135         <term><command>expect</command></term>
136         <listitem>
137           <para>Communicates with other interactive programs according
138           to a script</para>
139           <indexterm zone="ch-tools-expect expect">
140             <primary sortas="b-expect">expect</primary>
141           </indexterm>
142         </listitem>
143       </varlistentry>
145       <varlistentry id="libexpect">
146         <term><filename class="libraryfile">libexpect-&expect-lib-version;.so</filename></term>
147         <listitem>
148           <para>Contains functions that allow Expect to be used as a Tcl
149           extension or to be used directly from C or C++ (without Tcl)</para>
150           <indexterm zone="ch-tools-expect libexpect">
151             <primary sortas="c-libexpect-&expect-lib-version;">libexpect-&expect-lib-version;</primary>
152           </indexterm>
153         </listitem>
154       </varlistentry>
156     </variablelist>
158   </sect2>
160 </sect1>