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