142a55b46SmrgInstallation Instructions 242a55b46Smrg************************* 342a55b46Smrg 4e3d74329SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5e3d74329SmrgInc. 642a55b46Smrg 7e3d74329Smrg Copying and distribution of this file, with or without modification, 8e3d74329Smrgare permitted in any medium without royalty provided the copyright 9e3d74329Smrgnotice and this notice are preserved. This file is offered as-is, 10e3d74329Smrgwithout warranty of any kind. 1142a55b46Smrg 1242a55b46SmrgBasic Installation 1342a55b46Smrg================== 1442a55b46Smrg 1542a55b46Smrg Briefly, the shell commands `./configure; make; make install' should 1642a55b46Smrgconfigure, build, and install this package. The following 1742a55b46Smrgmore-detailed instructions are generic; see the `README' file for 18e3d74329Smrginstructions specific to this package. Some packages provide this 19e3d74329Smrg`INSTALL' file but do not implement all of the features documented 20e3d74329Smrgbelow. The lack of an optional feature in a given package is not 21e3d74329Smrgnecessarily a bug. More recommendations for GNU packages can be found 22e3d74329Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 2342a55b46Smrg 2442a55b46Smrg The `configure' shell script attempts to guess correct values for 2542a55b46Smrgvarious system-dependent variables used during compilation. It uses 2642a55b46Smrgthose values to create a `Makefile' in each directory of the package. 2742a55b46SmrgIt may also create one or more `.h' files containing system-dependent 2842a55b46Smrgdefinitions. Finally, it creates a shell script `config.status' that 2942a55b46Smrgyou can run in the future to recreate the current configuration, and a 3042a55b46Smrgfile `config.log' containing compiler output (useful mainly for 3142a55b46Smrgdebugging `configure'). 3242a55b46Smrg 3342a55b46Smrg It can also use an optional file (typically called `config.cache' 3442a55b46Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 3542a55b46Smrgthe results of its tests to speed up reconfiguring. Caching is 3642a55b46Smrgdisabled by default to prevent problems with accidental use of stale 3742a55b46Smrgcache files. 3842a55b46Smrg 3942a55b46Smrg If you need to do unusual things to compile the package, please try 4042a55b46Smrgto figure out how `configure' could check whether to do them, and mail 4142a55b46Smrgdiffs or instructions to the address given in the `README' so they can 4242a55b46Smrgbe considered for the next release. If you are using the cache, and at 4342a55b46Smrgsome point `config.cache' contains results you don't want to keep, you 4442a55b46Smrgmay remove or edit it. 4542a55b46Smrg 4642a55b46Smrg The file `configure.ac' (or `configure.in') is used to create 4742a55b46Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 4842a55b46Smrgyou want to change it or regenerate `configure' using a newer version 4942a55b46Smrgof `autoconf'. 5042a55b46Smrg 51e3d74329Smrg The simplest way to compile this package is: 5242a55b46Smrg 5342a55b46Smrg 1. `cd' to the directory containing the package's source code and type 5442a55b46Smrg `./configure' to configure the package for your system. 5542a55b46Smrg 5642a55b46Smrg Running `configure' might take a while. While running, it prints 5742a55b46Smrg some messages telling which features it is checking for. 5842a55b46Smrg 5942a55b46Smrg 2. Type `make' to compile the package. 6042a55b46Smrg 6142a55b46Smrg 3. Optionally, type `make check' to run any self-tests that come with 62e3d74329Smrg the package, generally using the just-built uninstalled binaries. 6342a55b46Smrg 6442a55b46Smrg 4. Type `make install' to install the programs and any data files and 65e3d74329Smrg documentation. When installing into a prefix owned by root, it is 66e3d74329Smrg recommended that the package be configured and built as a regular 67e3d74329Smrg user, and only the `make install' phase executed with root 68e3d74329Smrg privileges. 69e3d74329Smrg 70e3d74329Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71e3d74329Smrg this time using the binaries in their final installed location. 72e3d74329Smrg This target does not install anything. Running this target as a 73e3d74329Smrg regular user, particularly if the prior `make install' required 74e3d74329Smrg root privileges, verifies that the installation completed 75e3d74329Smrg correctly. 76e3d74329Smrg 77e3d74329Smrg 6. You can remove the program binaries and object files from the 7842a55b46Smrg source code directory by typing `make clean'. To also remove the 7942a55b46Smrg files that `configure' created (so you can compile the package for 8042a55b46Smrg a different kind of computer), type `make distclean'. There is 8142a55b46Smrg also a `make maintainer-clean' target, but that is intended mainly 8242a55b46Smrg for the package's developers. If you use it, you may have to get 8342a55b46Smrg all sorts of other programs in order to regenerate files that came 8442a55b46Smrg with the distribution. 8542a55b46Smrg 86e3d74329Smrg 7. Often, you can also type `make uninstall' to remove the installed 87e3d74329Smrg files again. In practice, not all packages have tested that 88e3d74329Smrg uninstallation works correctly, even though it is required by the 89e3d74329Smrg GNU Coding Standards. 90e3d74329Smrg 91e3d74329Smrg 8. Some packages, particularly those that use Automake, provide `make 92e3d74329Smrg distcheck', which can by used by developers to test that all other 93e3d74329Smrg targets like `make install' and `make uninstall' work correctly. 94e3d74329Smrg This target is generally not run by end users. 9542a55b46Smrg 9642a55b46SmrgCompilers and Options 9742a55b46Smrg===================== 9842a55b46Smrg 9942a55b46Smrg Some systems require unusual options for compilation or linking that 10042a55b46Smrgthe `configure' script does not know about. Run `./configure --help' 10142a55b46Smrgfor details on some of the pertinent environment variables. 10242a55b46Smrg 10342a55b46Smrg You can give `configure' initial values for configuration parameters 10442a55b46Smrgby setting variables in the command line or in the environment. Here 10542a55b46Smrgis an example: 10642a55b46Smrg 10742a55b46Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 10842a55b46Smrg 10942a55b46Smrg *Note Defining Variables::, for more details. 11042a55b46Smrg 11142a55b46SmrgCompiling For Multiple Architectures 11242a55b46Smrg==================================== 11342a55b46Smrg 11442a55b46Smrg You can compile the package for more than one kind of computer at the 11542a55b46Smrgsame time, by placing the object files for each architecture in their 11642a55b46Smrgown directory. To do this, you can use GNU `make'. `cd' to the 11742a55b46Smrgdirectory where you want the object files and executables to go and run 11842a55b46Smrgthe `configure' script. `configure' automatically checks for the 119e3d74329Smrgsource code in the directory that `configure' is in and in `..'. This 120e3d74329Smrgis known as a "VPATH" build. 12142a55b46Smrg 12242a55b46Smrg With a non-GNU `make', it is safer to compile the package for one 12342a55b46Smrgarchitecture at a time in the source code directory. After you have 12442a55b46Smrginstalled the package for one architecture, use `make distclean' before 12542a55b46Smrgreconfiguring for another architecture. 12642a55b46Smrg 12742a55b46Smrg On MacOS X 10.5 and later systems, you can create libraries and 12842a55b46Smrgexecutables that work on multiple system types--known as "fat" or 12942a55b46Smrg"universal" binaries--by specifying multiple `-arch' options to the 13042a55b46Smrgcompiler but only a single `-arch' option to the preprocessor. Like 13142a55b46Smrgthis: 13242a55b46Smrg 13342a55b46Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13442a55b46Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13542a55b46Smrg CPP="gcc -E" CXXCPP="g++ -E" 13642a55b46Smrg 13742a55b46Smrg This is not guaranteed to produce working output in all cases, you 13842a55b46Smrgmay have to build one architecture at a time and combine the results 13942a55b46Smrgusing the `lipo' tool if you have problems. 14042a55b46Smrg 14142a55b46SmrgInstallation Names 14242a55b46Smrg================== 14342a55b46Smrg 14442a55b46Smrg By default, `make install' installs the package's commands under 14542a55b46Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 14642a55b46Smrgcan specify an installation prefix other than `/usr/local' by giving 147e3d74329Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148e3d74329Smrgabsolute file name. 14942a55b46Smrg 15042a55b46Smrg You can specify separate installation prefixes for 15142a55b46Smrgarchitecture-specific files and architecture-independent files. If you 15242a55b46Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 15342a55b46SmrgPREFIX as the prefix for installing programs and libraries. 15442a55b46SmrgDocumentation and other data files still use the regular prefix. 15542a55b46Smrg 15642a55b46Smrg In addition, if you use an unusual directory layout you can give 15742a55b46Smrgoptions like `--bindir=DIR' to specify different values for particular 15842a55b46Smrgkinds of files. Run `configure --help' for a list of the directories 159e3d74329Smrgyou can set and what kinds of files go in them. In general, the 160e3d74329Smrgdefault for these options is expressed in terms of `${prefix}', so that 161e3d74329Smrgspecifying just `--prefix' will affect all of the other directory 162e3d74329Smrgspecifications that were not explicitly provided. 163e3d74329Smrg 164e3d74329Smrg The most portable way to affect installation locations is to pass the 165e3d74329Smrgcorrect locations to `configure'; however, many packages provide one or 166e3d74329Smrgboth of the following shortcuts of passing variable assignments to the 167e3d74329Smrg`make install' command line to change installation locations without 168e3d74329Smrghaving to reconfigure or recompile. 169e3d74329Smrg 170e3d74329Smrg The first method involves providing an override variable for each 171e3d74329Smrgaffected directory. For example, `make install 172e3d74329Smrgprefix=/alternate/directory' will choose an alternate location for all 173e3d74329Smrgdirectory configuration variables that were expressed in terms of 174e3d74329Smrg`${prefix}'. Any directories that were specified during `configure', 175e3d74329Smrgbut not in terms of `${prefix}', must each be overridden at install 176e3d74329Smrgtime for the entire installation to be relocated. The approach of 177e3d74329Smrgmakefile variable overrides for each directory variable is required by 178e3d74329Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179e3d74329SmrgHowever, some platforms have known limitations with the semantics of 180e3d74329Smrgshared libraries that end up requiring recompilation when using this 181e3d74329Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182e3d74329Smrg 183e3d74329Smrg The second method involves providing the `DESTDIR' variable. For 184e3d74329Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185e3d74329Smrg`/alternate/directory' before all installation names. The approach of 186e3d74329Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187e3d74329Smrgdoes not work on platforms that have drive letters. On the other hand, 188e3d74329Smrgit does better at avoiding recompilation issues, and works well even 189e3d74329Smrgwhen some directory options were not specified in terms of `${prefix}' 190e3d74329Smrgat `configure' time. 191e3d74329Smrg 192e3d74329SmrgOptional Features 193e3d74329Smrg================= 19442a55b46Smrg 19542a55b46Smrg If the package supports it, you can cause programs to be installed 19642a55b46Smrgwith an extra prefix or suffix on their names by giving `configure' the 19742a55b46Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 19842a55b46Smrg 19942a55b46Smrg Some packages pay attention to `--enable-FEATURE' options to 20042a55b46Smrg`configure', where FEATURE indicates an optional part of the package. 20142a55b46SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 20242a55b46Smrgis something like `gnu-as' or `x' (for the X Window System). The 20342a55b46Smrg`README' should mention any `--enable-' and `--with-' options that the 20442a55b46Smrgpackage recognizes. 20542a55b46Smrg 20642a55b46Smrg For packages that use the X Window System, `configure' can usually 20742a55b46Smrgfind the X include and library files automatically, but if it doesn't, 20842a55b46Smrgyou can use the `configure' options `--x-includes=DIR' and 20942a55b46Smrg`--x-libraries=DIR' to specify their locations. 21042a55b46Smrg 211e3d74329Smrg Some packages offer the ability to configure how verbose the 212e3d74329Smrgexecution of `make' will be. For these packages, running `./configure 213e3d74329Smrg--enable-silent-rules' sets the default to minimal output, which can be 214e3d74329Smrgoverridden with `make V=1'; while running `./configure 215e3d74329Smrg--disable-silent-rules' sets the default to verbose, which can be 216e3d74329Smrgoverridden with `make V=0'. 217e3d74329Smrg 21842a55b46SmrgParticular systems 21942a55b46Smrg================== 22042a55b46Smrg 22142a55b46Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 22242a55b46SmrgCC is not installed, it is recommended to use the following options in 22342a55b46Smrgorder to use an ANSI C compiler: 22442a55b46Smrg 225e3d74329Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 22642a55b46Smrg 22742a55b46Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 22842a55b46Smrg 229e3d74329Smrg HP-UX `make' updates targets which have the same time stamps as 230e3d74329Smrgtheir prerequisites, which makes it generally unusable when shipped 231e3d74329Smrggenerated files such as `configure' are involved. Use GNU `make' 232e3d74329Smrginstead. 233e3d74329Smrg 23442a55b46Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 23542a55b46Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 23642a55b46Smrga workaround. If GNU CC is not installed, it is therefore recommended 23742a55b46Smrgto try 23842a55b46Smrg 23942a55b46Smrg ./configure CC="cc" 24042a55b46Smrg 24142a55b46Smrgand if that doesn't work, try 24242a55b46Smrg 24342a55b46Smrg ./configure CC="cc -nodtk" 24442a55b46Smrg 245e3d74329Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246e3d74329Smrgdirectory contains several dysfunctional programs; working variants of 247e3d74329Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248e3d74329Smrgin your `PATH', put it _after_ `/usr/bin'. 249e3d74329Smrg 250e3d74329Smrg On Haiku, software installed for all users goes in `/boot/common', 251e3d74329Smrgnot `/usr/local'. It is recommended to use the following options: 252e3d74329Smrg 253e3d74329Smrg ./configure --prefix=/boot/common 254e3d74329Smrg 25542a55b46SmrgSpecifying the System Type 25642a55b46Smrg========================== 25742a55b46Smrg 25842a55b46Smrg There may be some features `configure' cannot figure out 25942a55b46Smrgautomatically, but needs to determine by the type of machine the package 26042a55b46Smrgwill run on. Usually, assuming the package is built to be run on the 26142a55b46Smrg_same_ architectures, `configure' can figure that out, but if it prints 26242a55b46Smrga message saying it cannot guess the machine type, give it the 26342a55b46Smrg`--build=TYPE' option. TYPE can either be a short name for the system 26442a55b46Smrgtype, such as `sun4', or a canonical name which has the form: 26542a55b46Smrg 26642a55b46Smrg CPU-COMPANY-SYSTEM 26742a55b46Smrg 26842a55b46Smrgwhere SYSTEM can have one of these forms: 26942a55b46Smrg 270e3d74329Smrg OS 271e3d74329Smrg KERNEL-OS 27242a55b46Smrg 27342a55b46Smrg See the file `config.sub' for the possible values of each field. If 27442a55b46Smrg`config.sub' isn't included in this package, then this package doesn't 27542a55b46Smrgneed to know the machine type. 27642a55b46Smrg 27742a55b46Smrg If you are _building_ compiler tools for cross-compiling, you should 27842a55b46Smrguse the option `--target=TYPE' to select the type of system they will 27942a55b46Smrgproduce code for. 28042a55b46Smrg 28142a55b46Smrg If you want to _use_ a cross compiler, that generates code for a 28242a55b46Smrgplatform different from the build platform, you should specify the 28342a55b46Smrg"host" platform (i.e., that on which the generated programs will 28442a55b46Smrgeventually be run) with `--host=TYPE'. 28542a55b46Smrg 28642a55b46SmrgSharing Defaults 28742a55b46Smrg================ 28842a55b46Smrg 28942a55b46Smrg If you want to set default values for `configure' scripts to share, 29042a55b46Smrgyou can create a site shell script called `config.site' that gives 29142a55b46Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 29242a55b46Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 29342a55b46Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 29442a55b46Smrg`CONFIG_SITE' environment variable to the location of the site script. 29542a55b46SmrgA warning: not all `configure' scripts look for a site script. 29642a55b46Smrg 29742a55b46SmrgDefining Variables 29842a55b46Smrg================== 29942a55b46Smrg 30042a55b46Smrg Variables not defined in a site shell script can be set in the 30142a55b46Smrgenvironment passed to `configure'. However, some packages may run 30242a55b46Smrgconfigure again during the build, and the customized values of these 30342a55b46Smrgvariables may be lost. In order to avoid this problem, you should set 30442a55b46Smrgthem in the `configure' command line, using `VAR=value'. For example: 30542a55b46Smrg 30642a55b46Smrg ./configure CC=/usr/local2/bin/gcc 30742a55b46Smrg 30842a55b46Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 30942a55b46Smrgoverridden in the site shell script). 31042a55b46Smrg 31142a55b46SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 31242a55b46Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 31342a55b46Smrg 31442a55b46Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 31542a55b46Smrg 31642a55b46Smrg`configure' Invocation 31742a55b46Smrg====================== 31842a55b46Smrg 31942a55b46Smrg `configure' recognizes the following options to control how it 32042a55b46Smrgoperates. 32142a55b46Smrg 32242a55b46Smrg`--help' 32342a55b46Smrg`-h' 32442a55b46Smrg Print a summary of all of the options to `configure', and exit. 32542a55b46Smrg 32642a55b46Smrg`--help=short' 32742a55b46Smrg`--help=recursive' 32842a55b46Smrg Print a summary of the options unique to this package's 32942a55b46Smrg `configure', and exit. The `short' variant lists options used 33042a55b46Smrg only in the top level, while the `recursive' variant lists options 33142a55b46Smrg also present in any nested packages. 33242a55b46Smrg 33342a55b46Smrg`--version' 33442a55b46Smrg`-V' 33542a55b46Smrg Print the version of Autoconf used to generate the `configure' 33642a55b46Smrg script, and exit. 33742a55b46Smrg 33842a55b46Smrg`--cache-file=FILE' 33942a55b46Smrg Enable the cache: use and save the results of the tests in FILE, 34042a55b46Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 34142a55b46Smrg disable caching. 34242a55b46Smrg 34342a55b46Smrg`--config-cache' 34442a55b46Smrg`-C' 34542a55b46Smrg Alias for `--cache-file=config.cache'. 34642a55b46Smrg 34742a55b46Smrg`--quiet' 34842a55b46Smrg`--silent' 34942a55b46Smrg`-q' 35042a55b46Smrg Do not print messages saying which checks are being made. To 35142a55b46Smrg suppress all normal output, redirect it to `/dev/null' (any error 35242a55b46Smrg messages will still be shown). 35342a55b46Smrg 35442a55b46Smrg`--srcdir=DIR' 35542a55b46Smrg Look for the package's source code in directory DIR. Usually 35642a55b46Smrg `configure' can determine that directory automatically. 35742a55b46Smrg 35842a55b46Smrg`--prefix=DIR' 359e3d74329Smrg Use DIR as the installation prefix. *note Installation Names:: 36042a55b46Smrg for more details, including other options available for fine-tuning 36142a55b46Smrg the installation locations. 36242a55b46Smrg 36342a55b46Smrg`--no-create' 36442a55b46Smrg`-n' 36542a55b46Smrg Run the configure checks, but stop before creating any output 36642a55b46Smrg files. 36742a55b46Smrg 36842a55b46Smrg`configure' also accepts some other, not widely useful, options. Run 36942a55b46Smrg`configure --help' for more details. 37042a55b46Smrg 371