| 1 | Guile Installation Guide |
| 2 | Copyright (c) 1996, 1997, 1998, 1999, 2000 Free software Foundation, Inc. |
| 3 | |
| 4 | Permission is granted to anyone to make or distribute verbatim copies |
| 5 | of this document as received, in any medium, provided that the |
| 6 | copyright notice and permission notice are preserved, |
| 7 | and that the distributor grants the recipient permission |
| 8 | for further redistribution as permitted by this notice. |
| 9 | |
| 10 | Permission is granted to distribute modified versions |
| 11 | of this document, or of portions of it, |
| 12 | under the above conditions, provided also that they |
| 13 | carry prominent notices stating who last changed them, |
| 14 | and that any new or changed statements about the activities |
| 15 | of the Free Software Foundation are approved by the Foundation. |
| 16 | |
| 17 | |
| 18 | Brief Installation Instructions =========================================== |
| 19 | |
| 20 | To build Guile on unix, there are two basic steps: |
| 21 | |
| 22 | 1. Type "./configure", to configure the package for your system. |
| 23 | 2. Type "make", to build the package. |
| 24 | |
| 25 | Generic instructions for configuring and compiling GNU distributions |
| 26 | are included below. (For instructions how to install SLIB, the scheme |
| 27 | procedure library, see below.) |
| 28 | |
| 29 | |
| 30 | Special Instructions For Some Systems ===================================== |
| 31 | |
| 32 | We would like Guile to build on all systems using the simple |
| 33 | instructions above, but it seems that a few systems still need special |
| 34 | treatment. If you can send us fixes for these problems, we'd be |
| 35 | grateful. |
| 36 | |
| 37 | SunOS 4.1: Guile's shared library support seems to be confused, but |
| 38 | hey; shared libraries are confusing. You may need to configure |
| 39 | Guile with a command like: |
| 40 | ./configure --disable-shared |
| 41 | For more information on `--disable-shared', see below, "Flags |
| 42 | Accepted by Configure". |
| 43 | |
| 44 | HP/UX: GCC 2.7.2 (and maybe other versions) have trouble creating |
| 45 | shared libraries if they depend on any non-shared libraries. GCC |
| 46 | seems to have other problems as well. To work around this, we |
| 47 | suggest you configure Guile to use the system's C compiler: |
| 48 | CC=cc ./configure |
| 49 | |
| 50 | NetBSD: Perry Metzger says, "Guile will build under NetBSD only using |
| 51 | gmake -- the native make will not work. (gmake is in our package |
| 52 | system, so this will not be a problem when we packagize 1.3.)" |
| 53 | |
| 54 | |
| 55 | Flags Accepted by Configure =============================================== |
| 56 | |
| 57 | If you run the configure script with no arguments, it should examine |
| 58 | your system and set things up appropriately. However, there are a few |
| 59 | switches specific to Guile you may find useful in some circumstances. |
| 60 | |
| 61 | |
| 62 | --enable-maintainer-mode |
| 63 | |
| 64 | If you have automake, autoconf, and libtool installed on your |
| 65 | system, this switch causes configure to generate Makefiles which |
| 66 | know how to automatically regenerate configure scripts, makefiles, |
| 67 | and headers, when they are out of date. The README file says which |
| 68 | versions of those tools you will need. |
| 69 | |
| 70 | |
| 71 | --with-threads --- Build with thread support |
| 72 | |
| 73 | Build a Guile executable and library that supports cooperative |
| 74 | threading. If you use this switch, Guile will also build and |
| 75 | install the QuickThreads non-preemptive threading library, |
| 76 | libqthreads, which you will need to link into your programs after |
| 77 | libguile. When you use `guile-config', you will pick up all |
| 78 | neccessary linker flags automatically. |
| 79 | |
| 80 | Cooperative threads are not yet thoroughly tested; once they are, |
| 81 | they will be enabled by default. The interaction with blocking I/O |
| 82 | is pretty ad hoc at the moment. In our experience, bugs in the |
| 83 | thread support do not affect you if you don't actually use threads. |
| 84 | |
| 85 | |
| 86 | --with-modules --- Specify statically linked `modules' |
| 87 | |
| 88 | Guile can dynamically load `plugin modules' during runtime, using |
| 89 | facilities provided by libtool. Not all platforms support this, |
| 90 | however. On these platforms, you can statically link the plugin |
| 91 | modules into libguile when Guile itself is build. XXX - how does |
| 92 | one specify the modules? |
| 93 | |
| 94 | |
| 95 | --enable-deprecated=LEVEL --- Control the inclusion of deprecated features. |
| 96 | |
| 97 | You can select between different behaviours via the LEVEL argument: |
| 98 | a value of "no" will omit all deprecated features and you will get |
| 99 | "undefined reference", "variable unbound" or similar errors when you |
| 100 | try to use them. All other values will include all deprecated |
| 101 | features. The LEVEL argument is used to determine the default value |
| 102 | for the environment variable GUILE_WARN_DEPRECATED. See the README |
| 103 | for more information. |
| 104 | |
| 105 | The default is to get a vague warning at program exit if deprecated |
| 106 | features were used: |
| 107 | |
| 108 | --enable-deprecated=yes |
| 109 | --enable-deprecated=summary |
| 110 | |
| 111 | To get a detailed warning at first use of a deprecated feature: |
| 112 | |
| 113 | --enable-deprecated=detailed |
| 114 | |
| 115 | To get no warnings: |
| 116 | |
| 117 | --enable-deprecated=shutup |
| 118 | |
| 119 | To omit deprecated features completely and irrevokably: |
| 120 | |
| 121 | --enable-deprecated=no |
| 122 | |
| 123 | |
| 124 | --disable-shared --- Do not build shared libraries. |
| 125 | --disable-static --- Do not build static libraries. |
| 126 | |
| 127 | Normally, both static and shared libraries will be built if your |
| 128 | system supports them. |
| 129 | |
| 130 | |
| 131 | --enable-debug-freelist --- Enable freelist debugging. |
| 132 | |
| 133 | This enables a debugging version of SCM_NEWCELL(), and also |
| 134 | registers an extra primitive, the setter |
| 135 | `gc-set-debug-check-freelist!'. |
| 136 | |
| 137 | Configure with the --enable-debug-freelist option to enable the |
| 138 | gc-set-debug-check-freelist! primitive, and then use: |
| 139 | |
| 140 | (gc-set-debug-check-freelist! #t) # turn on checking of the freelist |
| 141 | (gc-set-debug-check-freelist! #f) # turn off checking |
| 142 | |
| 143 | Checking of the freelist forces a traversal of the freelist and a |
| 144 | garbage collection before each allocation of a cell. This can slow |
| 145 | down the interpreter dramatically, so the setter should be used to |
| 146 | turn on this extra processing only when necessary. |
| 147 | |
| 148 | |
| 149 | --enable-debug-malloc --- Enable malloc debugging. |
| 150 | |
| 151 | Include code for debugging of calls to scm_must_malloc/realloc/free. |
| 152 | |
| 153 | Checks that |
| 154 | |
| 155 | 1. objects freed by scm_must_free has been mallocated by scm_must_malloc |
| 156 | 2. objects reallocated by scm_must_realloc has been allocated by |
| 157 | scm_must_malloc |
| 158 | 3. reallocated objects are reallocated with the same what string |
| 159 | |
| 160 | But, most importantly, it records the number of allocated objects of |
| 161 | each kind. This is useful when searching for memory leaks. |
| 162 | |
| 163 | A Guile compiled with this option provides the primitive |
| 164 | `malloc-stats' which returns an alist with pairs of kind and the |
| 165 | number of objects of that kind. |
| 166 | |
| 167 | |
| 168 | --enable-guile-debug --- Include internal debugging functions |
| 169 | --disable-arrays --- omit array and uniform array support |
| 170 | --disable-posix --- omit posix interfaces |
| 171 | --disable-networking --- omit networking interfaces |
| 172 | --disable-regex --- omit regular expression interfaces |
| 173 | |
| 174 | |
| 175 | Using Guile Without Installing It ========================================= |
| 176 | |
| 177 | If you want to run Guile without installing it, set the environment |
| 178 | variable `GUILE_LOAD_PATH' to a colon-separated list of directories, |
| 179 | including the directory containing this INSTALL file. If you used a |
| 180 | separate build directory, you'll need to include the build directory |
| 181 | in the path as well. |
| 182 | |
| 183 | For example, suppose the Guile distribution unpacked into a directory |
| 184 | called `/home/jimb/guile-snap' (so the full name of this INSTALL file |
| 185 | would be `/home/jimb/guile-snap/INSTALL'). Then you might say, if |
| 186 | you're using Bash or any other Bourne shell variant, |
| 187 | |
| 188 | export GUILE_LOAD_PATH=/home/jimb/guile-snap |
| 189 | |
| 190 | or if you're using CSH or one of its variants: |
| 191 | |
| 192 | setenv GUILE_LOAD_PATH /home/jimb/guile-snap |
| 193 | |
| 194 | |
| 195 | Installing SLIB =========================================================== |
| 196 | |
| 197 | In order to use SLIB from Guile you basically only need to put the |
| 198 | `slib' directory _in_ one of the directories on Guile's load path. |
| 199 | |
| 200 | The standard installation is: |
| 201 | |
| 202 | 1. Obtain slib from http://www-swiss.ai.mit.edu/~jaffer/SLIB.html |
| 203 | |
| 204 | 2. Put it in Guile's data directory, that is the directory printed when |
| 205 | you type |
| 206 | |
| 207 | guile-config info pkgdatadir |
| 208 | |
| 209 | at the shell prompt. This is normally `/usr/local/share/guile', so the |
| 210 | directory will normally have full path `/usr/local/share/guile/slib'. |
| 211 | |
| 212 | 3. Start guile as a user with write access to the data directory and type |
| 213 | |
| 214 | (use-modules (ice-9 slib)) |
| 215 | |
| 216 | at the Guile prompt. This will generate the slibcat catalog next to |
| 217 | the slib directory. |
| 218 | |
| 219 | SLIB's `require' is provided by the Guile module (ice-9 slib). |
| 220 | |
| 221 | Example: |
| 222 | |
| 223 | (use-modules (ice-9 slib)) |
| 224 | (require 'primes) |
| 225 | (prime? 7) |
| 226 | |
| 227 | |
| 228 | Generic Instructions for Building Auto-Configured Packages ================ |
| 229 | |
| 230 | To compile this package: |
| 231 | |
| 232 | 1. Configure the package for your system. In the directory that this |
| 233 | file is in, type `./configure'. If you're using `csh' on an old |
| 234 | version of System V, you might need to type `sh configure' instead to |
| 235 | prevent `csh' from trying to execute `configure' itself. |
| 236 | |
| 237 | The `configure' shell script attempts to guess correct values for |
| 238 | various system-dependent variables used during compilation, and |
| 239 | creates the Makefile(s) (one in each subdirectory of the source |
| 240 | directory). In some packages it creates a C header file containing |
| 241 | system-dependent definitions. It also creates a file `config.status' |
| 242 | that you can run in the future to recreate the current configuration. |
| 243 | Running `configure' takes a minute or two. |
| 244 | |
| 245 | To compile the package in a different directory from the one |
| 246 | containing the source code, you must use GNU make. `cd' to the |
| 247 | directory where you want the object files and executables to go and |
| 248 | run `configure' with the option `--srcdir=DIR', where DIR is the |
| 249 | directory that contains the source code. Using this option is |
| 250 | actually unnecessary if the source code is in the parent directory of |
| 251 | the one in which you are compiling; `configure' automatically checks |
| 252 | for the source code in `..' if it does not find it in the current |
| 253 | directory. |
| 254 | |
| 255 | By default, `make install' will install the package's files in |
| 256 | /usr/local/bin, /usr/local/lib, /usr/local/man, etc. You can specify |
| 257 | an installation prefix other than /usr/local by giving `configure' the |
| 258 | option `--prefix=PATH'. Alternately, you can do so by changing the |
| 259 | `prefix' variable in the Makefile that `configure' creates (the |
| 260 | Makefile in the top-level directory, if the package contains |
| 261 | subdirectories). |
| 262 | |
| 263 | You can specify separate installation prefixes for machine-specific |
| 264 | files and machine-independent files. If you give `configure' the |
| 265 | option `--exec_prefix=PATH', the package will use PATH as the prefix |
| 266 | for installing programs and libraries. Normally, all files are |
| 267 | installed using the same prefix. |
| 268 | |
| 269 | `configure' ignores any other arguments that you give it. |
| 270 | |
| 271 | If your system requires unusual options for compilation or linking |
| 272 | that `configure' doesn't know about, you can give `configure' initial |
| 273 | values for some variables by setting them in the environment. In |
| 274 | Bourne-compatible shells, you can do that on the command line like |
| 275 | this: |
| 276 | CC='gcc -traditional' DEFS=-D_POSIX_SOURCE ./configure |
| 277 | |
| 278 | The `make' variables that you might want to override with environment |
| 279 | variables when running `configure' are: |
| 280 | |
| 281 | (For these variables, any value given in the environment overrides the |
| 282 | value that `configure' would choose:) |
| 283 | CC C compiler program. |
| 284 | Default is `cc', or `gcc' if `gcc' is in your PATH. |
| 285 | INSTALL Program to use to install files. |
| 286 | Default is `install' if you have it, `cp' otherwise. |
| 287 | INCLUDEDIR Directory for `configure' to search for include files. |
| 288 | Default is /usr/include. |
| 289 | |
| 290 | (For these variables, any value given in the environment is added to |
| 291 | the value that `configure' chooses:) |
| 292 | DEFS Configuration options, in the form '-Dfoo -Dbar ...' |
| 293 | LIBS Libraries to link with, in the form '-lfoo -lbar ...' |
| 294 | |
| 295 | If you need to do unusual things to compile the package, we encourage |
| 296 | you to teach `configure' how to do them and mail the diffs to the |
| 297 | address given in the README so we can include them in the next |
| 298 | release. |
| 299 | |
| 300 | 2. Type `make' to compile the package. |
| 301 | |
| 302 | 3. Type `make install' to install programs, data files, and |
| 303 | documentation. |
| 304 | |
| 305 | 4. You can remove the program binaries and object files from the |
| 306 | source directory by typing `make clean'. To also remove the |
| 307 | Makefile(s), the header file containing system-dependent definitions |
| 308 | (if the package uses one), and `config.status' (all the files that |
| 309 | `configure' created), type `make distclean'. |
| 310 | |
| 311 | The file `configure.in' is used as a template to create `configure' by |
| 312 | a program called `autoconf'. You will only need it if you want to |
| 313 | regenerate `configure' using a newer version of `autoconf'. |
| 314 | |