Annotation of gforth/INSTALL, revision 1.33
1.33 ! anton 1: Copyright (C) 2003 Free Software Foundation, Inc.
! 2: This file is free documentation; the Free Software Foundation gives
! 3: unlimited permission to copy, distribute and modify it.
! 4:
1.7 anton 5: You need gcc version 2.0 or later to compile gforth.
1.1 anton 6:
1.5 anton 7: First, type
1.3 anton 8:
1.8 anton 9: ./configure
1.1 anton 10:
1.21 anton 11: (see Section Configuration Options below for details).
12:
13: After configuration, type
14:
15: make
16:
17: Now you can check whether your shiny new Forth system works. Say
18:
1.30 anton 19: make check
1.21 anton 20:
21: You can run some benchmarks with
22:
23: make bench
24:
25: and compare them with the results in Benchres and in the manual.
26:
27: If everything is all right, you may want to install gforth. Type
28:
29: make install
30:
1.29 crook 31: You have to make an entry in the info directory file manually (see
32: Installing Info Files, below).
1.21 anton 33:
34: For paper documentation, print gforth.ps (a Postscript file (300dpi
35: fonts, i.e., it works, but does not produce best quality on better
36: printers)), or say
37:
38: make gforth.dvi
39:
40: and print the resulting file gforth.dvi. You can also get the
41: documentation in HTML format by typing
42:
43: make html
44:
1.28 anton 45: If you prefer plain ASCII documentation, you can
46:
47: make doc/gforth.txt
48:
49: or just concatenate the files gforth.info-* ('cat gforth.info-*' under
50: Unix); the result of the latter option is a little worse.
51:
52: You can find binary distributions, documentation in HTML and plain
53: text format and information on known installation problems at
54: http://www.complang.tuwien.ac.at/forth/gforth/.
1.21 anton 55:
56:
57: Configuration Options
58:
1.23 anton 59: If you use GNU make, you can build in a directory different from the
60: source directory by changing to the build directory and invoking
61: configure thus:
1.21 anton 62:
63: $srcdir/configure
64:
1.23 anton 65: where $srcdir is the source directory. (Note that we tested this only
1.21 anton 66: for installation; i.e., if you want to hack the Gforth sources, you
67: should probably build in the source directory).
68:
1.4 pazsan 69: configure has the following useful parameters:
1.9 anton 70: --prefix=PREFIX install architecture-independent files in PREFIX
71: [default: /usr/local]
72: --exec-prefix=PREFIX install architecture-dependent files in PREFIX
73: [default: same as prefix]
1.8 anton 74: --enable-force-reg Use explicit register declarations if they appear in
75: the machine.h file. This can cause a good speedup,
76: but also incorrect code with some gcc versions on
77: some processors (default disabled).
78: --help: tells you about other parameters.
1.1 anton 79:
1.21 anton 80: The file Benchres shows which combination of the -enable options we
81: tried gave the best results for various machines.
82:
1.9 anton 83: If you don't like the defaults for the installation directories, you
84: should override them already during configure. E.g., if you want to
85: install in the /gnu hierarchy instead of in the default /usr/local
1.15 anton 86: hierarchy, say
1.5 anton 87:
1.9 anton 88: ./configure --prefix=/gnu
1.2 anton 89:
1.17 anton 90: Moreover, if your GCC is not called gcc (but, e.g., gcc-2.7.1), you
91: should say so during configuration. E.g.:
1.16 pazsan 92:
1.17 anton 93: env CC=gcc-2.7.1 ./configure
1.16 pazsan 94:
1.17 anton 95: You can also pass additional options to gcc in this way, e.g., if you
96: want to generate an a.out executable under Linux with gcc-2.7.0:
1.15 anton 97:
1.17 anton 98: env "CC=gcc -b i486-linuxaout -V 2.7.0" ./configure
1.15 anton 99:
1.22 anton 100: You can change the sizes of the various areas used in the default
101: image `gforth.fi' by passing the appropriate Gforth command line
102: options in the FORTHSIZES environment variable:
103:
1.26 anton 104: env "FORTHSIZES=--dictionary-size=256k --data-stack-size=16k --fp-stack-size=15872b --return-stack-size=15k --locals-stack-size=14848b" ./configure
1.22 anton 105:
106: The line above reaffirms the default sizes. Note that the locals
107: stack area is also used as input buffer stack.
1.17 anton 108:
1.24 anton 109: If C's "long long" do not work properly on your machine (i.e., if the
110: tests involving double-cell numbers fail), you can build Gforth such
111: that it does not use "long long":
112:
113: env ac_cv_sizeof_long_long=0 ./configure
114:
115:
1.31 anton 116: Cross-Installation
1.24 anton 117:
1.31 anton 118: You need a cross-compilation toolchain for your target including gcc
119: (2.0 or later).
120:
121: The first step in cross-installation is the cross-configuration. A
122: few tests made by the configure script do not work in a
1.24 anton 123: cross-compilation situation. You have to provide the results of these
124: tests by hand. E.g., if you compile for a 386 architecture processor:
125:
1.32 anton 126: env ac_cv_sizeof_char_p=4 ac_cv_sizeof_char=1 ac_cv_sizeof_short=2 ac_cv_sizeof_int=4 ac_cv_sizeof_long=4 ac_cv_sizeof_long_long=8 ac_cv_sizeof_intptr_t=4 ac_cv_sizeof_int128_t=0 ac_cv_c_bigendian=no ./configure
1.24 anton 127:
128: The ac_cv_sizeof_... variables give the sizes of various C types;
129: ac_cv_sizeof_char_p is the same as "sizeof(char*)" in C code. The
130: ac_cv_c_bigendian variable gives the byte order.
1.31 anton 131:
132: After the cross-configuration you type
133:
134: make gforths
135:
136: This produces the gforth engines for the target.
137:
138: The next step is to transfer everything to the target; on the target,
139: you do
140:
141: make
142:
143: to complete building gforth. If you do not have a make on the target,
144: run
145:
146: make -n
147:
148: on the host; manually execute on the target the last command output by
149: "make -n" (GFORTHD=...); the other commands output by "make -n" are
150: not necessary unless you have changed the Gforth sources. You can
151: then check and benchmark Gforth with
152:
153: make check
154: make bench
155:
156: or equivalent. Finally, perform
157:
158: make install
159:
160: or the equivalent commands on the target.
1.24 anton 161:
162:
1.17 anton 163: Preloading installation-specific code
164:
165: If you want to have some installation-specific files loaded when
166: Gforth starts (e.g., an assembler for your processor), put commands
1.28 anton 167: for loading them into /usr/local/share/gforth/site-forth/siteinit.fs
1.17 anton 168: (if the commands work for all architectures) or
1.28 anton 169: /usr/local/lib/gforth/site-forth/siteinit.fs (for
1.17 anton 170: architecture-specific commands);
1.28 anton 171: /usr/local/lib/gforth/site-forth/siteinit.fs takes precedence if both
1.17 anton 172: files are present (unless you change the search path). The file names
173: given above are the defaults; if you have changed the prefix, you have
174: to replace "/usr/local" in these names with your prefix.
175:
176: By default, the installation procedure creates an empty
1.28 anton 177: /usr/local/share/gforth/site-forth/siteinit.fs if there is no such
1.17 anton 178: file.
179:
1.28 anton 180: If you change the siteinit.fs file, you should run "make install"
1.17 anton 181: again for the changes to take effect (Actually, the part of "make
182: install" starting with "rm gforth.fi" is sufficient).
183:
184:
1.12 anton 185: Multiple Versions and Deinstallation
186:
187: Several versions of Gforth can be installed and used at the same
188: time. Version `foo' can be invoked with `gforth-foo'. We recommend to
189: keep the old version for some time after a new one has been installed.
1.10 anton 190:
1.12 anton 191: You can deinstall this version of Gforth with 'make uninstall' and
192: version foo with 'make uninstall VERSION=foo'. 'make uninstall' also
193: tells you how to uninstall Gforth completely.
1.29 crook 194:
195:
196: Installing Info Files
197:
198: Info is the GNU project on-line documentation format. You can read
199: info files either from within Emacs (Ctrl-h i) or using the
200: stand-alone Info reader, 'info'.
201:
202: If you use the default install root of '/usr/local' then the info
203: files will be installed in '/usr/local/info'.
204:
205: Many GNU/Linux distributions are set up to put all of their
206: documentation in '/usr/info', in which case you might have to do a
207: couple of things to get your environment set up to accommodate files
208: in both areas:
209:
210: 1. Add an INFOPATH environment variable. The easiest place to do
211: this is '/etc/profile', right next to PATH and MANPATH:
212:
213: INFOPATH=/usr/local/info:/usr/info
214:
215: 2. Create a file called 'dir' in 'usr/local/info'. Use the file
216: '/usr/info/dir' as a template. You can add the line for gforth
217: manually, or use '/sbin/install-info' (man install-info for details).
218:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>