1 Installing calc from the bzip2-ed tarball in 4 easy steps:
3 0) If your platform supports i686 RPMs, you may want to go to:
5 http://www.isthe.com/chongo/src/calc/
10 - all that is needed if you just want to use calc
12 * calc-devel-*.i686.rpm
13 - calc *.h header and *.a lib files for use in other programs
16 - calc source in RPM package form
18 The following 4 steps apply to calc source tree that comes from either:
20 bunzip2 -c calc-*.tar.bz2 | tar -xvf -
24 rpm -ivh calc-*.src.rpm
26 bunzip2 -c /usr/src/redhat/SOURCES/calc-*.tar.bz2 | tar -xvf -
28 1) Look at the makefile, and adjust it to suit your needs.
30 The top level Makefile and the custom/Makefile require a GNU
31 Make (such as gmake) or an equivalently advanced make. On many
32 targets, the default make is sufficent. On FreeBSD for example,
33 one must use gmake instead of make.
35 If your target system does not have GNU Make (or equivalent), then
36 you should try using the Makefile.simple and custom/Makefile.simple
39 mv Makefile Makefile.gmake
40 cp Makefile.simple Makefile
41 mv custom/Makefile custom/Makefile.gmake
42 cp custom/Makefile.simple custom/Makefile
44 The Makefile, as shipped, is suitable for installation under
45 Linux and Un*x-like environments. For the most part, the default
46 values should work. If in doubt, follow the 'When in doubt'
49 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
50 ! If you are building under Windoz or a Windoz-like environment !
51 ! (such as Cygwin or DJGPP), read the README.WINDOWS file. !
52 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
54 You should determine if these Makefile variables are reasonable:
56 INCDIR Where the system include (.h) files are kept.
57 BINDIR Where to install calc binary files.
58 LIBDIR Where to install calc link library (*.a) files.
59 CALC_SHAREDIR Where to install calc help, .cal, startup, and
62 You may want to change the default installation locations for
63 these values, which are based on the 4 values listed above:
65 HELPDIR where the help directory is installed
66 CALC_INCDIR where the calc include files are installed
67 CUSTOMCALDIR where custom *.cal files are installed
68 CUSTOMHELPDIR where custom help files are installed
69 CUSTOMINCDIR where custom .h files are installed
70 SCRIPTDIR where calc shell scripts are installed
72 If you want to install calc files under a top level directory,
75 The calc install is performed under ${T}, the calc build is
76 performed under /. The purpose for ${T} is to allow someone
77 to install calc somewhere other than into the system area.
83 CALC_SHAREDIR= /usr/share/calc
89 Then the installation locations will be:
91 calc binary files: /var/tmp/testing/usr/bin
92 calc link library: /var/tmp/testing/usr/lib
93 calc help, .cal ...: /var/tmp/testing/usr/share/calc
94 ... etc ... /var/tmp/testing/...
96 If ${T} is empty, calc is installed under /, which is the same
97 top of tree for which it was built. If ${T} is non-empty, then
98 calc is installed under ${T}, as if one had to chroot under
99 ${T} for calc to operate.
101 Look for the section that starts:
107 Select a compiler set by commenting in the appropriate set
108 of cc options. As shipped the Makefile assumes a gcc-like
109 environment such as Linux. If a more appropriate cc set if
110 found below, comment out the Linux set and comment in that
111 set or edit the gcc set or the common cc set as needed.
113 You may want to change these Makrfile variables from their defaults:
117 You may or may not need RANLIB when building libraries.
118 As shipped the Makefile assumes RANLIB is needed.
119 Comment the in/out the RANLIB value if ranlib does
120 not work or does not exist.
124 You may want to change the default pager used by calc.
125 As shipped the Makefile assumes 'more'. On your system
126 you may find 'less' to be a better pager.
130 Some compilers (to put it mildly) have bugs. Sometimes the
131 DEBUG Makefile variable causes the compiler / optimizer to
132 produce bad code. Other compilers do just fine.
134 If possible try to use DEBUG=-O3 -g3 (maximum optimization
135 and debug symbols). If the calc test fails (see step 3),
136 try lowering either the -O value and/or the -g3. Also try
137 using -Osomething without -g.
139 Adjust other Makefile variables as needed.
143 The top level Makefile and the custom/Makefile require a GNU
144 Make (such as gmake) or an equivalently advanced make. On many
145 targets, the default make is sufficent. On FreeBSD for example,
146 one must use gmake instead of make.
148 If your target system does not have GNU Make (or equivalent), then
149 you should try using the Makefile.simple and custom/Makefile.simple
152 mv Makefile Makefile.gmake
153 cp Makefile.simple Makefile
154 mv custom/Makefile custom/Makefile.gmake
155 cp custom/Makefile.simple custom/Makefile
159 ==> We are interested in any compiler warnings (and errors) that
160 you may find. See the BUGS file if you find any compiler
163 NOTE: You can force calc to build with only static libs:
166 make calc-static-only BLD_TYPE=calc-static-only
168 or force calc to build with only dynamic libs:
171 make calc-dynamic-only BLD_TYPE=calc-dynamic-only
177 ==> If you run into problems, read the BUGS file and follow
178 the instructions found in there.
180 NOTE: For a quiet check which only prints if something goes wrong:
188 We suggest that you might want to read the README file and look at
189 the calc help subsystem. See the README file for details.
191 ## Copyright (C) 1999-2007 Landon Curt Noll
193 ## Calc is open software; you can redistribute it and/or modify it under
194 ## the terms of the version 2.1 of the GNU Lesser General Public License
195 ## as published by the Free Software Foundation.
197 ## Calc is distributed in the hope that it will be useful, but WITHOUT
198 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
199 ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
200 ## Public License for more details.
202 ## A copy of version 2.1 of the GNU Lesser General Public License is
203 ## distributed with calc under the filename COPYING-LGPL. You should have
204 ## received a copy with calc; if not, write to Free Software Foundation, Inc.
205 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
207 ## @(#) $Revision: 30.6 $
208 ## @(#) $Id: HOWTO.INSTALL,v 30.6 2007/10/16 12:22:22 chongo Exp $
209 ## @(#) $Source: /usr/local/src/bin/calc/RCS/HOWTO.INSTALL,v $
211 ## Under source code control: 1999/09/27 20:48:44
212 ## File existed as early as: 1999
214 ## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
215 ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/