INSTALL revision 06ef0fec
129cb5710SmrgInstallation Instructions 229cb5710Smrg************************* 329cb5710Smrg 406ef0fecSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 506ef0fecSmrgInc. 629cb5710Smrg 706ef0fecSmrg Copying and distribution of this file, with or without modification, 806ef0fecSmrgare permitted in any medium without royalty provided the copyright 906ef0fecSmrgnotice and this notice are preserved. This file is offered as-is, 1006ef0fecSmrgwithout warranty of any kind. 1129cb5710Smrg 1229cb5710SmrgBasic Installation 1329cb5710Smrg================== 1429cb5710Smrg 1529cb5710Smrg Briefly, the shell commands `./configure; make; make install' should 1629cb5710Smrgconfigure, build, and install this package. The following 1729cb5710Smrgmore-detailed instructions are generic; see the `README' file for 1806ef0fecSmrginstructions specific to this package. Some packages provide this 1906ef0fecSmrg`INSTALL' file but do not implement all of the features documented 2006ef0fecSmrgbelow. The lack of an optional feature in a given package is not 2106ef0fecSmrgnecessarily a bug. More recommendations for GNU packages can be found 2206ef0fecSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 2329cb5710Smrg 2429cb5710Smrg The `configure' shell script attempts to guess correct values for 2529cb5710Smrgvarious system-dependent variables used during compilation. It uses 2629cb5710Smrgthose values to create a `Makefile' in each directory of the package. 2729cb5710SmrgIt may also create one or more `.h' files containing system-dependent 2829cb5710Smrgdefinitions. Finally, it creates a shell script `config.status' that 2929cb5710Smrgyou can run in the future to recreate the current configuration, and a 3029cb5710Smrgfile `config.log' containing compiler output (useful mainly for 3129cb5710Smrgdebugging `configure'). 3229cb5710Smrg 3329cb5710Smrg It can also use an optional file (typically called `config.cache' 3429cb5710Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 3529cb5710Smrgthe results of its tests to speed up reconfiguring. Caching is 3629cb5710Smrgdisabled by default to prevent problems with accidental use of stale 3729cb5710Smrgcache files. 3829cb5710Smrg 3929cb5710Smrg If you need to do unusual things to compile the package, please try 4029cb5710Smrgto figure out how `configure' could check whether to do them, and mail 4129cb5710Smrgdiffs or instructions to the address given in the `README' so they can 4229cb5710Smrgbe considered for the next release. If you are using the cache, and at 4329cb5710Smrgsome point `config.cache' contains results you don't want to keep, you 4429cb5710Smrgmay remove or edit it. 4529cb5710Smrg 4629cb5710Smrg The file `configure.ac' (or `configure.in') is used to create 4729cb5710Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 4829cb5710Smrgyou want to change it or regenerate `configure' using a newer version 4929cb5710Smrgof `autoconf'. 5029cb5710Smrg 5106ef0fecSmrg The simplest way to compile this package is: 5229cb5710Smrg 5329cb5710Smrg 1. `cd' to the directory containing the package's source code and type 5429cb5710Smrg `./configure' to configure the package for your system. 5529cb5710Smrg 5629cb5710Smrg Running `configure' might take a while. While running, it prints 5729cb5710Smrg some messages telling which features it is checking for. 5829cb5710Smrg 5929cb5710Smrg 2. Type `make' to compile the package. 6029cb5710Smrg 6129cb5710Smrg 3. Optionally, type `make check' to run any self-tests that come with 6206ef0fecSmrg the package, generally using the just-built uninstalled binaries. 6329cb5710Smrg 6429cb5710Smrg 4. Type `make install' to install the programs and any data files and 6506ef0fecSmrg documentation. When installing into a prefix owned by root, it is 6606ef0fecSmrg recommended that the package be configured and built as a regular 6706ef0fecSmrg user, and only the `make install' phase executed with root 6806ef0fecSmrg privileges. 6906ef0fecSmrg 7006ef0fecSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 7106ef0fecSmrg this time using the binaries in their final installed location. 7206ef0fecSmrg This target does not install anything. Running this target as a 7306ef0fecSmrg regular user, particularly if the prior `make install' required 7406ef0fecSmrg root privileges, verifies that the installation completed 7506ef0fecSmrg correctly. 7606ef0fecSmrg 7706ef0fecSmrg 6. You can remove the program binaries and object files from the 7829cb5710Smrg source code directory by typing `make clean'. To also remove the 7929cb5710Smrg files that `configure' created (so you can compile the package for 8029cb5710Smrg a different kind of computer), type `make distclean'. There is 8129cb5710Smrg also a `make maintainer-clean' target, but that is intended mainly 8229cb5710Smrg for the package's developers. If you use it, you may have to get 8329cb5710Smrg all sorts of other programs in order to regenerate files that came 8429cb5710Smrg with the distribution. 8529cb5710Smrg 8606ef0fecSmrg 7. Often, you can also type `make uninstall' to remove the installed 8706ef0fecSmrg files again. In practice, not all packages have tested that 8806ef0fecSmrg uninstallation works correctly, even though it is required by the 8906ef0fecSmrg GNU Coding Standards. 9006ef0fecSmrg 9106ef0fecSmrg 8. Some packages, particularly those that use Automake, provide `make 9206ef0fecSmrg distcheck', which can by used by developers to test that all other 9306ef0fecSmrg targets like `make install' and `make uninstall' work correctly. 9406ef0fecSmrg This target is generally not run by end users. 9529cb5710Smrg 9629cb5710SmrgCompilers and Options 9729cb5710Smrg===================== 9829cb5710Smrg 9929cb5710Smrg Some systems require unusual options for compilation or linking that 10029cb5710Smrgthe `configure' script does not know about. Run `./configure --help' 10129cb5710Smrgfor details on some of the pertinent environment variables. 10229cb5710Smrg 10329cb5710Smrg You can give `configure' initial values for configuration parameters 10429cb5710Smrgby setting variables in the command line or in the environment. Here 10529cb5710Smrgis an example: 10629cb5710Smrg 10729cb5710Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 10829cb5710Smrg 10929cb5710Smrg *Note Defining Variables::, for more details. 11029cb5710Smrg 11129cb5710SmrgCompiling For Multiple Architectures 11229cb5710Smrg==================================== 11329cb5710Smrg 11429cb5710Smrg You can compile the package for more than one kind of computer at the 11529cb5710Smrgsame time, by placing the object files for each architecture in their 11629cb5710Smrgown directory. To do this, you can use GNU `make'. `cd' to the 11729cb5710Smrgdirectory where you want the object files and executables to go and run 11829cb5710Smrgthe `configure' script. `configure' automatically checks for the 11906ef0fecSmrgsource code in the directory that `configure' is in and in `..'. This 12006ef0fecSmrgis known as a "VPATH" build. 12129cb5710Smrg 12229cb5710Smrg With a non-GNU `make', it is safer to compile the package for one 12329cb5710Smrgarchitecture at a time in the source code directory. After you have 12429cb5710Smrginstalled the package for one architecture, use `make distclean' before 12529cb5710Smrgreconfiguring for another architecture. 12629cb5710Smrg 12729cb5710Smrg On MacOS X 10.5 and later systems, you can create libraries and 12829cb5710Smrgexecutables that work on multiple system types--known as "fat" or 12929cb5710Smrg"universal" binaries--by specifying multiple `-arch' options to the 13029cb5710Smrgcompiler but only a single `-arch' option to the preprocessor. Like 13129cb5710Smrgthis: 13229cb5710Smrg 13329cb5710Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13429cb5710Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13529cb5710Smrg CPP="gcc -E" CXXCPP="g++ -E" 13629cb5710Smrg 13729cb5710Smrg This is not guaranteed to produce working output in all cases, you 13829cb5710Smrgmay have to build one architecture at a time and combine the results 13929cb5710Smrgusing the `lipo' tool if you have problems. 14029cb5710Smrg 14129cb5710SmrgInstallation Names 14229cb5710Smrg================== 14329cb5710Smrg 14429cb5710Smrg By default, `make install' installs the package's commands under 14529cb5710Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 14629cb5710Smrgcan specify an installation prefix other than `/usr/local' by giving 14706ef0fecSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 14806ef0fecSmrgabsolute file name. 14929cb5710Smrg 15029cb5710Smrg You can specify separate installation prefixes for 15129cb5710Smrgarchitecture-specific files and architecture-independent files. If you 15229cb5710Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 15329cb5710SmrgPREFIX as the prefix for installing programs and libraries. 15429cb5710SmrgDocumentation and other data files still use the regular prefix. 15529cb5710Smrg 15629cb5710Smrg In addition, if you use an unusual directory layout you can give 15729cb5710Smrgoptions like `--bindir=DIR' to specify different values for particular 15829cb5710Smrgkinds of files. Run `configure --help' for a list of the directories 15906ef0fecSmrgyou can set and what kinds of files go in them. In general, the 16006ef0fecSmrgdefault for these options is expressed in terms of `${prefix}', so that 16106ef0fecSmrgspecifying just `--prefix' will affect all of the other directory 16206ef0fecSmrgspecifications that were not explicitly provided. 16306ef0fecSmrg 16406ef0fecSmrg The most portable way to affect installation locations is to pass the 16506ef0fecSmrgcorrect locations to `configure'; however, many packages provide one or 16606ef0fecSmrgboth of the following shortcuts of passing variable assignments to the 16706ef0fecSmrg`make install' command line to change installation locations without 16806ef0fecSmrghaving to reconfigure or recompile. 16906ef0fecSmrg 17006ef0fecSmrg The first method involves providing an override variable for each 17106ef0fecSmrgaffected directory. For example, `make install 17206ef0fecSmrgprefix=/alternate/directory' will choose an alternate location for all 17306ef0fecSmrgdirectory configuration variables that were expressed in terms of 17406ef0fecSmrg`${prefix}'. Any directories that were specified during `configure', 17506ef0fecSmrgbut not in terms of `${prefix}', must each be overridden at install 17606ef0fecSmrgtime for the entire installation to be relocated. The approach of 17706ef0fecSmrgmakefile variable overrides for each directory variable is required by 17806ef0fecSmrgthe GNU Coding Standards, and ideally causes no recompilation. 17906ef0fecSmrgHowever, some platforms have known limitations with the semantics of 18006ef0fecSmrgshared libraries that end up requiring recompilation when using this 18106ef0fecSmrgmethod, particularly noticeable in packages that use GNU Libtool. 18206ef0fecSmrg 18306ef0fecSmrg The second method involves providing the `DESTDIR' variable. For 18406ef0fecSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 18506ef0fecSmrg`/alternate/directory' before all installation names. The approach of 18606ef0fecSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 18706ef0fecSmrgdoes not work on platforms that have drive letters. On the other hand, 18806ef0fecSmrgit does better at avoiding recompilation issues, and works well even 18906ef0fecSmrgwhen some directory options were not specified in terms of `${prefix}' 19006ef0fecSmrgat `configure' time. 19106ef0fecSmrg 19206ef0fecSmrgOptional Features 19306ef0fecSmrg================= 19429cb5710Smrg 19529cb5710Smrg If the package supports it, you can cause programs to be installed 19629cb5710Smrgwith an extra prefix or suffix on their names by giving `configure' the 19729cb5710Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 19829cb5710Smrg 19929cb5710Smrg Some packages pay attention to `--enable-FEATURE' options to 20029cb5710Smrg`configure', where FEATURE indicates an optional part of the package. 20129cb5710SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 20229cb5710Smrgis something like `gnu-as' or `x' (for the X Window System). The 20329cb5710Smrg`README' should mention any `--enable-' and `--with-' options that the 20429cb5710Smrgpackage recognizes. 20529cb5710Smrg 20629cb5710Smrg For packages that use the X Window System, `configure' can usually 20729cb5710Smrgfind the X include and library files automatically, but if it doesn't, 20829cb5710Smrgyou can use the `configure' options `--x-includes=DIR' and 20929cb5710Smrg`--x-libraries=DIR' to specify their locations. 21029cb5710Smrg 21106ef0fecSmrg Some packages offer the ability to configure how verbose the 21206ef0fecSmrgexecution of `make' will be. For these packages, running `./configure 21306ef0fecSmrg--enable-silent-rules' sets the default to minimal output, which can be 21406ef0fecSmrgoverridden with `make V=1'; while running `./configure 21506ef0fecSmrg--disable-silent-rules' sets the default to verbose, which can be 21606ef0fecSmrgoverridden with `make V=0'. 21706ef0fecSmrg 21829cb5710SmrgParticular systems 21929cb5710Smrg================== 22029cb5710Smrg 22129cb5710Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 22229cb5710SmrgCC is not installed, it is recommended to use the following options in 22329cb5710Smrgorder to use an ANSI C compiler: 22429cb5710Smrg 22506ef0fecSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 22629cb5710Smrg 22729cb5710Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 22829cb5710Smrg 22906ef0fecSmrg HP-UX `make' updates targets which have the same time stamps as 23006ef0fecSmrgtheir prerequisites, which makes it generally unusable when shipped 23106ef0fecSmrggenerated files such as `configure' are involved. Use GNU `make' 23206ef0fecSmrginstead. 23306ef0fecSmrg 23429cb5710Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 23529cb5710Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 23629cb5710Smrga workaround. If GNU CC is not installed, it is therefore recommended 23729cb5710Smrgto try 23829cb5710Smrg 23929cb5710Smrg ./configure CC="cc" 24029cb5710Smrg 24129cb5710Smrgand if that doesn't work, try 24229cb5710Smrg 24329cb5710Smrg ./configure CC="cc -nodtk" 24429cb5710Smrg 24506ef0fecSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 24606ef0fecSmrgdirectory contains several dysfunctional programs; working variants of 24706ef0fecSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 24806ef0fecSmrgin your `PATH', put it _after_ `/usr/bin'. 24906ef0fecSmrg 25006ef0fecSmrg On Haiku, software installed for all users goes in `/boot/common', 25106ef0fecSmrgnot `/usr/local'. It is recommended to use the following options: 25206ef0fecSmrg 25306ef0fecSmrg ./configure --prefix=/boot/common 25406ef0fecSmrg 25529cb5710SmrgSpecifying the System Type 25629cb5710Smrg========================== 25729cb5710Smrg 25829cb5710Smrg There may be some features `configure' cannot figure out 25929cb5710Smrgautomatically, but needs to determine by the type of machine the package 26029cb5710Smrgwill run on. Usually, assuming the package is built to be run on the 26129cb5710Smrg_same_ architectures, `configure' can figure that out, but if it prints 26229cb5710Smrga message saying it cannot guess the machine type, give it the 26329cb5710Smrg`--build=TYPE' option. TYPE can either be a short name for the system 26429cb5710Smrgtype, such as `sun4', or a canonical name which has the form: 26529cb5710Smrg 26629cb5710Smrg CPU-COMPANY-SYSTEM 26729cb5710Smrg 26829cb5710Smrgwhere SYSTEM can have one of these forms: 26929cb5710Smrg 27006ef0fecSmrg OS 27106ef0fecSmrg KERNEL-OS 27229cb5710Smrg 27329cb5710Smrg See the file `config.sub' for the possible values of each field. If 27429cb5710Smrg`config.sub' isn't included in this package, then this package doesn't 27529cb5710Smrgneed to know the machine type. 27629cb5710Smrg 27729cb5710Smrg If you are _building_ compiler tools for cross-compiling, you should 27829cb5710Smrguse the option `--target=TYPE' to select the type of system they will 27929cb5710Smrgproduce code for. 28029cb5710Smrg 28129cb5710Smrg If you want to _use_ a cross compiler, that generates code for a 28229cb5710Smrgplatform different from the build platform, you should specify the 28329cb5710Smrg"host" platform (i.e., that on which the generated programs will 28429cb5710Smrgeventually be run) with `--host=TYPE'. 28529cb5710Smrg 28629cb5710SmrgSharing Defaults 28729cb5710Smrg================ 28829cb5710Smrg 28929cb5710Smrg If you want to set default values for `configure' scripts to share, 29029cb5710Smrgyou can create a site shell script called `config.site' that gives 29129cb5710Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 29229cb5710Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 29329cb5710Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 29429cb5710Smrg`CONFIG_SITE' environment variable to the location of the site script. 29529cb5710SmrgA warning: not all `configure' scripts look for a site script. 29629cb5710Smrg 29729cb5710SmrgDefining Variables 29829cb5710Smrg================== 29929cb5710Smrg 30029cb5710Smrg Variables not defined in a site shell script can be set in the 30129cb5710Smrgenvironment passed to `configure'. However, some packages may run 30229cb5710Smrgconfigure again during the build, and the customized values of these 30329cb5710Smrgvariables may be lost. In order to avoid this problem, you should set 30429cb5710Smrgthem in the `configure' command line, using `VAR=value'. For example: 30529cb5710Smrg 30629cb5710Smrg ./configure CC=/usr/local2/bin/gcc 30729cb5710Smrg 30829cb5710Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 30929cb5710Smrgoverridden in the site shell script). 31029cb5710Smrg 31129cb5710SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 31229cb5710Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 31329cb5710Smrg 31429cb5710Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 31529cb5710Smrg 31629cb5710Smrg`configure' Invocation 31729cb5710Smrg====================== 31829cb5710Smrg 31929cb5710Smrg `configure' recognizes the following options to control how it 32029cb5710Smrgoperates. 32129cb5710Smrg 32229cb5710Smrg`--help' 32329cb5710Smrg`-h' 32429cb5710Smrg Print a summary of all of the options to `configure', and exit. 32529cb5710Smrg 32629cb5710Smrg`--help=short' 32729cb5710Smrg`--help=recursive' 32829cb5710Smrg Print a summary of the options unique to this package's 32929cb5710Smrg `configure', and exit. The `short' variant lists options used 33029cb5710Smrg only in the top level, while the `recursive' variant lists options 33129cb5710Smrg also present in any nested packages. 33229cb5710Smrg 33329cb5710Smrg`--version' 33429cb5710Smrg`-V' 33529cb5710Smrg Print the version of Autoconf used to generate the `configure' 33629cb5710Smrg script, and exit. 33729cb5710Smrg 33829cb5710Smrg`--cache-file=FILE' 33929cb5710Smrg Enable the cache: use and save the results of the tests in FILE, 34029cb5710Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 34129cb5710Smrg disable caching. 34229cb5710Smrg 34329cb5710Smrg`--config-cache' 34429cb5710Smrg`-C' 34529cb5710Smrg Alias for `--cache-file=config.cache'. 34629cb5710Smrg 34729cb5710Smrg`--quiet' 34829cb5710Smrg`--silent' 34929cb5710Smrg`-q' 35029cb5710Smrg Do not print messages saying which checks are being made. To 35129cb5710Smrg suppress all normal output, redirect it to `/dev/null' (any error 35229cb5710Smrg messages will still be shown). 35329cb5710Smrg 35429cb5710Smrg`--srcdir=DIR' 35529cb5710Smrg Look for the package's source code in directory DIR. Usually 35629cb5710Smrg `configure' can determine that directory automatically. 35729cb5710Smrg 35829cb5710Smrg`--prefix=DIR' 35906ef0fecSmrg Use DIR as the installation prefix. *note Installation Names:: 36029cb5710Smrg for more details, including other options available for fine-tuning 36129cb5710Smrg the installation locations. 36229cb5710Smrg 36329cb5710Smrg`--no-create' 36429cb5710Smrg`-n' 36529cb5710Smrg Run the configure checks, but stop before creating any output 36629cb5710Smrg files. 36729cb5710Smrg 36829cb5710Smrg`configure' also accepts some other, not widely useful, options. Run 36929cb5710Smrg`configure --help' for more details. 37029cb5710Smrg 371