INSTALL revision 7591dea4
13a67387eSmrgInstallation Instructions 23a67387eSmrg************************* 33a67387eSmrg 47591dea4SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 57591dea4SmrgInc. 63a67387eSmrg 77591dea4Smrg Copying and distribution of this file, with or without modification, 87591dea4Smrgare permitted in any medium without royalty provided the copyright 97591dea4Smrgnotice and this notice are preserved. This file is offered as-is, 107591dea4Smrgwithout warranty of any kind. 113a67387eSmrg 123a67387eSmrgBasic Installation 133a67387eSmrg================== 143a67387eSmrg 153a67387eSmrg Briefly, the shell commands `./configure; make; make install' should 163a67387eSmrgconfigure, build, and install this package. The following 173a67387eSmrgmore-detailed instructions are generic; see the `README' file for 187591dea4Smrginstructions specific to this package. Some packages provide this 197591dea4Smrg`INSTALL' file but do not implement all of the features documented 207591dea4Smrgbelow. The lack of an optional feature in a given package is not 217591dea4Smrgnecessarily a bug. More recommendations for GNU packages can be found 227591dea4Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 233a67387eSmrg 243a67387eSmrg The `configure' shell script attempts to guess correct values for 253a67387eSmrgvarious system-dependent variables used during compilation. It uses 263a67387eSmrgthose values to create a `Makefile' in each directory of the package. 273a67387eSmrgIt may also create one or more `.h' files containing system-dependent 283a67387eSmrgdefinitions. Finally, it creates a shell script `config.status' that 293a67387eSmrgyou can run in the future to recreate the current configuration, and a 303a67387eSmrgfile `config.log' containing compiler output (useful mainly for 313a67387eSmrgdebugging `configure'). 323a67387eSmrg 333a67387eSmrg It can also use an optional file (typically called `config.cache' 343a67387eSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 353a67387eSmrgthe results of its tests to speed up reconfiguring. Caching is 363a67387eSmrgdisabled by default to prevent problems with accidental use of stale 373a67387eSmrgcache files. 383a67387eSmrg 393a67387eSmrg If you need to do unusual things to compile the package, please try 403a67387eSmrgto figure out how `configure' could check whether to do them, and mail 413a67387eSmrgdiffs or instructions to the address given in the `README' so they can 423a67387eSmrgbe considered for the next release. If you are using the cache, and at 433a67387eSmrgsome point `config.cache' contains results you don't want to keep, you 443a67387eSmrgmay remove or edit it. 453a67387eSmrg 463a67387eSmrg The file `configure.ac' (or `configure.in') is used to create 473a67387eSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 483a67387eSmrgyou want to change it or regenerate `configure' using a newer version 493a67387eSmrgof `autoconf'. 503a67387eSmrg 517591dea4Smrg The simplest way to compile this package is: 523a67387eSmrg 533a67387eSmrg 1. `cd' to the directory containing the package's source code and type 543a67387eSmrg `./configure' to configure the package for your system. 553a67387eSmrg 563a67387eSmrg Running `configure' might take a while. While running, it prints 573a67387eSmrg some messages telling which features it is checking for. 583a67387eSmrg 593a67387eSmrg 2. Type `make' to compile the package. 603a67387eSmrg 613a67387eSmrg 3. Optionally, type `make check' to run any self-tests that come with 627591dea4Smrg the package, generally using the just-built uninstalled binaries. 633a67387eSmrg 643a67387eSmrg 4. Type `make install' to install the programs and any data files and 657591dea4Smrg documentation. When installing into a prefix owned by root, it is 667591dea4Smrg recommended that the package be configured and built as a regular 677591dea4Smrg user, and only the `make install' phase executed with root 687591dea4Smrg privileges. 697591dea4Smrg 707591dea4Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 717591dea4Smrg this time using the binaries in their final installed location. 727591dea4Smrg This target does not install anything. Running this target as a 737591dea4Smrg regular user, particularly if the prior `make install' required 747591dea4Smrg root privileges, verifies that the installation completed 757591dea4Smrg correctly. 767591dea4Smrg 777591dea4Smrg 6. You can remove the program binaries and object files from the 783a67387eSmrg source code directory by typing `make clean'. To also remove the 793a67387eSmrg files that `configure' created (so you can compile the package for 803a67387eSmrg a different kind of computer), type `make distclean'. There is 813a67387eSmrg also a `make maintainer-clean' target, but that is intended mainly 823a67387eSmrg for the package's developers. If you use it, you may have to get 833a67387eSmrg all sorts of other programs in order to regenerate files that came 843a67387eSmrg with the distribution. 853a67387eSmrg 867591dea4Smrg 7. Often, you can also type `make uninstall' to remove the installed 877591dea4Smrg files again. In practice, not all packages have tested that 887591dea4Smrg uninstallation works correctly, even though it is required by the 897591dea4Smrg GNU Coding Standards. 907591dea4Smrg 917591dea4Smrg 8. Some packages, particularly those that use Automake, provide `make 927591dea4Smrg distcheck', which can by used by developers to test that all other 937591dea4Smrg targets like `make install' and `make uninstall' work correctly. 947591dea4Smrg This target is generally not run by end users. 953a67387eSmrg 963a67387eSmrgCompilers and Options 973a67387eSmrg===================== 983a67387eSmrg 993a67387eSmrg Some systems require unusual options for compilation or linking that 1003a67387eSmrgthe `configure' script does not know about. Run `./configure --help' 1013a67387eSmrgfor details on some of the pertinent environment variables. 1023a67387eSmrg 1033a67387eSmrg You can give `configure' initial values for configuration parameters 1043a67387eSmrgby setting variables in the command line or in the environment. Here 1053a67387eSmrgis an example: 1063a67387eSmrg 1073a67387eSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 1083a67387eSmrg 1093a67387eSmrg *Note Defining Variables::, for more details. 1103a67387eSmrg 1113a67387eSmrgCompiling For Multiple Architectures 1123a67387eSmrg==================================== 1133a67387eSmrg 1143a67387eSmrg You can compile the package for more than one kind of computer at the 1153a67387eSmrgsame time, by placing the object files for each architecture in their 1163a67387eSmrgown directory. To do this, you can use GNU `make'. `cd' to the 1173a67387eSmrgdirectory where you want the object files and executables to go and run 1183a67387eSmrgthe `configure' script. `configure' automatically checks for the 1197591dea4Smrgsource code in the directory that `configure' is in and in `..'. This 1207591dea4Smrgis known as a "VPATH" build. 1213a67387eSmrg 1223a67387eSmrg With a non-GNU `make', it is safer to compile the package for one 1233a67387eSmrgarchitecture at a time in the source code directory. After you have 1243a67387eSmrginstalled the package for one architecture, use `make distclean' before 1253a67387eSmrgreconfiguring for another architecture. 1263a67387eSmrg 1273a67387eSmrg On MacOS X 10.5 and later systems, you can create libraries and 1283a67387eSmrgexecutables that work on multiple system types--known as "fat" or 1293a67387eSmrg"universal" binaries--by specifying multiple `-arch' options to the 1303a67387eSmrgcompiler but only a single `-arch' option to the preprocessor. Like 1313a67387eSmrgthis: 1323a67387eSmrg 1333a67387eSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1343a67387eSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1353a67387eSmrg CPP="gcc -E" CXXCPP="g++ -E" 1363a67387eSmrg 1373a67387eSmrg This is not guaranteed to produce working output in all cases, you 1383a67387eSmrgmay have to build one architecture at a time and combine the results 1393a67387eSmrgusing the `lipo' tool if you have problems. 1403a67387eSmrg 1413a67387eSmrgInstallation Names 1423a67387eSmrg================== 1433a67387eSmrg 1443a67387eSmrg By default, `make install' installs the package's commands under 1453a67387eSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1463a67387eSmrgcan specify an installation prefix other than `/usr/local' by giving 1477591dea4Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 1487591dea4Smrgabsolute file name. 1493a67387eSmrg 1503a67387eSmrg You can specify separate installation prefixes for 1513a67387eSmrgarchitecture-specific files and architecture-independent files. If you 1523a67387eSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1533a67387eSmrgPREFIX as the prefix for installing programs and libraries. 1543a67387eSmrgDocumentation and other data files still use the regular prefix. 1553a67387eSmrg 1563a67387eSmrg In addition, if you use an unusual directory layout you can give 1573a67387eSmrgoptions like `--bindir=DIR' to specify different values for particular 1583a67387eSmrgkinds of files. Run `configure --help' for a list of the directories 1597591dea4Smrgyou can set and what kinds of files go in them. In general, the 1607591dea4Smrgdefault for these options is expressed in terms of `${prefix}', so that 1617591dea4Smrgspecifying just `--prefix' will affect all of the other directory 1627591dea4Smrgspecifications that were not explicitly provided. 1637591dea4Smrg 1647591dea4Smrg The most portable way to affect installation locations is to pass the 1657591dea4Smrgcorrect locations to `configure'; however, many packages provide one or 1667591dea4Smrgboth of the following shortcuts of passing variable assignments to the 1677591dea4Smrg`make install' command line to change installation locations without 1687591dea4Smrghaving to reconfigure or recompile. 1697591dea4Smrg 1707591dea4Smrg The first method involves providing an override variable for each 1717591dea4Smrgaffected directory. For example, `make install 1727591dea4Smrgprefix=/alternate/directory' will choose an alternate location for all 1737591dea4Smrgdirectory configuration variables that were expressed in terms of 1747591dea4Smrg`${prefix}'. Any directories that were specified during `configure', 1757591dea4Smrgbut not in terms of `${prefix}', must each be overridden at install 1767591dea4Smrgtime for the entire installation to be relocated. The approach of 1777591dea4Smrgmakefile variable overrides for each directory variable is required by 1787591dea4Smrgthe GNU Coding Standards, and ideally causes no recompilation. 1797591dea4SmrgHowever, some platforms have known limitations with the semantics of 1807591dea4Smrgshared libraries that end up requiring recompilation when using this 1817591dea4Smrgmethod, particularly noticeable in packages that use GNU Libtool. 1827591dea4Smrg 1837591dea4Smrg The second method involves providing the `DESTDIR' variable. For 1847591dea4Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 1857591dea4Smrg`/alternate/directory' before all installation names. The approach of 1867591dea4Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 1877591dea4Smrgdoes not work on platforms that have drive letters. On the other hand, 1887591dea4Smrgit does better at avoiding recompilation issues, and works well even 1897591dea4Smrgwhen some directory options were not specified in terms of `${prefix}' 1907591dea4Smrgat `configure' time. 1917591dea4Smrg 1927591dea4SmrgOptional Features 1937591dea4Smrg================= 1943a67387eSmrg 1953a67387eSmrg If the package supports it, you can cause programs to be installed 1963a67387eSmrgwith an extra prefix or suffix on their names by giving `configure' the 1973a67387eSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1983a67387eSmrg 1993a67387eSmrg Some packages pay attention to `--enable-FEATURE' options to 2003a67387eSmrg`configure', where FEATURE indicates an optional part of the package. 2013a67387eSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 2023a67387eSmrgis something like `gnu-as' or `x' (for the X Window System). The 2033a67387eSmrg`README' should mention any `--enable-' and `--with-' options that the 2043a67387eSmrgpackage recognizes. 2053a67387eSmrg 2063a67387eSmrg For packages that use the X Window System, `configure' can usually 2073a67387eSmrgfind the X include and library files automatically, but if it doesn't, 2083a67387eSmrgyou can use the `configure' options `--x-includes=DIR' and 2093a67387eSmrg`--x-libraries=DIR' to specify their locations. 2103a67387eSmrg 2117591dea4Smrg Some packages offer the ability to configure how verbose the 2127591dea4Smrgexecution of `make' will be. For these packages, running `./configure 2137591dea4Smrg--enable-silent-rules' sets the default to minimal output, which can be 2147591dea4Smrgoverridden with `make V=1'; while running `./configure 2157591dea4Smrg--disable-silent-rules' sets the default to verbose, which can be 2167591dea4Smrgoverridden with `make V=0'. 2177591dea4Smrg 2183a67387eSmrgParticular systems 2193a67387eSmrg================== 2203a67387eSmrg 2213a67387eSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 2223a67387eSmrgCC is not installed, it is recommended to use the following options in 2233a67387eSmrgorder to use an ANSI C compiler: 2243a67387eSmrg 2257591dea4Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 2263a67387eSmrg 2273a67387eSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 2283a67387eSmrg 2297591dea4Smrg HP-UX `make' updates targets which have the same time stamps as 2307591dea4Smrgtheir prerequisites, which makes it generally unusable when shipped 2317591dea4Smrggenerated files such as `configure' are involved. Use GNU `make' 2327591dea4Smrginstead. 2337591dea4Smrg 2343a67387eSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 2353a67387eSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 2363a67387eSmrga workaround. If GNU CC is not installed, it is therefore recommended 2373a67387eSmrgto try 2383a67387eSmrg 2393a67387eSmrg ./configure CC="cc" 2403a67387eSmrg 2413a67387eSmrgand if that doesn't work, try 2423a67387eSmrg 2433a67387eSmrg ./configure CC="cc -nodtk" 2443a67387eSmrg 2457591dea4Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 2467591dea4Smrgdirectory contains several dysfunctional programs; working variants of 2477591dea4Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 2487591dea4Smrgin your `PATH', put it _after_ `/usr/bin'. 2497591dea4Smrg 2507591dea4Smrg On Haiku, software installed for all users goes in `/boot/common', 2517591dea4Smrgnot `/usr/local'. It is recommended to use the following options: 2527591dea4Smrg 2537591dea4Smrg ./configure --prefix=/boot/common 2547591dea4Smrg 2553a67387eSmrgSpecifying the System Type 2563a67387eSmrg========================== 2573a67387eSmrg 2583a67387eSmrg There may be some features `configure' cannot figure out 2593a67387eSmrgautomatically, but needs to determine by the type of machine the package 2603a67387eSmrgwill run on. Usually, assuming the package is built to be run on the 2613a67387eSmrg_same_ architectures, `configure' can figure that out, but if it prints 2623a67387eSmrga message saying it cannot guess the machine type, give it the 2633a67387eSmrg`--build=TYPE' option. TYPE can either be a short name for the system 2643a67387eSmrgtype, such as `sun4', or a canonical name which has the form: 2653a67387eSmrg 2663a67387eSmrg CPU-COMPANY-SYSTEM 2673a67387eSmrg 2683a67387eSmrgwhere SYSTEM can have one of these forms: 2693a67387eSmrg 2707591dea4Smrg OS 2717591dea4Smrg KERNEL-OS 2723a67387eSmrg 2733a67387eSmrg See the file `config.sub' for the possible values of each field. If 2743a67387eSmrg`config.sub' isn't included in this package, then this package doesn't 2753a67387eSmrgneed to know the machine type. 2763a67387eSmrg 2773a67387eSmrg If you are _building_ compiler tools for cross-compiling, you should 2783a67387eSmrguse the option `--target=TYPE' to select the type of system they will 2793a67387eSmrgproduce code for. 2803a67387eSmrg 2813a67387eSmrg If you want to _use_ a cross compiler, that generates code for a 2823a67387eSmrgplatform different from the build platform, you should specify the 2833a67387eSmrg"host" platform (i.e., that on which the generated programs will 2843a67387eSmrgeventually be run) with `--host=TYPE'. 2853a67387eSmrg 2863a67387eSmrgSharing Defaults 2873a67387eSmrg================ 2883a67387eSmrg 2893a67387eSmrg If you want to set default values for `configure' scripts to share, 2903a67387eSmrgyou can create a site shell script called `config.site' that gives 2913a67387eSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 2923a67387eSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2933a67387eSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2943a67387eSmrg`CONFIG_SITE' environment variable to the location of the site script. 2953a67387eSmrgA warning: not all `configure' scripts look for a site script. 2963a67387eSmrg 2973a67387eSmrgDefining Variables 2983a67387eSmrg================== 2993a67387eSmrg 3003a67387eSmrg Variables not defined in a site shell script can be set in the 3013a67387eSmrgenvironment passed to `configure'. However, some packages may run 3023a67387eSmrgconfigure again during the build, and the customized values of these 3033a67387eSmrgvariables may be lost. In order to avoid this problem, you should set 3043a67387eSmrgthem in the `configure' command line, using `VAR=value'. For example: 3053a67387eSmrg 3063a67387eSmrg ./configure CC=/usr/local2/bin/gcc 3073a67387eSmrg 3083a67387eSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 3093a67387eSmrgoverridden in the site shell script). 3103a67387eSmrg 3113a67387eSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 3123a67387eSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 3133a67387eSmrg 3143a67387eSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 3153a67387eSmrg 3163a67387eSmrg`configure' Invocation 3173a67387eSmrg====================== 3183a67387eSmrg 3193a67387eSmrg `configure' recognizes the following options to control how it 3203a67387eSmrgoperates. 3213a67387eSmrg 3223a67387eSmrg`--help' 3233a67387eSmrg`-h' 3243a67387eSmrg Print a summary of all of the options to `configure', and exit. 3253a67387eSmrg 3263a67387eSmrg`--help=short' 3273a67387eSmrg`--help=recursive' 3283a67387eSmrg Print a summary of the options unique to this package's 3293a67387eSmrg `configure', and exit. The `short' variant lists options used 3303a67387eSmrg only in the top level, while the `recursive' variant lists options 3313a67387eSmrg also present in any nested packages. 3323a67387eSmrg 3333a67387eSmrg`--version' 3343a67387eSmrg`-V' 3353a67387eSmrg Print the version of Autoconf used to generate the `configure' 3363a67387eSmrg script, and exit. 3373a67387eSmrg 3383a67387eSmrg`--cache-file=FILE' 3393a67387eSmrg Enable the cache: use and save the results of the tests in FILE, 3403a67387eSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 3413a67387eSmrg disable caching. 3423a67387eSmrg 3433a67387eSmrg`--config-cache' 3443a67387eSmrg`-C' 3453a67387eSmrg Alias for `--cache-file=config.cache'. 3463a67387eSmrg 3473a67387eSmrg`--quiet' 3483a67387eSmrg`--silent' 3493a67387eSmrg`-q' 3503a67387eSmrg Do not print messages saying which checks are being made. To 3513a67387eSmrg suppress all normal output, redirect it to `/dev/null' (any error 3523a67387eSmrg messages will still be shown). 3533a67387eSmrg 3543a67387eSmrg`--srcdir=DIR' 3553a67387eSmrg Look for the package's source code in directory DIR. Usually 3563a67387eSmrg `configure' can determine that directory automatically. 3573a67387eSmrg 3583a67387eSmrg`--prefix=DIR' 3597591dea4Smrg Use DIR as the installation prefix. *note Installation Names:: 3603a67387eSmrg for more details, including other options available for fine-tuning 3613a67387eSmrg the installation locations. 3623a67387eSmrg 3633a67387eSmrg`--no-create' 3643a67387eSmrg`-n' 3653a67387eSmrg Run the configure checks, but stop before creating any output 3663a67387eSmrg files. 3673a67387eSmrg 3683a67387eSmrg`configure' also accepts some other, not widely useful, options. Run 3693a67387eSmrg`configure --help' for more details. 3703a67387eSmrg 371