Commit | Line | Data |
---|---|---|
30d14d55 | 1 | To build Guile on unix, there are two basic steps: |
0196b30a JB |
2 | |
3 | 1. Configure the package by running the configure script. | |
4 | 2. Build the package by running make. | |
5 | ||
6 | Generic instructions for configuring and compiling GNU distributions | |
7 | are included below. Here is an illustration of commands that might be | |
8 | used to build Guile. The voluminous output of the commands is not shown. | |
9 | ||
cd2e9eb5 JB |
10 | % tar xvf guile-snap.tar.gz # unpack the sources |
11 | % cd guile-snap | |
30d14d55 JB |
12 | % ./configure |
13 | % make | |
14 | ||
15 | The `configure' script examines your system, and adapts Guile to | |
16 | compile and run on it. | |
17 | ||
18 | The `make' command builds several things: | |
19 | - An executable file `guile/guile', which is an interactive shell for | |
20 | talking with the Guile Scheme interpreter. | |
21 | - An object library `guile/libguile.a', containing the Guile Scheme | |
22 | interpreter, ready to be linked into your programs. | |
23 | - An object library `gtcltk-lib/libgtcltk.a', containing a simple | |
24 | interface between Guile and Tcl/Tk. This is only built if the | |
25 | configure script notices that you have the appropriate version of | |
26 | Tcl/Tk installed on your system already. If it is installed, `make' | |
27 | will automatically include Tcl/Tk and the interface in the guile | |
28 | shell. If the interface were documented, we'd include a pointer to | |
29 | it here. | |
30 | ||
31 | To install Guile, type `make install'. This installs the executable | |
32 | and libraries mentioned above, as well as Guile's header files and | |
33 | Scheme libraries. | |
34 | ||
35 | If you want to run Guile without installing it, set the environment | |
36 | variable `SCHEME_LOAD_PATH' to a colon-separated list of directories, | |
37 | including the directory containing this INSTALL file. For example, if | |
38 | you unpacked Guile so that the full filename of this file is | |
cd2e9eb5 | 39 | `/home/jimb/guile-snap/INSTALL', then you might say |
30d14d55 | 40 | |
cd2e9eb5 | 41 | export SCHEME_LOAD_PATH=/home/jimb/my-scheme:/home/jimb/guile-snap |
0196b30a | 42 | |
30d14d55 | 43 | if you're using Bash or any other Bourne shell variant, or |
0196b30a | 44 | |
cd2e9eb5 | 45 | setenv SCHEME_LOAD_PATH /home/jimb/my-scheme:/home/jimb/guile-snap |
0196b30a | 46 | |
30d14d55 | 47 | if you're using CSH or one of its variants. |
0196b30a JB |
48 | |
49 | ||
50 | Generic Instructions for Building Auto-Configured Packages | |
51 | ========================================================== | |
52 | ||
53 | ||
54 | To compile this package: | |
55 | ||
56 | 1. Configure the package for your system. In the directory that this | |
57 | file is in, type `./configure'. If you're using `csh' on an old | |
58 | version of System V, you might need to type `sh configure' instead to | |
59 | prevent `csh' from trying to execute `configure' itself. | |
60 | ||
61 | The `configure' shell script attempts to guess correct values for | |
62 | various system-dependent variables used during compilation, and | |
63 | creates the Makefile(s) (one in each subdirectory of the source | |
64 | directory). In some packages it creates a C header file containing | |
65 | system-dependent definitions. It also creates a file `config.status' | |
66 | that you can run in the future to recreate the current configuration. | |
67 | Running `configure' takes a minute or two. | |
68 | ||
69 | To compile the package in a different directory from the one | |
70 | containing the source code, you must use GNU make. `cd' to the | |
71 | directory where you want the object files and executables to go and | |
72 | run `configure' with the option `--srcdir=DIR', where DIR is the | |
73 | directory that contains the source code. Using this option is | |
74 | actually unnecessary if the source code is in the parent directory of | |
75 | the one in which you are compiling; `configure' automatically checks | |
76 | for the source code in `..' if it does not find it in the current | |
77 | directory. | |
78 | ||
79 | By default, `make install' will install the package's files in | |
80 | /usr/local/bin, /usr/local/lib, /usr/local/man, etc. You can specify | |
81 | an installation prefix other than /usr/local by giving `configure' the | |
82 | option `--prefix=PATH'. Alternately, you can do so by changing the | |
83 | `prefix' variable in the Makefile that `configure' creates (the | |
84 | Makefile in the top-level directory, if the package contains | |
85 | subdirectories). | |
86 | ||
87 | You can specify separate installation prefixes for machine-specific | |
88 | files and machine-independent files. If you give `configure' the | |
89 | option `--exec_prefix=PATH', the package will use PATH as the prefix | |
90 | for installing programs and libraries. Normally, all files are | |
91 | installed using the same prefix. | |
92 | ||
93 | `configure' ignores any other arguments that you give it. | |
94 | ||
95 | If your system requires unusual options for compilation or linking | |
96 | that `configure' doesn't know about, you can give `configure' initial | |
97 | values for some variables by setting them in the environment. In | |
98 | Bourne-compatible shells, you can do that on the command line like | |
99 | this: | |
100 | CC='gcc -traditional' DEFS=-D_POSIX_SOURCE ./configure | |
101 | ||
102 | The `make' variables that you might want to override with environment | |
103 | variables when running `configure' are: | |
104 | ||
105 | (For these variables, any value given in the environment overrides the | |
106 | value that `configure' would choose:) | |
107 | CC C compiler program. | |
108 | Default is `cc', or `gcc' if `gcc' is in your PATH. | |
109 | INSTALL Program to use to install files. | |
110 | Default is `install' if you have it, `cp' otherwise. | |
111 | INCLUDEDIR Directory for `configure' to search for include files. | |
112 | Default is /usr/include. | |
113 | ||
114 | (For these variables, any value given in the environment is added to | |
115 | the value that `configure' chooses:) | |
116 | DEFS Configuration options, in the form '-Dfoo -Dbar ...' | |
117 | LIBS Libraries to link with, in the form '-lfoo -lbar ...' | |
118 | ||
119 | If you need to do unusual things to compile the package, we encourage | |
120 | you to teach `configure' how to do them and mail the diffs to the | |
121 | address given in the README so we can include them in the next | |
122 | release. | |
123 | ||
124 | 2. Type `make' to compile the package. | |
125 | ||
126 | 3. Type `make install' to install programs, data files, and | |
127 | documentation. | |
128 | ||
129 | 4. You can remove the program binaries and object files from the | |
130 | source directory by typing `make clean'. To also remove the | |
131 | Makefile(s), the header file containing system-dependent definitions | |
132 | (if the package uses one), and `config.status' (all the files that | |
133 | `configure' created), type `make distclean'. | |
134 | ||
135 | The file `configure.in' is used as a template to create `configure' by | |
136 | a program called `autoconf'. You will only need it if you want to | |
137 | regenerate `configure' using a newer version of `autoconf'. |