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