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