INSTALL revision d7ffce2a
1d7ffce2aSmrgInstallation Instructions 2d7ffce2aSmrg************************* 3d7ffce2aSmrg 4d7ffce2aSmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 5d7ffce2aSmrg2006, 2007, 2008 Free Software Foundation, Inc. 6d7ffce2aSmrg 7d7ffce2aSmrg This file is free documentation; the Free Software Foundation gives 8d7ffce2aSmrgunlimited permission to copy, distribute and modify it. 9d7ffce2aSmrg 10d7ffce2aSmrgBasic Installation 11d7ffce2aSmrg================== 12d7ffce2aSmrg 13d7ffce2aSmrg Briefly, the shell commands `./configure; make; make install' should 14d7ffce2aSmrgconfigure, build, and install this package. The following 15d7ffce2aSmrgmore-detailed instructions are generic; see the `README' file for 16d7ffce2aSmrginstructions specific to this package. 17d7ffce2aSmrg 18d7ffce2aSmrg The `configure' shell script attempts to guess correct values for 19d7ffce2aSmrgvarious system-dependent variables used during compilation. It uses 20d7ffce2aSmrgthose values to create a `Makefile' in each directory of the package. 21d7ffce2aSmrgIt may also create one or more `.h' files containing system-dependent 22d7ffce2aSmrgdefinitions. Finally, it creates a shell script `config.status' that 23d7ffce2aSmrgyou can run in the future to recreate the current configuration, and a 24d7ffce2aSmrgfile `config.log' containing compiler output (useful mainly for 25d7ffce2aSmrgdebugging `configure'). 26d7ffce2aSmrg 27d7ffce2aSmrg It can also use an optional file (typically called `config.cache' 28d7ffce2aSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 29d7ffce2aSmrgthe results of its tests to speed up reconfiguring. Caching is 30d7ffce2aSmrgdisabled by default to prevent problems with accidental use of stale 31d7ffce2aSmrgcache files. 32d7ffce2aSmrg 33d7ffce2aSmrg If you need to do unusual things to compile the package, please try 34d7ffce2aSmrgto figure out how `configure' could check whether to do them, and mail 35d7ffce2aSmrgdiffs or instructions to the address given in the `README' so they can 36d7ffce2aSmrgbe considered for the next release. If you are using the cache, and at 37d7ffce2aSmrgsome point `config.cache' contains results you don't want to keep, you 38d7ffce2aSmrgmay remove or edit it. 39d7ffce2aSmrg 40d7ffce2aSmrg The file `configure.ac' (or `configure.in') is used to create 41d7ffce2aSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 42d7ffce2aSmrgyou want to change it or regenerate `configure' using a newer version 43d7ffce2aSmrgof `autoconf'. 44d7ffce2aSmrg 45d7ffce2aSmrgThe simplest way to compile this package is: 46d7ffce2aSmrg 47d7ffce2aSmrg 1. `cd' to the directory containing the package's source code and type 48d7ffce2aSmrg `./configure' to configure the package for your system. 49d7ffce2aSmrg 50d7ffce2aSmrg Running `configure' might take a while. While running, it prints 51d7ffce2aSmrg some messages telling which features it is checking for. 52d7ffce2aSmrg 53d7ffce2aSmrg 2. Type `make' to compile the package. 54d7ffce2aSmrg 55d7ffce2aSmrg 3. Optionally, type `make check' to run any self-tests that come with 56d7ffce2aSmrg the package. 57d7ffce2aSmrg 58d7ffce2aSmrg 4. Type `make install' to install the programs and any data files and 59d7ffce2aSmrg documentation. 60d7ffce2aSmrg 61d7ffce2aSmrg 5. You can remove the program binaries and object files from the 62d7ffce2aSmrg source code directory by typing `make clean'. To also remove the 63d7ffce2aSmrg files that `configure' created (so you can compile the package for 64d7ffce2aSmrg a different kind of computer), type `make distclean'. There is 65d7ffce2aSmrg also a `make maintainer-clean' target, but that is intended mainly 66d7ffce2aSmrg for the package's developers. If you use it, you may have to get 67d7ffce2aSmrg all sorts of other programs in order to regenerate files that came 68d7ffce2aSmrg with the distribution. 69d7ffce2aSmrg 70d7ffce2aSmrg 6. Often, you can also type `make uninstall' to remove the installed 71d7ffce2aSmrg files again. 72d7ffce2aSmrg 73d7ffce2aSmrgCompilers and Options 74d7ffce2aSmrg===================== 75d7ffce2aSmrg 76d7ffce2aSmrg Some systems require unusual options for compilation or linking that 77d7ffce2aSmrgthe `configure' script does not know about. Run `./configure --help' 78d7ffce2aSmrgfor details on some of the pertinent environment variables. 79d7ffce2aSmrg 80d7ffce2aSmrg You can give `configure' initial values for configuration parameters 81d7ffce2aSmrgby setting variables in the command line or in the environment. Here 82d7ffce2aSmrgis an example: 83d7ffce2aSmrg 84d7ffce2aSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 85d7ffce2aSmrg 86d7ffce2aSmrg *Note Defining Variables::, for more details. 87d7ffce2aSmrg 88d7ffce2aSmrgCompiling For Multiple Architectures 89d7ffce2aSmrg==================================== 90d7ffce2aSmrg 91d7ffce2aSmrg You can compile the package for more than one kind of computer at the 92d7ffce2aSmrgsame time, by placing the object files for each architecture in their 93d7ffce2aSmrgown directory. To do this, you can use GNU `make'. `cd' to the 94d7ffce2aSmrgdirectory where you want the object files and executables to go and run 95d7ffce2aSmrgthe `configure' script. `configure' automatically checks for the 96d7ffce2aSmrgsource code in the directory that `configure' is in and in `..'. 97d7ffce2aSmrg 98d7ffce2aSmrg With a non-GNU `make', it is safer to compile the package for one 99d7ffce2aSmrgarchitecture at a time in the source code directory. After you have 100d7ffce2aSmrginstalled the package for one architecture, use `make distclean' before 101d7ffce2aSmrgreconfiguring for another architecture. 102d7ffce2aSmrg 103d7ffce2aSmrg On MacOS X 10.5 and later systems, you can create libraries and 104d7ffce2aSmrgexecutables that work on multiple system types--known as "fat" or 105d7ffce2aSmrg"universal" binaries--by specifying multiple `-arch' options to the 106d7ffce2aSmrgcompiler but only a single `-arch' option to the preprocessor. Like 107d7ffce2aSmrgthis: 108d7ffce2aSmrg 109d7ffce2aSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 110d7ffce2aSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 111d7ffce2aSmrg CPP="gcc -E" CXXCPP="g++ -E" 112d7ffce2aSmrg 113d7ffce2aSmrg This is not guaranteed to produce working output in all cases, you 114d7ffce2aSmrgmay have to build one architecture at a time and combine the results 115d7ffce2aSmrgusing the `lipo' tool if you have problems. 116d7ffce2aSmrg 117d7ffce2aSmrgInstallation Names 118d7ffce2aSmrg================== 119d7ffce2aSmrg 120d7ffce2aSmrg By default, `make install' installs the package's commands under 121d7ffce2aSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 122d7ffce2aSmrgcan specify an installation prefix other than `/usr/local' by giving 123d7ffce2aSmrg`configure' the option `--prefix=PREFIX'. 124d7ffce2aSmrg 125d7ffce2aSmrg You can specify separate installation prefixes for 126d7ffce2aSmrgarchitecture-specific files and architecture-independent files. If you 127d7ffce2aSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 128d7ffce2aSmrgPREFIX as the prefix for installing programs and libraries. 129d7ffce2aSmrgDocumentation and other data files still use the regular prefix. 130d7ffce2aSmrg 131d7ffce2aSmrg In addition, if you use an unusual directory layout you can give 132d7ffce2aSmrgoptions like `--bindir=DIR' to specify different values for particular 133d7ffce2aSmrgkinds of files. Run `configure --help' for a list of the directories 134d7ffce2aSmrgyou can set and what kinds of files go in them. 135d7ffce2aSmrg 136d7ffce2aSmrg If the package supports it, you can cause programs to be installed 137d7ffce2aSmrgwith an extra prefix or suffix on their names by giving `configure' the 138d7ffce2aSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 139d7ffce2aSmrg 140d7ffce2aSmrgOptional Features 141d7ffce2aSmrg================= 142d7ffce2aSmrg 143d7ffce2aSmrg Some packages pay attention to `--enable-FEATURE' options to 144d7ffce2aSmrg`configure', where FEATURE indicates an optional part of the package. 145d7ffce2aSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 146d7ffce2aSmrgis something like `gnu-as' or `x' (for the X Window System). The 147d7ffce2aSmrg`README' should mention any `--enable-' and `--with-' options that the 148d7ffce2aSmrgpackage recognizes. 149d7ffce2aSmrg 150d7ffce2aSmrg For packages that use the X Window System, `configure' can usually 151d7ffce2aSmrgfind the X include and library files automatically, but if it doesn't, 152d7ffce2aSmrgyou can use the `configure' options `--x-includes=DIR' and 153d7ffce2aSmrg`--x-libraries=DIR' to specify their locations. 154d7ffce2aSmrg 155d7ffce2aSmrgParticular systems 156d7ffce2aSmrg================== 157d7ffce2aSmrg 158d7ffce2aSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 159d7ffce2aSmrgCC is not installed, it is recommended to use the following options in 160d7ffce2aSmrgorder to use an ANSI C compiler: 161d7ffce2aSmrg 162d7ffce2aSmrg ./configure CC="cc -Ae" 163d7ffce2aSmrg 164d7ffce2aSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 165d7ffce2aSmrg 166d7ffce2aSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 167d7ffce2aSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 168d7ffce2aSmrga workaround. If GNU CC is not installed, it is therefore recommended 169d7ffce2aSmrgto try 170d7ffce2aSmrg 171d7ffce2aSmrg ./configure CC="cc" 172d7ffce2aSmrg 173d7ffce2aSmrgand if that doesn't work, try 174d7ffce2aSmrg 175d7ffce2aSmrg ./configure CC="cc -nodtk" 176d7ffce2aSmrg 177d7ffce2aSmrgSpecifying the System Type 178d7ffce2aSmrg========================== 179d7ffce2aSmrg 180d7ffce2aSmrg There may be some features `configure' cannot figure out 181d7ffce2aSmrgautomatically, but needs to determine by the type of machine the package 182d7ffce2aSmrgwill run on. Usually, assuming the package is built to be run on the 183d7ffce2aSmrg_same_ architectures, `configure' can figure that out, but if it prints 184d7ffce2aSmrga message saying it cannot guess the machine type, give it the 185d7ffce2aSmrg`--build=TYPE' option. TYPE can either be a short name for the system 186d7ffce2aSmrgtype, such as `sun4', or a canonical name which has the form: 187d7ffce2aSmrg 188d7ffce2aSmrg CPU-COMPANY-SYSTEM 189d7ffce2aSmrg 190d7ffce2aSmrgwhere SYSTEM can have one of these forms: 191d7ffce2aSmrg 192d7ffce2aSmrg OS KERNEL-OS 193d7ffce2aSmrg 194d7ffce2aSmrg See the file `config.sub' for the possible values of each field. If 195d7ffce2aSmrg`config.sub' isn't included in this package, then this package doesn't 196d7ffce2aSmrgneed to know the machine type. 197d7ffce2aSmrg 198d7ffce2aSmrg If you are _building_ compiler tools for cross-compiling, you should 199d7ffce2aSmrguse the option `--target=TYPE' to select the type of system they will 200d7ffce2aSmrgproduce code for. 201d7ffce2aSmrg 202d7ffce2aSmrg If you want to _use_ a cross compiler, that generates code for a 203d7ffce2aSmrgplatform different from the build platform, you should specify the 204d7ffce2aSmrg"host" platform (i.e., that on which the generated programs will 205d7ffce2aSmrgeventually be run) with `--host=TYPE'. 206d7ffce2aSmrg 207d7ffce2aSmrgSharing Defaults 208d7ffce2aSmrg================ 209d7ffce2aSmrg 210d7ffce2aSmrg If you want to set default values for `configure' scripts to share, 211d7ffce2aSmrgyou can create a site shell script called `config.site' that gives 212d7ffce2aSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 213d7ffce2aSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 214d7ffce2aSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 215d7ffce2aSmrg`CONFIG_SITE' environment variable to the location of the site script. 216d7ffce2aSmrgA warning: not all `configure' scripts look for a site script. 217d7ffce2aSmrg 218d7ffce2aSmrgDefining Variables 219d7ffce2aSmrg================== 220d7ffce2aSmrg 221d7ffce2aSmrg Variables not defined in a site shell script can be set in the 222d7ffce2aSmrgenvironment passed to `configure'. However, some packages may run 223d7ffce2aSmrgconfigure again during the build, and the customized values of these 224d7ffce2aSmrgvariables may be lost. In order to avoid this problem, you should set 225d7ffce2aSmrgthem in the `configure' command line, using `VAR=value'. For example: 226d7ffce2aSmrg 227d7ffce2aSmrg ./configure CC=/usr/local2/bin/gcc 228d7ffce2aSmrg 229d7ffce2aSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 230d7ffce2aSmrgoverridden in the site shell script). 231d7ffce2aSmrg 232d7ffce2aSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 233d7ffce2aSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 234d7ffce2aSmrg 235d7ffce2aSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 236d7ffce2aSmrg 237d7ffce2aSmrg`configure' Invocation 238d7ffce2aSmrg====================== 239d7ffce2aSmrg 240d7ffce2aSmrg `configure' recognizes the following options to control how it 241d7ffce2aSmrgoperates. 242d7ffce2aSmrg 243d7ffce2aSmrg`--help' 244d7ffce2aSmrg`-h' 245d7ffce2aSmrg Print a summary of all of the options to `configure', and exit. 246d7ffce2aSmrg 247d7ffce2aSmrg`--help=short' 248d7ffce2aSmrg`--help=recursive' 249d7ffce2aSmrg Print a summary of the options unique to this package's 250d7ffce2aSmrg `configure', and exit. The `short' variant lists options used 251d7ffce2aSmrg only in the top level, while the `recursive' variant lists options 252d7ffce2aSmrg also present in any nested packages. 253d7ffce2aSmrg 254d7ffce2aSmrg`--version' 255d7ffce2aSmrg`-V' 256d7ffce2aSmrg Print the version of Autoconf used to generate the `configure' 257d7ffce2aSmrg script, and exit. 258d7ffce2aSmrg 259d7ffce2aSmrg`--cache-file=FILE' 260d7ffce2aSmrg Enable the cache: use and save the results of the tests in FILE, 261d7ffce2aSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 262d7ffce2aSmrg disable caching. 263d7ffce2aSmrg 264d7ffce2aSmrg`--config-cache' 265d7ffce2aSmrg`-C' 266d7ffce2aSmrg Alias for `--cache-file=config.cache'. 267d7ffce2aSmrg 268d7ffce2aSmrg`--quiet' 269d7ffce2aSmrg`--silent' 270d7ffce2aSmrg`-q' 271d7ffce2aSmrg Do not print messages saying which checks are being made. To 272d7ffce2aSmrg suppress all normal output, redirect it to `/dev/null' (any error 273d7ffce2aSmrg messages will still be shown). 274d7ffce2aSmrg 275d7ffce2aSmrg`--srcdir=DIR' 276d7ffce2aSmrg Look for the package's source code in directory DIR. Usually 277d7ffce2aSmrg `configure' can determine that directory automatically. 278d7ffce2aSmrg 279d7ffce2aSmrg`--prefix=DIR' 280d7ffce2aSmrg Use DIR as the installation prefix. *Note Installation Names:: 281d7ffce2aSmrg for more details, including other options available for fine-tuning 282d7ffce2aSmrg the installation locations. 283d7ffce2aSmrg 284d7ffce2aSmrg`--no-create' 285d7ffce2aSmrg`-n' 286d7ffce2aSmrg Run the configure checks, but stop before creating any output 287d7ffce2aSmrg files. 288d7ffce2aSmrg 289d7ffce2aSmrg`configure' also accepts some other, not widely useful, options. Run 290d7ffce2aSmrg`configure --help' for more details. 291d7ffce2aSmrg 292