INSTALL revision 126a8a12
1126a8a12SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software 2126a8a12SmrgFoundation, Inc. 3126a8a12Smrg 4126a8a12Smrg This file is free documentation; the Free Software Foundation gives 5126a8a12Smrgunlimited permission to copy, distribute and modify it. 6126a8a12Smrg 7126a8a12SmrgBasic Installation 8126a8a12Smrg================== 9126a8a12Smrg 10126a8a12Smrg These are generic installation instructions. 11126a8a12Smrg 12126a8a12Smrg The `configure' shell script attempts to guess correct values for 13126a8a12Smrgvarious system-dependent variables used during compilation. It uses 14126a8a12Smrgthose values to create a `Makefile' in each directory of the package. 15126a8a12SmrgIt may also create one or more `.h' files containing system-dependent 16126a8a12Smrgdefinitions. Finally, it creates a shell script `config.status' that 17126a8a12Smrgyou can run in the future to recreate the current configuration, and a 18126a8a12Smrgfile `config.log' containing compiler output (useful mainly for 19126a8a12Smrgdebugging `configure'). 20126a8a12Smrg 21126a8a12Smrg It can also use an optional file (typically called `config.cache' 22126a8a12Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 23126a8a12Smrgthe results of its tests to speed up reconfiguring. (Caching is 24126a8a12Smrgdisabled by default to prevent problems with accidental use of stale 25126a8a12Smrgcache files.) 26126a8a12Smrg 27126a8a12Smrg If you need to do unusual things to compile the package, please try 28126a8a12Smrgto figure out how `configure' could check whether to do them, and mail 29126a8a12Smrgdiffs or instructions to the address given in the `README' so they can 30126a8a12Smrgbe considered for the next release. If you are using the cache, and at 31126a8a12Smrgsome point `config.cache' contains results you don't want to keep, you 32126a8a12Smrgmay remove or edit it. 33126a8a12Smrg 34126a8a12Smrg The file `configure.ac' (or `configure.in') is used to create 35126a8a12Smrg`configure' by a program called `autoconf'. You only need 36126a8a12Smrg`configure.ac' if you want to change it or regenerate `configure' using 37126a8a12Smrga newer version of `autoconf'. 38126a8a12Smrg 39126a8a12SmrgThe simplest way to compile this package is: 40126a8a12Smrg 41126a8a12Smrg 1. `cd' to the directory containing the package's source code and type 42126a8a12Smrg `./configure' to configure the package for your system. If you're 43126a8a12Smrg using `csh' on an old version of System V, you might need to type 44126a8a12Smrg `sh ./configure' instead to prevent `csh' from trying to execute 45126a8a12Smrg `configure' itself. 46126a8a12Smrg 47126a8a12Smrg Running `configure' takes awhile. While running, it prints some 48126a8a12Smrg messages telling which features it is checking for. 49126a8a12Smrg 50126a8a12Smrg 2. Type `make' to compile the package. 51126a8a12Smrg 52126a8a12Smrg 3. Optionally, type `make check' to run any self-tests that come with 53126a8a12Smrg the package. 54126a8a12Smrg 55126a8a12Smrg 4. Type `make install' to install the programs and any data files and 56126a8a12Smrg documentation. 57126a8a12Smrg 58126a8a12Smrg 5. You can remove the program binaries and object files from the 59126a8a12Smrg source code directory by typing `make clean'. To also remove the 60126a8a12Smrg files that `configure' created (so you can compile the package for 61126a8a12Smrg a different kind of computer), type `make distclean'. There is 62126a8a12Smrg also a `make maintainer-clean' target, but that is intended mainly 63126a8a12Smrg for the package's developers. If you use it, you may have to get 64126a8a12Smrg all sorts of other programs in order to regenerate files that came 65126a8a12Smrg with the distribution. 66126a8a12Smrg 67126a8a12SmrgCompilers and Options 68126a8a12Smrg===================== 69126a8a12Smrg 70126a8a12Smrg Some systems require unusual options for compilation or linking that 71126a8a12Smrgthe `configure' script does not know about. Run `./configure --help' 72126a8a12Smrgfor details on some of the pertinent environment variables. 73126a8a12Smrg 74126a8a12Smrg You can give `configure' initial values for configuration parameters 75126a8a12Smrgby setting variables in the command line or in the environment. Here 76126a8a12Smrgis an example: 77126a8a12Smrg 78126a8a12Smrg ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix 79126a8a12Smrg 80126a8a12Smrg *Note Defining Variables::, for more details. 81126a8a12Smrg 82126a8a12SmrgCompiling For Multiple Architectures 83126a8a12Smrg==================================== 84126a8a12Smrg 85126a8a12Smrg You can compile the package for more than one kind of computer at the 86126a8a12Smrgsame time, by placing the object files for each architecture in their 87126a8a12Smrgown directory. To do this, you must use a version of `make' that 88126a8a12Smrgsupports the `VPATH' variable, such as GNU `make'. `cd' to the 89126a8a12Smrgdirectory where you want the object files and executables to go and run 90126a8a12Smrgthe `configure' script. `configure' automatically checks for the 91126a8a12Smrgsource code in the directory that `configure' is in and in `..'. 92126a8a12Smrg 93126a8a12Smrg If you have to use a `make' that does not support the `VPATH' 94126a8a12Smrgvariable, you have to compile the package for one architecture at a 95126a8a12Smrgtime in the source code directory. After you have installed the 96126a8a12Smrgpackage for one architecture, use `make distclean' before reconfiguring 97126a8a12Smrgfor another architecture. 98126a8a12Smrg 99126a8a12SmrgInstallation Names 100126a8a12Smrg================== 101126a8a12Smrg 102126a8a12Smrg By default, `make install' will install the package's files in 103126a8a12Smrg`/usr/local/bin', `/usr/local/man', etc. You can specify an 104126a8a12Smrginstallation prefix other than `/usr/local' by giving `configure' the 105126a8a12Smrgoption `--prefix=PATH'. 106126a8a12Smrg 107126a8a12Smrg You can specify separate installation prefixes for 108126a8a12Smrgarchitecture-specific files and architecture-independent files. If you 109126a8a12Smrggive `configure' the option `--exec-prefix=PATH', the package will use 110126a8a12SmrgPATH as the prefix for installing programs and libraries. 111126a8a12SmrgDocumentation and other data files will still use the regular prefix. 112126a8a12Smrg 113126a8a12Smrg In addition, if you use an unusual directory layout you can give 114126a8a12Smrgoptions like `--bindir=PATH' to specify different values for particular 115126a8a12Smrgkinds of files. Run `configure --help' for a list of the directories 116126a8a12Smrgyou can set and what kinds of files go in them. 117126a8a12Smrg 118126a8a12Smrg If the package supports it, you can cause programs to be installed 119126a8a12Smrgwith an extra prefix or suffix on their names by giving `configure' the 120126a8a12Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 121126a8a12Smrg 122126a8a12SmrgOptional Features 123126a8a12Smrg================= 124126a8a12Smrg 125126a8a12Smrg Some packages pay attention to `--enable-FEATURE' options to 126126a8a12Smrg`configure', where FEATURE indicates an optional part of the package. 127126a8a12SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 128126a8a12Smrgis something like `gnu-as' or `x' (for the X Window System). The 129126a8a12Smrg`README' should mention any `--enable-' and `--with-' options that the 130126a8a12Smrgpackage recognizes. 131126a8a12Smrg 132126a8a12Smrg For packages that use the X Window System, `configure' can usually 133126a8a12Smrgfind the X include and library files automatically, but if it doesn't, 134126a8a12Smrgyou can use the `configure' options `--x-includes=DIR' and 135126a8a12Smrg`--x-libraries=DIR' to specify their locations. 136126a8a12Smrg 137126a8a12SmrgSpecifying the System Type 138126a8a12Smrg========================== 139126a8a12Smrg 140126a8a12Smrg There may be some features `configure' cannot figure out 141126a8a12Smrgautomatically, but needs to determine by the type of machine the package 142126a8a12Smrgwill run on. Usually, assuming the package is built to be run on the 143126a8a12Smrg_same_ architectures, `configure' can figure that out, but if it prints 144126a8a12Smrga message saying it cannot guess the machine type, give it the 145126a8a12Smrg`--build=TYPE' option. TYPE can either be a short name for the system 146126a8a12Smrgtype, such as `sun4', or a canonical name which has the form: 147126a8a12Smrg 148126a8a12Smrg CPU-COMPANY-SYSTEM 149126a8a12Smrg 150126a8a12Smrgwhere SYSTEM can have one of these forms: 151126a8a12Smrg 152126a8a12Smrg OS KERNEL-OS 153126a8a12Smrg 154126a8a12Smrg See the file `config.sub' for the possible values of each field. If 155126a8a12Smrg`config.sub' isn't included in this package, then this package doesn't 156126a8a12Smrgneed to know the machine type. 157126a8a12Smrg 158126a8a12Smrg If you are _building_ compiler tools for cross-compiling, you should 159126a8a12Smrguse the `--target=TYPE' option to select the type of system they will 160126a8a12Smrgproduce code for. 161126a8a12Smrg 162126a8a12Smrg If you want to _use_ a cross compiler, that generates code for a 163126a8a12Smrgplatform different from the build platform, you should specify the 164126a8a12Smrg"host" platform (i.e., that on which the generated programs will 165126a8a12Smrgeventually be run) with `--host=TYPE'. 166126a8a12Smrg 167126a8a12SmrgSharing Defaults 168126a8a12Smrg================ 169126a8a12Smrg 170126a8a12Smrg If you want to set default values for `configure' scripts to share, 171126a8a12Smrgyou can create a site shell script called `config.site' that gives 172126a8a12Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 173126a8a12Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 174126a8a12Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 175126a8a12Smrg`CONFIG_SITE' environment variable to the location of the site script. 176126a8a12SmrgA warning: not all `configure' scripts look for a site script. 177126a8a12Smrg 178126a8a12SmrgDefining Variables 179126a8a12Smrg================== 180126a8a12Smrg 181126a8a12Smrg Variables not defined in a site shell script can be set in the 182126a8a12Smrgenvironment passed to `configure'. However, some packages may run 183126a8a12Smrgconfigure again during the build, and the customized values of these 184126a8a12Smrgvariables may be lost. In order to avoid this problem, you should set 185126a8a12Smrgthem in the `configure' command line, using `VAR=value'. For example: 186126a8a12Smrg 187126a8a12Smrg ./configure CC=/usr/local2/bin/gcc 188126a8a12Smrg 189126a8a12Smrgwill cause the specified gcc to be used as the C compiler (unless it is 190126a8a12Smrgoverridden in the site shell script). 191126a8a12Smrg 192126a8a12Smrg`configure' Invocation 193126a8a12Smrg====================== 194126a8a12Smrg 195126a8a12Smrg `configure' recognizes the following options to control how it 196126a8a12Smrgoperates. 197126a8a12Smrg 198126a8a12Smrg`--help' 199126a8a12Smrg`-h' 200126a8a12Smrg Print a summary of the options to `configure', and exit. 201126a8a12Smrg 202126a8a12Smrg`--version' 203126a8a12Smrg`-V' 204126a8a12Smrg Print the version of Autoconf used to generate the `configure' 205126a8a12Smrg script, and exit. 206126a8a12Smrg 207126a8a12Smrg`--cache-file=FILE' 208126a8a12Smrg Enable the cache: use and save the results of the tests in FILE, 209126a8a12Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 210126a8a12Smrg disable caching. 211126a8a12Smrg 212126a8a12Smrg`--config-cache' 213126a8a12Smrg`-C' 214126a8a12Smrg Alias for `--cache-file=config.cache'. 215126a8a12Smrg 216126a8a12Smrg`--quiet' 217126a8a12Smrg`--silent' 218126a8a12Smrg`-q' 219126a8a12Smrg Do not print messages saying which checks are being made. To 220126a8a12Smrg suppress all normal output, redirect it to `/dev/null' (any error 221126a8a12Smrg messages will still be shown). 222126a8a12Smrg 223126a8a12Smrg`--srcdir=DIR' 224126a8a12Smrg Look for the package's source code in directory DIR. Usually 225126a8a12Smrg `configure' can determine that directory automatically. 226126a8a12Smrg 227126a8a12Smrg`configure' also accepts some other, not widely useful, options. Run 228126a8a12Smrg`configure --help' for more details. 229126a8a12Smrg 230