1 1.1 kardel Basic Installation 2 1.1 kardel ================== 3 1.1 kardel 4 1.1 kardel These are generic *nix installation instructions. 5 1.1 kardel 6 1.1 kardel For Windows/NT, please see ports/winnt and html/build/hints/winnt.html. 7 1.1 kardel 8 1.1 kardel The `configure' shell script attempts to guess correct values for 9 1.1 kardel various system-dependent variables used during compilation. It uses 10 1.1 kardel those values to create a `Makefile' in each directory of the package. 11 1.1 kardel It may also create one or more `.h' files containing system-dependent 12 1.1 kardel definitions. Finally, it creates a shell script `config.status' that 13 1.1 kardel you can run in the future to recreate the current configuration, a file 14 1.1 kardel `config.cache' that saves the results of its tests to speed up 15 1.1 kardel reconfiguring, and a file `config.log' containing compiler output 16 1.1 kardel (useful mainly for debugging `configure'). 17 1.1 kardel 18 1.1 kardel If you need to do unusual things to compile the package, please try 19 1.1 kardel to figure out how `configure' could check whether to do them, and mail 20 1.1 kardel diffs or instructions to the address given in the `README' so they can 21 1.1 kardel be considered for the next release. If at some point `config.cache' 22 1.1 kardel contains results you don't want to keep, you may remove or edit it. 23 1.1 kardel 24 1.1 kardel The file `configure.in' is used to create `configure' by a program 25 1.1 kardel called `autoconf'. You only need `configure.in' if you want to change 26 1.1 kardel it or regenerate `configure' using a newer version of `autoconf'. 27 1.1 kardel 28 1.1 kardel The simplest way to compile this package is: 29 1.1 kardel 30 1.1 kardel 1. `cd' to the directory containing the package's source code and type 31 1.1 kardel `./configure' to configure the package for your system. If you're 32 1.1 kardel using `csh' on an old version of System V, you might need to type 33 1.1 kardel `sh ./configure' instead to prevent `csh' from trying to execute 34 1.1 kardel `configure' itself. 35 1.1 kardel 36 1.1 kardel Running `configure' takes a while. While running, it prints some 37 1.1 kardel messages telling which features it is checking for. 38 1.1 kardel 39 1.1 kardel 2. Type `make' to compile the package. 40 1.1 kardel 41 1.1 kardel 3. Optionally, type `make check' to run any self-tests that come with 42 1.1 kardel the package. 43 1.1 kardel 44 1.1 kardel 4. Type `make install' to install the programs and any data files and 45 1.1 kardel documentation. 46 1.1 kardel 47 1.1 kardel 5. You can remove the program binaries and object files from the 48 1.1 kardel source code directory by typing `make clean'. To also remove the 49 1.1 kardel files that `configure' created (so you can compile the package for 50 1.1 kardel a different kind of computer), type `make distclean'. There is 51 1.1 kardel also a `make maintainer-clean' target, but that is intended mainly 52 1.1 kardel for the package's developers. If you use it, you may have to get 53 1.1 kardel all sorts of other programs in order to regenerate files that came 54 1.1 kardel with the distribution. 55 1.1 kardel 56 1.1 kardel Compilers and Options 57 1.1 kardel ===================== 58 1.1 kardel 59 1.1 kardel Some systems require unusual options for compilation or linking that 60 1.1 kardel the `configure' script does not know about. You can give `configure' 61 1.1 kardel initial values for variables by setting them in the environment. Using 62 1.1 kardel a Bourne-compatible shell, you can do that on the command line like 63 1.1 kardel this: 64 1.1 kardel CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure 65 1.1 kardel 66 1.1 kardel Or on systems that have the `env' program, you can do it like this: 67 1.1 kardel env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure 68 1.1 kardel 69 1.1 kardel Compiling For Multiple Architectures 70 1.1 kardel ==================================== 71 1.1 kardel 72 1.1 kardel You can compile the package for more than one kind of computer at the 73 1.1 kardel same time, by placing the object files for each architecture in their 74 1.1 kardel own directory. To do this, you must use a version of `make' that 75 1.1 kardel supports the `VPATH' variable, such as GNU `make'. `cd' to the 76 1.1 kardel directory where you want the object files and executables to go and run 77 1.1 kardel the `configure' script. `configure' automatically checks for the 78 1.1 kardel source code in the directory that `configure' is in and in `..'. 79 1.1 kardel 80 1.1 kardel If you have to use a `make' that does not supports the `VPATH' 81 1.1 kardel variable, you have to compile the package for one architecture at a time 82 1.1 kardel in the source code directory. After you have installed the package for 83 1.1 kardel one architecture, use `make distclean' before reconfiguring for another 84 1.1 kardel architecture. 85 1.1 kardel 86 1.1 kardel Installation Names 87 1.1 kardel ================== 88 1.1 kardel 89 1.1 kardel By default, `make install' will install the package's files in 90 1.1 kardel `/usr/local/bin', `/usr/local/man', etc. You can specify an 91 1.1 kardel installation prefix other than `/usr/local' by giving `configure' the 92 1.1 kardel option `--prefix=PATH'. 93 1.1 kardel 94 1.1 kardel You can specify separate installation prefixes for 95 1.1 kardel architecture-specific files and architecture-independent files. If you 96 1.1 kardel give `configure' the option `--exec-prefix=PATH', the package will use 97 1.1 kardel PATH as the prefix for installing programs and libraries. 98 1.1 kardel Documentation and other data files will still use the regular prefix. 99 1.1 kardel 100 1.1 kardel If the package supports it, you can cause programs to be installed 101 1.1 kardel with an extra prefix or suffix on their names by giving `configure' the 102 1.1 kardel option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 103 1.1 kardel 104 1.1 kardel Optional Features 105 1.1 kardel ================= 106 1.1 kardel 107 1.1 kardel Some packages pay attention to `--enable-FEATURE' options to 108 1.1 kardel `configure', where FEATURE indicates an optional part of the package. 109 1.1 kardel They may also pay attention to `--with-PACKAGE' options, where PACKAGE 110 1.1 kardel is something like `gnu-as' or `x' (for the X Window System). The 111 1.1 kardel `README' should mention any `--enable-' and `--with-' options that the 112 1.1 kardel package recognizes. 113 1.1 kardel 114 1.1 kardel For packages that use the X Window System, `configure' can usually 115 1.1 kardel find the X include and library files automatically, but if it doesn't, 116 1.1 kardel you can use the `configure' options `--x-includes=DIR' and 117 1.1 kardel `--x-libraries=DIR' to specify their locations. 118 1.1 kardel 119 1.1 kardel Specifying the System Type 120 1.1 kardel ========================== 121 1.1 kardel 122 1.1 kardel There may be some features `configure' can not figure out 123 1.1 kardel automatically, but needs to determine by the type of host the package 124 1.1 kardel will run on. Usually `configure' can figure that out, but if it prints 125 1.1 kardel a message saying it can not guess the host type, give it the 126 1.1 kardel `--host=TYPE' option. TYPE can either be a short name for the system 127 1.1 kardel type, such as `sun4', or a canonical name with three fields: 128 1.1 kardel CPU-COMPANY-SYSTEM 129 1.1 kardel 130 1.1 kardel See the file `config.sub' for the possible values of each field. If 131 1.1 kardel `config.sub' isn't included in this package, then this package doesn't 132 1.1 kardel need to know the host type. 133 1.1 kardel 134 1.1 kardel If you are building compiler tools for cross-compiling, you can also 135 1.1 kardel use the `--target=TYPE' option to select the type of system they will 136 1.1 kardel produce code for and the `--build=TYPE' option to select the type of 137 1.1 kardel system on which you are compiling the package. 138 1.1 kardel 139 1.1 kardel Sharing Defaults 140 1.1 kardel ================ 141 1.1 kardel 142 1.1 kardel If you want to set default values for `configure' scripts to share, 143 1.1 kardel you can create a site shell script called `config.site' that gives 144 1.1 kardel default values for variables like `CC', `cache_file', and `prefix'. 145 1.1 kardel `configure' looks for `PREFIX/share/config.site' if it exists, then 146 1.1 kardel `PREFIX/etc/config.site' if it exists. Or, you can set the 147 1.1 kardel `CONFIG_SITE' environment variable to the location of the site script. 148 1.1 kardel A warning: not all `configure' scripts look for a site script. 149 1.1 kardel 150 1.1 kardel Operation Controls 151 1.1 kardel ================== 152 1.1 kardel 153 1.1 kardel `configure' recognizes the following options to control how it 154 1.1 kardel operates. 155 1.1 kardel 156 1.1 kardel `--cache-file=FILE' 157 1.1 kardel Use and save the results of the tests in FILE instead of 158 1.1 kardel `./config.cache'. Set FILE to `/dev/null' to disable caching, for 159 1.1 kardel debugging `configure'. 160 1.1 kardel 161 1.1 kardel `--help' 162 1.1 kardel Print a summary of the options to `configure', and exit. 163 1.1 kardel 164 1.1 kardel `--quiet' 165 1.1 kardel `--silent' 166 1.1 kardel `-q' 167 1.1 kardel Do not print messages saying which checks are being made. 168 1.1 kardel 169 1.1 kardel `--srcdir=DIR' 170 1.1 kardel Look for the package's source code in directory DIR. Usually 171 1.1 kardel `configure' can determine that directory automatically. 172 1.1 kardel 173 1.1 kardel `--version' 174 1.1 kardel Print the version of Autoconf used to generate the `configure' 175 1.1 kardel script, and exit. 176 1.1 kardel 177 1.1 kardel `configure' also accepts some other, not widely useful, options. 178 1.1 kardel 179