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