INSTALL revision 8f34cbf9
130f8ce46SmrgInstallation Instructions 230f8ce46Smrg************************* 330f8ce46Smrg 48f34cbf9SsnjCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 58f34cbf9SsnjInc. 630f8ce46Smrg 78f34cbf9Ssnj Copying and distribution of this file, with or without modification, 88f34cbf9Ssnjare permitted in any medium without royalty provided the copyright 98f34cbf9Ssnjnotice and this notice are preserved. This file is offered as-is, 108f34cbf9Ssnjwithout warranty of any kind. 1130f8ce46Smrg 1230f8ce46SmrgBasic Installation 1330f8ce46Smrg================== 1430f8ce46Smrg 1530f8ce46Smrg Briefly, the shell commands `./configure; make; make install' should 1630f8ce46Smrgconfigure, build, and install this package. The following 1730f8ce46Smrgmore-detailed instructions are generic; see the `README' file for 188f34cbf9Ssnjinstructions specific to this package. Some packages provide this 198f34cbf9Ssnj`INSTALL' file but do not implement all of the features documented 208f34cbf9Ssnjbelow. The lack of an optional feature in a given package is not 218f34cbf9Ssnjnecessarily a bug. More recommendations for GNU packages can be found 228f34cbf9Ssnjin *note Makefile Conventions: (standards)Makefile Conventions. 2330f8ce46Smrg 2430f8ce46Smrg The `configure' shell script attempts to guess correct values for 2530f8ce46Smrgvarious system-dependent variables used during compilation. It uses 2630f8ce46Smrgthose values to create a `Makefile' in each directory of the package. 2730f8ce46SmrgIt may also create one or more `.h' files containing system-dependent 2830f8ce46Smrgdefinitions. Finally, it creates a shell script `config.status' that 2930f8ce46Smrgyou can run in the future to recreate the current configuration, and a 3030f8ce46Smrgfile `config.log' containing compiler output (useful mainly for 3130f8ce46Smrgdebugging `configure'). 3230f8ce46Smrg 3330f8ce46Smrg It can also use an optional file (typically called `config.cache' 3430f8ce46Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 3530f8ce46Smrgthe results of its tests to speed up reconfiguring. Caching is 3630f8ce46Smrgdisabled by default to prevent problems with accidental use of stale 3730f8ce46Smrgcache files. 3830f8ce46Smrg 3930f8ce46Smrg If you need to do unusual things to compile the package, please try 4030f8ce46Smrgto figure out how `configure' could check whether to do them, and mail 4130f8ce46Smrgdiffs or instructions to the address given in the `README' so they can 4230f8ce46Smrgbe considered for the next release. If you are using the cache, and at 4330f8ce46Smrgsome point `config.cache' contains results you don't want to keep, you 4430f8ce46Smrgmay remove or edit it. 4530f8ce46Smrg 4630f8ce46Smrg The file `configure.ac' (or `configure.in') is used to create 4730f8ce46Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 4830f8ce46Smrgyou want to change it or regenerate `configure' using a newer version 4930f8ce46Smrgof `autoconf'. 5030f8ce46Smrg 518f34cbf9Ssnj The simplest way to compile this package is: 5230f8ce46Smrg 5330f8ce46Smrg 1. `cd' to the directory containing the package's source code and type 5430f8ce46Smrg `./configure' to configure the package for your system. 5530f8ce46Smrg 5630f8ce46Smrg Running `configure' might take a while. While running, it prints 5730f8ce46Smrg some messages telling which features it is checking for. 5830f8ce46Smrg 5930f8ce46Smrg 2. Type `make' to compile the package. 6030f8ce46Smrg 6130f8ce46Smrg 3. Optionally, type `make check' to run any self-tests that come with 628f34cbf9Ssnj the package, generally using the just-built uninstalled binaries. 6330f8ce46Smrg 6430f8ce46Smrg 4. Type `make install' to install the programs and any data files and 658f34cbf9Ssnj documentation. When installing into a prefix owned by root, it is 668f34cbf9Ssnj recommended that the package be configured and built as a regular 678f34cbf9Ssnj user, and only the `make install' phase executed with root 688f34cbf9Ssnj privileges. 698f34cbf9Ssnj 708f34cbf9Ssnj 5. Optionally, type `make installcheck' to repeat any self-tests, but 718f34cbf9Ssnj this time using the binaries in their final installed location. 728f34cbf9Ssnj This target does not install anything. Running this target as a 738f34cbf9Ssnj regular user, particularly if the prior `make install' required 748f34cbf9Ssnj root privileges, verifies that the installation completed 758f34cbf9Ssnj correctly. 768f34cbf9Ssnj 778f34cbf9Ssnj 6. You can remove the program binaries and object files from the 7830f8ce46Smrg source code directory by typing `make clean'. To also remove the 7930f8ce46Smrg files that `configure' created (so you can compile the package for 8030f8ce46Smrg a different kind of computer), type `make distclean'. There is 8130f8ce46Smrg also a `make maintainer-clean' target, but that is intended mainly 8230f8ce46Smrg for the package's developers. If you use it, you may have to get 8330f8ce46Smrg all sorts of other programs in order to regenerate files that came 8430f8ce46Smrg with the distribution. 8530f8ce46Smrg 868f34cbf9Ssnj 7. Often, you can also type `make uninstall' to remove the installed 878f34cbf9Ssnj files again. In practice, not all packages have tested that 888f34cbf9Ssnj uninstallation works correctly, even though it is required by the 898f34cbf9Ssnj GNU Coding Standards. 908f34cbf9Ssnj 918f34cbf9Ssnj 8. Some packages, particularly those that use Automake, provide `make 928f34cbf9Ssnj distcheck', which can by used by developers to test that all other 938f34cbf9Ssnj targets like `make install' and `make uninstall' work correctly. 948f34cbf9Ssnj This target is generally not run by end users. 9530f8ce46Smrg 9630f8ce46SmrgCompilers and Options 9730f8ce46Smrg===================== 9830f8ce46Smrg 9930f8ce46Smrg Some systems require unusual options for compilation or linking that 10030f8ce46Smrgthe `configure' script does not know about. Run `./configure --help' 10130f8ce46Smrgfor details on some of the pertinent environment variables. 10230f8ce46Smrg 10330f8ce46Smrg You can give `configure' initial values for configuration parameters 10430f8ce46Smrgby setting variables in the command line or in the environment. Here 10530f8ce46Smrgis an example: 10630f8ce46Smrg 10730f8ce46Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 10830f8ce46Smrg 10930f8ce46Smrg *Note Defining Variables::, for more details. 11030f8ce46Smrg 11130f8ce46SmrgCompiling For Multiple Architectures 11230f8ce46Smrg==================================== 11330f8ce46Smrg 11430f8ce46Smrg You can compile the package for more than one kind of computer at the 11530f8ce46Smrgsame time, by placing the object files for each architecture in their 11630f8ce46Smrgown directory. To do this, you can use GNU `make'. `cd' to the 11730f8ce46Smrgdirectory where you want the object files and executables to go and run 11830f8ce46Smrgthe `configure' script. `configure' automatically checks for the 1198f34cbf9Ssnjsource code in the directory that `configure' is in and in `..'. This 1208f34cbf9Ssnjis known as a "VPATH" build. 12130f8ce46Smrg 12230f8ce46Smrg With a non-GNU `make', it is safer to compile the package for one 12330f8ce46Smrgarchitecture at a time in the source code directory. After you have 12430f8ce46Smrginstalled the package for one architecture, use `make distclean' before 12530f8ce46Smrgreconfiguring for another architecture. 12630f8ce46Smrg 12730f8ce46Smrg On MacOS X 10.5 and later systems, you can create libraries and 12830f8ce46Smrgexecutables that work on multiple system types--known as "fat" or 12930f8ce46Smrg"universal" binaries--by specifying multiple `-arch' options to the 13030f8ce46Smrgcompiler but only a single `-arch' option to the preprocessor. Like 13130f8ce46Smrgthis: 13230f8ce46Smrg 13330f8ce46Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13430f8ce46Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13530f8ce46Smrg CPP="gcc -E" CXXCPP="g++ -E" 13630f8ce46Smrg 13730f8ce46Smrg This is not guaranteed to produce working output in all cases, you 13830f8ce46Smrgmay have to build one architecture at a time and combine the results 13930f8ce46Smrgusing the `lipo' tool if you have problems. 14030f8ce46Smrg 14130f8ce46SmrgInstallation Names 14230f8ce46Smrg================== 14330f8ce46Smrg 14430f8ce46Smrg By default, `make install' installs the package's commands under 14530f8ce46Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 14630f8ce46Smrgcan specify an installation prefix other than `/usr/local' by giving 1478f34cbf9Ssnj`configure' the option `--prefix=PREFIX', where PREFIX must be an 1488f34cbf9Ssnjabsolute file name. 14930f8ce46Smrg 15030f8ce46Smrg You can specify separate installation prefixes for 15130f8ce46Smrgarchitecture-specific files and architecture-independent files. If you 15230f8ce46Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 15330f8ce46SmrgPREFIX as the prefix for installing programs and libraries. 15430f8ce46SmrgDocumentation and other data files still use the regular prefix. 15530f8ce46Smrg 15630f8ce46Smrg In addition, if you use an unusual directory layout you can give 15730f8ce46Smrgoptions like `--bindir=DIR' to specify different values for particular 15830f8ce46Smrgkinds of files. Run `configure --help' for a list of the directories 1598f34cbf9Ssnjyou can set and what kinds of files go in them. In general, the 1608f34cbf9Ssnjdefault for these options is expressed in terms of `${prefix}', so that 1618f34cbf9Ssnjspecifying just `--prefix' will affect all of the other directory 1628f34cbf9Ssnjspecifications that were not explicitly provided. 1638f34cbf9Ssnj 1648f34cbf9Ssnj The most portable way to affect installation locations is to pass the 1658f34cbf9Ssnjcorrect locations to `configure'; however, many packages provide one or 1668f34cbf9Ssnjboth of the following shortcuts of passing variable assignments to the 1678f34cbf9Ssnj`make install' command line to change installation locations without 1688f34cbf9Ssnjhaving to reconfigure or recompile. 1698f34cbf9Ssnj 1708f34cbf9Ssnj The first method involves providing an override variable for each 1718f34cbf9Ssnjaffected directory. For example, `make install 1728f34cbf9Ssnjprefix=/alternate/directory' will choose an alternate location for all 1738f34cbf9Ssnjdirectory configuration variables that were expressed in terms of 1748f34cbf9Ssnj`${prefix}'. Any directories that were specified during `configure', 1758f34cbf9Ssnjbut not in terms of `${prefix}', must each be overridden at install 1768f34cbf9Ssnjtime for the entire installation to be relocated. The approach of 1778f34cbf9Ssnjmakefile variable overrides for each directory variable is required by 1788f34cbf9Ssnjthe GNU Coding Standards, and ideally causes no recompilation. 1798f34cbf9SsnjHowever, some platforms have known limitations with the semantics of 1808f34cbf9Ssnjshared libraries that end up requiring recompilation when using this 1818f34cbf9Ssnjmethod, particularly noticeable in packages that use GNU Libtool. 1828f34cbf9Ssnj 1838f34cbf9Ssnj The second method involves providing the `DESTDIR' variable. For 1848f34cbf9Ssnjexample, `make install DESTDIR=/alternate/directory' will prepend 1858f34cbf9Ssnj`/alternate/directory' before all installation names. The approach of 1868f34cbf9Ssnj`DESTDIR' overrides is not required by the GNU Coding Standards, and 1878f34cbf9Ssnjdoes not work on platforms that have drive letters. On the other hand, 1888f34cbf9Ssnjit does better at avoiding recompilation issues, and works well even 1898f34cbf9Ssnjwhen some directory options were not specified in terms of `${prefix}' 1908f34cbf9Ssnjat `configure' time. 1918f34cbf9Ssnj 1928f34cbf9SsnjOptional Features 1938f34cbf9Ssnj================= 19430f8ce46Smrg 19530f8ce46Smrg If the package supports it, you can cause programs to be installed 19630f8ce46Smrgwith an extra prefix or suffix on their names by giving `configure' the 19730f8ce46Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 19830f8ce46Smrg 19930f8ce46Smrg Some packages pay attention to `--enable-FEATURE' options to 20030f8ce46Smrg`configure', where FEATURE indicates an optional part of the package. 20130f8ce46SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 20230f8ce46Smrgis something like `gnu-as' or `x' (for the X Window System). The 20330f8ce46Smrg`README' should mention any `--enable-' and `--with-' options that the 20430f8ce46Smrgpackage recognizes. 20530f8ce46Smrg 20630f8ce46Smrg For packages that use the X Window System, `configure' can usually 20730f8ce46Smrgfind the X include and library files automatically, but if it doesn't, 20830f8ce46Smrgyou can use the `configure' options `--x-includes=DIR' and 20930f8ce46Smrg`--x-libraries=DIR' to specify their locations. 21030f8ce46Smrg 2118f34cbf9Ssnj Some packages offer the ability to configure how verbose the 2128f34cbf9Ssnjexecution of `make' will be. For these packages, running `./configure 2138f34cbf9Ssnj--enable-silent-rules' sets the default to minimal output, which can be 2148f34cbf9Ssnjoverridden with `make V=1'; while running `./configure 2158f34cbf9Ssnj--disable-silent-rules' sets the default to verbose, which can be 2168f34cbf9Ssnjoverridden with `make V=0'. 2178f34cbf9Ssnj 21830f8ce46SmrgParticular systems 21930f8ce46Smrg================== 22030f8ce46Smrg 22130f8ce46Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 22230f8ce46SmrgCC is not installed, it is recommended to use the following options in 22330f8ce46Smrgorder to use an ANSI C compiler: 22430f8ce46Smrg 2258f34cbf9Ssnj ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 22630f8ce46Smrg 22730f8ce46Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 22830f8ce46Smrg 2298f34cbf9Ssnj HP-UX `make' updates targets which have the same time stamps as 2308f34cbf9Ssnjtheir prerequisites, which makes it generally unusable when shipped 2318f34cbf9Ssnjgenerated files such as `configure' are involved. Use GNU `make' 2328f34cbf9Ssnjinstead. 2338f34cbf9Ssnj 23430f8ce46Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 23530f8ce46Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 23630f8ce46Smrga workaround. If GNU CC is not installed, it is therefore recommended 23730f8ce46Smrgto try 23830f8ce46Smrg 23930f8ce46Smrg ./configure CC="cc" 24030f8ce46Smrg 24130f8ce46Smrgand if that doesn't work, try 24230f8ce46Smrg 24330f8ce46Smrg ./configure CC="cc -nodtk" 24430f8ce46Smrg 2458f34cbf9Ssnj On Solaris, don't put `/usr/ucb' early in your `PATH'. This 2468f34cbf9Ssnjdirectory contains several dysfunctional programs; working variants of 2478f34cbf9Ssnjthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 2488f34cbf9Ssnjin your `PATH', put it _after_ `/usr/bin'. 2498f34cbf9Ssnj 2508f34cbf9Ssnj On Haiku, software installed for all users goes in `/boot/common', 2518f34cbf9Ssnjnot `/usr/local'. It is recommended to use the following options: 2528f34cbf9Ssnj 2538f34cbf9Ssnj ./configure --prefix=/boot/common 2548f34cbf9Ssnj 25530f8ce46SmrgSpecifying the System Type 25630f8ce46Smrg========================== 25730f8ce46Smrg 25830f8ce46Smrg There may be some features `configure' cannot figure out 25930f8ce46Smrgautomatically, but needs to determine by the type of machine the package 26030f8ce46Smrgwill run on. Usually, assuming the package is built to be run on the 26130f8ce46Smrg_same_ architectures, `configure' can figure that out, but if it prints 26230f8ce46Smrga message saying it cannot guess the machine type, give it the 26330f8ce46Smrg`--build=TYPE' option. TYPE can either be a short name for the system 26430f8ce46Smrgtype, such as `sun4', or a canonical name which has the form: 26530f8ce46Smrg 26630f8ce46Smrg CPU-COMPANY-SYSTEM 26730f8ce46Smrg 26830f8ce46Smrgwhere SYSTEM can have one of these forms: 26930f8ce46Smrg 2708f34cbf9Ssnj OS 2718f34cbf9Ssnj KERNEL-OS 27230f8ce46Smrg 27330f8ce46Smrg See the file `config.sub' for the possible values of each field. If 27430f8ce46Smrg`config.sub' isn't included in this package, then this package doesn't 27530f8ce46Smrgneed to know the machine type. 27630f8ce46Smrg 27730f8ce46Smrg If you are _building_ compiler tools for cross-compiling, you should 27830f8ce46Smrguse the option `--target=TYPE' to select the type of system they will 27930f8ce46Smrgproduce code for. 28030f8ce46Smrg 28130f8ce46Smrg If you want to _use_ a cross compiler, that generates code for a 28230f8ce46Smrgplatform different from the build platform, you should specify the 28330f8ce46Smrg"host" platform (i.e., that on which the generated programs will 28430f8ce46Smrgeventually be run) with `--host=TYPE'. 28530f8ce46Smrg 28630f8ce46SmrgSharing Defaults 28730f8ce46Smrg================ 28830f8ce46Smrg 28930f8ce46Smrg If you want to set default values for `configure' scripts to share, 29030f8ce46Smrgyou can create a site shell script called `config.site' that gives 29130f8ce46Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 29230f8ce46Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 29330f8ce46Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 29430f8ce46Smrg`CONFIG_SITE' environment variable to the location of the site script. 29530f8ce46SmrgA warning: not all `configure' scripts look for a site script. 29630f8ce46Smrg 29730f8ce46SmrgDefining Variables 29830f8ce46Smrg================== 29930f8ce46Smrg 30030f8ce46Smrg Variables not defined in a site shell script can be set in the 30130f8ce46Smrgenvironment passed to `configure'. However, some packages may run 30230f8ce46Smrgconfigure again during the build, and the customized values of these 30330f8ce46Smrgvariables may be lost. In order to avoid this problem, you should set 30430f8ce46Smrgthem in the `configure' command line, using `VAR=value'. For example: 30530f8ce46Smrg 30630f8ce46Smrg ./configure CC=/usr/local2/bin/gcc 30730f8ce46Smrg 30830f8ce46Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 30930f8ce46Smrgoverridden in the site shell script). 31030f8ce46Smrg 31130f8ce46SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 31230f8ce46Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 31330f8ce46Smrg 31430f8ce46Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 31530f8ce46Smrg 31630f8ce46Smrg`configure' Invocation 31730f8ce46Smrg====================== 31830f8ce46Smrg 31930f8ce46Smrg `configure' recognizes the following options to control how it 32030f8ce46Smrgoperates. 32130f8ce46Smrg 32230f8ce46Smrg`--help' 32330f8ce46Smrg`-h' 32430f8ce46Smrg Print a summary of all of the options to `configure', and exit. 32530f8ce46Smrg 32630f8ce46Smrg`--help=short' 32730f8ce46Smrg`--help=recursive' 32830f8ce46Smrg Print a summary of the options unique to this package's 32930f8ce46Smrg `configure', and exit. The `short' variant lists options used 33030f8ce46Smrg only in the top level, while the `recursive' variant lists options 33130f8ce46Smrg also present in any nested packages. 33230f8ce46Smrg 33330f8ce46Smrg`--version' 33430f8ce46Smrg`-V' 33530f8ce46Smrg Print the version of Autoconf used to generate the `configure' 33630f8ce46Smrg script, and exit. 33730f8ce46Smrg 33830f8ce46Smrg`--cache-file=FILE' 33930f8ce46Smrg Enable the cache: use and save the results of the tests in FILE, 34030f8ce46Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 34130f8ce46Smrg disable caching. 34230f8ce46Smrg 34330f8ce46Smrg`--config-cache' 34430f8ce46Smrg`-C' 34530f8ce46Smrg Alias for `--cache-file=config.cache'. 34630f8ce46Smrg 34730f8ce46Smrg`--quiet' 34830f8ce46Smrg`--silent' 34930f8ce46Smrg`-q' 35030f8ce46Smrg Do not print messages saying which checks are being made. To 35130f8ce46Smrg suppress all normal output, redirect it to `/dev/null' (any error 35230f8ce46Smrg messages will still be shown). 35330f8ce46Smrg 35430f8ce46Smrg`--srcdir=DIR' 35530f8ce46Smrg Look for the package's source code in directory DIR. Usually 35630f8ce46Smrg `configure' can determine that directory automatically. 35730f8ce46Smrg 35830f8ce46Smrg`--prefix=DIR' 3598f34cbf9Ssnj Use DIR as the installation prefix. *note Installation Names:: 36030f8ce46Smrg for more details, including other options available for fine-tuning 36130f8ce46Smrg the installation locations. 36230f8ce46Smrg 36330f8ce46Smrg`--no-create' 36430f8ce46Smrg`-n' 36530f8ce46Smrg Run the configure checks, but stop before creating any output 36630f8ce46Smrg files. 36730f8ce46Smrg 36830f8ce46Smrg`configure' also accepts some other, not widely useful, options. Run 36930f8ce46Smrg`configure --help' for more details. 37030f8ce46Smrg 371