INSTALL revision 576bae58
1576bae58SmrgInstallation Instructions 2576bae58Smrg************************* 3576bae58Smrg 4576bae58SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 5576bae58Smrg2006, 2007, 2008 Free Software Foundation, Inc. 6576bae58Smrg 7576bae58Smrg This file is free documentation; the Free Software Foundation gives 8576bae58Smrgunlimited permission to copy, distribute and modify it. 9576bae58Smrg 10576bae58SmrgBasic Installation 11576bae58Smrg================== 12576bae58Smrg 13576bae58Smrg Briefly, the shell commands `./configure; make; make install' should 14576bae58Smrgconfigure, build, and install this package. The following 15576bae58Smrgmore-detailed instructions are generic; see the `README' file for 16576bae58Smrginstructions specific to this package. 17576bae58Smrg 18576bae58Smrg The `configure' shell script attempts to guess correct values for 19576bae58Smrgvarious system-dependent variables used during compilation. It uses 20576bae58Smrgthose values to create a `Makefile' in each directory of the package. 21576bae58SmrgIt may also create one or more `.h' files containing system-dependent 22576bae58Smrgdefinitions. Finally, it creates a shell script `config.status' that 23576bae58Smrgyou can run in the future to recreate the current configuration, and a 24576bae58Smrgfile `config.log' containing compiler output (useful mainly for 25576bae58Smrgdebugging `configure'). 26576bae58Smrg 27576bae58Smrg It can also use an optional file (typically called `config.cache' 28576bae58Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 29576bae58Smrgthe results of its tests to speed up reconfiguring. Caching is 30576bae58Smrgdisabled by default to prevent problems with accidental use of stale 31576bae58Smrgcache files. 32576bae58Smrg 33576bae58Smrg If you need to do unusual things to compile the package, please try 34576bae58Smrgto figure out how `configure' could check whether to do them, and mail 35576bae58Smrgdiffs or instructions to the address given in the `README' so they can 36576bae58Smrgbe considered for the next release. If you are using the cache, and at 37576bae58Smrgsome point `config.cache' contains results you don't want to keep, you 38576bae58Smrgmay remove or edit it. 39576bae58Smrg 40576bae58Smrg The file `configure.ac' (or `configure.in') is used to create 41576bae58Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 42576bae58Smrgyou want to change it or regenerate `configure' using a newer version 43576bae58Smrgof `autoconf'. 44576bae58Smrg 45576bae58SmrgThe simplest way to compile this package is: 46576bae58Smrg 47576bae58Smrg 1. `cd' to the directory containing the package's source code and type 48576bae58Smrg `./configure' to configure the package for your system. 49576bae58Smrg 50576bae58Smrg Running `configure' might take a while. While running, it prints 51576bae58Smrg some messages telling which features it is checking for. 52576bae58Smrg 53576bae58Smrg 2. Type `make' to compile the package. 54576bae58Smrg 55576bae58Smrg 3. Optionally, type `make check' to run any self-tests that come with 56576bae58Smrg the package. 57576bae58Smrg 58576bae58Smrg 4. Type `make install' to install the programs and any data files and 59576bae58Smrg documentation. 60576bae58Smrg 61576bae58Smrg 5. You can remove the program binaries and object files from the 62576bae58Smrg source code directory by typing `make clean'. To also remove the 63576bae58Smrg files that `configure' created (so you can compile the package for 64576bae58Smrg a different kind of computer), type `make distclean'. There is 65576bae58Smrg also a `make maintainer-clean' target, but that is intended mainly 66576bae58Smrg for the package's developers. If you use it, you may have to get 67576bae58Smrg all sorts of other programs in order to regenerate files that came 68576bae58Smrg with the distribution. 69576bae58Smrg 70576bae58Smrg 6. Often, you can also type `make uninstall' to remove the installed 71576bae58Smrg files again. 72576bae58Smrg 73576bae58SmrgCompilers and Options 74576bae58Smrg===================== 75576bae58Smrg 76576bae58Smrg Some systems require unusual options for compilation or linking that 77576bae58Smrgthe `configure' script does not know about. Run `./configure --help' 78576bae58Smrgfor details on some of the pertinent environment variables. 79576bae58Smrg 80576bae58Smrg You can give `configure' initial values for configuration parameters 81576bae58Smrgby setting variables in the command line or in the environment. Here 82576bae58Smrgis an example: 83576bae58Smrg 84576bae58Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 85576bae58Smrg 86576bae58Smrg *Note Defining Variables::, for more details. 87576bae58Smrg 88576bae58SmrgCompiling For Multiple Architectures 89576bae58Smrg==================================== 90576bae58Smrg 91576bae58Smrg You can compile the package for more than one kind of computer at the 92576bae58Smrgsame time, by placing the object files for each architecture in their 93576bae58Smrgown directory. To do this, you can use GNU `make'. `cd' to the 94576bae58Smrgdirectory where you want the object files and executables to go and run 95576bae58Smrgthe `configure' script. `configure' automatically checks for the 96576bae58Smrgsource code in the directory that `configure' is in and in `..'. 97576bae58Smrg 98576bae58Smrg With a non-GNU `make', it is safer to compile the package for one 99576bae58Smrgarchitecture at a time in the source code directory. After you have 100576bae58Smrginstalled the package for one architecture, use `make distclean' before 101576bae58Smrgreconfiguring for another architecture. 102576bae58Smrg 103576bae58Smrg On MacOS X 10.5 and later systems, you can create libraries and 104576bae58Smrgexecutables that work on multiple system types--known as "fat" or 105576bae58Smrg"universal" binaries--by specifying multiple `-arch' options to the 106576bae58Smrgcompiler but only a single `-arch' option to the preprocessor. Like 107576bae58Smrgthis: 108576bae58Smrg 109576bae58Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 110576bae58Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 111576bae58Smrg CPP="gcc -E" CXXCPP="g++ -E" 112576bae58Smrg 113576bae58Smrg This is not guaranteed to produce working output in all cases, you 114576bae58Smrgmay have to build one architecture at a time and combine the results 115576bae58Smrgusing the `lipo' tool if you have problems. 116576bae58Smrg 117576bae58SmrgInstallation Names 118576bae58Smrg================== 119576bae58Smrg 120576bae58Smrg By default, `make install' installs the package's commands under 121576bae58Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 122576bae58Smrgcan specify an installation prefix other than `/usr/local' by giving 123576bae58Smrg`configure' the option `--prefix=PREFIX'. 124576bae58Smrg 125576bae58Smrg You can specify separate installation prefixes for 126576bae58Smrgarchitecture-specific files and architecture-independent files. If you 127576bae58Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 128576bae58SmrgPREFIX as the prefix for installing programs and libraries. 129576bae58SmrgDocumentation and other data files still use the regular prefix. 130576bae58Smrg 131576bae58Smrg In addition, if you use an unusual directory layout you can give 132576bae58Smrgoptions like `--bindir=DIR' to specify different values for particular 133576bae58Smrgkinds of files. Run `configure --help' for a list of the directories 134576bae58Smrgyou can set and what kinds of files go in them. 135576bae58Smrg 136576bae58Smrg If the package supports it, you can cause programs to be installed 137576bae58Smrgwith an extra prefix or suffix on their names by giving `configure' the 138576bae58Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 139576bae58Smrg 140576bae58SmrgOptional Features 141576bae58Smrg================= 142576bae58Smrg 143576bae58Smrg Some packages pay attention to `--enable-FEATURE' options to 144576bae58Smrg`configure', where FEATURE indicates an optional part of the package. 145576bae58SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 146576bae58Smrgis something like `gnu-as' or `x' (for the X Window System). The 147576bae58Smrg`README' should mention any `--enable-' and `--with-' options that the 148576bae58Smrgpackage recognizes. 149576bae58Smrg 150576bae58Smrg For packages that use the X Window System, `configure' can usually 151576bae58Smrgfind the X include and library files automatically, but if it doesn't, 152576bae58Smrgyou can use the `configure' options `--x-includes=DIR' and 153576bae58Smrg`--x-libraries=DIR' to specify their locations. 154576bae58Smrg 155576bae58SmrgParticular systems 156576bae58Smrg================== 157576bae58Smrg 158576bae58Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 159576bae58SmrgCC is not installed, it is recommended to use the following options in 160576bae58Smrgorder to use an ANSI C compiler: 161576bae58Smrg 162576bae58Smrg ./configure CC="cc -Ae" 163576bae58Smrg 164576bae58Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 165576bae58Smrg 166576bae58Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 167576bae58Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 168576bae58Smrga workaround. If GNU CC is not installed, it is therefore recommended 169576bae58Smrgto try 170576bae58Smrg 171576bae58Smrg ./configure CC="cc" 172576bae58Smrg 173576bae58Smrgand if that doesn't work, try 174576bae58Smrg 175576bae58Smrg ./configure CC="cc -nodtk" 176576bae58Smrg 177576bae58SmrgSpecifying the System Type 178576bae58Smrg========================== 179576bae58Smrg 180576bae58Smrg There may be some features `configure' cannot figure out 181576bae58Smrgautomatically, but needs to determine by the type of machine the package 182576bae58Smrgwill run on. Usually, assuming the package is built to be run on the 183576bae58Smrg_same_ architectures, `configure' can figure that out, but if it prints 184576bae58Smrga message saying it cannot guess the machine type, give it the 185576bae58Smrg`--build=TYPE' option. TYPE can either be a short name for the system 186576bae58Smrgtype, such as `sun4', or a canonical name which has the form: 187576bae58Smrg 188576bae58Smrg CPU-COMPANY-SYSTEM 189576bae58Smrg 190576bae58Smrgwhere SYSTEM can have one of these forms: 191576bae58Smrg 192576bae58Smrg OS KERNEL-OS 193576bae58Smrg 194576bae58Smrg See the file `config.sub' for the possible values of each field. If 195576bae58Smrg`config.sub' isn't included in this package, then this package doesn't 196576bae58Smrgneed to know the machine type. 197576bae58Smrg 198576bae58Smrg If you are _building_ compiler tools for cross-compiling, you should 199576bae58Smrguse the option `--target=TYPE' to select the type of system they will 200576bae58Smrgproduce code for. 201576bae58Smrg 202576bae58Smrg If you want to _use_ a cross compiler, that generates code for a 203576bae58Smrgplatform different from the build platform, you should specify the 204576bae58Smrg"host" platform (i.e., that on which the generated programs will 205576bae58Smrgeventually be run) with `--host=TYPE'. 206576bae58Smrg 207576bae58SmrgSharing Defaults 208576bae58Smrg================ 209576bae58Smrg 210576bae58Smrg If you want to set default values for `configure' scripts to share, 211576bae58Smrgyou can create a site shell script called `config.site' that gives 212576bae58Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 213576bae58Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 214576bae58Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 215576bae58Smrg`CONFIG_SITE' environment variable to the location of the site script. 216576bae58SmrgA warning: not all `configure' scripts look for a site script. 217576bae58Smrg 218576bae58SmrgDefining Variables 219576bae58Smrg================== 220576bae58Smrg 221576bae58Smrg Variables not defined in a site shell script can be set in the 222576bae58Smrgenvironment passed to `configure'. However, some packages may run 223576bae58Smrgconfigure again during the build, and the customized values of these 224576bae58Smrgvariables may be lost. In order to avoid this problem, you should set 225576bae58Smrgthem in the `configure' command line, using `VAR=value'. For example: 226576bae58Smrg 227576bae58Smrg ./configure CC=/usr/local2/bin/gcc 228576bae58Smrg 229576bae58Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 230576bae58Smrgoverridden in the site shell script). 231576bae58Smrg 232576bae58SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 233576bae58Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 234576bae58Smrg 235576bae58Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 236576bae58Smrg 237576bae58Smrg`configure' Invocation 238576bae58Smrg====================== 239576bae58Smrg 240576bae58Smrg `configure' recognizes the following options to control how it 241576bae58Smrgoperates. 242576bae58Smrg 243576bae58Smrg`--help' 244576bae58Smrg`-h' 245576bae58Smrg Print a summary of all of the options to `configure', and exit. 246576bae58Smrg 247576bae58Smrg`--help=short' 248576bae58Smrg`--help=recursive' 249576bae58Smrg Print a summary of the options unique to this package's 250576bae58Smrg `configure', and exit. The `short' variant lists options used 251576bae58Smrg only in the top level, while the `recursive' variant lists options 252576bae58Smrg also present in any nested packages. 253576bae58Smrg 254576bae58Smrg`--version' 255576bae58Smrg`-V' 256576bae58Smrg Print the version of Autoconf used to generate the `configure' 257576bae58Smrg script, and exit. 258576bae58Smrg 259576bae58Smrg`--cache-file=FILE' 260576bae58Smrg Enable the cache: use and save the results of the tests in FILE, 261576bae58Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 262576bae58Smrg disable caching. 263576bae58Smrg 264576bae58Smrg`--config-cache' 265576bae58Smrg`-C' 266576bae58Smrg Alias for `--cache-file=config.cache'. 267576bae58Smrg 268576bae58Smrg`--quiet' 269576bae58Smrg`--silent' 270576bae58Smrg`-q' 271576bae58Smrg Do not print messages saying which checks are being made. To 272576bae58Smrg suppress all normal output, redirect it to `/dev/null' (any error 273576bae58Smrg messages will still be shown). 274576bae58Smrg 275576bae58Smrg`--srcdir=DIR' 276576bae58Smrg Look for the package's source code in directory DIR. Usually 277576bae58Smrg `configure' can determine that directory automatically. 278576bae58Smrg 279576bae58Smrg`--prefix=DIR' 280576bae58Smrg Use DIR as the installation prefix. *Note Installation Names:: 281576bae58Smrg for more details, including other options available for fine-tuning 282576bae58Smrg the installation locations. 283576bae58Smrg 284576bae58Smrg`--no-create' 285576bae58Smrg`-n' 286576bae58Smrg Run the configure checks, but stop before creating any output 287576bae58Smrg files. 288576bae58Smrg 289576bae58Smrg`configure' also accepts some other, not widely useful, options. Run 290576bae58Smrg`configure --help' for more details. 291576bae58Smrg 292