INSTALL revision b4b94579
1b4b94579SmrgInstallation Instructions 2b4b94579Smrg************************* 3b4b94579Smrg 4b4b94579SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 5b4b94579Smrg2006 Free Software Foundation, Inc. 6b4b94579Smrg 7b4b94579SmrgThis file is free documentation; the Free Software Foundation gives 8b4b94579Smrgunlimited permission to copy, distribute and modify it. 9b4b94579Smrg 10b4b94579SmrgBasic Installation 11b4b94579Smrg================== 12b4b94579Smrg 13b4b94579SmrgBriefly, the shell commands `./configure; make; make install' should 14b4b94579Smrgconfigure, build, and install this package. The following 15b4b94579Smrgmore-detailed instructions are generic; see the `README' file for 16b4b94579Smrginstructions specific to this package. 17b4b94579Smrg 18b4b94579Smrg The `configure' shell script attempts to guess correct values for 19b4b94579Smrgvarious system-dependent variables used during compilation. It uses 20b4b94579Smrgthose values to create a `Makefile' in each directory of the package. 21b4b94579SmrgIt may also create one or more `.h' files containing system-dependent 22b4b94579Smrgdefinitions. Finally, it creates a shell script `config.status' that 23b4b94579Smrgyou can run in the future to recreate the current configuration, and a 24b4b94579Smrgfile `config.log' containing compiler output (useful mainly for 25b4b94579Smrgdebugging `configure'). 26b4b94579Smrg 27b4b94579Smrg It can also use an optional file (typically called `config.cache' 28b4b94579Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 29b4b94579Smrgthe results of its tests to speed up reconfiguring. Caching is 30b4b94579Smrgdisabled by default to prevent problems with accidental use of stale 31b4b94579Smrgcache files. 32b4b94579Smrg 33b4b94579Smrg If you need to do unusual things to compile the package, please try 34b4b94579Smrgto figure out how `configure' could check whether to do them, and mail 35b4b94579Smrgdiffs or instructions to the address given in the `README' so they can 36b4b94579Smrgbe considered for the next release. If you are using the cache, and at 37b4b94579Smrgsome point `config.cache' contains results you don't want to keep, you 38b4b94579Smrgmay remove or edit it. 39b4b94579Smrg 40b4b94579Smrg The file `configure.ac' (or `configure.in') is used to create 41b4b94579Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 42b4b94579Smrgyou want to change it or regenerate `configure' using a newer version 43b4b94579Smrgof `autoconf'. 44b4b94579Smrg 45b4b94579SmrgThe simplest way to compile this package is: 46b4b94579Smrg 47b4b94579Smrg 1. `cd' to the directory containing the package's source code and type 48b4b94579Smrg `./configure' to configure the package for your system. 49b4b94579Smrg 50b4b94579Smrg Running `configure' might take a while. While running, it prints 51b4b94579Smrg some messages telling which features it is checking for. 52b4b94579Smrg 53b4b94579Smrg 2. Type `make' to compile the package. 54b4b94579Smrg 55b4b94579Smrg 3. Optionally, type `make check' to run any self-tests that come with 56b4b94579Smrg the package. 57b4b94579Smrg 58b4b94579Smrg 4. Type `make install' to install the programs and any data files and 59b4b94579Smrg documentation. 60b4b94579Smrg 61b4b94579Smrg 5. You can remove the program binaries and object files from the 62b4b94579Smrg source code directory by typing `make clean'. To also remove the 63b4b94579Smrg files that `configure' created (so you can compile the package for 64b4b94579Smrg a different kind of computer), type `make distclean'. There is 65b4b94579Smrg also a `make maintainer-clean' target, but that is intended mainly 66b4b94579Smrg for the package's developers. If you use it, you may have to get 67b4b94579Smrg all sorts of other programs in order to regenerate files that came 68b4b94579Smrg with the distribution. 69b4b94579Smrg 70b4b94579SmrgCompilers and Options 71b4b94579Smrg===================== 72b4b94579Smrg 73b4b94579SmrgSome systems require unusual options for compilation or linking that the 74b4b94579Smrg`configure' script does not know about. Run `./configure --help' for 75b4b94579Smrgdetails on some of the pertinent environment variables. 76b4b94579Smrg 77b4b94579Smrg You can give `configure' initial values for configuration parameters 78b4b94579Smrgby setting variables in the command line or in the environment. Here 79b4b94579Smrgis an example: 80b4b94579Smrg 81b4b94579Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 82b4b94579Smrg 83b4b94579Smrg *Note Defining Variables::, for more details. 84b4b94579Smrg 85b4b94579SmrgCompiling For Multiple Architectures 86b4b94579Smrg==================================== 87b4b94579Smrg 88b4b94579SmrgYou can compile the package for more than one kind of computer at the 89b4b94579Smrgsame time, by placing the object files for each architecture in their 90b4b94579Smrgown directory. To do this, you can use GNU `make'. `cd' to the 91b4b94579Smrgdirectory where you want the object files and executables to go and run 92b4b94579Smrgthe `configure' script. `configure' automatically checks for the 93b4b94579Smrgsource code in the directory that `configure' is in and in `..'. 94b4b94579Smrg 95b4b94579Smrg With a non-GNU `make', it is safer to compile the package for one 96b4b94579Smrgarchitecture at a time in the source code directory. After you have 97b4b94579Smrginstalled the package for one architecture, use `make distclean' before 98b4b94579Smrgreconfiguring for another architecture. 99b4b94579Smrg 100b4b94579SmrgInstallation Names 101b4b94579Smrg================== 102b4b94579Smrg 103b4b94579SmrgBy default, `make install' installs the package's commands under 104b4b94579Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 105b4b94579Smrgcan specify an installation prefix other than `/usr/local' by giving 106b4b94579Smrg`configure' the option `--prefix=PREFIX'. 107b4b94579Smrg 108b4b94579Smrg You can specify separate installation prefixes for 109b4b94579Smrgarchitecture-specific files and architecture-independent files. If you 110b4b94579Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 111b4b94579SmrgPREFIX as the prefix for installing programs and libraries. 112b4b94579SmrgDocumentation and other data files still use the regular prefix. 113b4b94579Smrg 114b4b94579Smrg In addition, if you use an unusual directory layout you can give 115b4b94579Smrgoptions like `--bindir=DIR' to specify different values for particular 116b4b94579Smrgkinds of files. Run `configure --help' for a list of the directories 117b4b94579Smrgyou can set and what kinds of files go in them. 118b4b94579Smrg 119b4b94579Smrg If the package supports it, you can cause programs to be installed 120b4b94579Smrgwith an extra prefix or suffix on their names by giving `configure' the 121b4b94579Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 122b4b94579Smrg 123b4b94579SmrgOptional Features 124b4b94579Smrg================= 125b4b94579Smrg 126b4b94579SmrgSome packages pay attention to `--enable-FEATURE' options to 127b4b94579Smrg`configure', where FEATURE indicates an optional part of the package. 128b4b94579SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 129b4b94579Smrgis something like `gnu-as' or `x' (for the X Window System). The 130b4b94579Smrg`README' should mention any `--enable-' and `--with-' options that the 131b4b94579Smrgpackage recognizes. 132b4b94579Smrg 133b4b94579Smrg For packages that use the X Window System, `configure' can usually 134b4b94579Smrgfind the X include and library files automatically, but if it doesn't, 135b4b94579Smrgyou can use the `configure' options `--x-includes=DIR' and 136b4b94579Smrg`--x-libraries=DIR' to specify their locations. 137b4b94579Smrg 138b4b94579SmrgSpecifying the System Type 139b4b94579Smrg========================== 140b4b94579Smrg 141b4b94579SmrgThere may be some features `configure' cannot figure out automatically, 142b4b94579Smrgbut needs to determine by the type of machine the package will run on. 143b4b94579SmrgUsually, assuming the package is built to be run on the _same_ 144b4b94579Smrgarchitectures, `configure' can figure that out, but if it prints a 145b4b94579Smrgmessage saying it cannot guess the machine type, give it the 146b4b94579Smrg`--build=TYPE' option. TYPE can either be a short name for the system 147b4b94579Smrgtype, such as `sun4', or a canonical name which has the form: 148b4b94579Smrg 149b4b94579Smrg CPU-COMPANY-SYSTEM 150b4b94579Smrg 151b4b94579Smrgwhere SYSTEM can have one of these forms: 152b4b94579Smrg 153b4b94579Smrg OS KERNEL-OS 154b4b94579Smrg 155b4b94579Smrg See the file `config.sub' for the possible values of each field. If 156b4b94579Smrg`config.sub' isn't included in this package, then this package doesn't 157b4b94579Smrgneed to know the machine type. 158b4b94579Smrg 159b4b94579Smrg If you are _building_ compiler tools for cross-compiling, you should 160b4b94579Smrguse the option `--target=TYPE' to select the type of system they will 161b4b94579Smrgproduce code for. 162b4b94579Smrg 163b4b94579Smrg If you want to _use_ a cross compiler, that generates code for a 164b4b94579Smrgplatform different from the build platform, you should specify the 165b4b94579Smrg"host" platform (i.e., that on which the generated programs will 166b4b94579Smrgeventually be run) with `--host=TYPE'. 167b4b94579Smrg 168b4b94579SmrgSharing Defaults 169b4b94579Smrg================ 170b4b94579Smrg 171b4b94579SmrgIf you want to set default values for `configure' scripts to share, you 172b4b94579Smrgcan create a site shell script called `config.site' that gives default 173b4b94579Smrgvalues for variables like `CC', `cache_file', and `prefix'. 174b4b94579Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 175b4b94579Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 176b4b94579Smrg`CONFIG_SITE' environment variable to the location of the site script. 177b4b94579SmrgA warning: not all `configure' scripts look for a site script. 178b4b94579Smrg 179b4b94579SmrgDefining Variables 180b4b94579Smrg================== 181b4b94579Smrg 182b4b94579SmrgVariables not defined in a site shell script can be set in the 183b4b94579Smrgenvironment passed to `configure'. However, some packages may run 184b4b94579Smrgconfigure again during the build, and the customized values of these 185b4b94579Smrgvariables may be lost. In order to avoid this problem, you should set 186b4b94579Smrgthem in the `configure' command line, using `VAR=value'. For example: 187b4b94579Smrg 188b4b94579Smrg ./configure CC=/usr/local2/bin/gcc 189b4b94579Smrg 190b4b94579Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 191b4b94579Smrgoverridden in the site shell script). 192b4b94579Smrg 193b4b94579SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 194b4b94579Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 195b4b94579Smrg 196b4b94579Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 197b4b94579Smrg 198b4b94579Smrg`configure' Invocation 199b4b94579Smrg====================== 200b4b94579Smrg 201b4b94579Smrg`configure' recognizes the following options to control how it operates. 202b4b94579Smrg 203b4b94579Smrg`--help' 204b4b94579Smrg`-h' 205b4b94579Smrg Print a summary of the options to `configure', and exit. 206b4b94579Smrg 207b4b94579Smrg`--version' 208b4b94579Smrg`-V' 209b4b94579Smrg Print the version of Autoconf used to generate the `configure' 210b4b94579Smrg script, and exit. 211b4b94579Smrg 212b4b94579Smrg`--cache-file=FILE' 213b4b94579Smrg Enable the cache: use and save the results of the tests in FILE, 214b4b94579Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 215b4b94579Smrg disable caching. 216b4b94579Smrg 217b4b94579Smrg`--config-cache' 218b4b94579Smrg`-C' 219b4b94579Smrg Alias for `--cache-file=config.cache'. 220b4b94579Smrg 221b4b94579Smrg`--quiet' 222b4b94579Smrg`--silent' 223b4b94579Smrg`-q' 224b4b94579Smrg Do not print messages saying which checks are being made. To 225b4b94579Smrg suppress all normal output, redirect it to `/dev/null' (any error 226b4b94579Smrg messages will still be shown). 227b4b94579Smrg 228b4b94579Smrg`--srcdir=DIR' 229b4b94579Smrg Look for the package's source code in directory DIR. Usually 230b4b94579Smrg `configure' can determine that directory automatically. 231b4b94579Smrg 232b4b94579Smrg`configure' also accepts some other, not widely useful, options. Run 233b4b94579Smrg`configure --help' for more details. 234b4b94579Smrg 235