source: chapter08/bc.xml@ 8b9efe67

xry111/arm64 xry111/arm64-12.0
Last change on this file since 8b9efe67 was e909a1eb, checked in by Xi Ruoyao <xry111@…>, 23 months ago

bc: enable readline

Using readline can improve line editing feature of bc, but it's not
enabled by default.

As readline is already installed before bc, let's pick up this
improvement with no cost.

  • Property mode set to 100644
File size: 3.5 KB
Line 
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]>
7
8<sect1 id="ch-system-bc" role="wrap">
9 <?dbhtml filename="bc.html"?>
10
11 <sect1info condition="script">
12 <productname>bc</productname>
13 <productnumber>&bc-version;</productnumber>
14 <address>&bc-url;</address>
15 </sect1info>
16
17 <title>Bc-&bc-version;</title>
18
19 <indexterm zone="ch-system-bc">
20 <primary sortas="a-Bc">Bc</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
25
26 <para>The Bc package contains an arbitrary precision numeric processing
27 language.</para>
28
29 <segmentedlist>
30 <segtitle>&buildtime;</segtitle>
31 <segtitle>&diskspace;</segtitle>
32
33 <seglistitem>
34 <seg>&bc-fin-sbu;</seg>
35 <seg>&bc-fin-du;</seg>
36 </seglistitem>
37 </segmentedlist>
38
39 </sect2>
40
41 <sect2 role="installation">
42 <title>Installation of Bc</title>
43
44 <para>Prepare Bc for compilation:</para>
45
46<screen><userinput remap="configure">CC=gcc ./configure --prefix=/usr -G -O3 -r</userinput></screen>
47
48 <variablelist>
49 <title>The meaning of the configure options:</title>
50
51 <varlistentry>
52 <term><parameter>CC=gcc</parameter></term>
53 <listitem>
54 <para>This parameter specifies the compiler to use.</para>
55 </listitem>
56 </varlistentry>
57
58 <varlistentry>
59 <term><parameter>-G</parameter></term>
60 <listitem>
61 <para>Omit parts of the test suite that won't work
62 without a GNU bc present.</para>
63 </listitem>
64 </varlistentry>
65
66 <varlistentry>
67 <term><parameter>-O3</parameter></term>
68 <listitem>
69 <para>Specify the optimization to use.</para>
70 </listitem>
71 </varlistentry>
72
73 <varlistentry>
74 <term><parameter>-r</parameter></term>
75 <listitem>
76 <para>Enable the use of <application>Readline</application> to
77 improve the line editing feature of bc.</para>
78 </listitem>
79 </varlistentry>
80 </variablelist>
81
82 <para>Compile the package:</para>
83
84<screen><userinput remap="make">make</userinput></screen>
85
86 <para>To test bc, run:</para>
87
88<screen><userinput remap="test">make test</userinput></screen>
89
90
91 <para>Install the package:</para>
92
93<screen><userinput remap="install">make install</userinput></screen>
94
95 </sect2>
96
97 <sect2 id="contents-bc" role="content">
98 <title>Contents of Bc</title>
99
100 <segmentedlist>
101 <segtitle>Installed programs</segtitle>
102
103 <seglistitem>
104 <seg>bc and dc</seg>
105 </seglistitem>
106 </segmentedlist>
107
108 <variablelist>
109 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
110 <?dbfo list-presentation="list"?>
111 <?dbhtml list-presentation="table"?>
112
113 <varlistentry id="bc">
114 <term><command>bc</command></term>
115 <listitem>
116 <para>A command line calculator</para>
117 <indexterm zone="ch-system-bc bc">
118 <primary sortas="b-bc">bc</primary>
119 </indexterm>
120 </listitem>
121 </varlistentry>
122
123 <varlistentry id="dc">
124 <term><command>dc</command></term>
125 <listitem>
126 <para>A reverse-polish command line calculator</para>
127 <indexterm zone="ch-system-bc dc">
128 <primary sortas="b-dc">dc</primary>
129 </indexterm>
130 </listitem>
131 </varlistentry>
132
133 </variablelist>
134
135 </sect2>
136
137</sect1>
Note: See TracBrowser for help on using the repository browser.