INSTALL revision caade7cc
1caade7ccSmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software 2caade7ccSmrgFoundation, Inc. 3caade7ccSmrg 4caade7ccSmrg This file is free documentation; the Free Software Foundation gives 5caade7ccSmrgunlimited permission to copy, distribute and modify it. 6caade7ccSmrg 7caade7ccSmrgBasic Installation 8caade7ccSmrg================== 9caade7ccSmrg 10caade7ccSmrg These are generic installation instructions. 11caade7ccSmrg 12caade7ccSmrg The `configure' shell script attempts to guess correct values for 13caade7ccSmrgvarious system-dependent variables used during compilation. It uses 14caade7ccSmrgthose values to create a `Makefile' in each directory of the package. 15caade7ccSmrgIt may also create one or more `.h' files containing system-dependent 16caade7ccSmrgdefinitions. Finally, it creates a shell script `config.status' that 17caade7ccSmrgyou can run in the future to recreate the current configuration, and a 18caade7ccSmrgfile `config.log' containing compiler output (useful mainly for 19caade7ccSmrgdebugging `configure'). 20caade7ccSmrg 21caade7ccSmrg It can also use an optional file (typically called `config.cache' 22caade7ccSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 23caade7ccSmrgthe results of its tests to speed up reconfiguring. (Caching is 24caade7ccSmrgdisabled by default to prevent problems with accidental use of stale 25caade7ccSmrgcache files.) 26caade7ccSmrg 27caade7ccSmrg If you need to do unusual things to compile the package, please try 28caade7ccSmrgto figure out how `configure' could check whether to do them, and mail 29caade7ccSmrgdiffs or instructions to the address given in the `README' so they can 30caade7ccSmrgbe considered for the next release. If you are using the cache, and at 31caade7ccSmrgsome point `config.cache' contains results you don't want to keep, you 32caade7ccSmrgmay remove or edit it. 33caade7ccSmrg 34caade7ccSmrg The file `configure.ac' (or `configure.in') is used to create 35caade7ccSmrg`configure' by a program called `autoconf'. You only need 36caade7ccSmrg`configure.ac' if you want to change it or regenerate `configure' using 37caade7ccSmrga newer version of `autoconf'. 38caade7ccSmrg 39caade7ccSmrgThe simplest way to compile this package is: 40caade7ccSmrg 41caade7ccSmrg 1. `cd' to the directory containing the package's source code and type 42caade7ccSmrg `./configure' to configure the package for your system. If you're 43caade7ccSmrg using `csh' on an old version of System V, you might need to type 44caade7ccSmrg `sh ./configure' instead to prevent `csh' from trying to execute 45caade7ccSmrg `configure' itself. 46caade7ccSmrg 47caade7ccSmrg Running `configure' takes awhile. While running, it prints some 48caade7ccSmrg messages telling which features it is checking for. 49caade7ccSmrg 50caade7ccSmrg 2. Type `make' to compile the package. 51caade7ccSmrg 52caade7ccSmrg 3. Optionally, type `make check' to run any self-tests that come with 53caade7ccSmrg the package. 54caade7ccSmrg 55caade7ccSmrg 4. Type `make install' to install the programs and any data files and 56caade7ccSmrg documentation. 57caade7ccSmrg 58caade7ccSmrg 5. You can remove the program binaries and object files from the 59caade7ccSmrg source code directory by typing `make clean'. To also remove the 60caade7ccSmrg files that `configure' created (so you can compile the package for 61caade7ccSmrg a different kind of computer), type `make distclean'. There is 62caade7ccSmrg also a `make maintainer-clean' target, but that is intended mainly 63caade7ccSmrg for the package's developers. If you use it, you may have to get 64caade7ccSmrg all sorts of other programs in order to regenerate files that came 65caade7ccSmrg with the distribution. 66caade7ccSmrg 67caade7ccSmrgCompilers and Options 68caade7ccSmrg===================== 69caade7ccSmrg 70caade7ccSmrg Some systems require unusual options for compilation or linking that 71caade7ccSmrgthe `configure' script does not know about. Run `./configure --help' 72caade7ccSmrgfor details on some of the pertinent environment variables. 73caade7ccSmrg 74caade7ccSmrg You can give `configure' initial values for configuration parameters 75caade7ccSmrgby setting variables in the command line or in the environment. Here 76caade7ccSmrgis an example: 77caade7ccSmrg 78caade7ccSmrg ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix 79caade7ccSmrg 80caade7ccSmrg *Note Defining Variables::, for more details. 81caade7ccSmrg 82caade7ccSmrgCompiling For Multiple Architectures 83caade7ccSmrg==================================== 84caade7ccSmrg 85caade7ccSmrg You can compile the package for more than one kind of computer at the 86caade7ccSmrgsame time, by placing the object files for each architecture in their 87caade7ccSmrgown directory. To do this, you must use a version of `make' that 88caade7ccSmrgsupports the `VPATH' variable, such as GNU `make'. `cd' to the 89caade7ccSmrgdirectory where you want the object files and executables to go and run 90caade7ccSmrgthe `configure' script. `configure' automatically checks for the 91caade7ccSmrgsource code in the directory that `configure' is in and in `..'. 92caade7ccSmrg 93caade7ccSmrg If you have to use a `make' that does not support the `VPATH' 94caade7ccSmrgvariable, you have to compile the package for one architecture at a 95caade7ccSmrgtime in the source code directory. After you have installed the 96caade7ccSmrgpackage for one architecture, use `make distclean' before reconfiguring 97caade7ccSmrgfor another architecture. 98caade7ccSmrg 99caade7ccSmrgInstallation Names 100caade7ccSmrg================== 101caade7ccSmrg 102caade7ccSmrg By default, `make install' will install the package's files in 103caade7ccSmrg`/usr/local/bin', `/usr/local/man', etc. You can specify an 104caade7ccSmrginstallation prefix other than `/usr/local' by giving `configure' the 105caade7ccSmrgoption `--prefix=PATH'. 106caade7ccSmrg 107caade7ccSmrg You can specify separate installation prefixes for 108caade7ccSmrgarchitecture-specific files and architecture-independent files. If you 109caade7ccSmrggive `configure' the option `--exec-prefix=PATH', the package will use 110caade7ccSmrgPATH as the prefix for installing programs and libraries. 111caade7ccSmrgDocumentation and other data files will still use the regular prefix. 112caade7ccSmrg 113caade7ccSmrg In addition, if you use an unusual directory layout you can give 114caade7ccSmrgoptions like `--bindir=PATH' to specify different values for particular 115caade7ccSmrgkinds of files. Run `configure --help' for a list of the directories 116caade7ccSmrgyou can set and what kinds of files go in them. 117caade7ccSmrg 118caade7ccSmrg If the package supports it, you can cause programs to be installed 119caade7ccSmrgwith an extra prefix or suffix on their names by giving `configure' the 120caade7ccSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 121caade7ccSmrg 122caade7ccSmrgOptional Features 123caade7ccSmrg================= 124caade7ccSmrg 125caade7ccSmrg Some packages pay attention to `--enable-FEATURE' options to 126caade7ccSmrg`configure', where FEATURE indicates an optional part of the package. 127caade7ccSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 128caade7ccSmrgis something like `gnu-as' or `x' (for the X Window System). The 129caade7ccSmrg`README' should mention any `--enable-' and `--with-' options that the 130caade7ccSmrgpackage recognizes. 131caade7ccSmrg 132caade7ccSmrg For packages that use the X Window System, `configure' can usually 133caade7ccSmrgfind the X include and library files automatically, but if it doesn't, 134caade7ccSmrgyou can use the `configure' options `--x-includes=DIR' and 135caade7ccSmrg`--x-libraries=DIR' to specify their locations. 136caade7ccSmrg 137caade7ccSmrgSpecifying the System Type 138caade7ccSmrg========================== 139caade7ccSmrg 140caade7ccSmrg There may be some features `configure' cannot figure out 141caade7ccSmrgautomatically, but needs to determine by the type of machine the package 142caade7ccSmrgwill run on. Usually, assuming the package is built to be run on the 143caade7ccSmrg_same_ architectures, `configure' can figure that out, but if it prints 144caade7ccSmrga message saying it cannot guess the machine type, give it the 145caade7ccSmrg`--build=TYPE' option. TYPE can either be a short name for the system 146caade7ccSmrgtype, such as `sun4', or a canonical name which has the form: 147caade7ccSmrg 148caade7ccSmrg CPU-COMPANY-SYSTEM 149caade7ccSmrg 150caade7ccSmrgwhere SYSTEM can have one of these forms: 151caade7ccSmrg 152caade7ccSmrg OS KERNEL-OS 153caade7ccSmrg 154caade7ccSmrg See the file `config.sub' for the possible values of each field. If 155caade7ccSmrg`config.sub' isn't included in this package, then this package doesn't 156caade7ccSmrgneed to know the machine type. 157caade7ccSmrg 158caade7ccSmrg If you are _building_ compiler tools for cross-compiling, you should 159caade7ccSmrguse the `--target=TYPE' option to select the type of system they will 160caade7ccSmrgproduce code for. 161caade7ccSmrg 162caade7ccSmrg If you want to _use_ a cross compiler, that generates code for a 163caade7ccSmrgplatform different from the build platform, you should specify the 164caade7ccSmrg"host" platform (i.e., that on which the generated programs will 165caade7ccSmrgeventually be run) with `--host=TYPE'. 166caade7ccSmrg 167caade7ccSmrgSharing Defaults 168caade7ccSmrg================ 169caade7ccSmrg 170caade7ccSmrg If you want to set default values for `configure' scripts to share, 171caade7ccSmrgyou can create a site shell script called `config.site' that gives 172caade7ccSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 173caade7ccSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 174caade7ccSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 175caade7ccSmrg`CONFIG_SITE' environment variable to the location of the site script. 176caade7ccSmrgA warning: not all `configure' scripts look for a site script. 177caade7ccSmrg 178caade7ccSmrgDefining Variables 179caade7ccSmrg================== 180caade7ccSmrg 181caade7ccSmrg Variables not defined in a site shell script can be set in the 182caade7ccSmrgenvironment passed to `configure'. However, some packages may run 183caade7ccSmrgconfigure again during the build, and the customized values of these 184caade7ccSmrgvariables may be lost. In order to avoid this problem, you should set 185caade7ccSmrgthem in the `configure' command line, using `VAR=value'. For example: 186caade7ccSmrg 187caade7ccSmrg ./configure CC=/usr/local2/bin/gcc 188caade7ccSmrg 189caade7ccSmrgwill cause the specified gcc to be used as the C compiler (unless it is 190caade7ccSmrgoverridden in the site shell script). 191caade7ccSmrg 192caade7ccSmrg`configure' Invocation 193caade7ccSmrg====================== 194caade7ccSmrg 195caade7ccSmrg `configure' recognizes the following options to control how it 196caade7ccSmrgoperates. 197caade7ccSmrg 198caade7ccSmrg`--help' 199caade7ccSmrg`-h' 200caade7ccSmrg Print a summary of the options to `configure', and exit. 201caade7ccSmrg 202caade7ccSmrg`--version' 203caade7ccSmrg`-V' 204caade7ccSmrg Print the version of Autoconf used to generate the `configure' 205caade7ccSmrg script, and exit. 206caade7ccSmrg 207caade7ccSmrg`--cache-file=FILE' 208caade7ccSmrg Enable the cache: use and save the results of the tests in FILE, 209caade7ccSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 210caade7ccSmrg disable caching. 211caade7ccSmrg 212caade7ccSmrg`--config-cache' 213caade7ccSmrg`-C' 214caade7ccSmrg Alias for `--cache-file=config.cache'. 215caade7ccSmrg 216caade7ccSmrg`--quiet' 217caade7ccSmrg`--silent' 218caade7ccSmrg`-q' 219caade7ccSmrg Do not print messages saying which checks are being made. To 220caade7ccSmrg suppress all normal output, redirect it to `/dev/null' (any error 221caade7ccSmrg messages will still be shown). 222caade7ccSmrg 223caade7ccSmrg`--srcdir=DIR' 224caade7ccSmrg Look for the package's source code in directory DIR. Usually 225caade7ccSmrg `configure' can determine that directory automatically. 226caade7ccSmrg 227caade7ccSmrg`configure' also accepts some other, not widely useful, options. Run 228caade7ccSmrg`configure --help' for more details. 229caade7ccSmrg 230