NetBSD/gnu/usr.bin/bc/Install

108 lines
4.0 KiB
Plaintext

INSTALLATION
------------
a) Make sure you have a working vsprintf and vfprintf in your library.
(If your system does not have them in your library, you can get
a copy of the BSD4.3-tahoe stdio that is freely copyable. It
is available from uunet.uu.net. For Minix systems, a vsprintf.c
is included.)
b) EDIT the Makefile for the correct definitions. Read the comments in
the the Makefile and make the changes needed. (A "full" explanation
of all the C defines are given at the end of this file.) If your are
on a MINIX machine, make sure the correct definitions for $O, $CFLAGS,
and $LDFLAGS are uncommented in the makefile.
NOTE: "configure" is a shell scritp that is automatically run by make
to configure the bc source to your operating system. You should still
look at the Makefile.
d) "make derived" (If you need it.)
The distribution contains the files bc.c.dist y.tab.h.dist and
scan.c.dist. These are provided so that you do not need a working
yacc and flex (lex). This program was designed to work with the free
programs byacc (berkeley yacc) and flex. It should work with other
versions of yacc and lex, but it is not guaranteed to work.
If you do not have yacc or flex, give the command to get the *.dist
files to their proper place. This insures that make will not try
to make these derived files from their original source. Use the
"make derived" before trying to compile bc.
e) "make"
compiles bc
f) "make install"
installs bc and libmath.b (if needed) in their directories.
g) Use bc!
DEFINES
-------
The following the are some defines that are automatically generated
by the configure script. In most cases, you do not need to deal
with them. The configure script is automatically run by make.
BC_MATH_FILE=$(LIBFILE)
This defines the location of the math library file. If you
use this definition, the math library is read from LIBFILE.
If you do not define this, bc will include a "compiled" form
of the math library with the executable and will not need to
read any external file if the -l flag is given.
VARARGS
The variable args mechanism is assumed to be ANSI stdarg.
Use -DVARARGS for Ultrix, SUN-OS, BSD, and other UNIX versions that
use traditional varargs,
For MINIX and ANSI compilers (gcc et al) do NOT use -DVARARGS.
NO_LIMITS
Use this for systems without the /usr/include/limits.h file.
(BSD4.3 is one.) You should check the values of INT_MAX and
LONG_MAX in the file const.h if you use -DNO_LIMITS.
NO_UNISTD
Use this for systems without /usr/include/unistd.h.
-DNO_STDLIB
Use this for systems without /usr/include/stdlib.h.
STRINGS_H
Include the file <strings.h> instead of <string.h>.
The following defines may need to be added by hand to the Makefile if
you want them. They are not generated by the configure script.
-DOLD_EQ_OP
Causes bc to recognize =<op> as the same as <op>=. The =<op> is
the old style. It makes "a =- 1" ambiguous. With OLD_EQ_OP defined
it is equivalent to "a -= 1" and with OLD_EQ_OP undefined it is
equivalent to "a = -1".
-DSMALL_BUF
Use this IF you are using flex AND you have a systems with limited
memory space. If you use this, you should also use -DBC_MATH_FILE.
This is "standard" for MINIX systems running on the IBM_PC.
-DSHORTNAMES
If your compiler keeps a limited number of characters from names,
you should include this define. It is needed for the K&R compiler
on MINIX and is automatically added for MINIX on the IBM_PC.
-DDEBUG=n
Compile the debugging code. The higher the number, the more
debugging code. The degugging code is not very good.
POSSIBLE PROBLEMS
-----------------
There might be some possible problems compiling due to different
versions of the header files. scan.c may require to edit out some
definitions of malloc and free. Others should compile with the
correct set of defines.