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