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