INSTALL revision 44d7874b
144d7874bSmrgInstallation Instructions 244d7874bSmrg************************* 344d7874bSmrg 444d7874bSmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free 544d7874bSmrgSoftware Foundation, Inc. 644d7874bSmrg 744d7874bSmrgThis file is free documentation; the Free Software Foundation gives 844d7874bSmrgunlimited permission to copy, distribute and modify it. 944d7874bSmrg 1044d7874bSmrgBasic Installation 1144d7874bSmrg================== 1244d7874bSmrg 1344d7874bSmrgThese are generic installation instructions. 1444d7874bSmrg 1544d7874bSmrg The `configure' shell script attempts to guess correct values for 1644d7874bSmrgvarious system-dependent variables used during compilation. It uses 1744d7874bSmrgthose values to create a `Makefile' in each directory of the package. 1844d7874bSmrgIt may also create one or more `.h' files containing system-dependent 1944d7874bSmrgdefinitions. Finally, it creates a shell script `config.status' that 2044d7874bSmrgyou can run in the future to recreate the current configuration, and a 2144d7874bSmrgfile `config.log' containing compiler output (useful mainly for 2244d7874bSmrgdebugging `configure'). 2344d7874bSmrg 2444d7874bSmrg It can also use an optional file (typically called `config.cache' 2544d7874bSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 2644d7874bSmrgthe results of its tests to speed up reconfiguring. (Caching is 2744d7874bSmrgdisabled by default to prevent problems with accidental use of stale 2844d7874bSmrgcache files.) 2944d7874bSmrg 3044d7874bSmrg If you need to do unusual things to compile the package, please try 3144d7874bSmrgto figure out how `configure' could check whether to do them, and mail 3244d7874bSmrgdiffs or instructions to the address given in the `README' so they can 3344d7874bSmrgbe considered for the next release. If you are using the cache, and at 3444d7874bSmrgsome point `config.cache' contains results you don't want to keep, you 3544d7874bSmrgmay remove or edit it. 3644d7874bSmrg 3744d7874bSmrg The file `configure.ac' (or `configure.in') is used to create 3844d7874bSmrg`configure' by a program called `autoconf'. You only need 3944d7874bSmrg`configure.ac' if you want to change it or regenerate `configure' using 4044d7874bSmrga newer version of `autoconf'. 4144d7874bSmrg 4244d7874bSmrgThe simplest way to compile this package is: 4344d7874bSmrg 4444d7874bSmrg 1. `cd' to the directory containing the package's source code and type 4544d7874bSmrg `./configure' to configure the package for your system. If you're 4644d7874bSmrg using `csh' on an old version of System V, you might need to type 4744d7874bSmrg `sh ./configure' instead to prevent `csh' from trying to execute 4844d7874bSmrg `configure' itself. 4944d7874bSmrg 5044d7874bSmrg Running `configure' takes awhile. While running, it prints some 5144d7874bSmrg messages telling which features it is checking for. 5244d7874bSmrg 5344d7874bSmrg 2. Type `make' to compile the package. 5444d7874bSmrg 5544d7874bSmrg 3. Optionally, type `make check' to run any self-tests that come with 5644d7874bSmrg the package. 5744d7874bSmrg 5844d7874bSmrg 4. Type `make install' to install the programs and any data files and 5944d7874bSmrg documentation. 6044d7874bSmrg 6144d7874bSmrg 5. You can remove the program binaries and object files from the 6244d7874bSmrg source code directory by typing `make clean'. To also remove the 6344d7874bSmrg files that `configure' created (so you can compile the package for 6444d7874bSmrg a different kind of computer), type `make distclean'. There is 6544d7874bSmrg also a `make maintainer-clean' target, but that is intended mainly 6644d7874bSmrg for the package's developers. If you use it, you may have to get 6744d7874bSmrg all sorts of other programs in order to regenerate files that came 6844d7874bSmrg with the distribution. 6944d7874bSmrg 7044d7874bSmrgCompilers and Options 7144d7874bSmrg===================== 7244d7874bSmrg 7344d7874bSmrgSome systems require unusual options for compilation or linking that the 7444d7874bSmrg`configure' script does not know about. Run `./configure --help' for 7544d7874bSmrgdetails on some of the pertinent environment variables. 7644d7874bSmrg 7744d7874bSmrg You can give `configure' initial values for configuration parameters 7844d7874bSmrgby setting variables in the command line or in the environment. Here 7944d7874bSmrgis an example: 8044d7874bSmrg 8144d7874bSmrg ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix 8244d7874bSmrg 8344d7874bSmrg *Note Defining Variables::, for more details. 8444d7874bSmrg 8544d7874bSmrgCompiling For Multiple Architectures 8644d7874bSmrg==================================== 8744d7874bSmrg 8844d7874bSmrgYou can compile the package for more than one kind of computer at the 8944d7874bSmrgsame time, by placing the object files for each architecture in their 9044d7874bSmrgown directory. To do this, you must use a version of `make' that 9144d7874bSmrgsupports the `VPATH' variable, such as GNU `make'. `cd' to the 9244d7874bSmrgdirectory where you want the object files and executables to go and run 9344d7874bSmrgthe `configure' script. `configure' automatically checks for the 9444d7874bSmrgsource code in the directory that `configure' is in and in `..'. 9544d7874bSmrg 9644d7874bSmrg If you have to use a `make' that does not support the `VPATH' 9744d7874bSmrgvariable, you have to compile the package for one architecture at a 9844d7874bSmrgtime in the source code directory. After you have installed the 9944d7874bSmrgpackage for one architecture, use `make distclean' before reconfiguring 10044d7874bSmrgfor another architecture. 10144d7874bSmrg 10244d7874bSmrgInstallation Names 10344d7874bSmrg================== 10444d7874bSmrg 10544d7874bSmrgBy default, `make install' installs the package's commands under 10644d7874bSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 10744d7874bSmrgcan specify an installation prefix other than `/usr/local' by giving 10844d7874bSmrg`configure' the option `--prefix=PREFIX'. 10944d7874bSmrg 11044d7874bSmrg You can specify separate installation prefixes for 11144d7874bSmrgarchitecture-specific files and architecture-independent files. If you 11244d7874bSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 11344d7874bSmrgPREFIX as the prefix for installing programs and libraries. 11444d7874bSmrgDocumentation and other data files still use the regular prefix. 11544d7874bSmrg 11644d7874bSmrg In addition, if you use an unusual directory layout you can give 11744d7874bSmrgoptions like `--bindir=DIR' to specify different values for particular 11844d7874bSmrgkinds of files. Run `configure --help' for a list of the directories 11944d7874bSmrgyou can set and what kinds of files go in them. 12044d7874bSmrg 12144d7874bSmrg If the package supports it, you can cause programs to be installed 12244d7874bSmrgwith an extra prefix or suffix on their names by giving `configure' the 12344d7874bSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 12444d7874bSmrg 12544d7874bSmrgOptional Features 12644d7874bSmrg================= 12744d7874bSmrg 12844d7874bSmrgSome packages pay attention to `--enable-FEATURE' options to 12944d7874bSmrg`configure', where FEATURE indicates an optional part of the package. 13044d7874bSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 13144d7874bSmrgis something like `gnu-as' or `x' (for the X Window System). The 13244d7874bSmrg`README' should mention any `--enable-' and `--with-' options that the 13344d7874bSmrgpackage recognizes. 13444d7874bSmrg 13544d7874bSmrg For packages that use the X Window System, `configure' can usually 13644d7874bSmrgfind the X include and library files automatically, but if it doesn't, 13744d7874bSmrgyou can use the `configure' options `--x-includes=DIR' and 13844d7874bSmrg`--x-libraries=DIR' to specify their locations. 13944d7874bSmrg 14044d7874bSmrgSpecifying the System Type 14144d7874bSmrg========================== 14244d7874bSmrg 14344d7874bSmrgThere may be some features `configure' cannot figure out automatically, 14444d7874bSmrgbut needs to determine by the type of machine the package will run on. 14544d7874bSmrgUsually, assuming the package is built to be run on the _same_ 14644d7874bSmrgarchitectures, `configure' can figure that out, but if it prints a 14744d7874bSmrgmessage saying it cannot guess the machine type, give it the 14844d7874bSmrg`--build=TYPE' option. TYPE can either be a short name for the system 14944d7874bSmrgtype, such as `sun4', or a canonical name which has the form: 15044d7874bSmrg 15144d7874bSmrg CPU-COMPANY-SYSTEM 15244d7874bSmrg 15344d7874bSmrgwhere SYSTEM can have one of these forms: 15444d7874bSmrg 15544d7874bSmrg OS KERNEL-OS 15644d7874bSmrg 15744d7874bSmrg See the file `config.sub' for the possible values of each field. If 15844d7874bSmrg`config.sub' isn't included in this package, then this package doesn't 15944d7874bSmrgneed to know the machine type. 16044d7874bSmrg 16144d7874bSmrg If you are _building_ compiler tools for cross-compiling, you should 16244d7874bSmrguse the option `--target=TYPE' to select the type of system they will 16344d7874bSmrgproduce code for. 16444d7874bSmrg 16544d7874bSmrg If you want to _use_ a cross compiler, that generates code for a 16644d7874bSmrgplatform different from the build platform, you should specify the 16744d7874bSmrg"host" platform (i.e., that on which the generated programs will 16844d7874bSmrgeventually be run) with `--host=TYPE'. 16944d7874bSmrg 17044d7874bSmrgSharing Defaults 17144d7874bSmrg================ 17244d7874bSmrg 17344d7874bSmrgIf you want to set default values for `configure' scripts to share, you 17444d7874bSmrgcan create a site shell script called `config.site' that gives default 17544d7874bSmrgvalues for variables like `CC', `cache_file', and `prefix'. 17644d7874bSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 17744d7874bSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 17844d7874bSmrg`CONFIG_SITE' environment variable to the location of the site script. 17944d7874bSmrgA warning: not all `configure' scripts look for a site script. 18044d7874bSmrg 18144d7874bSmrgDefining Variables 18244d7874bSmrg================== 18344d7874bSmrg 18444d7874bSmrgVariables not defined in a site shell script can be set in the 18544d7874bSmrgenvironment passed to `configure'. However, some packages may run 18644d7874bSmrgconfigure again during the build, and the customized values of these 18744d7874bSmrgvariables may be lost. In order to avoid this problem, you should set 18844d7874bSmrgthem in the `configure' command line, using `VAR=value'. For example: 18944d7874bSmrg 19044d7874bSmrg ./configure CC=/usr/local2/bin/gcc 19144d7874bSmrg 19244d7874bSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 19344d7874bSmrgoverridden in the site shell script). Here is a another example: 19444d7874bSmrg 19544d7874bSmrg /bin/bash ./configure CONFIG_SHELL=/bin/bash 19644d7874bSmrg 19744d7874bSmrgHere the `CONFIG_SHELL=/bin/bash' operand causes subsequent 19844d7874bSmrgconfiguration-related scripts to be executed by `/bin/bash'. 19944d7874bSmrg 20044d7874bSmrg`configure' Invocation 20144d7874bSmrg====================== 20244d7874bSmrg 20344d7874bSmrg`configure' recognizes the following options to control how it operates. 20444d7874bSmrg 20544d7874bSmrg`--help' 20644d7874bSmrg`-h' 20744d7874bSmrg Print a summary of the options to `configure', and exit. 20844d7874bSmrg 20944d7874bSmrg`--version' 21044d7874bSmrg`-V' 21144d7874bSmrg Print the version of Autoconf used to generate the `configure' 21244d7874bSmrg script, and exit. 21344d7874bSmrg 21444d7874bSmrg`--cache-file=FILE' 21544d7874bSmrg Enable the cache: use and save the results of the tests in FILE, 21644d7874bSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 21744d7874bSmrg disable caching. 21844d7874bSmrg 21944d7874bSmrg`--config-cache' 22044d7874bSmrg`-C' 22144d7874bSmrg Alias for `--cache-file=config.cache'. 22244d7874bSmrg 22344d7874bSmrg`--quiet' 22444d7874bSmrg`--silent' 22544d7874bSmrg`-q' 22644d7874bSmrg Do not print messages saying which checks are being made. To 22744d7874bSmrg suppress all normal output, redirect it to `/dev/null' (any error 22844d7874bSmrg messages will still be shown). 22944d7874bSmrg 23044d7874bSmrg`--srcdir=DIR' 23144d7874bSmrg Look for the package's source code in directory DIR. Usually 23244d7874bSmrg `configure' can determine that directory automatically. 23344d7874bSmrg 23444d7874bSmrg`configure' also accepts some other, not widely useful, options. Run 23544d7874bSmrg`configure --help' for more details. 23644d7874bSmrg 237