1706f2543SmrgInstallation Instructions 2706f2543Smrg************************* 3706f2543Smrg 4706f2543SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 5706f2543Smrg2006, 2007, 2008 Free Software Foundation, Inc. 6706f2543Smrg 7706f2543Smrg This file is free documentation; the Free Software Foundation gives 8706f2543Smrgunlimited permission to copy, distribute and modify it. 9706f2543Smrg 10706f2543SmrgBasic Installation 11706f2543Smrg================== 12706f2543Smrg 13706f2543Smrg Briefly, the shell commands `./configure; make; make install' should 14706f2543Smrgconfigure, build, and install this package. The following 15706f2543Smrgmore-detailed instructions are generic; see the `README' file for 16706f2543Smrginstructions specific to this package. 17706f2543Smrg 18706f2543Smrg The `configure' shell script attempts to guess correct values for 19706f2543Smrgvarious system-dependent variables used during compilation. It uses 20706f2543Smrgthose values to create a `Makefile' in each directory of the package. 21706f2543SmrgIt may also create one or more `.h' files containing system-dependent 22706f2543Smrgdefinitions. Finally, it creates a shell script `config.status' that 23706f2543Smrgyou can run in the future to recreate the current configuration, and a 24706f2543Smrgfile `config.log' containing compiler output (useful mainly for 25706f2543Smrgdebugging `configure'). 26706f2543Smrg 27706f2543Smrg It can also use an optional file (typically called `config.cache' 28706f2543Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 29706f2543Smrgthe results of its tests to speed up reconfiguring. Caching is 30706f2543Smrgdisabled by default to prevent problems with accidental use of stale 31706f2543Smrgcache files. 32706f2543Smrg 33706f2543Smrg If you need to do unusual things to compile the package, please try 34706f2543Smrgto figure out how `configure' could check whether to do them, and mail 35706f2543Smrgdiffs or instructions to the address given in the `README' so they can 36706f2543Smrgbe considered for the next release. If you are using the cache, and at 37706f2543Smrgsome point `config.cache' contains results you don't want to keep, you 38706f2543Smrgmay remove or edit it. 39706f2543Smrg 40706f2543Smrg The file `configure.ac' (or `configure.in') is used to create 41706f2543Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 42706f2543Smrgyou want to change it or regenerate `configure' using a newer version 43706f2543Smrgof `autoconf'. 44706f2543Smrg 45706f2543SmrgThe simplest way to compile this package is: 46706f2543Smrg 47706f2543Smrg 1. `cd' to the directory containing the package's source code and type 48706f2543Smrg `./configure' to configure the package for your system. 49706f2543Smrg 50706f2543Smrg Running `configure' might take a while. While running, it prints 51706f2543Smrg some messages telling which features it is checking for. 52706f2543Smrg 53706f2543Smrg 2. Type `make' to compile the package. 54706f2543Smrg 55706f2543Smrg 3. Optionally, type `make check' to run any self-tests that come with 56706f2543Smrg the package. 57706f2543Smrg 58706f2543Smrg 4. Type `make install' to install the programs and any data files and 59706f2543Smrg documentation. 60706f2543Smrg 61706f2543Smrg 5. You can remove the program binaries and object files from the 62706f2543Smrg source code directory by typing `make clean'. To also remove the 63706f2543Smrg files that `configure' created (so you can compile the package for 64706f2543Smrg a different kind of computer), type `make distclean'. There is 65706f2543Smrg also a `make maintainer-clean' target, but that is intended mainly 66706f2543Smrg for the package's developers. If you use it, you may have to get 67706f2543Smrg all sorts of other programs in order to regenerate files that came 68706f2543Smrg with the distribution. 69706f2543Smrg 70706f2543Smrg 6. Often, you can also type `make uninstall' to remove the installed 71706f2543Smrg files again. 72706f2543Smrg 73706f2543SmrgCompilers and Options 74706f2543Smrg===================== 75706f2543Smrg 76706f2543Smrg Some systems require unusual options for compilation or linking that 77706f2543Smrgthe `configure' script does not know about. Run `./configure --help' 78706f2543Smrgfor details on some of the pertinent environment variables. 79706f2543Smrg 80706f2543Smrg You can give `configure' initial values for configuration parameters 81706f2543Smrgby setting variables in the command line or in the environment. Here 82706f2543Smrgis an example: 83706f2543Smrg 84706f2543Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 85706f2543Smrg 86706f2543Smrg *Note Defining Variables::, for more details. 87706f2543Smrg 88706f2543SmrgCompiling For Multiple Architectures 89706f2543Smrg==================================== 90706f2543Smrg 91706f2543Smrg You can compile the package for more than one kind of computer at the 92706f2543Smrgsame time, by placing the object files for each architecture in their 93706f2543Smrgown directory. To do this, you can use GNU `make'. `cd' to the 94706f2543Smrgdirectory where you want the object files and executables to go and run 95706f2543Smrgthe `configure' script. `configure' automatically checks for the 96706f2543Smrgsource code in the directory that `configure' is in and in `..'. 97706f2543Smrg 98706f2543Smrg With a non-GNU `make', it is safer to compile the package for one 99706f2543Smrgarchitecture at a time in the source code directory. After you have 100706f2543Smrginstalled the package for one architecture, use `make distclean' before 101706f2543Smrgreconfiguring for another architecture. 102706f2543Smrg 103706f2543Smrg On MacOS X 10.5 and later systems, you can create libraries and 104706f2543Smrgexecutables that work on multiple system types--known as "fat" or 105706f2543Smrg"universal" binaries--by specifying multiple `-arch' options to the 106706f2543Smrgcompiler but only a single `-arch' option to the preprocessor. Like 107706f2543Smrgthis: 108706f2543Smrg 109706f2543Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 110706f2543Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 111706f2543Smrg CPP="gcc -E" CXXCPP="g++ -E" 112706f2543Smrg 113706f2543Smrg This is not guaranteed to produce working output in all cases, you 114706f2543Smrgmay have to build one architecture at a time and combine the results 115706f2543Smrgusing the `lipo' tool if you have problems. 116706f2543Smrg 117706f2543SmrgInstallation Names 118706f2543Smrg================== 119706f2543Smrg 120706f2543Smrg By default, `make install' installs the package's commands under 121706f2543Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 122706f2543Smrgcan specify an installation prefix other than `/usr/local' by giving 123706f2543Smrg`configure' the option `--prefix=PREFIX'. 124706f2543Smrg 125706f2543Smrg You can specify separate installation prefixes for 126706f2543Smrgarchitecture-specific files and architecture-independent files. If you 127706f2543Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 128706f2543SmrgPREFIX as the prefix for installing programs and libraries. 129706f2543SmrgDocumentation and other data files still use the regular prefix. 130706f2543Smrg 131706f2543Smrg In addition, if you use an unusual directory layout you can give 132706f2543Smrgoptions like `--bindir=DIR' to specify different values for particular 133706f2543Smrgkinds of files. Run `configure --help' for a list of the directories 134706f2543Smrgyou can set and what kinds of files go in them. 135706f2543Smrg 136706f2543Smrg If the package supports it, you can cause programs to be installed 137706f2543Smrgwith an extra prefix or suffix on their names by giving `configure' the 138706f2543Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 139706f2543Smrg 140706f2543SmrgOptional Features 141706f2543Smrg================= 142706f2543Smrg 143706f2543Smrg Some packages pay attention to `--enable-FEATURE' options to 144706f2543Smrg`configure', where FEATURE indicates an optional part of the package. 145706f2543SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 146706f2543Smrgis something like `gnu-as' or `x' (for the X Window System). The 147706f2543Smrg`README' should mention any `--enable-' and `--with-' options that the 148706f2543Smrgpackage recognizes. 149706f2543Smrg 150706f2543Smrg For packages that use the X Window System, `configure' can usually 151706f2543Smrgfind the X include and library files automatically, but if it doesn't, 152706f2543Smrgyou can use the `configure' options `--x-includes=DIR' and 153706f2543Smrg`--x-libraries=DIR' to specify their locations. 154706f2543Smrg 155706f2543SmrgParticular systems 156706f2543Smrg================== 157706f2543Smrg 158706f2543Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 159706f2543SmrgCC is not installed, it is recommended to use the following options in 160706f2543Smrgorder to use an ANSI C compiler: 161706f2543Smrg 162706f2543Smrg ./configure CC="cc -Ae" 163706f2543Smrg 164706f2543Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 165706f2543Smrg 166706f2543Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 167706f2543Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 168706f2543Smrga workaround. If GNU CC is not installed, it is therefore recommended 169706f2543Smrgto try 170706f2543Smrg 171706f2543Smrg ./configure CC="cc" 172706f2543Smrg 173706f2543Smrgand if that doesn't work, try 174706f2543Smrg 175706f2543Smrg ./configure CC="cc -nodtk" 176706f2543Smrg 177706f2543SmrgSpecifying the System Type 178706f2543Smrg========================== 179706f2543Smrg 180706f2543Smrg There may be some features `configure' cannot figure out 181706f2543Smrgautomatically, but needs to determine by the type of machine the package 182706f2543Smrgwill run on. Usually, assuming the package is built to be run on the 183706f2543Smrg_same_ architectures, `configure' can figure that out, but if it prints 184706f2543Smrga message saying it cannot guess the machine type, give it the 185706f2543Smrg`--build=TYPE' option. TYPE can either be a short name for the system 186706f2543Smrgtype, such as `sun4', or a canonical name which has the form: 187706f2543Smrg 188706f2543Smrg CPU-COMPANY-SYSTEM 189706f2543Smrg 190706f2543Smrgwhere SYSTEM can have one of these forms: 191706f2543Smrg 192706f2543Smrg OS KERNEL-OS 193706f2543Smrg 194706f2543Smrg See the file `config.sub' for the possible values of each field. If 195706f2543Smrg`config.sub' isn't included in this package, then this package doesn't 196706f2543Smrgneed to know the machine type. 197706f2543Smrg 198706f2543Smrg If you are _building_ compiler tools for cross-compiling, you should 199706f2543Smrguse the option `--target=TYPE' to select the type of system they will 200706f2543Smrgproduce code for. 201706f2543Smrg 202706f2543Smrg If you want to _use_ a cross compiler, that generates code for a 203706f2543Smrgplatform different from the build platform, you should specify the 204706f2543Smrg"host" platform (i.e., that on which the generated programs will 205706f2543Smrgeventually be run) with `--host=TYPE'. 206706f2543Smrg 207706f2543SmrgSharing Defaults 208706f2543Smrg================ 209706f2543Smrg 210706f2543Smrg If you want to set default values for `configure' scripts to share, 211706f2543Smrgyou can create a site shell script called `config.site' that gives 212706f2543Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 213706f2543Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 214706f2543Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 215706f2543Smrg`CONFIG_SITE' environment variable to the location of the site script. 216706f2543SmrgA warning: not all `configure' scripts look for a site script. 217706f2543Smrg 218706f2543SmrgDefining Variables 219706f2543Smrg================== 220706f2543Smrg 221706f2543Smrg Variables not defined in a site shell script can be set in the 222706f2543Smrgenvironment passed to `configure'. However, some packages may run 223706f2543Smrgconfigure again during the build, and the customized values of these 224706f2543Smrgvariables may be lost. In order to avoid this problem, you should set 225706f2543Smrgthem in the `configure' command line, using `VAR=value'. For example: 226706f2543Smrg 227706f2543Smrg ./configure CC=/usr/local2/bin/gcc 228706f2543Smrg 229706f2543Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 230706f2543Smrgoverridden in the site shell script). 231706f2543Smrg 232706f2543SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 233706f2543Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 234706f2543Smrg 235706f2543Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 236706f2543Smrg 237706f2543Smrg`configure' Invocation 238706f2543Smrg====================== 239706f2543Smrg 240706f2543Smrg `configure' recognizes the following options to control how it 241706f2543Smrgoperates. 242706f2543Smrg 243706f2543Smrg`--help' 244706f2543Smrg`-h' 245706f2543Smrg Print a summary of all of the options to `configure', and exit. 246706f2543Smrg 247706f2543Smrg`--help=short' 248706f2543Smrg`--help=recursive' 249706f2543Smrg Print a summary of the options unique to this package's 250706f2543Smrg `configure', and exit. The `short' variant lists options used 251706f2543Smrg only in the top level, while the `recursive' variant lists options 252706f2543Smrg also present in any nested packages. 253706f2543Smrg 254706f2543Smrg`--version' 255706f2543Smrg`-V' 256706f2543Smrg Print the version of Autoconf used to generate the `configure' 257706f2543Smrg script, and exit. 258706f2543Smrg 259706f2543Smrg`--cache-file=FILE' 260706f2543Smrg Enable the cache: use and save the results of the tests in FILE, 261706f2543Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 262706f2543Smrg disable caching. 263706f2543Smrg 264706f2543Smrg`--config-cache' 265706f2543Smrg`-C' 266706f2543Smrg Alias for `--cache-file=config.cache'. 267706f2543Smrg 268706f2543Smrg`--quiet' 269706f2543Smrg`--silent' 270706f2543Smrg`-q' 271706f2543Smrg Do not print messages saying which checks are being made. To 272706f2543Smrg suppress all normal output, redirect it to `/dev/null' (any error 273706f2543Smrg messages will still be shown). 274706f2543Smrg 275706f2543Smrg`--srcdir=DIR' 276706f2543Smrg Look for the package's source code in directory DIR. Usually 277706f2543Smrg `configure' can determine that directory automatically. 278706f2543Smrg 279706f2543Smrg`--prefix=DIR' 280706f2543Smrg Use DIR as the installation prefix. *Note Installation Names:: 281706f2543Smrg for more details, including other options available for fine-tuning 282706f2543Smrg the installation locations. 283706f2543Smrg 284706f2543Smrg`--no-create' 285706f2543Smrg`-n' 286706f2543Smrg Run the configure checks, but stop before creating any output 287706f2543Smrg files. 288706f2543Smrg 289706f2543Smrg`configure' also accepts some other, not widely useful, options. Run 290706f2543Smrg`configure --help' for more details. 291706f2543Smrg 292