1428d7b3dSmrgInstallation Instructions 2428d7b3dSmrg************************* 3428d7b3dSmrg 4428d7b3dSmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 5428d7b3dSmrg2006, 2007, 2008 Free Software Foundation, Inc. 6428d7b3dSmrg 7428d7b3dSmrg This file is free documentation; the Free Software Foundation gives 8428d7b3dSmrgunlimited permission to copy, distribute and modify it. 9428d7b3dSmrg 10428d7b3dSmrgBasic Installation 11428d7b3dSmrg================== 12428d7b3dSmrg 13428d7b3dSmrg Briefly, the shell commands `./configure; make; make install' should 14428d7b3dSmrgconfigure, build, and install this package. The following 15428d7b3dSmrgmore-detailed instructions are generic; see the `README' file for 16428d7b3dSmrginstructions specific to this package. 17428d7b3dSmrg 18428d7b3dSmrg The `configure' shell script attempts to guess correct values for 19428d7b3dSmrgvarious system-dependent variables used during compilation. It uses 20428d7b3dSmrgthose values to create a `Makefile' in each directory of the package. 21428d7b3dSmrgIt may also create one or more `.h' files containing system-dependent 22428d7b3dSmrgdefinitions. Finally, it creates a shell script `config.status' that 23428d7b3dSmrgyou can run in the future to recreate the current configuration, and a 24428d7b3dSmrgfile `config.log' containing compiler output (useful mainly for 25428d7b3dSmrgdebugging `configure'). 26428d7b3dSmrg 27428d7b3dSmrg It can also use an optional file (typically called `config.cache' 28428d7b3dSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 29428d7b3dSmrgthe results of its tests to speed up reconfiguring. Caching is 30428d7b3dSmrgdisabled by default to prevent problems with accidental use of stale 31428d7b3dSmrgcache files. 32428d7b3dSmrg 33428d7b3dSmrg If you need to do unusual things to compile the package, please try 34428d7b3dSmrgto figure out how `configure' could check whether to do them, and mail 35428d7b3dSmrgdiffs or instructions to the address given in the `README' so they can 36428d7b3dSmrgbe considered for the next release. If you are using the cache, and at 37428d7b3dSmrgsome point `config.cache' contains results you don't want to keep, you 38428d7b3dSmrgmay remove or edit it. 39428d7b3dSmrg 40428d7b3dSmrg The file `configure.ac' (or `configure.in') is used to create 41428d7b3dSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 42428d7b3dSmrgyou want to change it or regenerate `configure' using a newer version 43428d7b3dSmrgof `autoconf'. 44428d7b3dSmrg 45428d7b3dSmrgThe simplest way to compile this package is: 46428d7b3dSmrg 47428d7b3dSmrg 1. `cd' to the directory containing the package's source code and type 48428d7b3dSmrg `./configure' to configure the package for your system. 49428d7b3dSmrg 50428d7b3dSmrg Running `configure' might take a while. While running, it prints 51428d7b3dSmrg some messages telling which features it is checking for. 52428d7b3dSmrg 53428d7b3dSmrg 2. Type `make' to compile the package. 54428d7b3dSmrg 55428d7b3dSmrg 3. Optionally, type `make check' to run any self-tests that come with 56428d7b3dSmrg the package. 57428d7b3dSmrg 58428d7b3dSmrg 4. Type `make install' to install the programs and any data files and 59428d7b3dSmrg documentation. 60428d7b3dSmrg 61428d7b3dSmrg 5. You can remove the program binaries and object files from the 62428d7b3dSmrg source code directory by typing `make clean'. To also remove the 63428d7b3dSmrg files that `configure' created (so you can compile the package for 64428d7b3dSmrg a different kind of computer), type `make distclean'. There is 65428d7b3dSmrg also a `make maintainer-clean' target, but that is intended mainly 66428d7b3dSmrg for the package's developers. If you use it, you may have to get 67428d7b3dSmrg all sorts of other programs in order to regenerate files that came 68428d7b3dSmrg with the distribution. 69428d7b3dSmrg 70428d7b3dSmrg 6. Often, you can also type `make uninstall' to remove the installed 71428d7b3dSmrg files again. 72428d7b3dSmrg 73428d7b3dSmrgCompilers and Options 74428d7b3dSmrg===================== 75428d7b3dSmrg 76428d7b3dSmrg Some systems require unusual options for compilation or linking that 77428d7b3dSmrgthe `configure' script does not know about. Run `./configure --help' 78428d7b3dSmrgfor details on some of the pertinent environment variables. 79428d7b3dSmrg 80428d7b3dSmrg You can give `configure' initial values for configuration parameters 81428d7b3dSmrgby setting variables in the command line or in the environment. Here 82428d7b3dSmrgis an example: 83428d7b3dSmrg 84428d7b3dSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 85428d7b3dSmrg 86428d7b3dSmrg *Note Defining Variables::, for more details. 87428d7b3dSmrg 88428d7b3dSmrgCompiling For Multiple Architectures 89428d7b3dSmrg==================================== 90428d7b3dSmrg 91428d7b3dSmrg You can compile the package for more than one kind of computer at the 92428d7b3dSmrgsame time, by placing the object files for each architecture in their 93428d7b3dSmrgown directory. To do this, you can use GNU `make'. `cd' to the 94428d7b3dSmrgdirectory where you want the object files and executables to go and run 95428d7b3dSmrgthe `configure' script. `configure' automatically checks for the 96428d7b3dSmrgsource code in the directory that `configure' is in and in `..'. 97428d7b3dSmrg 98428d7b3dSmrg With a non-GNU `make', it is safer to compile the package for one 99428d7b3dSmrgarchitecture at a time in the source code directory. After you have 100428d7b3dSmrginstalled the package for one architecture, use `make distclean' before 101428d7b3dSmrgreconfiguring for another architecture. 102428d7b3dSmrg 103428d7b3dSmrg On MacOS X 10.5 and later systems, you can create libraries and 104428d7b3dSmrgexecutables that work on multiple system types--known as "fat" or 105428d7b3dSmrg"universal" binaries--by specifying multiple `-arch' options to the 106428d7b3dSmrgcompiler but only a single `-arch' option to the preprocessor. Like 107428d7b3dSmrgthis: 108428d7b3dSmrg 109428d7b3dSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 110428d7b3dSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 111428d7b3dSmrg CPP="gcc -E" CXXCPP="g++ -E" 112428d7b3dSmrg 113428d7b3dSmrg This is not guaranteed to produce working output in all cases, you 114428d7b3dSmrgmay have to build one architecture at a time and combine the results 115428d7b3dSmrgusing the `lipo' tool if you have problems. 116428d7b3dSmrg 117428d7b3dSmrgInstallation Names 118428d7b3dSmrg================== 119428d7b3dSmrg 120428d7b3dSmrg By default, `make install' installs the package's commands under 121428d7b3dSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 122428d7b3dSmrgcan specify an installation prefix other than `/usr/local' by giving 123428d7b3dSmrg`configure' the option `--prefix=PREFIX'. 124428d7b3dSmrg 125428d7b3dSmrg You can specify separate installation prefixes for 126428d7b3dSmrgarchitecture-specific files and architecture-independent files. If you 127428d7b3dSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 128428d7b3dSmrgPREFIX as the prefix for installing programs and libraries. 129428d7b3dSmrgDocumentation and other data files still use the regular prefix. 130428d7b3dSmrg 131428d7b3dSmrg In addition, if you use an unusual directory layout you can give 132428d7b3dSmrgoptions like `--bindir=DIR' to specify different values for particular 133428d7b3dSmrgkinds of files. Run `configure --help' for a list of the directories 134428d7b3dSmrgyou can set and what kinds of files go in them. 135428d7b3dSmrg 136428d7b3dSmrg If the package supports it, you can cause programs to be installed 137428d7b3dSmrgwith an extra prefix or suffix on their names by giving `configure' the 138428d7b3dSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 139428d7b3dSmrg 140428d7b3dSmrgOptional Features 141428d7b3dSmrg================= 142428d7b3dSmrg 143428d7b3dSmrg Some packages pay attention to `--enable-FEATURE' options to 144428d7b3dSmrg`configure', where FEATURE indicates an optional part of the package. 145428d7b3dSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 146428d7b3dSmrgis something like `gnu-as' or `x' (for the X Window System). The 147428d7b3dSmrg`README' should mention any `--enable-' and `--with-' options that the 148428d7b3dSmrgpackage recognizes. 149428d7b3dSmrg 150428d7b3dSmrg For packages that use the X Window System, `configure' can usually 151428d7b3dSmrgfind the X include and library files automatically, but if it doesn't, 152428d7b3dSmrgyou can use the `configure' options `--x-includes=DIR' and 153428d7b3dSmrg`--x-libraries=DIR' to specify their locations. 154428d7b3dSmrg 155428d7b3dSmrgParticular systems 156428d7b3dSmrg================== 157428d7b3dSmrg 158428d7b3dSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 159428d7b3dSmrgCC is not installed, it is recommended to use the following options in 160428d7b3dSmrgorder to use an ANSI C compiler: 161428d7b3dSmrg 162428d7b3dSmrg ./configure CC="cc -Ae" 163428d7b3dSmrg 164428d7b3dSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 165428d7b3dSmrg 166428d7b3dSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 167428d7b3dSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 168428d7b3dSmrga workaround. If GNU CC is not installed, it is therefore recommended 169428d7b3dSmrgto try 170428d7b3dSmrg 171428d7b3dSmrg ./configure CC="cc" 172428d7b3dSmrg 173428d7b3dSmrgand if that doesn't work, try 174428d7b3dSmrg 175428d7b3dSmrg ./configure CC="cc -nodtk" 176428d7b3dSmrg 177428d7b3dSmrgSpecifying the System Type 178428d7b3dSmrg========================== 179428d7b3dSmrg 180428d7b3dSmrg There may be some features `configure' cannot figure out 181428d7b3dSmrgautomatically, but needs to determine by the type of machine the package 182428d7b3dSmrgwill run on. Usually, assuming the package is built to be run on the 183428d7b3dSmrg_same_ architectures, `configure' can figure that out, but if it prints 184428d7b3dSmrga message saying it cannot guess the machine type, give it the 185428d7b3dSmrg`--build=TYPE' option. TYPE can either be a short name for the system 186428d7b3dSmrgtype, such as `sun4', or a canonical name which has the form: 187428d7b3dSmrg 188428d7b3dSmrg CPU-COMPANY-SYSTEM 189428d7b3dSmrg 190428d7b3dSmrgwhere SYSTEM can have one of these forms: 191428d7b3dSmrg 192428d7b3dSmrg OS KERNEL-OS 193428d7b3dSmrg 194428d7b3dSmrg See the file `config.sub' for the possible values of each field. If 195428d7b3dSmrg`config.sub' isn't included in this package, then this package doesn't 196428d7b3dSmrgneed to know the machine type. 197428d7b3dSmrg 198428d7b3dSmrg If you are _building_ compiler tools for cross-compiling, you should 199428d7b3dSmrguse the option `--target=TYPE' to select the type of system they will 200428d7b3dSmrgproduce code for. 201428d7b3dSmrg 202428d7b3dSmrg If you want to _use_ a cross compiler, that generates code for a 203428d7b3dSmrgplatform different from the build platform, you should specify the 204428d7b3dSmrg"host" platform (i.e., that on which the generated programs will 205428d7b3dSmrgeventually be run) with `--host=TYPE'. 206428d7b3dSmrg 207428d7b3dSmrgSharing Defaults 208428d7b3dSmrg================ 209428d7b3dSmrg 210428d7b3dSmrg If you want to set default values for `configure' scripts to share, 211428d7b3dSmrgyou can create a site shell script called `config.site' that gives 212428d7b3dSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 213428d7b3dSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 214428d7b3dSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 215428d7b3dSmrg`CONFIG_SITE' environment variable to the location of the site script. 216428d7b3dSmrgA warning: not all `configure' scripts look for a site script. 217428d7b3dSmrg 218428d7b3dSmrgDefining Variables 219428d7b3dSmrg================== 220428d7b3dSmrg 221428d7b3dSmrg Variables not defined in a site shell script can be set in the 222428d7b3dSmrgenvironment passed to `configure'. However, some packages may run 223428d7b3dSmrgconfigure again during the build, and the customized values of these 224428d7b3dSmrgvariables may be lost. In order to avoid this problem, you should set 225428d7b3dSmrgthem in the `configure' command line, using `VAR=value'. For example: 226428d7b3dSmrg 227428d7b3dSmrg ./configure CC=/usr/local2/bin/gcc 228428d7b3dSmrg 229428d7b3dSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 230428d7b3dSmrgoverridden in the site shell script). 231428d7b3dSmrg 232428d7b3dSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 233428d7b3dSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 234428d7b3dSmrg 235428d7b3dSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 236428d7b3dSmrg 237428d7b3dSmrg`configure' Invocation 238428d7b3dSmrg====================== 239428d7b3dSmrg 240428d7b3dSmrg `configure' recognizes the following options to control how it 241428d7b3dSmrgoperates. 242428d7b3dSmrg 243428d7b3dSmrg`--help' 244428d7b3dSmrg`-h' 245428d7b3dSmrg Print a summary of all of the options to `configure', and exit. 246428d7b3dSmrg 247428d7b3dSmrg`--help=short' 248428d7b3dSmrg`--help=recursive' 249428d7b3dSmrg Print a summary of the options unique to this package's 250428d7b3dSmrg `configure', and exit. The `short' variant lists options used 251428d7b3dSmrg only in the top level, while the `recursive' variant lists options 252428d7b3dSmrg also present in any nested packages. 253428d7b3dSmrg 254428d7b3dSmrg`--version' 255428d7b3dSmrg`-V' 256428d7b3dSmrg Print the version of Autoconf used to generate the `configure' 257428d7b3dSmrg script, and exit. 258428d7b3dSmrg 259428d7b3dSmrg`--cache-file=FILE' 260428d7b3dSmrg Enable the cache: use and save the results of the tests in FILE, 261428d7b3dSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 262428d7b3dSmrg disable caching. 263428d7b3dSmrg 264428d7b3dSmrg`--config-cache' 265428d7b3dSmrg`-C' 266428d7b3dSmrg Alias for `--cache-file=config.cache'. 267428d7b3dSmrg 268428d7b3dSmrg`--quiet' 269428d7b3dSmrg`--silent' 270428d7b3dSmrg`-q' 271428d7b3dSmrg Do not print messages saying which checks are being made. To 272428d7b3dSmrg suppress all normal output, redirect it to `/dev/null' (any error 273428d7b3dSmrg messages will still be shown). 274428d7b3dSmrg 275428d7b3dSmrg`--srcdir=DIR' 276428d7b3dSmrg Look for the package's source code in directory DIR. Usually 277428d7b3dSmrg `configure' can determine that directory automatically. 278428d7b3dSmrg 279428d7b3dSmrg`--prefix=DIR' 280428d7b3dSmrg Use DIR as the installation prefix. *Note Installation Names:: 281428d7b3dSmrg for more details, including other options available for fine-tuning 282428d7b3dSmrg the installation locations. 283428d7b3dSmrg 284428d7b3dSmrg`--no-create' 285428d7b3dSmrg`-n' 286428d7b3dSmrg Run the configure checks, but stop before creating any output 287428d7b3dSmrg files. 288428d7b3dSmrg 289428d7b3dSmrg`configure' also accepts some other, not widely useful, options. Run 290428d7b3dSmrg`configure --help' for more details. 291428d7b3dSmrg 292