[52d29f7] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[52d29f7] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[0aeb696] | 7 | <!-- Inserted as a reminder to do this. The mention of a test suite
|
---|
| 8 | is usually right before the root user installation commands. Please
|
---|
| 9 | delete these 12 (including one blank) lines after you are done.-->
|
---|
| 10 |
|
---|
| 11 | <!-- Use one of the two mentions below about a test suite,
|
---|
| 12 | delete the line that is not applicable. Of course, if the
|
---|
| 13 | test suite uses syntax other than "make check", revise the
|
---|
| 14 | line to reflect the actual syntax to run the test suite -->
|
---|
| 15 |
|
---|
| 16 | <!-- <para>This package does not come with a test suite.</para> -->
|
---|
| 17 | <!-- <para>To test the results, issue: <command>make check</command>.</para> -->
|
---|
| 18 |
|
---|
[78bfd941] | 19 | <!ENTITY bc-download-http "&gnu-alpha-http;bc/bc-&bc-version;.tar.bz2">
|
---|
| 20 | <!ENTITY bc-download-ftp "&gnu-alpha-ftp;bc/bc-&bc-version;.tar.bz2">
|
---|
[c9b953e6] | 21 | <!ENTITY bc-md5sum "5126a721b73f97d715bb72c13c889035">
|
---|
| 22 | <!ENTITY bc-size "288 KB">
|
---|
[aafcfb8] | 23 | <!ENTITY bc-buildsize "3 MB">
|
---|
[1fcdfae] | 24 | <!ENTITY bc-time "less than 0.1 SBU (0.2 SBU if running the testsuite)">
|
---|
[52d29f7] | 25 | ]>
|
---|
| 26 |
|
---|
[fd680fb] | 27 | <sect1 id="bc" xreflabel="bc-&bc-version;">
|
---|
[b96124dd] | 28 | <?dbhtml filename="bc.html"?>
|
---|
[fc7afd0c] | 29 |
|
---|
| 30 |
|
---|
[c9b953e6] | 31 | <title>bc-&bc-version;</title>
|
---|
[fc7afd0c] | 32 |
|
---|
[b96124dd] | 33 | <indexterm zone="bc">
|
---|
| 34 | <primary sortas="a-Bc">Bc</primary>
|
---|
| 35 | </indexterm>
|
---|
| 36 |
|
---|
| 37 | <sect2 role="package">
|
---|
[c9b953e6] | 38 | <title>Introduction to bc</title>
|
---|
[fc7afd0c] | 39 |
|
---|
[b96124dd] | 40 | <para>The <application>bc</application> package contains
|
---|
| 41 | an arbitrary precision numeric processing language.</para>
|
---|
[fc7afd0c] | 42 |
|
---|
[442d824] | 43 | <note><para>Starting with linux-3.9 the <command>bc</command>
|
---|
| 44 | program is needed to build the linux kernel. It is been moved
|
---|
| 45 | to LFS for LFS-7.4.</para></note>
|
---|
| 46 |
|
---|
[e748a01] | 47 | &lfs74_checked;
|
---|
[aafcfb8] | 48 |
|
---|
[b96124dd] | 49 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 50 | <itemizedlist spacing="compact">
|
---|
| 51 | <listitem>
|
---|
| 52 | <para>Download (HTTP): <ulink url="&bc-download-http;"/></para>
|
---|
| 53 | </listitem>
|
---|
| 54 | <listitem>
|
---|
| 55 | <para>Download (FTP): <ulink url="&bc-download-ftp;"/></para>
|
---|
| 56 | </listitem>
|
---|
| 57 | <listitem>
|
---|
| 58 | <para>Download MD5 sum: &bc-md5sum;</para>
|
---|
| 59 | </listitem>
|
---|
| 60 | <listitem>
|
---|
| 61 | <para>Download size: &bc-size;</para>
|
---|
| 62 | </listitem>
|
---|
| 63 | <listitem>
|
---|
| 64 | <para>Estimated disk space required: &bc-buildsize;</para>
|
---|
| 65 | </listitem>
|
---|
| 66 | <listitem>
|
---|
| 67 | <para>Estimated build time: &bc-time;</para>
|
---|
| 68 | </listitem>
|
---|
| 69 | </itemizedlist>
|
---|
[fc7afd0c] | 70 |
|
---|
[1039de3] | 71 | <para condition="html" role="usernotes">User Notes:
|
---|
| 72 | <ulink url="&blfs-wiki;/bc"/></para>
|
---|
| 73 |
|
---|
[b96124dd] | 74 | </sect2>
|
---|
[fc7afd0c] | 75 |
|
---|
[88adcdd] | 76 | <sect2 role="installation">
|
---|
[b96124dd] | 77 | <title>Installation of Bc</title>
|
---|
| 78 |
|
---|
| 79 | <para>Install <application>bc</application> by running the following commands:</para>
|
---|
| 80 |
|
---|
[c9b953e6] | 81 | <screen><userinput>./configure --prefix=/usr --with-readline &&
|
---|
[b96124dd] | 82 | make</userinput></screen>
|
---|
| 83 |
|
---|
[1fcdfae] | 84 | <para>To test <application>bc</application>, run the commands below.
|
---|
[9f12e36] | 85 | There is quite a bit of output, so you may want to redirect it to a file.
|
---|
[ed24600] | 86 | There are a very small percentage of tests (10 of 12,144) that will
|
---|
| 87 | indicate a roundoff error at the last digit.</para>
|
---|
| 88 |
|
---|
| 89 | <screen><userinput>echo "quit" | ./bc/bc -l Test/checklib.b</userinput></screen>
|
---|
[fc7afd0c] | 90 |
|
---|
[b96124dd] | 91 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[fc7afd0c] | 92 |
|
---|
[b96124dd] | 93 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
[fc7afd0c] | 94 |
|
---|
[b96124dd] | 95 | </sect2>
|
---|
[fc7afd0c] | 96 |
|
---|
[1fcdfae] | 97 | <sect2 role="commands">
|
---|
| 98 | <title>Command Explanations</title>
|
---|
[c9b953e6] | 99 | <!--
|
---|
[1fcdfae] | 100 | <para><command>sed -i '/PROTO.*readline/d' bc/scan.l</command>: This
|
---|
| 101 | command fixes the <application>Readline</application> library call.</para>
|
---|
| 102 |
|
---|
| 103 | <para><command>sed -i '/flex -I8/s/8//' configure</command>: This
|
---|
| 104 | command fixes the <application>Flex</application> invocation.</para>
|
---|
| 105 |
|
---|
| 106 | <para><command>sed -i '/stdlib/a #include <string.h>' lib/number.c</command>:
|
---|
| 107 | This command inserts a missing header.</para>
|
---|
| 108 |
|
---|
| 109 | <para><command>sed -i 's/program.*save/static &/' bc/load.c</command>:
|
---|
| 110 | This command fixes a segfault when running <application>bc</application>
|
---|
| 111 | with <command>bc -l</command>.</para>
|
---|
[c9b953e6] | 112 | -->
|
---|
[1fcdfae] | 113 | <para><parameter>--with-readline</parameter>: This option enables
|
---|
| 114 | <application>Readline</application> support in interactive mode.</para>
|
---|
| 115 |
|
---|
| 116 | </sect2>
|
---|
| 117 |
|
---|
[b96124dd] | 118 | <sect2 role="content">
|
---|
| 119 | <title>Contents</title>
|
---|
| 120 |
|
---|
| 121 | <segmentedlist>
|
---|
| 122 | <segtitle>Installed Programs</segtitle>
|
---|
| 123 | <segtitle>Installed Libraries</segtitle>
|
---|
| 124 | <segtitle>Installed Directories</segtitle>
|
---|
[fc7afd0c] | 125 |
|
---|
[b96124dd] | 126 | <seglistitem>
|
---|
| 127 | <seg>bc and dc</seg>
|
---|
| 128 | <seg>None</seg>
|
---|
| 129 | <seg>None</seg>
|
---|
| 130 | </seglistitem>
|
---|
| 131 | </segmentedlist>
|
---|
[fc7afd0c] | 132 |
|
---|
[b96124dd] | 133 | <variablelist>
|
---|
| 134 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 135 | <?dbfo list-presentation="list"?>
|
---|
| 136 | <?dbhtml list-presentation="table"?>
|
---|
[fc7afd0c] | 137 |
|
---|
[b96124dd] | 138 | <varlistentry id="bc-prog">
|
---|
| 139 | <term><command>bc</command></term>
|
---|
| 140 | <listitem>
|
---|
| 141 | <para>is a calculator.</para>
|
---|
| 142 | <indexterm zone="bc bc-prog">
|
---|
| 143 | <primary sortas="b-bc">bc</primary>
|
---|
| 144 | </indexterm>
|
---|
| 145 | </listitem>
|
---|
| 146 | </varlistentry>
|
---|
[fc7afd0c] | 147 |
|
---|
[b96124dd] | 148 | <varlistentry id="dc">
|
---|
| 149 | <term><command>dc</command></term>
|
---|
| 150 | <listitem>
|
---|
| 151 | <para>is a reverse-polish calculator.</para>
|
---|
| 152 | <indexterm zone="bc dc">
|
---|
| 153 | <primary sortas="b-dc">dc</primary>
|
---|
| 154 | </indexterm>
|
---|
| 155 | </listitem>
|
---|
| 156 | </varlistentry>
|
---|
[fc7afd0c] | 157 |
|
---|
[b96124dd] | 158 | </variablelist>
|
---|
| 159 |
|
---|
| 160 | </sect2>
|
---|
[52d29f7] | 161 |
|
---|
| 162 | </sect1>
|
---|
| 163 |
|
---|