| 1 | Brief Installation Instructions =========================================== |
| 2 | |
| 3 | To build Guile on unix, there are two basic steps: |
| 4 | |
| 5 | 1. Type "./configure", to configure the package for your system. |
| 6 | 2. Type "make", to build the package. |
| 7 | |
| 8 | Generic instructions for configuring and compiling GNU distributions |
| 9 | are included below. |
| 10 | |
| 11 | |
| 12 | Special Instructions For Some Systems ===================================== |
| 13 | |
| 14 | We would like Guile to build on all systems using the simple |
| 15 | instructions above, but it seems that a few systems still need special |
| 16 | treatment. If you can send us fixes for these problems, we'd be |
| 17 | grateful. |
| 18 | |
| 19 | SunOS 4.1: Guile's shared library support seems to be confused, but |
| 20 | hey; shared libraries are confusing. You may need to configure |
| 21 | Guile with a command like: |
| 22 | ./configure --disable-shared |
| 23 | For more information on `--disable-shared', see below, "Flags |
| 24 | Accepted by Configure". |
| 25 | |
| 26 | HP/UX: GCC 2.7.2 (and maybe other versions) have trouble creating |
| 27 | shared libraries if they depend on any non-shared libraries. GCC |
| 28 | seems to have other problems as well. To work around this, we |
| 29 | suggest you configure Guile to use the system's C compiler: |
| 30 | CC=cc ./configure |
| 31 | |
| 32 | |
| 33 | What You Get ============================================================== |
| 34 | |
| 35 | The `configure' script examines your system, and adapts Guile to |
| 36 | compile and run on it. |
| 37 | |
| 38 | The `make' command builds several things: |
| 39 | - An executable file `guile/guile', which is an interactive shell for |
| 40 | talking with the Guile Scheme interpreter. |
| 41 | - An object library `libguile/.libs/libguile.a', containing the Guile Scheme |
| 42 | interpreter, ready to be linked into your programs. |
| 43 | |
| 44 | To install Guile, type `make install'. This installs the executable |
| 45 | and libraries mentioned above, as well as Guile's header files and |
| 46 | Scheme libraries. |
| 47 | |
| 48 | Make also builds shared libraries, on systems that support them. |
| 49 | Because of the nature of shared libraries, before linking against |
| 50 | them, you should probably install them; `make install' takes care of |
| 51 | this. |
| 52 | |
| 53 | |
| 54 | Flags Accepted by Configure =============================================== |
| 55 | |
| 56 | If you run the configure script with no arguments, it should examine |
| 57 | your system and set things up appropriately. However, there are a few |
| 58 | switches specific to Guile you may find useful in some circumstances. |
| 59 | |
| 60 | --enable-maintainer-mode --- If you have automake, autoconf, and |
| 61 | libtool installed on your system, this switch causes configure to |
| 62 | generate Makefiles which know how to automatically regenerate |
| 63 | configure scripts, makefiles, and headers, when they are out of date. |
| 64 | The README file says which versions of those tools you will need. |
| 65 | |
| 66 | --with-threads --- Build a Guile executable and library that supports |
| 67 | cooperative threading. If you use this switch, Guile will also build |
| 68 | and install the QuickThreads non-preemptive threading library, |
| 69 | libqt.a, which you will need to link into your programs after |
| 70 | libguile.a. That is, you should pass the switches -lguile -qt to your |
| 71 | linker. |
| 72 | |
| 73 | Coop threads are not yet thoroughly tested; once they are, they will |
| 74 | be enabled by default. The interaction with blocking I/O is pretty ad |
| 75 | hoc at the moment. In our experience, bugs in the thread support do |
| 76 | not affect you if you don't actually use threads. |
| 77 | |
| 78 | At the moment, threads are known not to work with the NetBSD 1.2 |
| 79 | assembler. |
| 80 | |
| 81 | --enable-dynamic-linking --- Build a Guile executable and library |
| 82 | providing Scheme functions which can load a shared library and |
| 83 | initialize it, perhaps thereby adding new functions to Guile. This |
| 84 | feature is not yet thoroughly tested; once it is, it will be enabled |
| 85 | by default. This option has no effect on systems that do not support |
| 86 | shared libraries. |
| 87 | |
| 88 | --disable-shared --- Do not build shared libraries. Normally, Guile |
| 89 | will build shared libraries if your system supports them. Guile |
| 90 | always builds static libraries. |
| 91 | |
| 92 | |
| 93 | Using Guile Without Installing It ========================================= |
| 94 | |
| 95 | If you want to run Guile without installing it, set the environment |
| 96 | variable `GUILE_LOAD_PATH' to a colon-separated list of directories, |
| 97 | including the directory containing this INSTALL file. If you used a |
| 98 | separate build directory, you'll need to include the build directory |
| 99 | in the path as well. |
| 100 | |
| 101 | For example, suppose the Guile distribution unpacked into a directory |
| 102 | called `/home/jimb/guile-snap' (so the full name of this file would be |
| 103 | `/home/jimb/guile-snap/INSTALL'). Then you might say: |
| 104 | |
| 105 | export GUILE_LOAD_PATH=/home/jimb/guile-snap |
| 106 | |
| 107 | if you're using Bash or any other Bourne shell variant, or |
| 108 | |
| 109 | setenv GUILE_LOAD_PATH /home/jimb/guile-snap |
| 110 | |
| 111 | if you're using CSH or one of its variants. |
| 112 | |
| 113 | If you built Guile in a separate directory from the source tree, then |
| 114 | you'll need to include your build directory in the GUILE_LOAD_PATH as |
| 115 | well. For example, if you built in a subdirectory of the source tree |
| 116 | called `pentium', you might say: |
| 117 | |
| 118 | export GUILE_LOAD_PATH=/home/jimb/guile-snap:/home/jimb/guile-snap/pentium |
| 119 | |
| 120 | |
| 121 | Building a Statically Linked Guile ======================================== |
| 122 | |
| 123 | Sometimes it's useful to build a statically-linked version of the |
| 124 | Guile executable. It's helpful in debugging, and for producing |
| 125 | stand-alone executables for distribution to machines you don't |
| 126 | control. |
| 127 | |
| 128 | To do this, set the LDFLAGS environment variable to `-static' before |
| 129 | you configure, or before you run the `make' command to build the |
| 130 | executable. |
| 131 | |
| 132 | |
| 133 | Generic Instructions for Building Auto-Configured Packages ================ |
| 134 | |
| 135 | To compile this package: |
| 136 | |
| 137 | 1. Configure the package for your system. In the directory that this |
| 138 | file is in, type `./configure'. If you're using `csh' on an old |
| 139 | version of System V, you might need to type `sh configure' instead to |
| 140 | prevent `csh' from trying to execute `configure' itself. |
| 141 | |
| 142 | The `configure' shell script attempts to guess correct values for |
| 143 | various system-dependent variables used during compilation, and |
| 144 | creates the Makefile(s) (one in each subdirectory of the source |
| 145 | directory). In some packages it creates a C header file containing |
| 146 | system-dependent definitions. It also creates a file `config.status' |
| 147 | that you can run in the future to recreate the current configuration. |
| 148 | Running `configure' takes a minute or two. |
| 149 | |
| 150 | To compile the package in a different directory from the one |
| 151 | containing the source code, you must use GNU make. `cd' to the |
| 152 | directory where you want the object files and executables to go and |
| 153 | run `configure' with the option `--srcdir=DIR', where DIR is the |
| 154 | directory that contains the source code. Using this option is |
| 155 | actually unnecessary if the source code is in the parent directory of |
| 156 | the one in which you are compiling; `configure' automatically checks |
| 157 | for the source code in `..' if it does not find it in the current |
| 158 | directory. |
| 159 | |
| 160 | By default, `make install' will install the package's files in |
| 161 | /usr/local/bin, /usr/local/lib, /usr/local/man, etc. You can specify |
| 162 | an installation prefix other than /usr/local by giving `configure' the |
| 163 | option `--prefix=PATH'. Alternately, you can do so by changing the |
| 164 | `prefix' variable in the Makefile that `configure' creates (the |
| 165 | Makefile in the top-level directory, if the package contains |
| 166 | subdirectories). |
| 167 | |
| 168 | You can specify separate installation prefixes for machine-specific |
| 169 | files and machine-independent files. If you give `configure' the |
| 170 | option `--exec_prefix=PATH', the package will use PATH as the prefix |
| 171 | for installing programs and libraries. Normally, all files are |
| 172 | installed using the same prefix. |
| 173 | |
| 174 | `configure' ignores any other arguments that you give it. |
| 175 | |
| 176 | If your system requires unusual options for compilation or linking |
| 177 | that `configure' doesn't know about, you can give `configure' initial |
| 178 | values for some variables by setting them in the environment. In |
| 179 | Bourne-compatible shells, you can do that on the command line like |
| 180 | this: |
| 181 | CC='gcc -traditional' DEFS=-D_POSIX_SOURCE ./configure |
| 182 | |
| 183 | The `make' variables that you might want to override with environment |
| 184 | variables when running `configure' are: |
| 185 | |
| 186 | (For these variables, any value given in the environment overrides the |
| 187 | value that `configure' would choose:) |
| 188 | CC C compiler program. |
| 189 | Default is `cc', or `gcc' if `gcc' is in your PATH. |
| 190 | INSTALL Program to use to install files. |
| 191 | Default is `install' if you have it, `cp' otherwise. |
| 192 | INCLUDEDIR Directory for `configure' to search for include files. |
| 193 | Default is /usr/include. |
| 194 | |
| 195 | (For these variables, any value given in the environment is added to |
| 196 | the value that `configure' chooses:) |
| 197 | DEFS Configuration options, in the form '-Dfoo -Dbar ...' |
| 198 | LIBS Libraries to link with, in the form '-lfoo -lbar ...' |
| 199 | |
| 200 | If you need to do unusual things to compile the package, we encourage |
| 201 | you to teach `configure' how to do them and mail the diffs to the |
| 202 | address given in the README so we can include them in the next |
| 203 | release. |
| 204 | |
| 205 | 2. Type `make' to compile the package. |
| 206 | |
| 207 | 3. Type `make install' to install programs, data files, and |
| 208 | documentation. |
| 209 | |
| 210 | 4. You can remove the program binaries and object files from the |
| 211 | source directory by typing `make clean'. To also remove the |
| 212 | Makefile(s), the header file containing system-dependent definitions |
| 213 | (if the package uses one), and `config.status' (all the files that |
| 214 | `configure' created), type `make distclean'. |
| 215 | |
| 216 | The file `configure.in' is used as a template to create `configure' by |
| 217 | a program called `autoconf'. You will only need it if you want to |
| 218 | regenerate `configure' using a newer version of `autoconf'. |