138b41dabSmrgInstallation Instructions 238b41dabSmrg************************* 338b41dabSmrg 438b41dabSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 538b41dabSmrgInc. 638b41dabSmrg 738b41dabSmrg Copying and distribution of this file, with or without modification, 838b41dabSmrgare permitted in any medium without royalty provided the copyright 938b41dabSmrgnotice and this notice are preserved. This file is offered as-is, 1038b41dabSmrgwithout warranty of any kind. 1138b41dabSmrg 1238b41dabSmrgBasic Installation 1338b41dabSmrg================== 1438b41dabSmrg 1538b41dabSmrg Briefly, the shell commands `./configure; make; make install' should 1638b41dabSmrgconfigure, build, and install this package. The following 1738b41dabSmrgmore-detailed instructions are generic; see the `README' file for 1838b41dabSmrginstructions specific to this package. Some packages provide this 1938b41dabSmrg`INSTALL' file but do not implement all of the features documented 2038b41dabSmrgbelow. The lack of an optional feature in a given package is not 2138b41dabSmrgnecessarily a bug. More recommendations for GNU packages can be found 2238b41dabSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 2338b41dabSmrg 2438b41dabSmrg The `configure' shell script attempts to guess correct values for 2538b41dabSmrgvarious system-dependent variables used during compilation. It uses 2638b41dabSmrgthose values to create a `Makefile' in each directory of the package. 2738b41dabSmrgIt may also create one or more `.h' files containing system-dependent 2838b41dabSmrgdefinitions. Finally, it creates a shell script `config.status' that 2938b41dabSmrgyou can run in the future to recreate the current configuration, and a 3038b41dabSmrgfile `config.log' containing compiler output (useful mainly for 3138b41dabSmrgdebugging `configure'). 3238b41dabSmrg 3338b41dabSmrg It can also use an optional file (typically called `config.cache' 3438b41dabSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 3538b41dabSmrgthe results of its tests to speed up reconfiguring. Caching is 3638b41dabSmrgdisabled by default to prevent problems with accidental use of stale 3738b41dabSmrgcache files. 3838b41dabSmrg 3938b41dabSmrg If you need to do unusual things to compile the package, please try 4038b41dabSmrgto figure out how `configure' could check whether to do them, and mail 4138b41dabSmrgdiffs or instructions to the address given in the `README' so they can 4238b41dabSmrgbe considered for the next release. If you are using the cache, and at 4338b41dabSmrgsome point `config.cache' contains results you don't want to keep, you 4438b41dabSmrgmay remove or edit it. 4538b41dabSmrg 4638b41dabSmrg The file `configure.ac' (or `configure.in') is used to create 4738b41dabSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 4838b41dabSmrgyou want to change it or regenerate `configure' using a newer version 4938b41dabSmrgof `autoconf'. 5038b41dabSmrg 5138b41dabSmrg The simplest way to compile this package is: 5238b41dabSmrg 5338b41dabSmrg 1. `cd' to the directory containing the package's source code and type 5438b41dabSmrg `./configure' to configure the package for your system. 5538b41dabSmrg 5638b41dabSmrg Running `configure' might take a while. While running, it prints 5738b41dabSmrg some messages telling which features it is checking for. 5838b41dabSmrg 5938b41dabSmrg 2. Type `make' to compile the package. 6038b41dabSmrg 6138b41dabSmrg 3. Optionally, type `make check' to run any self-tests that come with 6238b41dabSmrg the package, generally using the just-built uninstalled binaries. 6338b41dabSmrg 6438b41dabSmrg 4. Type `make install' to install the programs and any data files and 6538b41dabSmrg documentation. When installing into a prefix owned by root, it is 6638b41dabSmrg recommended that the package be configured and built as a regular 6738b41dabSmrg user, and only the `make install' phase executed with root 6838b41dabSmrg privileges. 6938b41dabSmrg 7038b41dabSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 7138b41dabSmrg this time using the binaries in their final installed location. 7238b41dabSmrg This target does not install anything. Running this target as a 7338b41dabSmrg regular user, particularly if the prior `make install' required 7438b41dabSmrg root privileges, verifies that the installation completed 7538b41dabSmrg correctly. 7638b41dabSmrg 7738b41dabSmrg 6. You can remove the program binaries and object files from the 7838b41dabSmrg source code directory by typing `make clean'. To also remove the 7938b41dabSmrg files that `configure' created (so you can compile the package for 8038b41dabSmrg a different kind of computer), type `make distclean'. There is 8138b41dabSmrg also a `make maintainer-clean' target, but that is intended mainly 8238b41dabSmrg for the package's developers. If you use it, you may have to get 8338b41dabSmrg all sorts of other programs in order to regenerate files that came 8438b41dabSmrg with the distribution. 8538b41dabSmrg 8638b41dabSmrg 7. Often, you can also type `make uninstall' to remove the installed 8738b41dabSmrg files again. In practice, not all packages have tested that 8838b41dabSmrg uninstallation works correctly, even though it is required by the 8938b41dabSmrg GNU Coding Standards. 9038b41dabSmrg 9138b41dabSmrg 8. Some packages, particularly those that use Automake, provide `make 9238b41dabSmrg distcheck', which can by used by developers to test that all other 9338b41dabSmrg targets like `make install' and `make uninstall' work correctly. 9438b41dabSmrg This target is generally not run by end users. 9538b41dabSmrg 9638b41dabSmrgCompilers and Options 9738b41dabSmrg===================== 9838b41dabSmrg 9938b41dabSmrg Some systems require unusual options for compilation or linking that 10038b41dabSmrgthe `configure' script does not know about. Run `./configure --help' 10138b41dabSmrgfor details on some of the pertinent environment variables. 10238b41dabSmrg 10338b41dabSmrg You can give `configure' initial values for configuration parameters 10438b41dabSmrgby setting variables in the command line or in the environment. Here 10538b41dabSmrgis an example: 10638b41dabSmrg 10738b41dabSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 10838b41dabSmrg 10938b41dabSmrg *Note Defining Variables::, for more details. 11038b41dabSmrg 11138b41dabSmrgCompiling For Multiple Architectures 11238b41dabSmrg==================================== 11338b41dabSmrg 11438b41dabSmrg You can compile the package for more than one kind of computer at the 11538b41dabSmrgsame time, by placing the object files for each architecture in their 11638b41dabSmrgown directory. To do this, you can use GNU `make'. `cd' to the 11738b41dabSmrgdirectory where you want the object files and executables to go and run 11838b41dabSmrgthe `configure' script. `configure' automatically checks for the 11938b41dabSmrgsource code in the directory that `configure' is in and in `..'. This 12038b41dabSmrgis known as a "VPATH" build. 12138b41dabSmrg 12238b41dabSmrg With a non-GNU `make', it is safer to compile the package for one 12338b41dabSmrgarchitecture at a time in the source code directory. After you have 12438b41dabSmrginstalled the package for one architecture, use `make distclean' before 12538b41dabSmrgreconfiguring for another architecture. 12638b41dabSmrg 12738b41dabSmrg On MacOS X 10.5 and later systems, you can create libraries and 12838b41dabSmrgexecutables that work on multiple system types--known as "fat" or 12938b41dabSmrg"universal" binaries--by specifying multiple `-arch' options to the 13038b41dabSmrgcompiler but only a single `-arch' option to the preprocessor. Like 13138b41dabSmrgthis: 13238b41dabSmrg 13338b41dabSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13438b41dabSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13538b41dabSmrg CPP="gcc -E" CXXCPP="g++ -E" 13638b41dabSmrg 13738b41dabSmrg This is not guaranteed to produce working output in all cases, you 13838b41dabSmrgmay have to build one architecture at a time and combine the results 13938b41dabSmrgusing the `lipo' tool if you have problems. 14038b41dabSmrg 14138b41dabSmrgInstallation Names 14238b41dabSmrg================== 14338b41dabSmrg 14438b41dabSmrg By default, `make install' installs the package's commands under 14538b41dabSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 14638b41dabSmrgcan specify an installation prefix other than `/usr/local' by giving 14738b41dabSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 14838b41dabSmrgabsolute file name. 14938b41dabSmrg 15038b41dabSmrg You can specify separate installation prefixes for 15138b41dabSmrgarchitecture-specific files and architecture-independent files. If you 15238b41dabSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 15338b41dabSmrgPREFIX as the prefix for installing programs and libraries. 15438b41dabSmrgDocumentation and other data files still use the regular prefix. 15538b41dabSmrg 15638b41dabSmrg In addition, if you use an unusual directory layout you can give 15738b41dabSmrgoptions like `--bindir=DIR' to specify different values for particular 15838b41dabSmrgkinds of files. Run `configure --help' for a list of the directories 15938b41dabSmrgyou can set and what kinds of files go in them. In general, the 16038b41dabSmrgdefault for these options is expressed in terms of `${prefix}', so that 16138b41dabSmrgspecifying just `--prefix' will affect all of the other directory 16238b41dabSmrgspecifications that were not explicitly provided. 16338b41dabSmrg 16438b41dabSmrg The most portable way to affect installation locations is to pass the 16538b41dabSmrgcorrect locations to `configure'; however, many packages provide one or 16638b41dabSmrgboth of the following shortcuts of passing variable assignments to the 16738b41dabSmrg`make install' command line to change installation locations without 16838b41dabSmrghaving to reconfigure or recompile. 16938b41dabSmrg 17038b41dabSmrg The first method involves providing an override variable for each 17138b41dabSmrgaffected directory. For example, `make install 17238b41dabSmrgprefix=/alternate/directory' will choose an alternate location for all 17338b41dabSmrgdirectory configuration variables that were expressed in terms of 17438b41dabSmrg`${prefix}'. Any directories that were specified during `configure', 17538b41dabSmrgbut not in terms of `${prefix}', must each be overridden at install 17638b41dabSmrgtime for the entire installation to be relocated. The approach of 17738b41dabSmrgmakefile variable overrides for each directory variable is required by 17838b41dabSmrgthe GNU Coding Standards, and ideally causes no recompilation. 17938b41dabSmrgHowever, some platforms have known limitations with the semantics of 18038b41dabSmrgshared libraries that end up requiring recompilation when using this 18138b41dabSmrgmethod, particularly noticeable in packages that use GNU Libtool. 18238b41dabSmrg 18338b41dabSmrg The second method involves providing the `DESTDIR' variable. For 18438b41dabSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 18538b41dabSmrg`/alternate/directory' before all installation names. The approach of 18638b41dabSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 18738b41dabSmrgdoes not work on platforms that have drive letters. On the other hand, 18838b41dabSmrgit does better at avoiding recompilation issues, and works well even 18938b41dabSmrgwhen some directory options were not specified in terms of `${prefix}' 19038b41dabSmrgat `configure' time. 19138b41dabSmrg 19238b41dabSmrgOptional Features 19338b41dabSmrg================= 19438b41dabSmrg 19538b41dabSmrg If the package supports it, you can cause programs to be installed 19638b41dabSmrgwith an extra prefix or suffix on their names by giving `configure' the 19738b41dabSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 19838b41dabSmrg 19938b41dabSmrg Some packages pay attention to `--enable-FEATURE' options to 20038b41dabSmrg`configure', where FEATURE indicates an optional part of the package. 20138b41dabSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 20238b41dabSmrgis something like `gnu-as' or `x' (for the X Window System). The 20338b41dabSmrg`README' should mention any `--enable-' and `--with-' options that the 20438b41dabSmrgpackage recognizes. 20538b41dabSmrg 20638b41dabSmrg For packages that use the X Window System, `configure' can usually 20738b41dabSmrgfind the X include and library files automatically, but if it doesn't, 20838b41dabSmrgyou can use the `configure' options `--x-includes=DIR' and 20938b41dabSmrg`--x-libraries=DIR' to specify their locations. 21038b41dabSmrg 21138b41dabSmrg Some packages offer the ability to configure how verbose the 21238b41dabSmrgexecution of `make' will be. For these packages, running `./configure 21338b41dabSmrg--enable-silent-rules' sets the default to minimal output, which can be 21438b41dabSmrgoverridden with `make V=1'; while running `./configure 21538b41dabSmrg--disable-silent-rules' sets the default to verbose, which can be 21638b41dabSmrgoverridden with `make V=0'. 21738b41dabSmrg 21838b41dabSmrgParticular systems 21938b41dabSmrg================== 22038b41dabSmrg 22138b41dabSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 22238b41dabSmrgCC is not installed, it is recommended to use the following options in 22338b41dabSmrgorder to use an ANSI C compiler: 22438b41dabSmrg 22538b41dabSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 22638b41dabSmrg 22738b41dabSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 22838b41dabSmrg 22938b41dabSmrg HP-UX `make' updates targets which have the same time stamps as 23038b41dabSmrgtheir prerequisites, which makes it generally unusable when shipped 23138b41dabSmrggenerated files such as `configure' are involved. Use GNU `make' 23238b41dabSmrginstead. 23338b41dabSmrg 23438b41dabSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 23538b41dabSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 23638b41dabSmrga workaround. If GNU CC is not installed, it is therefore recommended 23738b41dabSmrgto try 23838b41dabSmrg 23938b41dabSmrg ./configure CC="cc" 24038b41dabSmrg 24138b41dabSmrgand if that doesn't work, try 24238b41dabSmrg 24338b41dabSmrg ./configure CC="cc -nodtk" 24438b41dabSmrg 24538b41dabSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 24638b41dabSmrgdirectory contains several dysfunctional programs; working variants of 24738b41dabSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 24838b41dabSmrgin your `PATH', put it _after_ `/usr/bin'. 24938b41dabSmrg 25038b41dabSmrg On Haiku, software installed for all users goes in `/boot/common', 25138b41dabSmrgnot `/usr/local'. It is recommended to use the following options: 25238b41dabSmrg 25338b41dabSmrg ./configure --prefix=/boot/common 25438b41dabSmrg 25538b41dabSmrgSpecifying the System Type 25638b41dabSmrg========================== 25738b41dabSmrg 25838b41dabSmrg There may be some features `configure' cannot figure out 25938b41dabSmrgautomatically, but needs to determine by the type of machine the package 26038b41dabSmrgwill run on. Usually, assuming the package is built to be run on the 26138b41dabSmrg_same_ architectures, `configure' can figure that out, but if it prints 26238b41dabSmrga message saying it cannot guess the machine type, give it the 26338b41dabSmrg`--build=TYPE' option. TYPE can either be a short name for the system 26438b41dabSmrgtype, such as `sun4', or a canonical name which has the form: 26538b41dabSmrg 26638b41dabSmrg CPU-COMPANY-SYSTEM 26738b41dabSmrg 26838b41dabSmrgwhere SYSTEM can have one of these forms: 26938b41dabSmrg 27038b41dabSmrg OS 27138b41dabSmrg KERNEL-OS 27238b41dabSmrg 27338b41dabSmrg See the file `config.sub' for the possible values of each field. If 27438b41dabSmrg`config.sub' isn't included in this package, then this package doesn't 27538b41dabSmrgneed to know the machine type. 27638b41dabSmrg 27738b41dabSmrg If you are _building_ compiler tools for cross-compiling, you should 27838b41dabSmrguse the option `--target=TYPE' to select the type of system they will 27938b41dabSmrgproduce code for. 28038b41dabSmrg 28138b41dabSmrg If you want to _use_ a cross compiler, that generates code for a 28238b41dabSmrgplatform different from the build platform, you should specify the 28338b41dabSmrg"host" platform (i.e., that on which the generated programs will 28438b41dabSmrgeventually be run) with `--host=TYPE'. 28538b41dabSmrg 28638b41dabSmrgSharing Defaults 28738b41dabSmrg================ 28838b41dabSmrg 28938b41dabSmrg If you want to set default values for `configure' scripts to share, 29038b41dabSmrgyou can create a site shell script called `config.site' that gives 29138b41dabSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 29238b41dabSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 29338b41dabSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 29438b41dabSmrg`CONFIG_SITE' environment variable to the location of the site script. 29538b41dabSmrgA warning: not all `configure' scripts look for a site script. 29638b41dabSmrg 29738b41dabSmrgDefining Variables 29838b41dabSmrg================== 29938b41dabSmrg 30038b41dabSmrg Variables not defined in a site shell script can be set in the 30138b41dabSmrgenvironment passed to `configure'. However, some packages may run 30238b41dabSmrgconfigure again during the build, and the customized values of these 30338b41dabSmrgvariables may be lost. In order to avoid this problem, you should set 30438b41dabSmrgthem in the `configure' command line, using `VAR=value'. For example: 30538b41dabSmrg 30638b41dabSmrg ./configure CC=/usr/local2/bin/gcc 30738b41dabSmrg 30838b41dabSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 30938b41dabSmrgoverridden in the site shell script). 31038b41dabSmrg 31138b41dabSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 31238b41dabSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 31338b41dabSmrg 31438b41dabSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 31538b41dabSmrg 31638b41dabSmrg`configure' Invocation 31738b41dabSmrg====================== 31838b41dabSmrg 31938b41dabSmrg `configure' recognizes the following options to control how it 32038b41dabSmrgoperates. 32138b41dabSmrg 32238b41dabSmrg`--help' 32338b41dabSmrg`-h' 32438b41dabSmrg Print a summary of all of the options to `configure', and exit. 32538b41dabSmrg 32638b41dabSmrg`--help=short' 32738b41dabSmrg`--help=recursive' 32838b41dabSmrg Print a summary of the options unique to this package's 32938b41dabSmrg `configure', and exit. The `short' variant lists options used 33038b41dabSmrg only in the top level, while the `recursive' variant lists options 33138b41dabSmrg also present in any nested packages. 33238b41dabSmrg 33338b41dabSmrg`--version' 33438b41dabSmrg`-V' 33538b41dabSmrg Print the version of Autoconf used to generate the `configure' 33638b41dabSmrg script, and exit. 33738b41dabSmrg 33838b41dabSmrg`--cache-file=FILE' 33938b41dabSmrg Enable the cache: use and save the results of the tests in FILE, 34038b41dabSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 34138b41dabSmrg disable caching. 34238b41dabSmrg 34338b41dabSmrg`--config-cache' 34438b41dabSmrg`-C' 34538b41dabSmrg Alias for `--cache-file=config.cache'. 34638b41dabSmrg 34738b41dabSmrg`--quiet' 34838b41dabSmrg`--silent' 34938b41dabSmrg`-q' 35038b41dabSmrg Do not print messages saying which checks are being made. To 35138b41dabSmrg suppress all normal output, redirect it to `/dev/null' (any error 35238b41dabSmrg messages will still be shown). 35338b41dabSmrg 35438b41dabSmrg`--srcdir=DIR' 35538b41dabSmrg Look for the package's source code in directory DIR. Usually 35638b41dabSmrg `configure' can determine that directory automatically. 35738b41dabSmrg 35838b41dabSmrg`--prefix=DIR' 35938b41dabSmrg Use DIR as the installation prefix. *note Installation Names:: 36038b41dabSmrg for more details, including other options available for fine-tuning 36138b41dabSmrg the installation locations. 36238b41dabSmrg 36338b41dabSmrg`--no-create' 36438b41dabSmrg`-n' 36538b41dabSmrg Run the configure checks, but stop before creating any output 36638b41dabSmrg files. 36738b41dabSmrg 36838b41dabSmrg`configure' also accepts some other, not widely useful, options. Run 36938b41dabSmrg`configure --help' for more details. 37038b41dabSmrg 371