INSTALL revision 7914d74b
17914d74bSmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software 27914d74bSmrgFoundation, Inc. 37914d74bSmrg 47914d74bSmrg This file is free documentation; the Free Software Foundation gives 57914d74bSmrgunlimited permission to copy, distribute and modify it. 67914d74bSmrg 77914d74bSmrgBasic Installation 87914d74bSmrg================== 97914d74bSmrg 107914d74bSmrg These are generic installation instructions. 117914d74bSmrg 127914d74bSmrg The `configure' shell script attempts to guess correct values for 137914d74bSmrgvarious system-dependent variables used during compilation. It uses 147914d74bSmrgthose values to create a `Makefile' in each directory of the package. 157914d74bSmrgIt may also create one or more `.h' files containing system-dependent 167914d74bSmrgdefinitions. Finally, it creates a shell script `config.status' that 177914d74bSmrgyou can run in the future to recreate the current configuration, and a 187914d74bSmrgfile `config.log' containing compiler output (useful mainly for 197914d74bSmrgdebugging `configure'). 207914d74bSmrg 217914d74bSmrg It can also use an optional file (typically called `config.cache' 227914d74bSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 237914d74bSmrgthe results of its tests to speed up reconfiguring. (Caching is 247914d74bSmrgdisabled by default to prevent problems with accidental use of stale 257914d74bSmrgcache files.) 267914d74bSmrg 277914d74bSmrg If you need to do unusual things to compile the package, please try 287914d74bSmrgto figure out how `configure' could check whether to do them, and mail 297914d74bSmrgdiffs or instructions to the address given in the `README' so they can 307914d74bSmrgbe considered for the next release. If you are using the cache, and at 317914d74bSmrgsome point `config.cache' contains results you don't want to keep, you 327914d74bSmrgmay remove or edit it. 337914d74bSmrg 347914d74bSmrg The file `configure.ac' (or `configure.in') is used to create 357914d74bSmrg`configure' by a program called `autoconf'. You only need 367914d74bSmrg`configure.ac' if you want to change it or regenerate `configure' using 377914d74bSmrga newer version of `autoconf'. 387914d74bSmrg 397914d74bSmrgThe simplest way to compile this package is: 407914d74bSmrg 417914d74bSmrg 1. `cd' to the directory containing the package's source code and type 427914d74bSmrg `./configure' to configure the package for your system. If you're 437914d74bSmrg using `csh' on an old version of System V, you might need to type 447914d74bSmrg `sh ./configure' instead to prevent `csh' from trying to execute 457914d74bSmrg `configure' itself. 467914d74bSmrg 477914d74bSmrg Running `configure' takes awhile. While running, it prints some 487914d74bSmrg messages telling which features it is checking for. 497914d74bSmrg 507914d74bSmrg 2. Type `make' to compile the package. 517914d74bSmrg 527914d74bSmrg 3. Optionally, type `make check' to run any self-tests that come with 537914d74bSmrg the package. 547914d74bSmrg 557914d74bSmrg 4. Type `make install' to install the programs and any data files and 567914d74bSmrg documentation. 577914d74bSmrg 587914d74bSmrg 5. You can remove the program binaries and object files from the 597914d74bSmrg source code directory by typing `make clean'. To also remove the 607914d74bSmrg files that `configure' created (so you can compile the package for 617914d74bSmrg a different kind of computer), type `make distclean'. There is 627914d74bSmrg also a `make maintainer-clean' target, but that is intended mainly 637914d74bSmrg for the package's developers. If you use it, you may have to get 647914d74bSmrg all sorts of other programs in order to regenerate files that came 657914d74bSmrg with the distribution. 667914d74bSmrg 677914d74bSmrgCompilers and Options 687914d74bSmrg===================== 697914d74bSmrg 707914d74bSmrg Some systems require unusual options for compilation or linking that 717914d74bSmrgthe `configure' script does not know about. Run `./configure --help' 727914d74bSmrgfor details on some of the pertinent environment variables. 737914d74bSmrg 747914d74bSmrg You can give `configure' initial values for configuration parameters 757914d74bSmrgby setting variables in the command line or in the environment. Here 767914d74bSmrgis an example: 777914d74bSmrg 787914d74bSmrg ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix 797914d74bSmrg 807914d74bSmrg *Note Defining Variables::, for more details. 817914d74bSmrg 827914d74bSmrgCompiling For Multiple Architectures 837914d74bSmrg==================================== 847914d74bSmrg 857914d74bSmrg You can compile the package for more than one kind of computer at the 867914d74bSmrgsame time, by placing the object files for each architecture in their 877914d74bSmrgown directory. To do this, you must use a version of `make' that 887914d74bSmrgsupports the `VPATH' variable, such as GNU `make'. `cd' to the 897914d74bSmrgdirectory where you want the object files and executables to go and run 907914d74bSmrgthe `configure' script. `configure' automatically checks for the 917914d74bSmrgsource code in the directory that `configure' is in and in `..'. 927914d74bSmrg 937914d74bSmrg If you have to use a `make' that does not support the `VPATH' 947914d74bSmrgvariable, you have to compile the package for one architecture at a 957914d74bSmrgtime in the source code directory. After you have installed the 967914d74bSmrgpackage for one architecture, use `make distclean' before reconfiguring 977914d74bSmrgfor another architecture. 987914d74bSmrg 997914d74bSmrgInstallation Names 1007914d74bSmrg================== 1017914d74bSmrg 1027914d74bSmrg By default, `make install' will install the package's files in 1037914d74bSmrg`/usr/local/bin', `/usr/local/man', etc. You can specify an 1047914d74bSmrginstallation prefix other than `/usr/local' by giving `configure' the 1057914d74bSmrgoption `--prefix=PATH'. 1067914d74bSmrg 1077914d74bSmrg You can specify separate installation prefixes for 1087914d74bSmrgarchitecture-specific files and architecture-independent files. If you 1097914d74bSmrggive `configure' the option `--exec-prefix=PATH', the package will use 1107914d74bSmrgPATH as the prefix for installing programs and libraries. 1117914d74bSmrgDocumentation and other data files will still use the regular prefix. 1127914d74bSmrg 1137914d74bSmrg In addition, if you use an unusual directory layout you can give 1147914d74bSmrgoptions like `--bindir=PATH' to specify different values for particular 1157914d74bSmrgkinds of files. Run `configure --help' for a list of the directories 1167914d74bSmrgyou can set and what kinds of files go in them. 1177914d74bSmrg 1187914d74bSmrg If the package supports it, you can cause programs to be installed 1197914d74bSmrgwith an extra prefix or suffix on their names by giving `configure' the 1207914d74bSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1217914d74bSmrg 1227914d74bSmrgOptional Features 1237914d74bSmrg================= 1247914d74bSmrg 1257914d74bSmrg Some packages pay attention to `--enable-FEATURE' options to 1267914d74bSmrg`configure', where FEATURE indicates an optional part of the package. 1277914d74bSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 1287914d74bSmrgis something like `gnu-as' or `x' (for the X Window System). The 1297914d74bSmrg`README' should mention any `--enable-' and `--with-' options that the 1307914d74bSmrgpackage recognizes. 1317914d74bSmrg 1327914d74bSmrg For packages that use the X Window System, `configure' can usually 1337914d74bSmrgfind the X include and library files automatically, but if it doesn't, 1347914d74bSmrgyou can use the `configure' options `--x-includes=DIR' and 1357914d74bSmrg`--x-libraries=DIR' to specify their locations. 1367914d74bSmrg 1377914d74bSmrgSpecifying the System Type 1387914d74bSmrg========================== 1397914d74bSmrg 1407914d74bSmrg There may be some features `configure' cannot figure out 1417914d74bSmrgautomatically, but needs to determine by the type of machine the package 1427914d74bSmrgwill run on. Usually, assuming the package is built to be run on the 1437914d74bSmrg_same_ architectures, `configure' can figure that out, but if it prints 1447914d74bSmrga message saying it cannot guess the machine type, give it the 1457914d74bSmrg`--build=TYPE' option. TYPE can either be a short name for the system 1467914d74bSmrgtype, such as `sun4', or a canonical name which has the form: 1477914d74bSmrg 1487914d74bSmrg CPU-COMPANY-SYSTEM 1497914d74bSmrg 1507914d74bSmrgwhere SYSTEM can have one of these forms: 1517914d74bSmrg 1527914d74bSmrg OS KERNEL-OS 1537914d74bSmrg 1547914d74bSmrg See the file `config.sub' for the possible values of each field. If 1557914d74bSmrg`config.sub' isn't included in this package, then this package doesn't 1567914d74bSmrgneed to know the machine type. 1577914d74bSmrg 1587914d74bSmrg If you are _building_ compiler tools for cross-compiling, you should 1597914d74bSmrguse the `--target=TYPE' option to select the type of system they will 1607914d74bSmrgproduce code for. 1617914d74bSmrg 1627914d74bSmrg If you want to _use_ a cross compiler, that generates code for a 1637914d74bSmrgplatform different from the build platform, you should specify the 1647914d74bSmrg"host" platform (i.e., that on which the generated programs will 1657914d74bSmrgeventually be run) with `--host=TYPE'. 1667914d74bSmrg 1677914d74bSmrgSharing Defaults 1687914d74bSmrg================ 1697914d74bSmrg 1707914d74bSmrg If you want to set default values for `configure' scripts to share, 1717914d74bSmrgyou can create a site shell script called `config.site' that gives 1727914d74bSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 1737914d74bSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 1747914d74bSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 1757914d74bSmrg`CONFIG_SITE' environment variable to the location of the site script. 1767914d74bSmrgA warning: not all `configure' scripts look for a site script. 1777914d74bSmrg 1787914d74bSmrgDefining Variables 1797914d74bSmrg================== 1807914d74bSmrg 1817914d74bSmrg Variables not defined in a site shell script can be set in the 1827914d74bSmrgenvironment passed to `configure'. However, some packages may run 1837914d74bSmrgconfigure again during the build, and the customized values of these 1847914d74bSmrgvariables may be lost. In order to avoid this problem, you should set 1857914d74bSmrgthem in the `configure' command line, using `VAR=value'. For example: 1867914d74bSmrg 1877914d74bSmrg ./configure CC=/usr/local2/bin/gcc 1887914d74bSmrg 1897914d74bSmrgwill cause the specified gcc to be used as the C compiler (unless it is 1907914d74bSmrgoverridden in the site shell script). 1917914d74bSmrg 1927914d74bSmrg`configure' Invocation 1937914d74bSmrg====================== 1947914d74bSmrg 1957914d74bSmrg `configure' recognizes the following options to control how it 1967914d74bSmrgoperates. 1977914d74bSmrg 1987914d74bSmrg`--help' 1997914d74bSmrg`-h' 2007914d74bSmrg Print a summary of the options to `configure', and exit. 2017914d74bSmrg 2027914d74bSmrg`--version' 2037914d74bSmrg`-V' 2047914d74bSmrg Print the version of Autoconf used to generate the `configure' 2057914d74bSmrg script, and exit. 2067914d74bSmrg 2077914d74bSmrg`--cache-file=FILE' 2087914d74bSmrg Enable the cache: use and save the results of the tests in FILE, 2097914d74bSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 2107914d74bSmrg disable caching. 2117914d74bSmrg 2127914d74bSmrg`--config-cache' 2137914d74bSmrg`-C' 2147914d74bSmrg Alias for `--cache-file=config.cache'. 2157914d74bSmrg 2167914d74bSmrg`--quiet' 2177914d74bSmrg`--silent' 2187914d74bSmrg`-q' 2197914d74bSmrg Do not print messages saying which checks are being made. To 2207914d74bSmrg suppress all normal output, redirect it to `/dev/null' (any error 2217914d74bSmrg messages will still be shown). 2227914d74bSmrg 2237914d74bSmrg`--srcdir=DIR' 2247914d74bSmrg Look for the package's source code in directory DIR. Usually 2257914d74bSmrg `configure' can determine that directory automatically. 2267914d74bSmrg 2277914d74bSmrg`configure' also accepts some other, not widely useful, options. Run 2287914d74bSmrg`configure --help' for more details. 2297914d74bSmrg 230