148e69166SmrgInstallation Instructions 248e69166Smrg************************* 348e69166Smrg 48846b520SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 58846b520SmrgInc. 648e69166Smrg 78846b520Smrg Copying and distribution of this file, with or without modification, 88846b520Smrgare permitted in any medium without royalty provided the copyright 98846b520Smrgnotice and this notice are preserved. This file is offered as-is, 108846b520Smrgwithout warranty of any kind. 1148e69166Smrg 1248e69166SmrgBasic Installation 1348e69166Smrg================== 1448e69166Smrg 1548e69166Smrg Briefly, the shell commands `./configure; make; make install' should 1648e69166Smrgconfigure, build, and install this package. The following 1748e69166Smrgmore-detailed instructions are generic; see the `README' file for 188846b520Smrginstructions specific to this package. Some packages provide this 198846b520Smrg`INSTALL' file but do not implement all of the features documented 208846b520Smrgbelow. The lack of an optional feature in a given package is not 218846b520Smrgnecessarily a bug. More recommendations for GNU packages can be found 228846b520Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 2348e69166Smrg 2448e69166Smrg The `configure' shell script attempts to guess correct values for 2548e69166Smrgvarious system-dependent variables used during compilation. It uses 2648e69166Smrgthose values to create a `Makefile' in each directory of the package. 2748e69166SmrgIt may also create one or more `.h' files containing system-dependent 2848e69166Smrgdefinitions. Finally, it creates a shell script `config.status' that 2948e69166Smrgyou can run in the future to recreate the current configuration, and a 3048e69166Smrgfile `config.log' containing compiler output (useful mainly for 3148e69166Smrgdebugging `configure'). 3248e69166Smrg 3348e69166Smrg It can also use an optional file (typically called `config.cache' 3448e69166Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 3548e69166Smrgthe results of its tests to speed up reconfiguring. Caching is 3648e69166Smrgdisabled by default to prevent problems with accidental use of stale 3748e69166Smrgcache files. 3848e69166Smrg 3948e69166Smrg If you need to do unusual things to compile the package, please try 4048e69166Smrgto figure out how `configure' could check whether to do them, and mail 4148e69166Smrgdiffs or instructions to the address given in the `README' so they can 4248e69166Smrgbe considered for the next release. If you are using the cache, and at 4348e69166Smrgsome point `config.cache' contains results you don't want to keep, you 4448e69166Smrgmay remove or edit it. 4548e69166Smrg 4648e69166Smrg The file `configure.ac' (or `configure.in') is used to create 4748e69166Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 4848e69166Smrgyou want to change it or regenerate `configure' using a newer version 4948e69166Smrgof `autoconf'. 5048e69166Smrg 518846b520Smrg The simplest way to compile this package is: 5248e69166Smrg 5348e69166Smrg 1. `cd' to the directory containing the package's source code and type 5448e69166Smrg `./configure' to configure the package for your system. 5548e69166Smrg 5648e69166Smrg Running `configure' might take a while. While running, it prints 5748e69166Smrg some messages telling which features it is checking for. 5848e69166Smrg 5948e69166Smrg 2. Type `make' to compile the package. 6048e69166Smrg 6148e69166Smrg 3. Optionally, type `make check' to run any self-tests that come with 628846b520Smrg the package, generally using the just-built uninstalled binaries. 6348e69166Smrg 6448e69166Smrg 4. Type `make install' to install the programs and any data files and 658846b520Smrg documentation. When installing into a prefix owned by root, it is 668846b520Smrg recommended that the package be configured and built as a regular 678846b520Smrg user, and only the `make install' phase executed with root 688846b520Smrg privileges. 698846b520Smrg 708846b520Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 718846b520Smrg this time using the binaries in their final installed location. 728846b520Smrg This target does not install anything. Running this target as a 738846b520Smrg regular user, particularly if the prior `make install' required 748846b520Smrg root privileges, verifies that the installation completed 758846b520Smrg correctly. 768846b520Smrg 778846b520Smrg 6. You can remove the program binaries and object files from the 7848e69166Smrg source code directory by typing `make clean'. To also remove the 7948e69166Smrg files that `configure' created (so you can compile the package for 8048e69166Smrg a different kind of computer), type `make distclean'. There is 8148e69166Smrg also a `make maintainer-clean' target, but that is intended mainly 8248e69166Smrg for the package's developers. If you use it, you may have to get 8348e69166Smrg all sorts of other programs in order to regenerate files that came 8448e69166Smrg with the distribution. 8548e69166Smrg 868846b520Smrg 7. Often, you can also type `make uninstall' to remove the installed 878846b520Smrg files again. In practice, not all packages have tested that 888846b520Smrg uninstallation works correctly, even though it is required by the 898846b520Smrg GNU Coding Standards. 908846b520Smrg 918846b520Smrg 8. Some packages, particularly those that use Automake, provide `make 928846b520Smrg distcheck', which can by used by developers to test that all other 938846b520Smrg targets like `make install' and `make uninstall' work correctly. 948846b520Smrg This target is generally not run by end users. 9548e69166Smrg 9648e69166SmrgCompilers and Options 9748e69166Smrg===================== 9848e69166Smrg 9948e69166Smrg Some systems require unusual options for compilation or linking that 10048e69166Smrgthe `configure' script does not know about. Run `./configure --help' 10148e69166Smrgfor details on some of the pertinent environment variables. 10248e69166Smrg 10348e69166Smrg You can give `configure' initial values for configuration parameters 10448e69166Smrgby setting variables in the command line or in the environment. Here 10548e69166Smrgis an example: 10648e69166Smrg 10748e69166Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 10848e69166Smrg 10948e69166Smrg *Note Defining Variables::, for more details. 11048e69166Smrg 11148e69166SmrgCompiling For Multiple Architectures 11248e69166Smrg==================================== 11348e69166Smrg 11448e69166Smrg You can compile the package for more than one kind of computer at the 11548e69166Smrgsame time, by placing the object files for each architecture in their 11648e69166Smrgown directory. To do this, you can use GNU `make'. `cd' to the 11748e69166Smrgdirectory where you want the object files and executables to go and run 11848e69166Smrgthe `configure' script. `configure' automatically checks for the 1198846b520Smrgsource code in the directory that `configure' is in and in `..'. This 1208846b520Smrgis known as a "VPATH" build. 12148e69166Smrg 12248e69166Smrg With a non-GNU `make', it is safer to compile the package for one 12348e69166Smrgarchitecture at a time in the source code directory. After you have 12448e69166Smrginstalled the package for one architecture, use `make distclean' before 12548e69166Smrgreconfiguring for another architecture. 12648e69166Smrg 12748e69166Smrg On MacOS X 10.5 and later systems, you can create libraries and 12848e69166Smrgexecutables that work on multiple system types--known as "fat" or 12948e69166Smrg"universal" binaries--by specifying multiple `-arch' options to the 13048e69166Smrgcompiler but only a single `-arch' option to the preprocessor. Like 13148e69166Smrgthis: 13248e69166Smrg 13348e69166Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13448e69166Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13548e69166Smrg CPP="gcc -E" CXXCPP="g++ -E" 13648e69166Smrg 13748e69166Smrg This is not guaranteed to produce working output in all cases, you 13848e69166Smrgmay have to build one architecture at a time and combine the results 13948e69166Smrgusing the `lipo' tool if you have problems. 14048e69166Smrg 14148e69166SmrgInstallation Names 14248e69166Smrg================== 14348e69166Smrg 14448e69166Smrg By default, `make install' installs the package's commands under 14548e69166Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 14648e69166Smrgcan specify an installation prefix other than `/usr/local' by giving 1478846b520Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 1488846b520Smrgabsolute file name. 14948e69166Smrg 15048e69166Smrg You can specify separate installation prefixes for 15148e69166Smrgarchitecture-specific files and architecture-independent files. If you 15248e69166Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 15348e69166SmrgPREFIX as the prefix for installing programs and libraries. 15448e69166SmrgDocumentation and other data files still use the regular prefix. 15548e69166Smrg 15648e69166Smrg In addition, if you use an unusual directory layout you can give 15748e69166Smrgoptions like `--bindir=DIR' to specify different values for particular 15848e69166Smrgkinds of files. Run `configure --help' for a list of the directories 1598846b520Smrgyou can set and what kinds of files go in them. In general, the 1608846b520Smrgdefault for these options is expressed in terms of `${prefix}', so that 1618846b520Smrgspecifying just `--prefix' will affect all of the other directory 1628846b520Smrgspecifications that were not explicitly provided. 1638846b520Smrg 1648846b520Smrg The most portable way to affect installation locations is to pass the 1658846b520Smrgcorrect locations to `configure'; however, many packages provide one or 1668846b520Smrgboth of the following shortcuts of passing variable assignments to the 1678846b520Smrg`make install' command line to change installation locations without 1688846b520Smrghaving to reconfigure or recompile. 1698846b520Smrg 1708846b520Smrg The first method involves providing an override variable for each 1718846b520Smrgaffected directory. For example, `make install 1728846b520Smrgprefix=/alternate/directory' will choose an alternate location for all 1738846b520Smrgdirectory configuration variables that were expressed in terms of 1748846b520Smrg`${prefix}'. Any directories that were specified during `configure', 1758846b520Smrgbut not in terms of `${prefix}', must each be overridden at install 1768846b520Smrgtime for the entire installation to be relocated. The approach of 1778846b520Smrgmakefile variable overrides for each directory variable is required by 1788846b520Smrgthe GNU Coding Standards, and ideally causes no recompilation. 1798846b520SmrgHowever, some platforms have known limitations with the semantics of 1808846b520Smrgshared libraries that end up requiring recompilation when using this 1818846b520Smrgmethod, particularly noticeable in packages that use GNU Libtool. 1828846b520Smrg 1838846b520Smrg The second method involves providing the `DESTDIR' variable. For 1848846b520Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 1858846b520Smrg`/alternate/directory' before all installation names. The approach of 1868846b520Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 1878846b520Smrgdoes not work on platforms that have drive letters. On the other hand, 1888846b520Smrgit does better at avoiding recompilation issues, and works well even 1898846b520Smrgwhen some directory options were not specified in terms of `${prefix}' 1908846b520Smrgat `configure' time. 1918846b520Smrg 1928846b520SmrgOptional Features 1938846b520Smrg================= 19448e69166Smrg 19548e69166Smrg If the package supports it, you can cause programs to be installed 19648e69166Smrgwith an extra prefix or suffix on their names by giving `configure' the 19748e69166Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 19848e69166Smrg 19948e69166Smrg Some packages pay attention to `--enable-FEATURE' options to 20048e69166Smrg`configure', where FEATURE indicates an optional part of the package. 20148e69166SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 20248e69166Smrgis something like `gnu-as' or `x' (for the X Window System). The 20348e69166Smrg`README' should mention any `--enable-' and `--with-' options that the 20448e69166Smrgpackage recognizes. 20548e69166Smrg 20648e69166Smrg For packages that use the X Window System, `configure' can usually 20748e69166Smrgfind the X include and library files automatically, but if it doesn't, 20848e69166Smrgyou can use the `configure' options `--x-includes=DIR' and 20948e69166Smrg`--x-libraries=DIR' to specify their locations. 21048e69166Smrg 2118846b520Smrg Some packages offer the ability to configure how verbose the 2128846b520Smrgexecution of `make' will be. For these packages, running `./configure 2138846b520Smrg--enable-silent-rules' sets the default to minimal output, which can be 2148846b520Smrgoverridden with `make V=1'; while running `./configure 2158846b520Smrg--disable-silent-rules' sets the default to verbose, which can be 2168846b520Smrgoverridden with `make V=0'. 2178846b520Smrg 21848e69166SmrgParticular systems 21948e69166Smrg================== 22048e69166Smrg 22148e69166Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 22248e69166SmrgCC is not installed, it is recommended to use the following options in 22348e69166Smrgorder to use an ANSI C compiler: 22448e69166Smrg 2258846b520Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 22648e69166Smrg 22748e69166Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 22848e69166Smrg 2298846b520Smrg HP-UX `make' updates targets which have the same time stamps as 2308846b520Smrgtheir prerequisites, which makes it generally unusable when shipped 2318846b520Smrggenerated files such as `configure' are involved. Use GNU `make' 2328846b520Smrginstead. 2338846b520Smrg 23448e69166Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 23548e69166Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 23648e69166Smrga workaround. If GNU CC is not installed, it is therefore recommended 23748e69166Smrgto try 23848e69166Smrg 23948e69166Smrg ./configure CC="cc" 24048e69166Smrg 24148e69166Smrgand if that doesn't work, try 24248e69166Smrg 24348e69166Smrg ./configure CC="cc -nodtk" 24448e69166Smrg 2458846b520Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 2468846b520Smrgdirectory contains several dysfunctional programs; working variants of 2478846b520Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 2488846b520Smrgin your `PATH', put it _after_ `/usr/bin'. 2498846b520Smrg 2508846b520Smrg On Haiku, software installed for all users goes in `/boot/common', 2518846b520Smrgnot `/usr/local'. It is recommended to use the following options: 2528846b520Smrg 2538846b520Smrg ./configure --prefix=/boot/common 2548846b520Smrg 25548e69166SmrgSpecifying the System Type 25648e69166Smrg========================== 25748e69166Smrg 25848e69166Smrg There may be some features `configure' cannot figure out 25948e69166Smrgautomatically, but needs to determine by the type of machine the package 26048e69166Smrgwill run on. Usually, assuming the package is built to be run on the 26148e69166Smrg_same_ architectures, `configure' can figure that out, but if it prints 26248e69166Smrga message saying it cannot guess the machine type, give it the 26348e69166Smrg`--build=TYPE' option. TYPE can either be a short name for the system 26448e69166Smrgtype, such as `sun4', or a canonical name which has the form: 26548e69166Smrg 26648e69166Smrg CPU-COMPANY-SYSTEM 26748e69166Smrg 26848e69166Smrgwhere SYSTEM can have one of these forms: 26948e69166Smrg 2708846b520Smrg OS 2718846b520Smrg KERNEL-OS 27248e69166Smrg 27348e69166Smrg See the file `config.sub' for the possible values of each field. If 27448e69166Smrg`config.sub' isn't included in this package, then this package doesn't 27548e69166Smrgneed to know the machine type. 27648e69166Smrg 27748e69166Smrg If you are _building_ compiler tools for cross-compiling, you should 27848e69166Smrguse the option `--target=TYPE' to select the type of system they will 27948e69166Smrgproduce code for. 28048e69166Smrg 28148e69166Smrg If you want to _use_ a cross compiler, that generates code for a 28248e69166Smrgplatform different from the build platform, you should specify the 28348e69166Smrg"host" platform (i.e., that on which the generated programs will 28448e69166Smrgeventually be run) with `--host=TYPE'. 28548e69166Smrg 28648e69166SmrgSharing Defaults 28748e69166Smrg================ 28848e69166Smrg 28948e69166Smrg If you want to set default values for `configure' scripts to share, 29048e69166Smrgyou can create a site shell script called `config.site' that gives 29148e69166Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 29248e69166Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 29348e69166Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 29448e69166Smrg`CONFIG_SITE' environment variable to the location of the site script. 29548e69166SmrgA warning: not all `configure' scripts look for a site script. 29648e69166Smrg 29748e69166SmrgDefining Variables 29848e69166Smrg================== 29948e69166Smrg 30048e69166Smrg Variables not defined in a site shell script can be set in the 30148e69166Smrgenvironment passed to `configure'. However, some packages may run 30248e69166Smrgconfigure again during the build, and the customized values of these 30348e69166Smrgvariables may be lost. In order to avoid this problem, you should set 30448e69166Smrgthem in the `configure' command line, using `VAR=value'. For example: 30548e69166Smrg 30648e69166Smrg ./configure CC=/usr/local2/bin/gcc 30748e69166Smrg 30848e69166Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 30948e69166Smrgoverridden in the site shell script). 31048e69166Smrg 31148e69166SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 31248e69166Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 31348e69166Smrg 31448e69166Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 31548e69166Smrg 31648e69166Smrg`configure' Invocation 31748e69166Smrg====================== 31848e69166Smrg 31948e69166Smrg `configure' recognizes the following options to control how it 32048e69166Smrgoperates. 32148e69166Smrg 32248e69166Smrg`--help' 32348e69166Smrg`-h' 32448e69166Smrg Print a summary of all of the options to `configure', and exit. 32548e69166Smrg 32648e69166Smrg`--help=short' 32748e69166Smrg`--help=recursive' 32848e69166Smrg Print a summary of the options unique to this package's 32948e69166Smrg `configure', and exit. The `short' variant lists options used 33048e69166Smrg only in the top level, while the `recursive' variant lists options 33148e69166Smrg also present in any nested packages. 33248e69166Smrg 33348e69166Smrg`--version' 33448e69166Smrg`-V' 33548e69166Smrg Print the version of Autoconf used to generate the `configure' 33648e69166Smrg script, and exit. 33748e69166Smrg 33848e69166Smrg`--cache-file=FILE' 33948e69166Smrg Enable the cache: use and save the results of the tests in FILE, 34048e69166Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 34148e69166Smrg disable caching. 34248e69166Smrg 34348e69166Smrg`--config-cache' 34448e69166Smrg`-C' 34548e69166Smrg Alias for `--cache-file=config.cache'. 34648e69166Smrg 34748e69166Smrg`--quiet' 34848e69166Smrg`--silent' 34948e69166Smrg`-q' 35048e69166Smrg Do not print messages saying which checks are being made. To 35148e69166Smrg suppress all normal output, redirect it to `/dev/null' (any error 35248e69166Smrg messages will still be shown). 35348e69166Smrg 35448e69166Smrg`--srcdir=DIR' 35548e69166Smrg Look for the package's source code in directory DIR. Usually 35648e69166Smrg `configure' can determine that directory automatically. 35748e69166Smrg 35848e69166Smrg`--prefix=DIR' 3598846b520Smrg Use DIR as the installation prefix. *note Installation Names:: 36048e69166Smrg for more details, including other options available for fine-tuning 36148e69166Smrg the installation locations. 36248e69166Smrg 36348e69166Smrg`--no-create' 36448e69166Smrg`-n' 36548e69166Smrg Run the configure checks, but stop before creating any output 36648e69166Smrg files. 36748e69166Smrg 36848e69166Smrg`configure' also accepts some other, not widely useful, options. Run 36948e69166Smrg`configure --help' for more details. 37048e69166Smrg 371