INSTALL revision 29cb5710
129cb5710SmrgInstallation Instructions 229cb5710Smrg************************* 329cb5710Smrg 429cb5710SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 529cb5710Smrg2006, 2007, 2008 Free Software Foundation, Inc. 629cb5710Smrg 729cb5710Smrg This file is free documentation; the Free Software Foundation gives 829cb5710Smrgunlimited permission to copy, distribute and modify it. 929cb5710Smrg 1029cb5710SmrgBasic Installation 1129cb5710Smrg================== 1229cb5710Smrg 1329cb5710Smrg Briefly, the shell commands `./configure; make; make install' should 1429cb5710Smrgconfigure, build, and install this package. The following 1529cb5710Smrgmore-detailed instructions are generic; see the `README' file for 1629cb5710Smrginstructions specific to this package. 1729cb5710Smrg 1829cb5710Smrg The `configure' shell script attempts to guess correct values for 1929cb5710Smrgvarious system-dependent variables used during compilation. It uses 2029cb5710Smrgthose values to create a `Makefile' in each directory of the package. 2129cb5710SmrgIt may also create one or more `.h' files containing system-dependent 2229cb5710Smrgdefinitions. Finally, it creates a shell script `config.status' that 2329cb5710Smrgyou can run in the future to recreate the current configuration, and a 2429cb5710Smrgfile `config.log' containing compiler output (useful mainly for 2529cb5710Smrgdebugging `configure'). 2629cb5710Smrg 2729cb5710Smrg It can also use an optional file (typically called `config.cache' 2829cb5710Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 2929cb5710Smrgthe results of its tests to speed up reconfiguring. Caching is 3029cb5710Smrgdisabled by default to prevent problems with accidental use of stale 3129cb5710Smrgcache files. 3229cb5710Smrg 3329cb5710Smrg If you need to do unusual things to compile the package, please try 3429cb5710Smrgto figure out how `configure' could check whether to do them, and mail 3529cb5710Smrgdiffs or instructions to the address given in the `README' so they can 3629cb5710Smrgbe considered for the next release. If you are using the cache, and at 3729cb5710Smrgsome point `config.cache' contains results you don't want to keep, you 3829cb5710Smrgmay remove or edit it. 3929cb5710Smrg 4029cb5710Smrg The file `configure.ac' (or `configure.in') is used to create 4129cb5710Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 4229cb5710Smrgyou want to change it or regenerate `configure' using a newer version 4329cb5710Smrgof `autoconf'. 4429cb5710Smrg 4529cb5710SmrgThe simplest way to compile this package is: 4629cb5710Smrg 4729cb5710Smrg 1. `cd' to the directory containing the package's source code and type 4829cb5710Smrg `./configure' to configure the package for your system. 4929cb5710Smrg 5029cb5710Smrg Running `configure' might take a while. While running, it prints 5129cb5710Smrg some messages telling which features it is checking for. 5229cb5710Smrg 5329cb5710Smrg 2. Type `make' to compile the package. 5429cb5710Smrg 5529cb5710Smrg 3. Optionally, type `make check' to run any self-tests that come with 5629cb5710Smrg the package. 5729cb5710Smrg 5829cb5710Smrg 4. Type `make install' to install the programs and any data files and 5929cb5710Smrg documentation. 6029cb5710Smrg 6129cb5710Smrg 5. You can remove the program binaries and object files from the 6229cb5710Smrg source code directory by typing `make clean'. To also remove the 6329cb5710Smrg files that `configure' created (so you can compile the package for 6429cb5710Smrg a different kind of computer), type `make distclean'. There is 6529cb5710Smrg also a `make maintainer-clean' target, but that is intended mainly 6629cb5710Smrg for the package's developers. If you use it, you may have to get 6729cb5710Smrg all sorts of other programs in order to regenerate files that came 6829cb5710Smrg with the distribution. 6929cb5710Smrg 7029cb5710Smrg 6. Often, you can also type `make uninstall' to remove the installed 7129cb5710Smrg files again. 7229cb5710Smrg 7329cb5710SmrgCompilers and Options 7429cb5710Smrg===================== 7529cb5710Smrg 7629cb5710Smrg Some systems require unusual options for compilation or linking that 7729cb5710Smrgthe `configure' script does not know about. Run `./configure --help' 7829cb5710Smrgfor details on some of the pertinent environment variables. 7929cb5710Smrg 8029cb5710Smrg You can give `configure' initial values for configuration parameters 8129cb5710Smrgby setting variables in the command line or in the environment. Here 8229cb5710Smrgis an example: 8329cb5710Smrg 8429cb5710Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 8529cb5710Smrg 8629cb5710Smrg *Note Defining Variables::, for more details. 8729cb5710Smrg 8829cb5710SmrgCompiling For Multiple Architectures 8929cb5710Smrg==================================== 9029cb5710Smrg 9129cb5710Smrg You can compile the package for more than one kind of computer at the 9229cb5710Smrgsame time, by placing the object files for each architecture in their 9329cb5710Smrgown directory. To do this, you can use GNU `make'. `cd' to the 9429cb5710Smrgdirectory where you want the object files and executables to go and run 9529cb5710Smrgthe `configure' script. `configure' automatically checks for the 9629cb5710Smrgsource code in the directory that `configure' is in and in `..'. 9729cb5710Smrg 9829cb5710Smrg With a non-GNU `make', it is safer to compile the package for one 9929cb5710Smrgarchitecture at a time in the source code directory. After you have 10029cb5710Smrginstalled the package for one architecture, use `make distclean' before 10129cb5710Smrgreconfiguring for another architecture. 10229cb5710Smrg 10329cb5710Smrg On MacOS X 10.5 and later systems, you can create libraries and 10429cb5710Smrgexecutables that work on multiple system types--known as "fat" or 10529cb5710Smrg"universal" binaries--by specifying multiple `-arch' options to the 10629cb5710Smrgcompiler but only a single `-arch' option to the preprocessor. Like 10729cb5710Smrgthis: 10829cb5710Smrg 10929cb5710Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 11029cb5710Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 11129cb5710Smrg CPP="gcc -E" CXXCPP="g++ -E" 11229cb5710Smrg 11329cb5710Smrg This is not guaranteed to produce working output in all cases, you 11429cb5710Smrgmay have to build one architecture at a time and combine the results 11529cb5710Smrgusing the `lipo' tool if you have problems. 11629cb5710Smrg 11729cb5710SmrgInstallation Names 11829cb5710Smrg================== 11929cb5710Smrg 12029cb5710Smrg By default, `make install' installs the package's commands under 12129cb5710Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 12229cb5710Smrgcan specify an installation prefix other than `/usr/local' by giving 12329cb5710Smrg`configure' the option `--prefix=PREFIX'. 12429cb5710Smrg 12529cb5710Smrg You can specify separate installation prefixes for 12629cb5710Smrgarchitecture-specific files and architecture-independent files. If you 12729cb5710Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 12829cb5710SmrgPREFIX as the prefix for installing programs and libraries. 12929cb5710SmrgDocumentation and other data files still use the regular prefix. 13029cb5710Smrg 13129cb5710Smrg In addition, if you use an unusual directory layout you can give 13229cb5710Smrgoptions like `--bindir=DIR' to specify different values for particular 13329cb5710Smrgkinds of files. Run `configure --help' for a list of the directories 13429cb5710Smrgyou can set and what kinds of files go in them. 13529cb5710Smrg 13629cb5710Smrg If the package supports it, you can cause programs to be installed 13729cb5710Smrgwith an extra prefix or suffix on their names by giving `configure' the 13829cb5710Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 13929cb5710Smrg 14029cb5710SmrgOptional Features 14129cb5710Smrg================= 14229cb5710Smrg 14329cb5710Smrg Some packages pay attention to `--enable-FEATURE' options to 14429cb5710Smrg`configure', where FEATURE indicates an optional part of the package. 14529cb5710SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 14629cb5710Smrgis something like `gnu-as' or `x' (for the X Window System). The 14729cb5710Smrg`README' should mention any `--enable-' and `--with-' options that the 14829cb5710Smrgpackage recognizes. 14929cb5710Smrg 15029cb5710Smrg For packages that use the X Window System, `configure' can usually 15129cb5710Smrgfind the X include and library files automatically, but if it doesn't, 15229cb5710Smrgyou can use the `configure' options `--x-includes=DIR' and 15329cb5710Smrg`--x-libraries=DIR' to specify their locations. 15429cb5710Smrg 15529cb5710SmrgParticular systems 15629cb5710Smrg================== 15729cb5710Smrg 15829cb5710Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 15929cb5710SmrgCC is not installed, it is recommended to use the following options in 16029cb5710Smrgorder to use an ANSI C compiler: 16129cb5710Smrg 16229cb5710Smrg ./configure CC="cc -Ae" 16329cb5710Smrg 16429cb5710Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 16529cb5710Smrg 16629cb5710Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 16729cb5710Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 16829cb5710Smrga workaround. If GNU CC is not installed, it is therefore recommended 16929cb5710Smrgto try 17029cb5710Smrg 17129cb5710Smrg ./configure CC="cc" 17229cb5710Smrg 17329cb5710Smrgand if that doesn't work, try 17429cb5710Smrg 17529cb5710Smrg ./configure CC="cc -nodtk" 17629cb5710Smrg 17729cb5710SmrgSpecifying the System Type 17829cb5710Smrg========================== 17929cb5710Smrg 18029cb5710Smrg There may be some features `configure' cannot figure out 18129cb5710Smrgautomatically, but needs to determine by the type of machine the package 18229cb5710Smrgwill run on. Usually, assuming the package is built to be run on the 18329cb5710Smrg_same_ architectures, `configure' can figure that out, but if it prints 18429cb5710Smrga message saying it cannot guess the machine type, give it the 18529cb5710Smrg`--build=TYPE' option. TYPE can either be a short name for the system 18629cb5710Smrgtype, such as `sun4', or a canonical name which has the form: 18729cb5710Smrg 18829cb5710Smrg CPU-COMPANY-SYSTEM 18929cb5710Smrg 19029cb5710Smrgwhere SYSTEM can have one of these forms: 19129cb5710Smrg 19229cb5710Smrg OS KERNEL-OS 19329cb5710Smrg 19429cb5710Smrg See the file `config.sub' for the possible values of each field. If 19529cb5710Smrg`config.sub' isn't included in this package, then this package doesn't 19629cb5710Smrgneed to know the machine type. 19729cb5710Smrg 19829cb5710Smrg If you are _building_ compiler tools for cross-compiling, you should 19929cb5710Smrguse the option `--target=TYPE' to select the type of system they will 20029cb5710Smrgproduce code for. 20129cb5710Smrg 20229cb5710Smrg If you want to _use_ a cross compiler, that generates code for a 20329cb5710Smrgplatform different from the build platform, you should specify the 20429cb5710Smrg"host" platform (i.e., that on which the generated programs will 20529cb5710Smrgeventually be run) with `--host=TYPE'. 20629cb5710Smrg 20729cb5710SmrgSharing Defaults 20829cb5710Smrg================ 20929cb5710Smrg 21029cb5710Smrg If you want to set default values for `configure' scripts to share, 21129cb5710Smrgyou can create a site shell script called `config.site' that gives 21229cb5710Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 21329cb5710Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 21429cb5710Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 21529cb5710Smrg`CONFIG_SITE' environment variable to the location of the site script. 21629cb5710SmrgA warning: not all `configure' scripts look for a site script. 21729cb5710Smrg 21829cb5710SmrgDefining Variables 21929cb5710Smrg================== 22029cb5710Smrg 22129cb5710Smrg Variables not defined in a site shell script can be set in the 22229cb5710Smrgenvironment passed to `configure'. However, some packages may run 22329cb5710Smrgconfigure again during the build, and the customized values of these 22429cb5710Smrgvariables may be lost. In order to avoid this problem, you should set 22529cb5710Smrgthem in the `configure' command line, using `VAR=value'. For example: 22629cb5710Smrg 22729cb5710Smrg ./configure CC=/usr/local2/bin/gcc 22829cb5710Smrg 22929cb5710Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 23029cb5710Smrgoverridden in the site shell script). 23129cb5710Smrg 23229cb5710SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 23329cb5710Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 23429cb5710Smrg 23529cb5710Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 23629cb5710Smrg 23729cb5710Smrg`configure' Invocation 23829cb5710Smrg====================== 23929cb5710Smrg 24029cb5710Smrg `configure' recognizes the following options to control how it 24129cb5710Smrgoperates. 24229cb5710Smrg 24329cb5710Smrg`--help' 24429cb5710Smrg`-h' 24529cb5710Smrg Print a summary of all of the options to `configure', and exit. 24629cb5710Smrg 24729cb5710Smrg`--help=short' 24829cb5710Smrg`--help=recursive' 24929cb5710Smrg Print a summary of the options unique to this package's 25029cb5710Smrg `configure', and exit. The `short' variant lists options used 25129cb5710Smrg only in the top level, while the `recursive' variant lists options 25229cb5710Smrg also present in any nested packages. 25329cb5710Smrg 25429cb5710Smrg`--version' 25529cb5710Smrg`-V' 25629cb5710Smrg Print the version of Autoconf used to generate the `configure' 25729cb5710Smrg script, and exit. 25829cb5710Smrg 25929cb5710Smrg`--cache-file=FILE' 26029cb5710Smrg Enable the cache: use and save the results of the tests in FILE, 26129cb5710Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 26229cb5710Smrg disable caching. 26329cb5710Smrg 26429cb5710Smrg`--config-cache' 26529cb5710Smrg`-C' 26629cb5710Smrg Alias for `--cache-file=config.cache'. 26729cb5710Smrg 26829cb5710Smrg`--quiet' 26929cb5710Smrg`--silent' 27029cb5710Smrg`-q' 27129cb5710Smrg Do not print messages saying which checks are being made. To 27229cb5710Smrg suppress all normal output, redirect it to `/dev/null' (any error 27329cb5710Smrg messages will still be shown). 27429cb5710Smrg 27529cb5710Smrg`--srcdir=DIR' 27629cb5710Smrg Look for the package's source code in directory DIR. Usually 27729cb5710Smrg `configure' can determine that directory automatically. 27829cb5710Smrg 27929cb5710Smrg`--prefix=DIR' 28029cb5710Smrg Use DIR as the installation prefix. *Note Installation Names:: 28129cb5710Smrg for more details, including other options available for fine-tuning 28229cb5710Smrg the installation locations. 28329cb5710Smrg 28429cb5710Smrg`--no-create' 28529cb5710Smrg`-n' 28629cb5710Smrg Run the configure checks, but stop before creating any output 28729cb5710Smrg files. 28829cb5710Smrg 28929cb5710Smrg`configure' also accepts some other, not widely useful, options. Run 29029cb5710Smrg`configure --help' for more details. 29129cb5710Smrg 292