INSTALL revision ff559fab
1ff559fabSmrgInstallation Instructions 2ff559fabSmrg************************* 3ff559fabSmrg 4ff559fabSmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free 5ff559fabSmrgSoftware Foundation, Inc. 6ff559fabSmrg 7ff559fabSmrgThis file is free documentation; the Free Software Foundation gives 8ff559fabSmrgunlimited permission to copy, distribute and modify it. 9ff559fabSmrg 10ff559fabSmrgBasic Installation 11ff559fabSmrg================== 12ff559fabSmrg 13ff559fabSmrgThese are generic installation instructions. 14ff559fabSmrg 15ff559fabSmrg The `configure' shell script attempts to guess correct values for 16ff559fabSmrgvarious system-dependent variables used during compilation. It uses 17ff559fabSmrgthose values to create a `Makefile' in each directory of the package. 18ff559fabSmrgIt may also create one or more `.h' files containing system-dependent 19ff559fabSmrgdefinitions. Finally, it creates a shell script `config.status' that 20ff559fabSmrgyou can run in the future to recreate the current configuration, and a 21ff559fabSmrgfile `config.log' containing compiler output (useful mainly for 22ff559fabSmrgdebugging `configure'). 23ff559fabSmrg 24ff559fabSmrg It can also use an optional file (typically called `config.cache' 25ff559fabSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 26ff559fabSmrgthe results of its tests to speed up reconfiguring. (Caching is 27ff559fabSmrgdisabled by default to prevent problems with accidental use of stale 28ff559fabSmrgcache files.) 29ff559fabSmrg 30ff559fabSmrg If you need to do unusual things to compile the package, please try 31ff559fabSmrgto figure out how `configure' could check whether to do them, and mail 32ff559fabSmrgdiffs or instructions to the address given in the `README' so they can 33ff559fabSmrgbe considered for the next release. If you are using the cache, and at 34ff559fabSmrgsome point `config.cache' contains results you don't want to keep, you 35ff559fabSmrgmay remove or edit it. 36ff559fabSmrg 37ff559fabSmrg The file `configure.ac' (or `configure.in') is used to create 38ff559fabSmrg`configure' by a program called `autoconf'. You only need 39ff559fabSmrg`configure.ac' if you want to change it or regenerate `configure' using 40ff559fabSmrga newer version of `autoconf'. 41ff559fabSmrg 42ff559fabSmrgThe simplest way to compile this package is: 43ff559fabSmrg 44ff559fabSmrg 1. `cd' to the directory containing the package's source code and type 45ff559fabSmrg `./configure' to configure the package for your system. If you're 46ff559fabSmrg using `csh' on an old version of System V, you might need to type 47ff559fabSmrg `sh ./configure' instead to prevent `csh' from trying to execute 48ff559fabSmrg `configure' itself. 49ff559fabSmrg 50ff559fabSmrg Running `configure' takes awhile. While running, it prints some 51ff559fabSmrg messages telling which features it is checking for. 52ff559fabSmrg 53ff559fabSmrg 2. Type `make' to compile the package. 54ff559fabSmrg 55ff559fabSmrg 3. Optionally, type `make check' to run any self-tests that come with 56ff559fabSmrg the package. 57ff559fabSmrg 58ff559fabSmrg 4. Type `make install' to install the programs and any data files and 59ff559fabSmrg documentation. 60ff559fabSmrg 61ff559fabSmrg 5. You can remove the program binaries and object files from the 62ff559fabSmrg source code directory by typing `make clean'. To also remove the 63ff559fabSmrg files that `configure' created (so you can compile the package for 64ff559fabSmrg a different kind of computer), type `make distclean'. There is 65ff559fabSmrg also a `make maintainer-clean' target, but that is intended mainly 66ff559fabSmrg for the package's developers. If you use it, you may have to get 67ff559fabSmrg all sorts of other programs in order to regenerate files that came 68ff559fabSmrg with the distribution. 69ff559fabSmrg 70ff559fabSmrgCompilers and Options 71ff559fabSmrg===================== 72ff559fabSmrg 73ff559fabSmrgSome systems require unusual options for compilation or linking that the 74ff559fabSmrg`configure' script does not know about. Run `./configure --help' for 75ff559fabSmrgdetails on some of the pertinent environment variables. 76ff559fabSmrg 77ff559fabSmrg You can give `configure' initial values for configuration parameters 78ff559fabSmrgby setting variables in the command line or in the environment. Here 79ff559fabSmrgis an example: 80ff559fabSmrg 81ff559fabSmrg ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix 82ff559fabSmrg 83ff559fabSmrg *Note Defining Variables::, for more details. 84ff559fabSmrg 85ff559fabSmrgCompiling For Multiple Architectures 86ff559fabSmrg==================================== 87ff559fabSmrg 88ff559fabSmrgYou can compile the package for more than one kind of computer at the 89ff559fabSmrgsame time, by placing the object files for each architecture in their 90ff559fabSmrgown directory. To do this, you must use a version of `make' that 91ff559fabSmrgsupports the `VPATH' variable, such as GNU `make'. `cd' to the 92ff559fabSmrgdirectory where you want the object files and executables to go and run 93ff559fabSmrgthe `configure' script. `configure' automatically checks for the 94ff559fabSmrgsource code in the directory that `configure' is in and in `..'. 95ff559fabSmrg 96ff559fabSmrg If you have to use a `make' that does not support the `VPATH' 97ff559fabSmrgvariable, you have to compile the package for one architecture at a 98ff559fabSmrgtime in the source code directory. After you have installed the 99ff559fabSmrgpackage for one architecture, use `make distclean' before reconfiguring 100ff559fabSmrgfor another architecture. 101ff559fabSmrg 102ff559fabSmrgInstallation Names 103ff559fabSmrg================== 104ff559fabSmrg 105ff559fabSmrgBy default, `make install' will install the package's files in 106ff559fabSmrg`/usr/local/bin', `/usr/local/man', etc. You can specify an 107ff559fabSmrginstallation prefix other than `/usr/local' by giving `configure' the 108ff559fabSmrgoption `--prefix=PREFIX'. 109ff559fabSmrg 110ff559fabSmrg You can specify separate installation prefixes for 111ff559fabSmrgarchitecture-specific files and architecture-independent files. If you 112ff559fabSmrggive `configure' the option `--exec-prefix=PREFIX', the package will 113ff559fabSmrguse PREFIX as the prefix for installing programs and libraries. 114ff559fabSmrgDocumentation and other data files will still use the regular prefix. 115ff559fabSmrg 116ff559fabSmrg In addition, if you use an unusual directory layout you can give 117ff559fabSmrgoptions like `--bindir=DIR' to specify different values for particular 118ff559fabSmrgkinds of files. Run `configure --help' for a list of the directories 119ff559fabSmrgyou can set and what kinds of files go in them. 120ff559fabSmrg 121ff559fabSmrg If the package supports it, you can cause programs to be installed 122ff559fabSmrgwith an extra prefix or suffix on their names by giving `configure' the 123ff559fabSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 124ff559fabSmrg 125ff559fabSmrgOptional Features 126ff559fabSmrg================= 127ff559fabSmrg 128ff559fabSmrgSome packages pay attention to `--enable-FEATURE' options to 129ff559fabSmrg`configure', where FEATURE indicates an optional part of the package. 130ff559fabSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 131ff559fabSmrgis something like `gnu-as' or `x' (for the X Window System). The 132ff559fabSmrg`README' should mention any `--enable-' and `--with-' options that the 133ff559fabSmrgpackage recognizes. 134ff559fabSmrg 135ff559fabSmrg For packages that use the X Window System, `configure' can usually 136ff559fabSmrgfind the X include and library files automatically, but if it doesn't, 137ff559fabSmrgyou can use the `configure' options `--x-includes=DIR' and 138ff559fabSmrg`--x-libraries=DIR' to specify their locations. 139ff559fabSmrg 140ff559fabSmrgSpecifying the System Type 141ff559fabSmrg========================== 142ff559fabSmrg 143ff559fabSmrgThere may be some features `configure' cannot figure out automatically, 144ff559fabSmrgbut needs to determine by the type of machine the package will run on. 145ff559fabSmrgUsually, assuming the package is built to be run on the _same_ 146ff559fabSmrgarchitectures, `configure' can figure that out, but if it prints a 147ff559fabSmrgmessage saying it cannot guess the machine type, give it the 148ff559fabSmrg`--build=TYPE' option. TYPE can either be a short name for the system 149ff559fabSmrgtype, such as `sun4', or a canonical name which has the form: 150ff559fabSmrg 151ff559fabSmrg CPU-COMPANY-SYSTEM 152ff559fabSmrg 153ff559fabSmrgwhere SYSTEM can have one of these forms: 154ff559fabSmrg 155ff559fabSmrg OS KERNEL-OS 156ff559fabSmrg 157ff559fabSmrg See the file `config.sub' for the possible values of each field. If 158ff559fabSmrg`config.sub' isn't included in this package, then this package doesn't 159ff559fabSmrgneed to know the machine type. 160ff559fabSmrg 161ff559fabSmrg If you are _building_ compiler tools for cross-compiling, you should 162ff559fabSmrguse the `--target=TYPE' option to select the type of system they will 163ff559fabSmrgproduce code for. 164ff559fabSmrg 165ff559fabSmrg If you want to _use_ a cross compiler, that generates code for a 166ff559fabSmrgplatform different from the build platform, you should specify the 167ff559fabSmrg"host" platform (i.e., that on which the generated programs will 168ff559fabSmrgeventually be run) with `--host=TYPE'. 169ff559fabSmrg 170ff559fabSmrgSharing Defaults 171ff559fabSmrg================ 172ff559fabSmrg 173ff559fabSmrgIf you want to set default values for `configure' scripts to share, you 174ff559fabSmrgcan create a site shell script called `config.site' that gives default 175ff559fabSmrgvalues for variables like `CC', `cache_file', and `prefix'. 176ff559fabSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 177ff559fabSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 178ff559fabSmrg`CONFIG_SITE' environment variable to the location of the site script. 179ff559fabSmrgA warning: not all `configure' scripts look for a site script. 180ff559fabSmrg 181ff559fabSmrgDefining Variables 182ff559fabSmrg================== 183ff559fabSmrg 184ff559fabSmrgVariables not defined in a site shell script can be set in the 185ff559fabSmrgenvironment passed to `configure'. However, some packages may run 186ff559fabSmrgconfigure again during the build, and the customized values of these 187ff559fabSmrgvariables may be lost. In order to avoid this problem, you should set 188ff559fabSmrgthem in the `configure' command line, using `VAR=value'. For example: 189ff559fabSmrg 190ff559fabSmrg ./configure CC=/usr/local2/bin/gcc 191ff559fabSmrg 192ff559fabSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 193ff559fabSmrgoverridden in the site shell script). Here is a another example: 194ff559fabSmrg 195ff559fabSmrg /bin/bash ./configure CONFIG_SHELL=/bin/bash 196ff559fabSmrg 197ff559fabSmrgHere the `CONFIG_SHELL=/bin/bash' operand causes subsequent 198ff559fabSmrgconfiguration-related scripts to be executed by `/bin/bash'. 199ff559fabSmrg 200ff559fabSmrg`configure' Invocation 201ff559fabSmrg====================== 202ff559fabSmrg 203ff559fabSmrg`configure' recognizes the following options to control how it operates. 204ff559fabSmrg 205ff559fabSmrg`--help' 206ff559fabSmrg`-h' 207ff559fabSmrg Print a summary of the options to `configure', and exit. 208ff559fabSmrg 209ff559fabSmrg`--version' 210ff559fabSmrg`-V' 211ff559fabSmrg Print the version of Autoconf used to generate the `configure' 212ff559fabSmrg script, and exit. 213ff559fabSmrg 214ff559fabSmrg`--cache-file=FILE' 215ff559fabSmrg Enable the cache: use and save the results of the tests in FILE, 216ff559fabSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 217ff559fabSmrg disable caching. 218ff559fabSmrg 219ff559fabSmrg`--config-cache' 220ff559fabSmrg`-C' 221ff559fabSmrg Alias for `--cache-file=config.cache'. 222ff559fabSmrg 223ff559fabSmrg`--quiet' 224ff559fabSmrg`--silent' 225ff559fabSmrg`-q' 226ff559fabSmrg Do not print messages saying which checks are being made. To 227ff559fabSmrg suppress all normal output, redirect it to `/dev/null' (any error 228ff559fabSmrg messages will still be shown). 229ff559fabSmrg 230ff559fabSmrg`--srcdir=DIR' 231ff559fabSmrg Look for the package's source code in directory DIR. Usually 232ff559fabSmrg `configure' can determine that directory automatically. 233ff559fabSmrg 234ff559fabSmrg`configure' also accepts some other, not widely useful, options. Run 235ff559fabSmrg`configure --help' for more details. 236ff559fabSmrg 237