1186690SobrienInstallation Instructions 2186690Sobrien************************* 3186690Sobrien 4186690SobrienCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 5234449Sobrien2006, 2007, 2008, 2009 Free Software Foundation, Inc. 6186690Sobrien 7234449Sobrien Copying and distribution of this file, with or without modification, 8234449Sobrienare permitted in any medium without royalty provided the copyright 9234449Sobriennotice and this notice are preserved. This file is offered as-is, 10234449Sobrienwithout warranty of any kind. 11186690Sobrien 12186690SobrienBasic Installation 13186690Sobrien================== 14186690Sobrien 15234449Sobrien Briefly, the shell commands `./configure; make; make install' should 16186690Sobrienconfigure, build, and install this package. The following 17186690Sobrienmore-detailed instructions are generic; see the `README' file for 18234449Sobrieninstructions specific to this package. Some packages provide this 19234449Sobrien`INSTALL' file but do not implement all of the features documented 20234449Sobrienbelow. The lack of an optional feature in a given package is not 21234449Sobriennecessarily a bug. More recommendations for GNU packages can be found 22234449Sobrienin *note Makefile Conventions: (standards)Makefile Conventions. 23186690Sobrien 24186690Sobrien The `configure' shell script attempts to guess correct values for 25186690Sobrienvarious system-dependent variables used during compilation. It uses 26186690Sobrienthose values to create a `Makefile' in each directory of the package. 27186690SobrienIt may also create one or more `.h' files containing system-dependent 28186690Sobriendefinitions. Finally, it creates a shell script `config.status' that 29186690Sobrienyou can run in the future to recreate the current configuration, and a 30186690Sobrienfile `config.log' containing compiler output (useful mainly for 31186690Sobriendebugging `configure'). 32186690Sobrien 33186690Sobrien It can also use an optional file (typically called `config.cache' 34186690Sobrienand enabled with `--cache-file=config.cache' or simply `-C') that saves 35186690Sobrienthe results of its tests to speed up reconfiguring. Caching is 36186690Sobriendisabled by default to prevent problems with accidental use of stale 37186690Sobriencache files. 38186690Sobrien 39186690Sobrien If you need to do unusual things to compile the package, please try 40186690Sobriento figure out how `configure' could check whether to do them, and mail 41186690Sobriendiffs or instructions to the address given in the `README' so they can 42186690Sobrienbe considered for the next release. If you are using the cache, and at 43186690Sobriensome point `config.cache' contains results you don't want to keep, you 44186690Sobrienmay remove or edit it. 45186690Sobrien 46186690Sobrien The file `configure.ac' (or `configure.in') is used to create 47186690Sobrien`configure' by a program called `autoconf'. You need `configure.ac' if 48186690Sobrienyou want to change it or regenerate `configure' using a newer version 49186690Sobrienof `autoconf'. 50186690Sobrien 51234449Sobrien The simplest way to compile this package is: 52186690Sobrien 53186690Sobrien 1. `cd' to the directory containing the package's source code and type 54186690Sobrien `./configure' to configure the package for your system. 55186690Sobrien 56186690Sobrien Running `configure' might take a while. While running, it prints 57186690Sobrien some messages telling which features it is checking for. 58186690Sobrien 59186690Sobrien 2. Type `make' to compile the package. 60186690Sobrien 61186690Sobrien 3. Optionally, type `make check' to run any self-tests that come with 62234449Sobrien the package, generally using the just-built uninstalled binaries. 63186690Sobrien 64186690Sobrien 4. Type `make install' to install the programs and any data files and 65234449Sobrien documentation. When installing into a prefix owned by root, it is 66234449Sobrien recommended that the package be configured and built as a regular 67234449Sobrien user, and only the `make install' phase executed with root 68234449Sobrien privileges. 69186690Sobrien 70234449Sobrien 5. Optionally, type `make installcheck' to repeat any self-tests, but 71234449Sobrien this time using the binaries in their final installed location. 72234449Sobrien This target does not install anything. Running this target as a 73234449Sobrien regular user, particularly if the prior `make install' required 74234449Sobrien root privileges, verifies that the installation completed 75234449Sobrien correctly. 76234449Sobrien 77234449Sobrien 6. You can remove the program binaries and object files from the 78186690Sobrien source code directory by typing `make clean'. To also remove the 79186690Sobrien files that `configure' created (so you can compile the package for 80186690Sobrien a different kind of computer), type `make distclean'. There is 81186690Sobrien also a `make maintainer-clean' target, but that is intended mainly 82186690Sobrien for the package's developers. If you use it, you may have to get 83186690Sobrien all sorts of other programs in order to regenerate files that came 84186690Sobrien with the distribution. 85186690Sobrien 86234449Sobrien 7. Often, you can also type `make uninstall' to remove the installed 87234449Sobrien files again. In practice, not all packages have tested that 88234449Sobrien uninstallation works correctly, even though it is required by the 89234449Sobrien GNU Coding Standards. 90234449Sobrien 91234449Sobrien 8. Some packages, particularly those that use Automake, provide `make 92234449Sobrien distcheck', which can by used by developers to test that all other 93234449Sobrien targets like `make install' and `make uninstall' work correctly. 94234449Sobrien This target is generally not run by end users. 95234449Sobrien 96186690SobrienCompilers and Options 97186690Sobrien===================== 98186690Sobrien 99234449Sobrien Some systems require unusual options for compilation or linking that 100234449Sobrienthe `configure' script does not know about. Run `./configure --help' 101234449Sobrienfor details on some of the pertinent environment variables. 102186690Sobrien 103186690Sobrien You can give `configure' initial values for configuration parameters 104186690Sobrienby setting variables in the command line or in the environment. Here 105186690Sobrienis an example: 106186690Sobrien 107186690Sobrien ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108186690Sobrien 109186690Sobrien *Note Defining Variables::, for more details. 110186690Sobrien 111186690SobrienCompiling For Multiple Architectures 112186690Sobrien==================================== 113186690Sobrien 114234449Sobrien You can compile the package for more than one kind of computer at the 115186690Sobriensame time, by placing the object files for each architecture in their 116186690Sobrienown directory. To do this, you can use GNU `make'. `cd' to the 117186690Sobriendirectory where you want the object files and executables to go and run 118186690Sobrienthe `configure' script. `configure' automatically checks for the 119234449Sobriensource code in the directory that `configure' is in and in `..'. This 120234449Sobrienis known as a "VPATH" build. 121186690Sobrien 122186690Sobrien With a non-GNU `make', it is safer to compile the package for one 123186690Sobrienarchitecture at a time in the source code directory. After you have 124186690Sobrieninstalled the package for one architecture, use `make distclean' before 125186690Sobrienreconfiguring for another architecture. 126186690Sobrien 127234449Sobrien On MacOS X 10.5 and later systems, you can create libraries and 128234449Sobrienexecutables that work on multiple system types--known as "fat" or 129234449Sobrien"universal" binaries--by specifying multiple `-arch' options to the 130234449Sobriencompiler but only a single `-arch' option to the preprocessor. Like 131234449Sobrienthis: 132234449Sobrien 133234449Sobrien ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134234449Sobrien CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135234449Sobrien CPP="gcc -E" CXXCPP="g++ -E" 136234449Sobrien 137234449Sobrien This is not guaranteed to produce working output in all cases, you 138234449Sobrienmay have to build one architecture at a time and combine the results 139234449Sobrienusing the `lipo' tool if you have problems. 140234449Sobrien 141186690SobrienInstallation Names 142186690Sobrien================== 143186690Sobrien 144234449Sobrien By default, `make install' installs the package's commands under 145186690Sobrien`/usr/local/bin', include files under `/usr/local/include', etc. You 146186690Sobriencan specify an installation prefix other than `/usr/local' by giving 147234449Sobrien`configure' the option `--prefix=PREFIX', where PREFIX must be an 148234449Sobrienabsolute file name. 149186690Sobrien 150186690Sobrien You can specify separate installation prefixes for 151186690Sobrienarchitecture-specific files and architecture-independent files. If you 152186690Sobrienpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153186690SobrienPREFIX as the prefix for installing programs and libraries. 154186690SobrienDocumentation and other data files still use the regular prefix. 155186690Sobrien 156186690Sobrien In addition, if you use an unusual directory layout you can give 157186690Sobrienoptions like `--bindir=DIR' to specify different values for particular 158186690Sobrienkinds of files. Run `configure --help' for a list of the directories 159234449Sobrienyou can set and what kinds of files go in them. In general, the 160234449Sobriendefault for these options is expressed in terms of `${prefix}', so that 161234449Sobrienspecifying just `--prefix' will affect all of the other directory 162234449Sobrienspecifications that were not explicitly provided. 163186690Sobrien 164234449Sobrien The most portable way to affect installation locations is to pass the 165234449Sobriencorrect locations to `configure'; however, many packages provide one or 166234449Sobrienboth of the following shortcuts of passing variable assignments to the 167234449Sobrien`make install' command line to change installation locations without 168234449Sobrienhaving to reconfigure or recompile. 169234449Sobrien 170234449Sobrien The first method involves providing an override variable for each 171234449Sobrienaffected directory. For example, `make install 172234449Sobrienprefix=/alternate/directory' will choose an alternate location for all 173234449Sobriendirectory configuration variables that were expressed in terms of 174234449Sobrien`${prefix}'. Any directories that were specified during `configure', 175234449Sobrienbut not in terms of `${prefix}', must each be overridden at install 176234449Sobrientime for the entire installation to be relocated. The approach of 177234449Sobrienmakefile variable overrides for each directory variable is required by 178234449Sobrienthe GNU Coding Standards, and ideally causes no recompilation. 179234449SobrienHowever, some platforms have known limitations with the semantics of 180234449Sobrienshared libraries that end up requiring recompilation when using this 181234449Sobrienmethod, particularly noticeable in packages that use GNU Libtool. 182234449Sobrien 183234449Sobrien The second method involves providing the `DESTDIR' variable. For 184234449Sobrienexample, `make install DESTDIR=/alternate/directory' will prepend 185234449Sobrien`/alternate/directory' before all installation names. The approach of 186234449Sobrien`DESTDIR' overrides is not required by the GNU Coding Standards, and 187234449Sobriendoes not work on platforms that have drive letters. On the other hand, 188234449Sobrienit does better at avoiding recompilation issues, and works well even 189234449Sobrienwhen some directory options were not specified in terms of `${prefix}' 190234449Sobrienat `configure' time. 191234449Sobrien 192234449SobrienOptional Features 193234449Sobrien================= 194234449Sobrien 195186690Sobrien If the package supports it, you can cause programs to be installed 196186690Sobrienwith an extra prefix or suffix on their names by giving `configure' the 197186690Sobrienoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198186690Sobrien 199234449Sobrien Some packages pay attention to `--enable-FEATURE' options to 200186690Sobrien`configure', where FEATURE indicates an optional part of the package. 201186690SobrienThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202186690Sobrienis something like `gnu-as' or `x' (for the X Window System). The 203186690Sobrien`README' should mention any `--enable-' and `--with-' options that the 204186690Sobrienpackage recognizes. 205186690Sobrien 206186690Sobrien For packages that use the X Window System, `configure' can usually 207186690Sobrienfind the X include and library files automatically, but if it doesn't, 208186690Sobrienyou can use the `configure' options `--x-includes=DIR' and 209186690Sobrien`--x-libraries=DIR' to specify their locations. 210186690Sobrien 211234449Sobrien Some packages offer the ability to configure how verbose the 212234449Sobrienexecution of `make' will be. For these packages, running `./configure 213234449Sobrien--enable-silent-rules' sets the default to minimal output, which can be 214234449Sobrienoverridden with `make V=1'; while running `./configure 215234449Sobrien--disable-silent-rules' sets the default to verbose, which can be 216234449Sobrienoverridden with `make V=0'. 217234449Sobrien 218234449SobrienParticular systems 219234449Sobrien================== 220234449Sobrien 221234449Sobrien On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222234449SobrienCC is not installed, it is recommended to use the following options in 223234449Sobrienorder to use an ANSI C compiler: 224234449Sobrien 225234449Sobrien ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226234449Sobrien 227234449Sobrienand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228234449Sobrien 229234449Sobrien On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 230234449Sobrienparse its `<wchar.h>' header file. The option `-nodtk' can be used as 231234449Sobriena workaround. If GNU CC is not installed, it is therefore recommended 232234449Sobriento try 233234449Sobrien 234234449Sobrien ./configure CC="cc" 235234449Sobrien 236234449Sobrienand if that doesn't work, try 237234449Sobrien 238234449Sobrien ./configure CC="cc -nodtk" 239234449Sobrien 240234449Sobrien On Solaris, don't put `/usr/ucb' early in your `PATH'. This 241234449Sobriendirectory contains several dysfunctional programs; working variants of 242234449Sobrienthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 243234449Sobrienin your `PATH', put it _after_ `/usr/bin'. 244234449Sobrien 245234449Sobrien On Haiku, software installed for all users goes in `/boot/common', 246234449Sobriennot `/usr/local'. It is recommended to use the following options: 247234449Sobrien 248234449Sobrien ./configure --prefix=/boot/common 249234449Sobrien 250186690SobrienSpecifying the System Type 251186690Sobrien========================== 252186690Sobrien 253234449Sobrien There may be some features `configure' cannot figure out 254234449Sobrienautomatically, but needs to determine by the type of machine the package 255234449Sobrienwill run on. Usually, assuming the package is built to be run on the 256234449Sobrien_same_ architectures, `configure' can figure that out, but if it prints 257234449Sobriena message saying it cannot guess the machine type, give it the 258186690Sobrien`--build=TYPE' option. TYPE can either be a short name for the system 259186690Sobrientype, such as `sun4', or a canonical name which has the form: 260186690Sobrien 261186690Sobrien CPU-COMPANY-SYSTEM 262186690Sobrien 263186690Sobrienwhere SYSTEM can have one of these forms: 264186690Sobrien 265234449Sobrien OS 266234449Sobrien KERNEL-OS 267186690Sobrien 268186690Sobrien See the file `config.sub' for the possible values of each field. If 269186690Sobrien`config.sub' isn't included in this package, then this package doesn't 270186690Sobrienneed to know the machine type. 271186690Sobrien 272186690Sobrien If you are _building_ compiler tools for cross-compiling, you should 273186690Sobrienuse the option `--target=TYPE' to select the type of system they will 274186690Sobrienproduce code for. 275186690Sobrien 276186690Sobrien If you want to _use_ a cross compiler, that generates code for a 277186690Sobrienplatform different from the build platform, you should specify the 278186690Sobrien"host" platform (i.e., that on which the generated programs will 279186690Sobrieneventually be run) with `--host=TYPE'. 280186690Sobrien 281186690SobrienSharing Defaults 282186690Sobrien================ 283186690Sobrien 284234449Sobrien If you want to set default values for `configure' scripts to share, 285234449Sobrienyou can create a site shell script called `config.site' that gives 286234449Sobriendefault values for variables like `CC', `cache_file', and `prefix'. 287186690Sobrien`configure' looks for `PREFIX/share/config.site' if it exists, then 288186690Sobrien`PREFIX/etc/config.site' if it exists. Or, you can set the 289186690Sobrien`CONFIG_SITE' environment variable to the location of the site script. 290186690SobrienA warning: not all `configure' scripts look for a site script. 291186690Sobrien 292186690SobrienDefining Variables 293186690Sobrien================== 294186690Sobrien 295234449Sobrien Variables not defined in a site shell script can be set in the 296186690Sobrienenvironment passed to `configure'. However, some packages may run 297186690Sobrienconfigure again during the build, and the customized values of these 298186690Sobrienvariables may be lost. In order to avoid this problem, you should set 299186690Sobrienthem in the `configure' command line, using `VAR=value'. For example: 300186690Sobrien 301186690Sobrien ./configure CC=/usr/local2/bin/gcc 302186690Sobrien 303186690Sobriencauses the specified `gcc' to be used as the C compiler (unless it is 304186690Sobrienoverridden in the site shell script). 305186690Sobrien 306186690SobrienUnfortunately, this technique does not work for `CONFIG_SHELL' due to 307186690Sobrienan Autoconf bug. Until the bug is fixed you can use this workaround: 308186690Sobrien 309186690Sobrien CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 310186690Sobrien 311186690Sobrien`configure' Invocation 312186690Sobrien====================== 313186690Sobrien 314234449Sobrien `configure' recognizes the following options to control how it 315234449Sobrienoperates. 316186690Sobrien 317186690Sobrien`--help' 318186690Sobrien`-h' 319234449Sobrien Print a summary of all of the options to `configure', and exit. 320186690Sobrien 321234449Sobrien`--help=short' 322234449Sobrien`--help=recursive' 323234449Sobrien Print a summary of the options unique to this package's 324234449Sobrien `configure', and exit. The `short' variant lists options used 325234449Sobrien only in the top level, while the `recursive' variant lists options 326234449Sobrien also present in any nested packages. 327234449Sobrien 328186690Sobrien`--version' 329186690Sobrien`-V' 330186690Sobrien Print the version of Autoconf used to generate the `configure' 331186690Sobrien script, and exit. 332186690Sobrien 333186690Sobrien`--cache-file=FILE' 334186690Sobrien Enable the cache: use and save the results of the tests in FILE, 335186690Sobrien traditionally `config.cache'. FILE defaults to `/dev/null' to 336186690Sobrien disable caching. 337186690Sobrien 338186690Sobrien`--config-cache' 339186690Sobrien`-C' 340186690Sobrien Alias for `--cache-file=config.cache'. 341186690Sobrien 342186690Sobrien`--quiet' 343186690Sobrien`--silent' 344186690Sobrien`-q' 345186690Sobrien Do not print messages saying which checks are being made. To 346186690Sobrien suppress all normal output, redirect it to `/dev/null' (any error 347186690Sobrien messages will still be shown). 348186690Sobrien 349186690Sobrien`--srcdir=DIR' 350186690Sobrien Look for the package's source code in directory DIR. Usually 351186690Sobrien `configure' can determine that directory automatically. 352186690Sobrien 353234449Sobrien`--prefix=DIR' 354234449Sobrien Use DIR as the installation prefix. *note Installation Names:: 355234449Sobrien for more details, including other options available for fine-tuning 356234449Sobrien the installation locations. 357234449Sobrien 358234449Sobrien`--no-create' 359234449Sobrien`-n' 360234449Sobrien Run the configure checks, but stop before creating any output 361234449Sobrien files. 362234449Sobrien 363186690Sobrien`configure' also accepts some other, not widely useful, options. Run 364186690Sobrien`configure --help' for more details. 365186690Sobrien 366