INSTALL revision 86bbecbe
186bbecbeSmrgInstallation Instructions 286bbecbeSmrg************************* 386bbecbeSmrg 486bbecbeSmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 586bbecbeSmrg2006, 2007, 2008 Free Software Foundation, Inc. 686bbecbeSmrg 786bbecbeSmrg This file is free documentation; the Free Software Foundation gives 886bbecbeSmrgunlimited permission to copy, distribute and modify it. 986bbecbeSmrg 1086bbecbeSmrgBasic Installation 1186bbecbeSmrg================== 1286bbecbeSmrg 1386bbecbeSmrg Briefly, the shell commands `./configure; make; make install' should 1486bbecbeSmrgconfigure, build, and install this package. The following 1586bbecbeSmrgmore-detailed instructions are generic; see the `README' file for 1686bbecbeSmrginstructions specific to this package. 1786bbecbeSmrg 1886bbecbeSmrg The `configure' shell script attempts to guess correct values for 1986bbecbeSmrgvarious system-dependent variables used during compilation. It uses 2086bbecbeSmrgthose values to create a `Makefile' in each directory of the package. 2186bbecbeSmrgIt may also create one or more `.h' files containing system-dependent 2286bbecbeSmrgdefinitions. Finally, it creates a shell script `config.status' that 2386bbecbeSmrgyou can run in the future to recreate the current configuration, and a 2486bbecbeSmrgfile `config.log' containing compiler output (useful mainly for 2586bbecbeSmrgdebugging `configure'). 2686bbecbeSmrg 2786bbecbeSmrg It can also use an optional file (typically called `config.cache' 2886bbecbeSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 2986bbecbeSmrgthe results of its tests to speed up reconfiguring. Caching is 3086bbecbeSmrgdisabled by default to prevent problems with accidental use of stale 3186bbecbeSmrgcache files. 3286bbecbeSmrg 3386bbecbeSmrg If you need to do unusual things to compile the package, please try 3486bbecbeSmrgto figure out how `configure' could check whether to do them, and mail 3586bbecbeSmrgdiffs or instructions to the address given in the `README' so they can 3686bbecbeSmrgbe considered for the next release. If you are using the cache, and at 3786bbecbeSmrgsome point `config.cache' contains results you don't want to keep, you 3886bbecbeSmrgmay remove or edit it. 3986bbecbeSmrg 4086bbecbeSmrg The file `configure.ac' (or `configure.in') is used to create 4186bbecbeSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 4286bbecbeSmrgyou want to change it or regenerate `configure' using a newer version 4386bbecbeSmrgof `autoconf'. 4486bbecbeSmrg 4586bbecbeSmrgThe simplest way to compile this package is: 4686bbecbeSmrg 4786bbecbeSmrg 1. `cd' to the directory containing the package's source code and type 4886bbecbeSmrg `./configure' to configure the package for your system. 4986bbecbeSmrg 5086bbecbeSmrg Running `configure' might take a while. While running, it prints 5186bbecbeSmrg some messages telling which features it is checking for. 5286bbecbeSmrg 5386bbecbeSmrg 2. Type `make' to compile the package. 5486bbecbeSmrg 5586bbecbeSmrg 3. Optionally, type `make check' to run any self-tests that come with 5686bbecbeSmrg the package. 5786bbecbeSmrg 5886bbecbeSmrg 4. Type `make install' to install the programs and any data files and 5986bbecbeSmrg documentation. 6086bbecbeSmrg 6186bbecbeSmrg 5. You can remove the program binaries and object files from the 6286bbecbeSmrg source code directory by typing `make clean'. To also remove the 6386bbecbeSmrg files that `configure' created (so you can compile the package for 6486bbecbeSmrg a different kind of computer), type `make distclean'. There is 6586bbecbeSmrg also a `make maintainer-clean' target, but that is intended mainly 6686bbecbeSmrg for the package's developers. If you use it, you may have to get 6786bbecbeSmrg all sorts of other programs in order to regenerate files that came 6886bbecbeSmrg with the distribution. 6986bbecbeSmrg 7086bbecbeSmrg 6. Often, you can also type `make uninstall' to remove the installed 7186bbecbeSmrg files again. 7286bbecbeSmrg 7386bbecbeSmrgCompilers and Options 7486bbecbeSmrg===================== 7586bbecbeSmrg 7686bbecbeSmrg Some systems require unusual options for compilation or linking that 7786bbecbeSmrgthe `configure' script does not know about. Run `./configure --help' 7886bbecbeSmrgfor details on some of the pertinent environment variables. 7986bbecbeSmrg 8086bbecbeSmrg You can give `configure' initial values for configuration parameters 8186bbecbeSmrgby setting variables in the command line or in the environment. Here 8286bbecbeSmrgis an example: 8386bbecbeSmrg 8486bbecbeSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 8586bbecbeSmrg 8686bbecbeSmrg *Note Defining Variables::, for more details. 8786bbecbeSmrg 8886bbecbeSmrgCompiling For Multiple Architectures 8986bbecbeSmrg==================================== 9086bbecbeSmrg 9186bbecbeSmrg You can compile the package for more than one kind of computer at the 9286bbecbeSmrgsame time, by placing the object files for each architecture in their 9386bbecbeSmrgown directory. To do this, you can use GNU `make'. `cd' to the 9486bbecbeSmrgdirectory where you want the object files and executables to go and run 9586bbecbeSmrgthe `configure' script. `configure' automatically checks for the 9686bbecbeSmrgsource code in the directory that `configure' is in and in `..'. 9786bbecbeSmrg 9886bbecbeSmrg With a non-GNU `make', it is safer to compile the package for one 9986bbecbeSmrgarchitecture at a time in the source code directory. After you have 10086bbecbeSmrginstalled the package for one architecture, use `make distclean' before 10186bbecbeSmrgreconfiguring for another architecture. 10286bbecbeSmrg 10386bbecbeSmrg On MacOS X 10.5 and later systems, you can create libraries and 10486bbecbeSmrgexecutables that work on multiple system types--known as "fat" or 10586bbecbeSmrg"universal" binaries--by specifying multiple `-arch' options to the 10686bbecbeSmrgcompiler but only a single `-arch' option to the preprocessor. Like 10786bbecbeSmrgthis: 10886bbecbeSmrg 10986bbecbeSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 11086bbecbeSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 11186bbecbeSmrg CPP="gcc -E" CXXCPP="g++ -E" 11286bbecbeSmrg 11386bbecbeSmrg This is not guaranteed to produce working output in all cases, you 11486bbecbeSmrgmay have to build one architecture at a time and combine the results 11586bbecbeSmrgusing the `lipo' tool if you have problems. 11686bbecbeSmrg 11786bbecbeSmrgInstallation Names 11886bbecbeSmrg================== 11986bbecbeSmrg 12086bbecbeSmrg By default, `make install' installs the package's commands under 12186bbecbeSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 12286bbecbeSmrgcan specify an installation prefix other than `/usr/local' by giving 12386bbecbeSmrg`configure' the option `--prefix=PREFIX'. 12486bbecbeSmrg 12586bbecbeSmrg You can specify separate installation prefixes for 12686bbecbeSmrgarchitecture-specific files and architecture-independent files. If you 12786bbecbeSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 12886bbecbeSmrgPREFIX as the prefix for installing programs and libraries. 12986bbecbeSmrgDocumentation and other data files still use the regular prefix. 13086bbecbeSmrg 13186bbecbeSmrg In addition, if you use an unusual directory layout you can give 13286bbecbeSmrgoptions like `--bindir=DIR' to specify different values for particular 13386bbecbeSmrgkinds of files. Run `configure --help' for a list of the directories 13486bbecbeSmrgyou can set and what kinds of files go in them. 13586bbecbeSmrg 13686bbecbeSmrg If the package supports it, you can cause programs to be installed 13786bbecbeSmrgwith an extra prefix or suffix on their names by giving `configure' the 13886bbecbeSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 13986bbecbeSmrg 14086bbecbeSmrgOptional Features 14186bbecbeSmrg================= 14286bbecbeSmrg 14386bbecbeSmrg Some packages pay attention to `--enable-FEATURE' options to 14486bbecbeSmrg`configure', where FEATURE indicates an optional part of the package. 14586bbecbeSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 14686bbecbeSmrgis something like `gnu-as' or `x' (for the X Window System). The 14786bbecbeSmrg`README' should mention any `--enable-' and `--with-' options that the 14886bbecbeSmrgpackage recognizes. 14986bbecbeSmrg 15086bbecbeSmrg For packages that use the X Window System, `configure' can usually 15186bbecbeSmrgfind the X include and library files automatically, but if it doesn't, 15286bbecbeSmrgyou can use the `configure' options `--x-includes=DIR' and 15386bbecbeSmrg`--x-libraries=DIR' to specify their locations. 15486bbecbeSmrg 15586bbecbeSmrgParticular systems 15686bbecbeSmrg================== 15786bbecbeSmrg 15886bbecbeSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 15986bbecbeSmrgCC is not installed, it is recommended to use the following options in 16086bbecbeSmrgorder to use an ANSI C compiler: 16186bbecbeSmrg 16286bbecbeSmrg ./configure CC="cc -Ae" 16386bbecbeSmrg 16486bbecbeSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 16586bbecbeSmrg 16686bbecbeSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 16786bbecbeSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 16886bbecbeSmrga workaround. If GNU CC is not installed, it is therefore recommended 16986bbecbeSmrgto try 17086bbecbeSmrg 17186bbecbeSmrg ./configure CC="cc" 17286bbecbeSmrg 17386bbecbeSmrgand if that doesn't work, try 17486bbecbeSmrg 17586bbecbeSmrg ./configure CC="cc -nodtk" 17686bbecbeSmrg 17786bbecbeSmrgSpecifying the System Type 17886bbecbeSmrg========================== 17986bbecbeSmrg 18086bbecbeSmrg There may be some features `configure' cannot figure out 18186bbecbeSmrgautomatically, but needs to determine by the type of machine the package 18286bbecbeSmrgwill run on. Usually, assuming the package is built to be run on the 18386bbecbeSmrg_same_ architectures, `configure' can figure that out, but if it prints 18486bbecbeSmrga message saying it cannot guess the machine type, give it the 18586bbecbeSmrg`--build=TYPE' option. TYPE can either be a short name for the system 18686bbecbeSmrgtype, such as `sun4', or a canonical name which has the form: 18786bbecbeSmrg 18886bbecbeSmrg CPU-COMPANY-SYSTEM 18986bbecbeSmrg 19086bbecbeSmrgwhere SYSTEM can have one of these forms: 19186bbecbeSmrg 19286bbecbeSmrg OS KERNEL-OS 19386bbecbeSmrg 19486bbecbeSmrg See the file `config.sub' for the possible values of each field. If 19586bbecbeSmrg`config.sub' isn't included in this package, then this package doesn't 19686bbecbeSmrgneed to know the machine type. 19786bbecbeSmrg 19886bbecbeSmrg If you are _building_ compiler tools for cross-compiling, you should 19986bbecbeSmrguse the option `--target=TYPE' to select the type of system they will 20086bbecbeSmrgproduce code for. 20186bbecbeSmrg 20286bbecbeSmrg If you want to _use_ a cross compiler, that generates code for a 20386bbecbeSmrgplatform different from the build platform, you should specify the 20486bbecbeSmrg"host" platform (i.e., that on which the generated programs will 20586bbecbeSmrgeventually be run) with `--host=TYPE'. 20686bbecbeSmrg 20786bbecbeSmrgSharing Defaults 20886bbecbeSmrg================ 20986bbecbeSmrg 21086bbecbeSmrg If you want to set default values for `configure' scripts to share, 21186bbecbeSmrgyou can create a site shell script called `config.site' that gives 21286bbecbeSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 21386bbecbeSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 21486bbecbeSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 21586bbecbeSmrg`CONFIG_SITE' environment variable to the location of the site script. 21686bbecbeSmrgA warning: not all `configure' scripts look for a site script. 21786bbecbeSmrg 21886bbecbeSmrgDefining Variables 21986bbecbeSmrg================== 22086bbecbeSmrg 22186bbecbeSmrg Variables not defined in a site shell script can be set in the 22286bbecbeSmrgenvironment passed to `configure'. However, some packages may run 22386bbecbeSmrgconfigure again during the build, and the customized values of these 22486bbecbeSmrgvariables may be lost. In order to avoid this problem, you should set 22586bbecbeSmrgthem in the `configure' command line, using `VAR=value'. For example: 22686bbecbeSmrg 22786bbecbeSmrg ./configure CC=/usr/local2/bin/gcc 22886bbecbeSmrg 22986bbecbeSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 23086bbecbeSmrgoverridden in the site shell script). 23186bbecbeSmrg 23286bbecbeSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 23386bbecbeSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 23486bbecbeSmrg 23586bbecbeSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 23686bbecbeSmrg 23786bbecbeSmrg`configure' Invocation 23886bbecbeSmrg====================== 23986bbecbeSmrg 24086bbecbeSmrg `configure' recognizes the following options to control how it 24186bbecbeSmrgoperates. 24286bbecbeSmrg 24386bbecbeSmrg`--help' 24486bbecbeSmrg`-h' 24586bbecbeSmrg Print a summary of all of the options to `configure', and exit. 24686bbecbeSmrg 24786bbecbeSmrg`--help=short' 24886bbecbeSmrg`--help=recursive' 24986bbecbeSmrg Print a summary of the options unique to this package's 25086bbecbeSmrg `configure', and exit. The `short' variant lists options used 25186bbecbeSmrg only in the top level, while the `recursive' variant lists options 25286bbecbeSmrg also present in any nested packages. 25386bbecbeSmrg 25486bbecbeSmrg`--version' 25586bbecbeSmrg`-V' 25686bbecbeSmrg Print the version of Autoconf used to generate the `configure' 25786bbecbeSmrg script, and exit. 25886bbecbeSmrg 25986bbecbeSmrg`--cache-file=FILE' 26086bbecbeSmrg Enable the cache: use and save the results of the tests in FILE, 26186bbecbeSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 26286bbecbeSmrg disable caching. 26386bbecbeSmrg 26486bbecbeSmrg`--config-cache' 26586bbecbeSmrg`-C' 26686bbecbeSmrg Alias for `--cache-file=config.cache'. 26786bbecbeSmrg 26886bbecbeSmrg`--quiet' 26986bbecbeSmrg`--silent' 27086bbecbeSmrg`-q' 27186bbecbeSmrg Do not print messages saying which checks are being made. To 27286bbecbeSmrg suppress all normal output, redirect it to `/dev/null' (any error 27386bbecbeSmrg messages will still be shown). 27486bbecbeSmrg 27586bbecbeSmrg`--srcdir=DIR' 27686bbecbeSmrg Look for the package's source code in directory DIR. Usually 27786bbecbeSmrg `configure' can determine that directory automatically. 27886bbecbeSmrg 27986bbecbeSmrg`--prefix=DIR' 28086bbecbeSmrg Use DIR as the installation prefix. *Note Installation Names:: 28186bbecbeSmrg for more details, including other options available for fine-tuning 28286bbecbeSmrg the installation locations. 28386bbecbeSmrg 28486bbecbeSmrg`--no-create' 28586bbecbeSmrg`-n' 28686bbecbeSmrg Run the configure checks, but stop before creating any output 28786bbecbeSmrg files. 28886bbecbeSmrg 28986bbecbeSmrg`configure' also accepts some other, not widely useful, options. Run 29086bbecbeSmrg`configure --help' for more details. 29186bbecbeSmrg 292