summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/bc/Install
blob: d8afa09b211ec8fb024382f7727d663a2aaef87a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85

INSTALLATION for GNU bc version 1.03  (Including GNU dc.)
---------------------------------------------------------

  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
      one of several stdio packages that are freely copyable.  The GNU
      libc has a complete stdio package.  For Minix 1.5 systems,
      a vsprintf.c is included.)

  b) run "configure" with the "standard" options for a configure of gnu
     products.  The major parameter for bc is the "--prefix=path"
     option to find the executable and manual directories.  For more help,
     give the command "configure --help".

  c) "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 "make derived" 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 and dc.

  e) "make"
	compiles bc and dc.

  f) "make install"
	installs bc, dc, libmath.b (if needed), bc.1, dc.1 and dc.info
	in their proper directories.

  g) Use bc and dc!


DEFINES
-------

  The following defines you may or may not want.  To delete one standardly on,
  edit the Makefile.in.  If you want add their definitions, put their
  definition in an environment variable "CFLAGS" for 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".

    -DDOT_IS_LAST
	Causes bc to recognize a single period (".") as a shorthand notation
	for the standard variable "last".  (This is standardly defined.)

    -DSMALL_BUF
        Use this IF you are using flex AND you have a systems with limited
        memory space.

    -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.

    -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.

  Hopefully, the autoconf/configure system should remove all problems.

  If you do a "make realclean", it removes all files that can be derived
  from some other files.  This also removes the file "libmath.h" that
  is used by the configure script.  Without it there, the configure
  script makes wrong assumptions about the abilities of your compiler.
  To get things back to the point where configure works well you will
  need to "make libmath.h", "make distclean" and then run configure again.