[gforth] / gforth / INSTALL  

gforth: gforth/INSTALL


1 : anton 1.7 You need gcc version 2.0 or later to compile gforth.
2 : anton 1.1
3 : anton 1.5 First, type
4 : anton 1.3
5 : anton 1.8 ./configure
6 : anton 1.1
7 : anton 1.21 (see Section Configuration Options below for details).
8 :    
9 :     After configuration, type
10 :    
11 :     make
12 :    
13 :     Now you can check whether your shiny new Forth system works. Say
14 :    
15 :     make test
16 :    
17 :     You can run some benchmarks with
18 :    
19 :     make bench
20 :    
21 :     and compare them with the results in Benchres and in the manual.
22 :    
23 :     If everything is all right, you may want to install gforth. Type
24 :    
25 :     make install
26 :    
27 :     You have to make an entry in the info directory file manually.
28 :    
29 :     For paper documentation, print gforth.ps (a Postscript file (300dpi
30 :     fonts, i.e., it works, but does not produce best quality on better
31 :     printers)), or say
32 :    
33 :     make gforth.dvi
34 :    
35 :     and print the resulting file gforth.dvi. You can also get the
36 :     documentation in HTML format by typing
37 :    
38 :     make html
39 :    
40 : anton 1.28 If you prefer plain ASCII documentation, you can
41 :    
42 :     make doc/gforth.txt
43 :    
44 :     or just concatenate the files gforth.info-* ('cat gforth.info-*' under
45 :     Unix); the result of the latter option is a little worse.
46 :    
47 :     You can find binary distributions, documentation in HTML and plain
48 :     text format and information on known installation problems at
49 :     http://www.complang.tuwien.ac.at/forth/gforth/.
50 : anton 1.21
51 :    
52 :     Configuration Options
53 :    
54 : anton 1.23 If you use GNU make, you can build in a directory different from the
55 :     source directory by changing to the build directory and invoking
56 :     configure thus:
57 : anton 1.21
58 :     $srcdir/configure
59 :    
60 : anton 1.23 where $srcdir is the source directory. (Note that we tested this only
61 : anton 1.21 for installation; i.e., if you want to hack the Gforth sources, you
62 :     should probably build in the source directory).
63 :    
64 : pazsan 1.4 configure has the following useful parameters:
65 : anton 1.9 --prefix=PREFIX install architecture-independent files in PREFIX
66 :     [default: /usr/local]
67 :     --exec-prefix=PREFIX install architecture-dependent files in PREFIX
68 :     [default: same as prefix]
69 : anton 1.8 --enable-force-reg Use explicit register declarations if they appear in
70 :     the machine.h file. This can cause a good speedup,
71 :     but also incorrect code with some gcc versions on
72 :     some processors (default disabled).
73 :     --enable-direct-threaded Force direct threading. This may not work on
74 :     some machines and may cause slowdown on others.
75 :     (default processor-dependent)
76 :     --enable-indirect-threaded Force indirect threading. This can cause a
77 :     slowdown on some machines.
78 :     (default processor-dependent)
79 :     --with-debug specifies option -g to compile with debug info (default)
80 : anton 1.22 --without-debug omits the -g switch and creates smaller images on
81 :     machines where strip has problems with gcc style
82 :     debugging informations.
83 : anton 1.8 --help: tells you about other parameters.
84 : anton 1.1
85 : anton 1.21 The file Benchres shows which combination of the -enable options we
86 :     tried gave the best results for various machines.
87 :    
88 : anton 1.9 If you don't like the defaults for the installation directories, you
89 :     should override them already during configure. E.g., if you want to
90 :     install in the /gnu hierarchy instead of in the default /usr/local
91 : anton 1.15 hierarchy, say
92 : anton 1.5
93 : anton 1.9 ./configure --prefix=/gnu
94 : anton 1.2
95 : anton 1.17 Moreover, if your GCC is not called gcc (but, e.g., gcc-2.7.1), you
96 :     should say so during configuration. E.g.:
97 : pazsan 1.16
98 : anton 1.17 env CC=gcc-2.7.1 ./configure
99 : pazsan 1.16
100 : anton 1.17 You can also pass additional options to gcc in this way, e.g., if you
101 :     want to generate an a.out executable under Linux with gcc-2.7.0:
102 : anton 1.15
103 : anton 1.17 env "CC=gcc -b i486-linuxaout -V 2.7.0" ./configure
104 : anton 1.15
105 : anton 1.22 You can change the sizes of the various areas used in the default
106 :     image `gforth.fi' by passing the appropriate Gforth command line
107 :     options in the FORTHSIZES environment variable:
108 :    
109 : anton 1.26 env "FORTHSIZES=--dictionary-size=256k --data-stack-size=16k --fp-stack-size=15872b --return-stack-size=15k --locals-stack-size=14848b" ./configure
110 : anton 1.22
111 :     The line above reaffirms the default sizes. Note that the locals
112 :     stack area is also used as input buffer stack.
113 : anton 1.17
114 : anton 1.24 If C's "long long" do not work properly on your machine (i.e., if the
115 :     tests involving double-cell numbers fail), you can build Gforth such
116 :     that it does not use "long long":
117 :    
118 :     env ac_cv_sizeof_long_long=0 ./configure
119 :    
120 :    
121 :     Cross-Configuration
122 :    
123 :     A few tests made by the configure script do not work in a
124 :     cross-compilation situation. You have to provide the results of these
125 :     tests by hand. E.g., if you compile for a 386 architecture processor:
126 :    
127 :     env ac_cv_sizeof_char_p=4 ac_cv_sizeof_short=2 ac_cv_sizeof_int=4 ac_cv_sizeof_long=4 ac_cv_sizeof_long_long=8 ac_cv_c_bigendian=no ./configure
128 :    
129 :     The ac_cv_sizeof_... variables give the sizes of various C types;
130 :     ac_cv_sizeof_char_p is the same as "sizeof(char*)" in C code. The
131 :     ac_cv_c_bigendian variable gives the byte order.
132 :    
133 :    
134 : anton 1.17 Preloading installation-specific code
135 :    
136 :     If you want to have some installation-specific files loaded when
137 :     Gforth starts (e.g., an assembler for your processor), put commands
138 : anton 1.28 for loading them into /usr/local/share/gforth/site-forth/siteinit.fs
139 : anton 1.17 (if the commands work for all architectures) or
140 : anton 1.28 /usr/local/lib/gforth/site-forth/siteinit.fs (for
141 : anton 1.17 architecture-specific commands);
142 : anton 1.28 /usr/local/lib/gforth/site-forth/siteinit.fs takes precedence if both
143 : anton 1.17 files are present (unless you change the search path). The file names
144 :     given above are the defaults; if you have changed the prefix, you have
145 :     to replace "/usr/local" in these names with your prefix.
146 :    
147 :     By default, the installation procedure creates an empty
148 : anton 1.28 /usr/local/share/gforth/site-forth/siteinit.fs if there is no such
149 : anton 1.17 file.
150 :    
151 : anton 1.28 If you change the siteinit.fs file, you should run "make install"
152 : anton 1.17 again for the changes to take effect (Actually, the part of "make
153 :     install" starting with "rm gforth.fi" is sufficient).
154 :    
155 :    
156 : anton 1.12 Multiple Versions and Deinstallation
157 :    
158 :     Several versions of Gforth can be installed and used at the same
159 :     time. Version `foo' can be invoked with `gforth-foo'. We recommend to
160 :     keep the old version for some time after a new one has been installed.
161 : anton 1.10
162 : anton 1.12 You can deinstall this version of Gforth with 'make uninstall' and
163 :     version foo with 'make uninstall VERSION=foo'. 'make uninstall' also
164 :     tells you how to uninstall Gforth completely.

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help