[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 |
|
---|
[b96124dd] | 30 | <sect1info>
|
---|
| 31 | <othername>$LastChangedBy$</othername>
|
---|
| 32 | <date>$Date$</date>
|
---|
| 33 | </sect1info>
|
---|
[fc7afd0c] | 34 |
|
---|
[c9b953e6] | 35 | <title>bc-&bc-version;</title>
|
---|
[fc7afd0c] | 36 |
|
---|
[b96124dd] | 37 | <indexterm zone="bc">
|
---|
| 38 | <primary sortas="a-Bc">Bc</primary>
|
---|
| 39 | </indexterm>
|
---|
| 40 |
|
---|
| 41 | <sect2 role="package">
|
---|
[c9b953e6] | 42 | <title>Introduction to bc</title>
|
---|
[fc7afd0c] | 43 |
|
---|
[b96124dd] | 44 | <para>The <application>bc</application> package contains
|
---|
| 45 | an arbitrary precision numeric processing language.</para>
|
---|
[fc7afd0c] | 46 |
|
---|
[442d824] | 47 | <note><para>Starting with linux-3.9 the <command>bc</command>
|
---|
| 48 | program is needed to build the linux kernel. It is been moved
|
---|
| 49 | to LFS for LFS-7.4.</para></note>
|
---|
| 50 |
|
---|
[e748a01] | 51 | &lfs74_checked;
|
---|
[aafcfb8] | 52 |
|
---|
[b96124dd] | 53 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 54 | <itemizedlist spacing="compact">
|
---|
| 55 | <listitem>
|
---|
| 56 | <para>Download (HTTP): <ulink url="&bc-download-http;"/></para>
|
---|
| 57 | </listitem>
|
---|
| 58 | <listitem>
|
---|
| 59 | <para>Download (FTP): <ulink url="&bc-download-ftp;"/></para>
|
---|
| 60 | </listitem>
|
---|
| 61 | <listitem>
|
---|
| 62 | <para>Download MD5 sum: &bc-md5sum;</para>
|
---|
| 63 | </listitem>
|
---|
| 64 | <listitem>
|
---|
| 65 | <para>Download size: &bc-size;</para>
|
---|
| 66 | </listitem>
|
---|
| 67 | <listitem>
|
---|
| 68 | <para>Estimated disk space required: &bc-buildsize;</para>
|
---|
| 69 | </listitem>
|
---|
| 70 | <listitem>
|
---|
| 71 | <para>Estimated build time: &bc-time;</para>
|
---|
| 72 | </listitem>
|
---|
| 73 | </itemizedlist>
|
---|
[fc7afd0c] | 74 |
|
---|
[1039de3] | 75 | <para condition="html" role="usernotes">User Notes:
|
---|
| 76 | <ulink url="&blfs-wiki;/bc"/></para>
|
---|
| 77 |
|
---|
[b96124dd] | 78 | </sect2>
|
---|
[fc7afd0c] | 79 |
|
---|
[88adcdd] | 80 | <sect2 role="installation">
|
---|
[b96124dd] | 81 | <title>Installation of Bc</title>
|
---|
| 82 |
|
---|
| 83 | <para>Install <application>bc</application> by running the following commands:</para>
|
---|
| 84 |
|
---|
[c9b953e6] | 85 | <screen><userinput>./configure --prefix=/usr --with-readline &&
|
---|
[b96124dd] | 86 | make</userinput></screen>
|
---|
| 87 |
|
---|
[1fcdfae] | 88 | <para>To test <application>bc</application>, run the commands below.
|
---|
[9f12e36] | 89 | There is quite a bit of output, so you may want to redirect it to a file.
|
---|
[ed24600] | 90 | There are a very small percentage of tests (10 of 12,144) that will
|
---|
| 91 | indicate a roundoff error at the last digit.</para>
|
---|
| 92 |
|
---|
| 93 | <screen><userinput>echo "quit" | ./bc/bc -l Test/checklib.b</userinput></screen>
|
---|
[fc7afd0c] | 94 |
|
---|
[b96124dd] | 95 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[fc7afd0c] | 96 |
|
---|
[b96124dd] | 97 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
[fc7afd0c] | 98 |
|
---|
[b96124dd] | 99 | </sect2>
|
---|
[fc7afd0c] | 100 |
|
---|
[1fcdfae] | 101 | <sect2 role="commands">
|
---|
| 102 | <title>Command Explanations</title>
|
---|
[c9b953e6] | 103 | <!--
|
---|
[1fcdfae] | 104 | <para><command>sed -i '/PROTO.*readline/d' bc/scan.l</command>: This
|
---|
| 105 | command fixes the <application>Readline</application> library call.</para>
|
---|
| 106 |
|
---|
| 107 | <para><command>sed -i '/flex -I8/s/8//' configure</command>: This
|
---|
| 108 | command fixes the <application>Flex</application> invocation.</para>
|
---|
| 109 |
|
---|
| 110 | <para><command>sed -i '/stdlib/a #include <string.h>' lib/number.c</command>:
|
---|
| 111 | This command inserts a missing header.</para>
|
---|
| 112 |
|
---|
| 113 | <para><command>sed -i 's/program.*save/static &/' bc/load.c</command>:
|
---|
| 114 | This command fixes a segfault when running <application>bc</application>
|
---|
| 115 | with <command>bc -l</command>.</para>
|
---|
[c9b953e6] | 116 | -->
|
---|
[1fcdfae] | 117 | <para><parameter>--with-readline</parameter>: This option enables
|
---|
| 118 | <application>Readline</application> support in interactive mode.</para>
|
---|
| 119 |
|
---|
| 120 | </sect2>
|
---|
| 121 |
|
---|
[b96124dd] | 122 | <sect2 role="content">
|
---|
| 123 | <title>Contents</title>
|
---|
| 124 |
|
---|
| 125 | <segmentedlist>
|
---|
| 126 | <segtitle>Installed Programs</segtitle>
|
---|
| 127 | <segtitle>Installed Libraries</segtitle>
|
---|
| 128 | <segtitle>Installed Directories</segtitle>
|
---|
[fc7afd0c] | 129 |
|
---|
[b96124dd] | 130 | <seglistitem>
|
---|
| 131 | <seg>bc and dc</seg>
|
---|
| 132 | <seg>None</seg>
|
---|
| 133 | <seg>None</seg>
|
---|
| 134 | </seglistitem>
|
---|
| 135 | </segmentedlist>
|
---|
[fc7afd0c] | 136 |
|
---|
[b96124dd] | 137 | <variablelist>
|
---|
| 138 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 139 | <?dbfo list-presentation="list"?>
|
---|
| 140 | <?dbhtml list-presentation="table"?>
|
---|
[fc7afd0c] | 141 |
|
---|
[b96124dd] | 142 | <varlistentry id="bc-prog">
|
---|
| 143 | <term><command>bc</command></term>
|
---|
| 144 | <listitem>
|
---|
| 145 | <para>is a calculator.</para>
|
---|
| 146 | <indexterm zone="bc bc-prog">
|
---|
| 147 | <primary sortas="b-bc">bc</primary>
|
---|
| 148 | </indexterm>
|
---|
| 149 | </listitem>
|
---|
| 150 | </varlistentry>
|
---|
[fc7afd0c] | 151 |
|
---|
[b96124dd] | 152 | <varlistentry id="dc">
|
---|
| 153 | <term><command>dc</command></term>
|
---|
| 154 | <listitem>
|
---|
| 155 | <para>is a reverse-polish calculator.</para>
|
---|
| 156 | <indexterm zone="bc dc">
|
---|
| 157 | <primary sortas="b-dc">dc</primary>
|
---|
| 158 | </indexterm>
|
---|
| 159 | </listitem>
|
---|
| 160 | </varlistentry>
|
---|
[fc7afd0c] | 161 |
|
---|
[b96124dd] | 162 | </variablelist>
|
---|
| 163 |
|
---|
| 164 | </sect2>
|
---|
[52d29f7] | 165 |
|
---|
| 166 | </sect1>
|
---|
| 167 |
|
---|