171ba42d0SmrgInstallation Instructions 271ba42d0Smrg************************* 371ba42d0Smrg 46257f37dSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 56257f37dSmrgInc. 671ba42d0Smrg 76257f37dSmrg Copying and distribution of this file, with or without modification, 86257f37dSmrgare permitted in any medium without royalty provided the copyright 96257f37dSmrgnotice and this notice are preserved. This file is offered as-is, 106257f37dSmrgwithout warranty of any kind. 1171ba42d0Smrg 1271ba42d0SmrgBasic Installation 1371ba42d0Smrg================== 1471ba42d0Smrg 1571ba42d0Smrg Briefly, the shell commands `./configure; make; make install' should 1671ba42d0Smrgconfigure, build, and install this package. The following 1771ba42d0Smrgmore-detailed instructions are generic; see the `README' file for 186257f37dSmrginstructions specific to this package. Some packages provide this 196257f37dSmrg`INSTALL' file but do not implement all of the features documented 206257f37dSmrgbelow. The lack of an optional feature in a given package is not 216257f37dSmrgnecessarily a bug. More recommendations for GNU packages can be found 226257f37dSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 2371ba42d0Smrg 2471ba42d0Smrg The `configure' shell script attempts to guess correct values for 2571ba42d0Smrgvarious system-dependent variables used during compilation. It uses 2671ba42d0Smrgthose values to create a `Makefile' in each directory of the package. 2771ba42d0SmrgIt may also create one or more `.h' files containing system-dependent 2871ba42d0Smrgdefinitions. Finally, it creates a shell script `config.status' that 2971ba42d0Smrgyou can run in the future to recreate the current configuration, and a 3071ba42d0Smrgfile `config.log' containing compiler output (useful mainly for 3171ba42d0Smrgdebugging `configure'). 3271ba42d0Smrg 3371ba42d0Smrg It can also use an optional file (typically called `config.cache' 3471ba42d0Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 3571ba42d0Smrgthe results of its tests to speed up reconfiguring. Caching is 3671ba42d0Smrgdisabled by default to prevent problems with accidental use of stale 3771ba42d0Smrgcache files. 3871ba42d0Smrg 3971ba42d0Smrg If you need to do unusual things to compile the package, please try 4071ba42d0Smrgto figure out how `configure' could check whether to do them, and mail 4171ba42d0Smrgdiffs or instructions to the address given in the `README' so they can 4271ba42d0Smrgbe considered for the next release. If you are using the cache, and at 4371ba42d0Smrgsome point `config.cache' contains results you don't want to keep, you 4471ba42d0Smrgmay remove or edit it. 4571ba42d0Smrg 4671ba42d0Smrg The file `configure.ac' (or `configure.in') is used to create 4771ba42d0Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 4871ba42d0Smrgyou want to change it or regenerate `configure' using a newer version 4971ba42d0Smrgof `autoconf'. 5071ba42d0Smrg 516257f37dSmrg The simplest way to compile this package is: 5271ba42d0Smrg 5371ba42d0Smrg 1. `cd' to the directory containing the package's source code and type 5471ba42d0Smrg `./configure' to configure the package for your system. 5571ba42d0Smrg 5671ba42d0Smrg Running `configure' might take a while. While running, it prints 5771ba42d0Smrg some messages telling which features it is checking for. 5871ba42d0Smrg 5971ba42d0Smrg 2. Type `make' to compile the package. 6071ba42d0Smrg 6171ba42d0Smrg 3. Optionally, type `make check' to run any self-tests that come with 626257f37dSmrg the package, generally using the just-built uninstalled binaries. 6371ba42d0Smrg 6471ba42d0Smrg 4. Type `make install' to install the programs and any data files and 656257f37dSmrg documentation. When installing into a prefix owned by root, it is 666257f37dSmrg recommended that the package be configured and built as a regular 676257f37dSmrg user, and only the `make install' phase executed with root 686257f37dSmrg privileges. 696257f37dSmrg 706257f37dSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 716257f37dSmrg this time using the binaries in their final installed location. 726257f37dSmrg This target does not install anything. Running this target as a 736257f37dSmrg regular user, particularly if the prior `make install' required 746257f37dSmrg root privileges, verifies that the installation completed 756257f37dSmrg correctly. 766257f37dSmrg 776257f37dSmrg 6. You can remove the program binaries and object files from the 7871ba42d0Smrg source code directory by typing `make clean'. To also remove the 7971ba42d0Smrg files that `configure' created (so you can compile the package for 8071ba42d0Smrg a different kind of computer), type `make distclean'. There is 8171ba42d0Smrg also a `make maintainer-clean' target, but that is intended mainly 8271ba42d0Smrg for the package's developers. If you use it, you may have to get 8371ba42d0Smrg all sorts of other programs in order to regenerate files that came 8471ba42d0Smrg with the distribution. 8571ba42d0Smrg 866257f37dSmrg 7. Often, you can also type `make uninstall' to remove the installed 876257f37dSmrg files again. In practice, not all packages have tested that 886257f37dSmrg uninstallation works correctly, even though it is required by the 896257f37dSmrg GNU Coding Standards. 906257f37dSmrg 916257f37dSmrg 8. Some packages, particularly those that use Automake, provide `make 926257f37dSmrg distcheck', which can by used by developers to test that all other 936257f37dSmrg targets like `make install' and `make uninstall' work correctly. 946257f37dSmrg This target is generally not run by end users. 9571ba42d0Smrg 9671ba42d0SmrgCompilers and Options 9771ba42d0Smrg===================== 9871ba42d0Smrg 9971ba42d0Smrg Some systems require unusual options for compilation or linking that 10071ba42d0Smrgthe `configure' script does not know about. Run `./configure --help' 10171ba42d0Smrgfor details on some of the pertinent environment variables. 10271ba42d0Smrg 10371ba42d0Smrg You can give `configure' initial values for configuration parameters 10471ba42d0Smrgby setting variables in the command line or in the environment. Here 10571ba42d0Smrgis an example: 10671ba42d0Smrg 10771ba42d0Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 10871ba42d0Smrg 10971ba42d0Smrg *Note Defining Variables::, for more details. 11071ba42d0Smrg 11171ba42d0SmrgCompiling For Multiple Architectures 11271ba42d0Smrg==================================== 11371ba42d0Smrg 11471ba42d0Smrg You can compile the package for more than one kind of computer at the 11571ba42d0Smrgsame time, by placing the object files for each architecture in their 11671ba42d0Smrgown directory. To do this, you can use GNU `make'. `cd' to the 11771ba42d0Smrgdirectory where you want the object files and executables to go and run 11871ba42d0Smrgthe `configure' script. `configure' automatically checks for the 1196257f37dSmrgsource code in the directory that `configure' is in and in `..'. This 1206257f37dSmrgis known as a "VPATH" build. 12171ba42d0Smrg 12271ba42d0Smrg With a non-GNU `make', it is safer to compile the package for one 12371ba42d0Smrgarchitecture at a time in the source code directory. After you have 12471ba42d0Smrginstalled the package for one architecture, use `make distclean' before 12571ba42d0Smrgreconfiguring for another architecture. 12671ba42d0Smrg 12771ba42d0Smrg On MacOS X 10.5 and later systems, you can create libraries and 12871ba42d0Smrgexecutables that work on multiple system types--known as "fat" or 12971ba42d0Smrg"universal" binaries--by specifying multiple `-arch' options to the 13071ba42d0Smrgcompiler but only a single `-arch' option to the preprocessor. Like 13171ba42d0Smrgthis: 13271ba42d0Smrg 13371ba42d0Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13471ba42d0Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13571ba42d0Smrg CPP="gcc -E" CXXCPP="g++ -E" 13671ba42d0Smrg 13771ba42d0Smrg This is not guaranteed to produce working output in all cases, you 13871ba42d0Smrgmay have to build one architecture at a time and combine the results 13971ba42d0Smrgusing the `lipo' tool if you have problems. 14071ba42d0Smrg 14171ba42d0SmrgInstallation Names 14271ba42d0Smrg================== 14371ba42d0Smrg 14471ba42d0Smrg By default, `make install' installs the package's commands under 14571ba42d0Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 14671ba42d0Smrgcan specify an installation prefix other than `/usr/local' by giving 1476257f37dSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 1486257f37dSmrgabsolute file name. 14971ba42d0Smrg 15071ba42d0Smrg You can specify separate installation prefixes for 15171ba42d0Smrgarchitecture-specific files and architecture-independent files. If you 15271ba42d0Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 15371ba42d0SmrgPREFIX as the prefix for installing programs and libraries. 15471ba42d0SmrgDocumentation and other data files still use the regular prefix. 15571ba42d0Smrg 15671ba42d0Smrg In addition, if you use an unusual directory layout you can give 15771ba42d0Smrgoptions like `--bindir=DIR' to specify different values for particular 15871ba42d0Smrgkinds of files. Run `configure --help' for a list of the directories 1596257f37dSmrgyou can set and what kinds of files go in them. In general, the 1606257f37dSmrgdefault for these options is expressed in terms of `${prefix}', so that 1616257f37dSmrgspecifying just `--prefix' will affect all of the other directory 1626257f37dSmrgspecifications that were not explicitly provided. 1636257f37dSmrg 1646257f37dSmrg The most portable way to affect installation locations is to pass the 1656257f37dSmrgcorrect locations to `configure'; however, many packages provide one or 1666257f37dSmrgboth of the following shortcuts of passing variable assignments to the 1676257f37dSmrg`make install' command line to change installation locations without 1686257f37dSmrghaving to reconfigure or recompile. 1696257f37dSmrg 1706257f37dSmrg The first method involves providing an override variable for each 1716257f37dSmrgaffected directory. For example, `make install 1726257f37dSmrgprefix=/alternate/directory' will choose an alternate location for all 1736257f37dSmrgdirectory configuration variables that were expressed in terms of 1746257f37dSmrg`${prefix}'. Any directories that were specified during `configure', 1756257f37dSmrgbut not in terms of `${prefix}', must each be overridden at install 1766257f37dSmrgtime for the entire installation to be relocated. The approach of 1776257f37dSmrgmakefile variable overrides for each directory variable is required by 1786257f37dSmrgthe GNU Coding Standards, and ideally causes no recompilation. 1796257f37dSmrgHowever, some platforms have known limitations with the semantics of 1806257f37dSmrgshared libraries that end up requiring recompilation when using this 1816257f37dSmrgmethod, particularly noticeable in packages that use GNU Libtool. 1826257f37dSmrg 1836257f37dSmrg The second method involves providing the `DESTDIR' variable. For 1846257f37dSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 1856257f37dSmrg`/alternate/directory' before all installation names. The approach of 1866257f37dSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 1876257f37dSmrgdoes not work on platforms that have drive letters. On the other hand, 1886257f37dSmrgit does better at avoiding recompilation issues, and works well even 1896257f37dSmrgwhen some directory options were not specified in terms of `${prefix}' 1906257f37dSmrgat `configure' time. 1916257f37dSmrg 1926257f37dSmrgOptional Features 1936257f37dSmrg================= 19471ba42d0Smrg 19571ba42d0Smrg If the package supports it, you can cause programs to be installed 19671ba42d0Smrgwith an extra prefix or suffix on their names by giving `configure' the 19771ba42d0Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 19871ba42d0Smrg 19971ba42d0Smrg Some packages pay attention to `--enable-FEATURE' options to 20071ba42d0Smrg`configure', where FEATURE indicates an optional part of the package. 20171ba42d0SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 20271ba42d0Smrgis something like `gnu-as' or `x' (for the X Window System). The 20371ba42d0Smrg`README' should mention any `--enable-' and `--with-' options that the 20471ba42d0Smrgpackage recognizes. 20571ba42d0Smrg 20671ba42d0Smrg For packages that use the X Window System, `configure' can usually 20771ba42d0Smrgfind the X include and library files automatically, but if it doesn't, 20871ba42d0Smrgyou can use the `configure' options `--x-includes=DIR' and 20971ba42d0Smrg`--x-libraries=DIR' to specify their locations. 21071ba42d0Smrg 2116257f37dSmrg Some packages offer the ability to configure how verbose the 2126257f37dSmrgexecution of `make' will be. For these packages, running `./configure 2136257f37dSmrg--enable-silent-rules' sets the default to minimal output, which can be 2146257f37dSmrgoverridden with `make V=1'; while running `./configure 2156257f37dSmrg--disable-silent-rules' sets the default to verbose, which can be 2166257f37dSmrgoverridden with `make V=0'. 2176257f37dSmrg 21871ba42d0SmrgParticular systems 21971ba42d0Smrg================== 22071ba42d0Smrg 22171ba42d0Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 22271ba42d0SmrgCC is not installed, it is recommended to use the following options in 22371ba42d0Smrgorder to use an ANSI C compiler: 22471ba42d0Smrg 2256257f37dSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 22671ba42d0Smrg 22771ba42d0Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 22871ba42d0Smrg 2296257f37dSmrg HP-UX `make' updates targets which have the same time stamps as 2306257f37dSmrgtheir prerequisites, which makes it generally unusable when shipped 2316257f37dSmrggenerated files such as `configure' are involved. Use GNU `make' 2326257f37dSmrginstead. 2336257f37dSmrg 23471ba42d0Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 23571ba42d0Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 23671ba42d0Smrga workaround. If GNU CC is not installed, it is therefore recommended 23771ba42d0Smrgto try 23871ba42d0Smrg 23971ba42d0Smrg ./configure CC="cc" 24071ba42d0Smrg 24171ba42d0Smrgand if that doesn't work, try 24271ba42d0Smrg 24371ba42d0Smrg ./configure CC="cc -nodtk" 24471ba42d0Smrg 2456257f37dSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 2466257f37dSmrgdirectory contains several dysfunctional programs; working variants of 2476257f37dSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 2486257f37dSmrgin your `PATH', put it _after_ `/usr/bin'. 2496257f37dSmrg 2506257f37dSmrg On Haiku, software installed for all users goes in `/boot/common', 2516257f37dSmrgnot `/usr/local'. It is recommended to use the following options: 2526257f37dSmrg 2536257f37dSmrg ./configure --prefix=/boot/common 2546257f37dSmrg 25571ba42d0SmrgSpecifying the System Type 25671ba42d0Smrg========================== 25771ba42d0Smrg 25871ba42d0Smrg There may be some features `configure' cannot figure out 25971ba42d0Smrgautomatically, but needs to determine by the type of machine the package 26071ba42d0Smrgwill run on. Usually, assuming the package is built to be run on the 26171ba42d0Smrg_same_ architectures, `configure' can figure that out, but if it prints 26271ba42d0Smrga message saying it cannot guess the machine type, give it the 26371ba42d0Smrg`--build=TYPE' option. TYPE can either be a short name for the system 26471ba42d0Smrgtype, such as `sun4', or a canonical name which has the form: 26571ba42d0Smrg 26671ba42d0Smrg CPU-COMPANY-SYSTEM 26771ba42d0Smrg 26871ba42d0Smrgwhere SYSTEM can have one of these forms: 26971ba42d0Smrg 2706257f37dSmrg OS 2716257f37dSmrg KERNEL-OS 27271ba42d0Smrg 27371ba42d0Smrg See the file `config.sub' for the possible values of each field. If 27471ba42d0Smrg`config.sub' isn't included in this package, then this package doesn't 27571ba42d0Smrgneed to know the machine type. 27671ba42d0Smrg 27771ba42d0Smrg If you are _building_ compiler tools for cross-compiling, you should 27871ba42d0Smrguse the option `--target=TYPE' to select the type of system they will 27971ba42d0Smrgproduce code for. 28071ba42d0Smrg 28171ba42d0Smrg If you want to _use_ a cross compiler, that generates code for a 28271ba42d0Smrgplatform different from the build platform, you should specify the 28371ba42d0Smrg"host" platform (i.e., that on which the generated programs will 28471ba42d0Smrgeventually be run) with `--host=TYPE'. 28571ba42d0Smrg 28671ba42d0SmrgSharing Defaults 28771ba42d0Smrg================ 28871ba42d0Smrg 28971ba42d0Smrg If you want to set default values for `configure' scripts to share, 29071ba42d0Smrgyou can create a site shell script called `config.site' that gives 29171ba42d0Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 29271ba42d0Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 29371ba42d0Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 29471ba42d0Smrg`CONFIG_SITE' environment variable to the location of the site script. 29571ba42d0SmrgA warning: not all `configure' scripts look for a site script. 29671ba42d0Smrg 29771ba42d0SmrgDefining Variables 29871ba42d0Smrg================== 29971ba42d0Smrg 30071ba42d0Smrg Variables not defined in a site shell script can be set in the 30171ba42d0Smrgenvironment passed to `configure'. However, some packages may run 30271ba42d0Smrgconfigure again during the build, and the customized values of these 30371ba42d0Smrgvariables may be lost. In order to avoid this problem, you should set 30471ba42d0Smrgthem in the `configure' command line, using `VAR=value'. For example: 30571ba42d0Smrg 30671ba42d0Smrg ./configure CC=/usr/local2/bin/gcc 30771ba42d0Smrg 30871ba42d0Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 30971ba42d0Smrgoverridden in the site shell script). 31071ba42d0Smrg 31171ba42d0SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 31271ba42d0Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 31371ba42d0Smrg 31471ba42d0Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 31571ba42d0Smrg 31671ba42d0Smrg`configure' Invocation 31771ba42d0Smrg====================== 31871ba42d0Smrg 31971ba42d0Smrg `configure' recognizes the following options to control how it 32071ba42d0Smrgoperates. 32171ba42d0Smrg 32271ba42d0Smrg`--help' 32371ba42d0Smrg`-h' 32471ba42d0Smrg Print a summary of all of the options to `configure', and exit. 32571ba42d0Smrg 32671ba42d0Smrg`--help=short' 32771ba42d0Smrg`--help=recursive' 32871ba42d0Smrg Print a summary of the options unique to this package's 32971ba42d0Smrg `configure', and exit. The `short' variant lists options used 33071ba42d0Smrg only in the top level, while the `recursive' variant lists options 33171ba42d0Smrg also present in any nested packages. 33271ba42d0Smrg 33371ba42d0Smrg`--version' 33471ba42d0Smrg`-V' 33571ba42d0Smrg Print the version of Autoconf used to generate the `configure' 33671ba42d0Smrg script, and exit. 33771ba42d0Smrg 33871ba42d0Smrg`--cache-file=FILE' 33971ba42d0Smrg Enable the cache: use and save the results of the tests in FILE, 34071ba42d0Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 34171ba42d0Smrg disable caching. 34271ba42d0Smrg 34371ba42d0Smrg`--config-cache' 34471ba42d0Smrg`-C' 34571ba42d0Smrg Alias for `--cache-file=config.cache'. 34671ba42d0Smrg 34771ba42d0Smrg`--quiet' 34871ba42d0Smrg`--silent' 34971ba42d0Smrg`-q' 35071ba42d0Smrg Do not print messages saying which checks are being made. To 35171ba42d0Smrg suppress all normal output, redirect it to `/dev/null' (any error 35271ba42d0Smrg messages will still be shown). 35371ba42d0Smrg 35471ba42d0Smrg`--srcdir=DIR' 35571ba42d0Smrg Look for the package's source code in directory DIR. Usually 35671ba42d0Smrg `configure' can determine that directory automatically. 35771ba42d0Smrg 35871ba42d0Smrg`--prefix=DIR' 3596257f37dSmrg Use DIR as the installation prefix. *note Installation Names:: 36071ba42d0Smrg for more details, including other options available for fine-tuning 36171ba42d0Smrg the installation locations. 36271ba42d0Smrg 36371ba42d0Smrg`--no-create' 36471ba42d0Smrg`-n' 36571ba42d0Smrg Run the configure checks, but stop before creating any output 36671ba42d0Smrg files. 36771ba42d0Smrg 36871ba42d0Smrg`configure' also accepts some other, not widely useful, options. Run 36971ba42d0Smrg`configure --help' for more details. 37071ba42d0Smrg 371