1883dc8a3SmrgInstallation Instructions 2883dc8a3Smrg************************* 3883dc8a3Smrg 409924814SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 509924814SmrgInc. 6883dc8a3Smrg 709924814Smrg Copying and distribution of this file, with or without modification, 809924814Smrgare permitted in any medium without royalty provided the copyright 909924814Smrgnotice and this notice are preserved. This file is offered as-is, 1009924814Smrgwithout warranty of any kind. 11883dc8a3Smrg 12883dc8a3SmrgBasic Installation 13883dc8a3Smrg================== 14883dc8a3Smrg 15883dc8a3Smrg Briefly, the shell commands `./configure; make; make install' should 16883dc8a3Smrgconfigure, build, and install this package. The following 17883dc8a3Smrgmore-detailed instructions are generic; see the `README' file for 1809924814Smrginstructions specific to this package. Some packages provide this 1909924814Smrg`INSTALL' file but do not implement all of the features documented 2009924814Smrgbelow. The lack of an optional feature in a given package is not 2109924814Smrgnecessarily a bug. More recommendations for GNU packages can be found 2209924814Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 23883dc8a3Smrg 24883dc8a3Smrg The `configure' shell script attempts to guess correct values for 25883dc8a3Smrgvarious system-dependent variables used during compilation. It uses 26883dc8a3Smrgthose values to create a `Makefile' in each directory of the package. 27883dc8a3SmrgIt may also create one or more `.h' files containing system-dependent 28883dc8a3Smrgdefinitions. Finally, it creates a shell script `config.status' that 29883dc8a3Smrgyou can run in the future to recreate the current configuration, and a 30883dc8a3Smrgfile `config.log' containing compiler output (useful mainly for 31883dc8a3Smrgdebugging `configure'). 32883dc8a3Smrg 33883dc8a3Smrg It can also use an optional file (typically called `config.cache' 34883dc8a3Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35883dc8a3Smrgthe results of its tests to speed up reconfiguring. Caching is 36883dc8a3Smrgdisabled by default to prevent problems with accidental use of stale 37883dc8a3Smrgcache files. 38883dc8a3Smrg 39883dc8a3Smrg If you need to do unusual things to compile the package, please try 40883dc8a3Smrgto figure out how `configure' could check whether to do them, and mail 41883dc8a3Smrgdiffs or instructions to the address given in the `README' so they can 42883dc8a3Smrgbe considered for the next release. If you are using the cache, and at 43883dc8a3Smrgsome point `config.cache' contains results you don't want to keep, you 44883dc8a3Smrgmay remove or edit it. 45883dc8a3Smrg 46883dc8a3Smrg The file `configure.ac' (or `configure.in') is used to create 47883dc8a3Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 48883dc8a3Smrgyou want to change it or regenerate `configure' using a newer version 49883dc8a3Smrgof `autoconf'. 50883dc8a3Smrg 5109924814Smrg The simplest way to compile this package is: 52883dc8a3Smrg 53883dc8a3Smrg 1. `cd' to the directory containing the package's source code and type 54883dc8a3Smrg `./configure' to configure the package for your system. 55883dc8a3Smrg 56883dc8a3Smrg Running `configure' might take a while. While running, it prints 57883dc8a3Smrg some messages telling which features it is checking for. 58883dc8a3Smrg 59883dc8a3Smrg 2. Type `make' to compile the package. 60883dc8a3Smrg 61883dc8a3Smrg 3. Optionally, type `make check' to run any self-tests that come with 6209924814Smrg the package, generally using the just-built uninstalled binaries. 63883dc8a3Smrg 64883dc8a3Smrg 4. Type `make install' to install the programs and any data files and 6509924814Smrg documentation. When installing into a prefix owned by root, it is 6609924814Smrg recommended that the package be configured and built as a regular 6709924814Smrg user, and only the `make install' phase executed with root 6809924814Smrg privileges. 6909924814Smrg 7009924814Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 7109924814Smrg this time using the binaries in their final installed location. 7209924814Smrg This target does not install anything. Running this target as a 7309924814Smrg regular user, particularly if the prior `make install' required 7409924814Smrg root privileges, verifies that the installation completed 7509924814Smrg correctly. 7609924814Smrg 7709924814Smrg 6. You can remove the program binaries and object files from the 78883dc8a3Smrg source code directory by typing `make clean'. To also remove the 79883dc8a3Smrg files that `configure' created (so you can compile the package for 80883dc8a3Smrg a different kind of computer), type `make distclean'. There is 81883dc8a3Smrg also a `make maintainer-clean' target, but that is intended mainly 82883dc8a3Smrg for the package's developers. If you use it, you may have to get 83883dc8a3Smrg all sorts of other programs in order to regenerate files that came 84883dc8a3Smrg with the distribution. 85883dc8a3Smrg 8609924814Smrg 7. Often, you can also type `make uninstall' to remove the installed 8709924814Smrg files again. In practice, not all packages have tested that 8809924814Smrg uninstallation works correctly, even though it is required by the 8909924814Smrg GNU Coding Standards. 9009924814Smrg 9109924814Smrg 8. Some packages, particularly those that use Automake, provide `make 9209924814Smrg distcheck', which can by used by developers to test that all other 9309924814Smrg targets like `make install' and `make uninstall' work correctly. 9409924814Smrg This target is generally not run by end users. 95883dc8a3Smrg 96883dc8a3SmrgCompilers and Options 97883dc8a3Smrg===================== 98883dc8a3Smrg 99883dc8a3Smrg Some systems require unusual options for compilation or linking that 100883dc8a3Smrgthe `configure' script does not know about. Run `./configure --help' 101883dc8a3Smrgfor details on some of the pertinent environment variables. 102883dc8a3Smrg 103883dc8a3Smrg You can give `configure' initial values for configuration parameters 104883dc8a3Smrgby setting variables in the command line or in the environment. Here 105883dc8a3Smrgis an example: 106883dc8a3Smrg 107883dc8a3Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108883dc8a3Smrg 109883dc8a3Smrg *Note Defining Variables::, for more details. 110883dc8a3Smrg 111883dc8a3SmrgCompiling For Multiple Architectures 112883dc8a3Smrg==================================== 113883dc8a3Smrg 114883dc8a3Smrg You can compile the package for more than one kind of computer at the 115883dc8a3Smrgsame time, by placing the object files for each architecture in their 116883dc8a3Smrgown directory. To do this, you can use GNU `make'. `cd' to the 117883dc8a3Smrgdirectory where you want the object files and executables to go and run 118883dc8a3Smrgthe `configure' script. `configure' automatically checks for the 11909924814Smrgsource code in the directory that `configure' is in and in `..'. This 12009924814Smrgis known as a "VPATH" build. 121883dc8a3Smrg 122883dc8a3Smrg With a non-GNU `make', it is safer to compile the package for one 123883dc8a3Smrgarchitecture at a time in the source code directory. After you have 124883dc8a3Smrginstalled the package for one architecture, use `make distclean' before 125883dc8a3Smrgreconfiguring for another architecture. 126883dc8a3Smrg 127883dc8a3Smrg On MacOS X 10.5 and later systems, you can create libraries and 128883dc8a3Smrgexecutables that work on multiple system types--known as "fat" or 129883dc8a3Smrg"universal" binaries--by specifying multiple `-arch' options to the 130883dc8a3Smrgcompiler but only a single `-arch' option to the preprocessor. Like 131883dc8a3Smrgthis: 132883dc8a3Smrg 133883dc8a3Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134883dc8a3Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135883dc8a3Smrg CPP="gcc -E" CXXCPP="g++ -E" 136883dc8a3Smrg 137883dc8a3Smrg This is not guaranteed to produce working output in all cases, you 138883dc8a3Smrgmay have to build one architecture at a time and combine the results 139883dc8a3Smrgusing the `lipo' tool if you have problems. 140883dc8a3Smrg 141883dc8a3SmrgInstallation Names 142883dc8a3Smrg================== 143883dc8a3Smrg 144883dc8a3Smrg By default, `make install' installs the package's commands under 145883dc8a3Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146883dc8a3Smrgcan specify an installation prefix other than `/usr/local' by giving 14709924814Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 14809924814Smrgabsolute file name. 149883dc8a3Smrg 150883dc8a3Smrg You can specify separate installation prefixes for 151883dc8a3Smrgarchitecture-specific files and architecture-independent files. If you 152883dc8a3Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153883dc8a3SmrgPREFIX as the prefix for installing programs and libraries. 154883dc8a3SmrgDocumentation and other data files still use the regular prefix. 155883dc8a3Smrg 156883dc8a3Smrg In addition, if you use an unusual directory layout you can give 157883dc8a3Smrgoptions like `--bindir=DIR' to specify different values for particular 158883dc8a3Smrgkinds of files. Run `configure --help' for a list of the directories 15909924814Smrgyou can set and what kinds of files go in them. In general, the 16009924814Smrgdefault for these options is expressed in terms of `${prefix}', so that 16109924814Smrgspecifying just `--prefix' will affect all of the other directory 16209924814Smrgspecifications that were not explicitly provided. 16309924814Smrg 16409924814Smrg The most portable way to affect installation locations is to pass the 16509924814Smrgcorrect locations to `configure'; however, many packages provide one or 16609924814Smrgboth of the following shortcuts of passing variable assignments to the 16709924814Smrg`make install' command line to change installation locations without 16809924814Smrghaving to reconfigure or recompile. 16909924814Smrg 17009924814Smrg The first method involves providing an override variable for each 17109924814Smrgaffected directory. For example, `make install 17209924814Smrgprefix=/alternate/directory' will choose an alternate location for all 17309924814Smrgdirectory configuration variables that were expressed in terms of 17409924814Smrg`${prefix}'. Any directories that were specified during `configure', 17509924814Smrgbut not in terms of `${prefix}', must each be overridden at install 17609924814Smrgtime for the entire installation to be relocated. The approach of 17709924814Smrgmakefile variable overrides for each directory variable is required by 17809924814Smrgthe GNU Coding Standards, and ideally causes no recompilation. 17909924814SmrgHowever, some platforms have known limitations with the semantics of 18009924814Smrgshared libraries that end up requiring recompilation when using this 18109924814Smrgmethod, particularly noticeable in packages that use GNU Libtool. 18209924814Smrg 18309924814Smrg The second method involves providing the `DESTDIR' variable. For 18409924814Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 18509924814Smrg`/alternate/directory' before all installation names. The approach of 18609924814Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 18709924814Smrgdoes not work on platforms that have drive letters. On the other hand, 18809924814Smrgit does better at avoiding recompilation issues, and works well even 18909924814Smrgwhen some directory options were not specified in terms of `${prefix}' 19009924814Smrgat `configure' time. 19109924814Smrg 19209924814SmrgOptional Features 19309924814Smrg================= 194883dc8a3Smrg 195883dc8a3Smrg If the package supports it, you can cause programs to be installed 196883dc8a3Smrgwith an extra prefix or suffix on their names by giving `configure' the 197883dc8a3Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198883dc8a3Smrg 199883dc8a3Smrg Some packages pay attention to `--enable-FEATURE' options to 200883dc8a3Smrg`configure', where FEATURE indicates an optional part of the package. 201883dc8a3SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202883dc8a3Smrgis something like `gnu-as' or `x' (for the X Window System). The 203883dc8a3Smrg`README' should mention any `--enable-' and `--with-' options that the 204883dc8a3Smrgpackage recognizes. 205883dc8a3Smrg 206883dc8a3Smrg For packages that use the X Window System, `configure' can usually 207883dc8a3Smrgfind the X include and library files automatically, but if it doesn't, 208883dc8a3Smrgyou can use the `configure' options `--x-includes=DIR' and 209883dc8a3Smrg`--x-libraries=DIR' to specify their locations. 210883dc8a3Smrg 21109924814Smrg Some packages offer the ability to configure how verbose the 21209924814Smrgexecution of `make' will be. For these packages, running `./configure 21309924814Smrg--enable-silent-rules' sets the default to minimal output, which can be 21409924814Smrgoverridden with `make V=1'; while running `./configure 21509924814Smrg--disable-silent-rules' sets the default to verbose, which can be 21609924814Smrgoverridden with `make V=0'. 21709924814Smrg 218883dc8a3SmrgParticular systems 219883dc8a3Smrg================== 220883dc8a3Smrg 221883dc8a3Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222883dc8a3SmrgCC is not installed, it is recommended to use the following options in 223883dc8a3Smrgorder to use an ANSI C compiler: 224883dc8a3Smrg 22509924814Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226883dc8a3Smrg 227883dc8a3Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228883dc8a3Smrg 22909924814Smrg HP-UX `make' updates targets which have the same time stamps as 23009924814Smrgtheir prerequisites, which makes it generally unusable when shipped 23109924814Smrggenerated files such as `configure' are involved. Use GNU `make' 23209924814Smrginstead. 23309924814Smrg 234883dc8a3Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235883dc8a3Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236883dc8a3Smrga workaround. If GNU CC is not installed, it is therefore recommended 237883dc8a3Smrgto try 238883dc8a3Smrg 239883dc8a3Smrg ./configure CC="cc" 240883dc8a3Smrg 241883dc8a3Smrgand if that doesn't work, try 242883dc8a3Smrg 243883dc8a3Smrg ./configure CC="cc -nodtk" 244883dc8a3Smrg 24509924814Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 24609924814Smrgdirectory contains several dysfunctional programs; working variants of 24709924814Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 24809924814Smrgin your `PATH', put it _after_ `/usr/bin'. 24909924814Smrg 25009924814Smrg On Haiku, software installed for all users goes in `/boot/common', 25109924814Smrgnot `/usr/local'. It is recommended to use the following options: 25209924814Smrg 25309924814Smrg ./configure --prefix=/boot/common 25409924814Smrg 255883dc8a3SmrgSpecifying the System Type 256883dc8a3Smrg========================== 257883dc8a3Smrg 258883dc8a3Smrg There may be some features `configure' cannot figure out 259883dc8a3Smrgautomatically, but needs to determine by the type of machine the package 260883dc8a3Smrgwill run on. Usually, assuming the package is built to be run on the 261883dc8a3Smrg_same_ architectures, `configure' can figure that out, but if it prints 262883dc8a3Smrga message saying it cannot guess the machine type, give it the 263883dc8a3Smrg`--build=TYPE' option. TYPE can either be a short name for the system 264883dc8a3Smrgtype, such as `sun4', or a canonical name which has the form: 265883dc8a3Smrg 266883dc8a3Smrg CPU-COMPANY-SYSTEM 267883dc8a3Smrg 268883dc8a3Smrgwhere SYSTEM can have one of these forms: 269883dc8a3Smrg 27009924814Smrg OS 27109924814Smrg KERNEL-OS 272883dc8a3Smrg 273883dc8a3Smrg See the file `config.sub' for the possible values of each field. If 274883dc8a3Smrg`config.sub' isn't included in this package, then this package doesn't 275883dc8a3Smrgneed to know the machine type. 276883dc8a3Smrg 277883dc8a3Smrg If you are _building_ compiler tools for cross-compiling, you should 278883dc8a3Smrguse the option `--target=TYPE' to select the type of system they will 279883dc8a3Smrgproduce code for. 280883dc8a3Smrg 281883dc8a3Smrg If you want to _use_ a cross compiler, that generates code for a 282883dc8a3Smrgplatform different from the build platform, you should specify the 283883dc8a3Smrg"host" platform (i.e., that on which the generated programs will 284883dc8a3Smrgeventually be run) with `--host=TYPE'. 285883dc8a3Smrg 286883dc8a3SmrgSharing Defaults 287883dc8a3Smrg================ 288883dc8a3Smrg 289883dc8a3Smrg If you want to set default values for `configure' scripts to share, 290883dc8a3Smrgyou can create a site shell script called `config.site' that gives 291883dc8a3Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 292883dc8a3Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293883dc8a3Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294883dc8a3Smrg`CONFIG_SITE' environment variable to the location of the site script. 295883dc8a3SmrgA warning: not all `configure' scripts look for a site script. 296883dc8a3Smrg 297883dc8a3SmrgDefining Variables 298883dc8a3Smrg================== 299883dc8a3Smrg 300883dc8a3Smrg Variables not defined in a site shell script can be set in the 301883dc8a3Smrgenvironment passed to `configure'. However, some packages may run 302883dc8a3Smrgconfigure again during the build, and the customized values of these 303883dc8a3Smrgvariables may be lost. In order to avoid this problem, you should set 304883dc8a3Smrgthem in the `configure' command line, using `VAR=value'. For example: 305883dc8a3Smrg 306883dc8a3Smrg ./configure CC=/usr/local2/bin/gcc 307883dc8a3Smrg 308883dc8a3Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 309883dc8a3Smrgoverridden in the site shell script). 310883dc8a3Smrg 311883dc8a3SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312883dc8a3Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313883dc8a3Smrg 314883dc8a3Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315883dc8a3Smrg 316883dc8a3Smrg`configure' Invocation 317883dc8a3Smrg====================== 318883dc8a3Smrg 319883dc8a3Smrg `configure' recognizes the following options to control how it 320883dc8a3Smrgoperates. 321883dc8a3Smrg 322883dc8a3Smrg`--help' 323883dc8a3Smrg`-h' 324883dc8a3Smrg Print a summary of all of the options to `configure', and exit. 325883dc8a3Smrg 326883dc8a3Smrg`--help=short' 327883dc8a3Smrg`--help=recursive' 328883dc8a3Smrg Print a summary of the options unique to this package's 329883dc8a3Smrg `configure', and exit. The `short' variant lists options used 330883dc8a3Smrg only in the top level, while the `recursive' variant lists options 331883dc8a3Smrg also present in any nested packages. 332883dc8a3Smrg 333883dc8a3Smrg`--version' 334883dc8a3Smrg`-V' 335883dc8a3Smrg Print the version of Autoconf used to generate the `configure' 336883dc8a3Smrg script, and exit. 337883dc8a3Smrg 338883dc8a3Smrg`--cache-file=FILE' 339883dc8a3Smrg Enable the cache: use and save the results of the tests in FILE, 340883dc8a3Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341883dc8a3Smrg disable caching. 342883dc8a3Smrg 343883dc8a3Smrg`--config-cache' 344883dc8a3Smrg`-C' 345883dc8a3Smrg Alias for `--cache-file=config.cache'. 346883dc8a3Smrg 347883dc8a3Smrg`--quiet' 348883dc8a3Smrg`--silent' 349883dc8a3Smrg`-q' 350883dc8a3Smrg Do not print messages saying which checks are being made. To 351883dc8a3Smrg suppress all normal output, redirect it to `/dev/null' (any error 352883dc8a3Smrg messages will still be shown). 353883dc8a3Smrg 354883dc8a3Smrg`--srcdir=DIR' 355883dc8a3Smrg Look for the package's source code in directory DIR. Usually 356883dc8a3Smrg `configure' can determine that directory automatically. 357883dc8a3Smrg 358883dc8a3Smrg`--prefix=DIR' 35909924814Smrg Use DIR as the installation prefix. *note Installation Names:: 360883dc8a3Smrg for more details, including other options available for fine-tuning 361883dc8a3Smrg the installation locations. 362883dc8a3Smrg 363883dc8a3Smrg`--no-create' 364883dc8a3Smrg`-n' 365883dc8a3Smrg Run the configure checks, but stop before creating any output 366883dc8a3Smrg files. 367883dc8a3Smrg 368883dc8a3Smrg`configure' also accepts some other, not widely useful, options. Run 369883dc8a3Smrg`configure --help' for more details. 370883dc8a3Smrg 371