12007c8b2SniaInstallation Instructions 22007c8b2Snia************************* 32007c8b2Snia 42007c8b2SniaCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 52007c8b2SniaInc. 62007c8b2Snia 72007c8b2Snia Copying and distribution of this file, with or without modification, 82007c8b2Sniaare permitted in any medium without royalty provided the copyright 92007c8b2Snianotice and this notice are preserved. This file is offered as-is, 102007c8b2Sniawithout warranty of any kind. 112007c8b2Snia 122007c8b2SniaBasic Installation 132007c8b2Snia================== 142007c8b2Snia 152007c8b2Snia Briefly, the shell commands `./configure; make; make install' should 162007c8b2Sniaconfigure, build, and install this package. The following 172007c8b2Sniamore-detailed instructions are generic; see the `README' file for 182007c8b2Sniainstructions specific to this package. Some packages provide this 192007c8b2Snia`INSTALL' file but do not implement all of the features documented 202007c8b2Sniabelow. The lack of an optional feature in a given package is not 212007c8b2Snianecessarily a bug. More recommendations for GNU packages can be found 222007c8b2Sniain *note Makefile Conventions: (standards)Makefile Conventions. 232007c8b2Snia 242007c8b2Snia The `configure' shell script attempts to guess correct values for 252007c8b2Sniavarious system-dependent variables used during compilation. It uses 262007c8b2Sniathose values to create a `Makefile' in each directory of the package. 272007c8b2SniaIt may also create one or more `.h' files containing system-dependent 282007c8b2Sniadefinitions. Finally, it creates a shell script `config.status' that 292007c8b2Sniayou can run in the future to recreate the current configuration, and a 302007c8b2Sniafile `config.log' containing compiler output (useful mainly for 312007c8b2Sniadebugging `configure'). 322007c8b2Snia 332007c8b2Snia It can also use an optional file (typically called `config.cache' 342007c8b2Sniaand enabled with `--cache-file=config.cache' or simply `-C') that saves 352007c8b2Sniathe results of its tests to speed up reconfiguring. Caching is 362007c8b2Sniadisabled by default to prevent problems with accidental use of stale 372007c8b2Sniacache files. 382007c8b2Snia 392007c8b2Snia If you need to do unusual things to compile the package, please try 402007c8b2Sniato figure out how `configure' could check whether to do them, and mail 412007c8b2Sniadiffs or instructions to the address given in the `README' so they can 422007c8b2Sniabe considered for the next release. If you are using the cache, and at 432007c8b2Sniasome point `config.cache' contains results you don't want to keep, you 442007c8b2Sniamay remove or edit it. 452007c8b2Snia 462007c8b2Snia The file `configure.ac' (or `configure.in') is used to create 472007c8b2Snia`configure' by a program called `autoconf'. You need `configure.ac' if 482007c8b2Sniayou want to change it or regenerate `configure' using a newer version 492007c8b2Sniaof `autoconf'. 502007c8b2Snia 512007c8b2Snia The simplest way to compile this package is: 522007c8b2Snia 532007c8b2Snia 1. `cd' to the directory containing the package's source code and type 542007c8b2Snia `./configure' to configure the package for your system. 552007c8b2Snia 562007c8b2Snia Running `configure' might take a while. While running, it prints 572007c8b2Snia some messages telling which features it is checking for. 582007c8b2Snia 592007c8b2Snia 2. Type `make' to compile the package. 602007c8b2Snia 612007c8b2Snia 3. Optionally, type `make check' to run any self-tests that come with 622007c8b2Snia the package, generally using the just-built uninstalled binaries. 632007c8b2Snia 642007c8b2Snia 4. Type `make install' to install the programs and any data files and 652007c8b2Snia documentation. When installing into a prefix owned by root, it is 662007c8b2Snia recommended that the package be configured and built as a regular 672007c8b2Snia user, and only the `make install' phase executed with root 682007c8b2Snia privileges. 692007c8b2Snia 702007c8b2Snia 5. Optionally, type `make installcheck' to repeat any self-tests, but 712007c8b2Snia this time using the binaries in their final installed location. 722007c8b2Snia This target does not install anything. Running this target as a 732007c8b2Snia regular user, particularly if the prior `make install' required 742007c8b2Snia root privileges, verifies that the installation completed 752007c8b2Snia correctly. 762007c8b2Snia 772007c8b2Snia 6. You can remove the program binaries and object files from the 782007c8b2Snia source code directory by typing `make clean'. To also remove the 792007c8b2Snia files that `configure' created (so you can compile the package for 802007c8b2Snia a different kind of computer), type `make distclean'. There is 812007c8b2Snia also a `make maintainer-clean' target, but that is intended mainly 822007c8b2Snia for the package's developers. If you use it, you may have to get 832007c8b2Snia all sorts of other programs in order to regenerate files that came 842007c8b2Snia with the distribution. 852007c8b2Snia 862007c8b2Snia 7. Often, you can also type `make uninstall' to remove the installed 872007c8b2Snia files again. In practice, not all packages have tested that 882007c8b2Snia uninstallation works correctly, even though it is required by the 892007c8b2Snia GNU Coding Standards. 902007c8b2Snia 912007c8b2Snia 8. Some packages, particularly those that use Automake, provide `make 922007c8b2Snia distcheck', which can by used by developers to test that all other 932007c8b2Snia targets like `make install' and `make uninstall' work correctly. 942007c8b2Snia This target is generally not run by end users. 952007c8b2Snia 962007c8b2SniaCompilers and Options 972007c8b2Snia===================== 982007c8b2Snia 992007c8b2Snia Some systems require unusual options for compilation or linking that 1002007c8b2Sniathe `configure' script does not know about. Run `./configure --help' 1012007c8b2Sniafor details on some of the pertinent environment variables. 1022007c8b2Snia 1032007c8b2Snia You can give `configure' initial values for configuration parameters 1042007c8b2Sniaby setting variables in the command line or in the environment. Here 1052007c8b2Sniais an example: 1062007c8b2Snia 1072007c8b2Snia ./configure CC=c99 CFLAGS=-g LIBS=-lposix 1082007c8b2Snia 1092007c8b2Snia *Note Defining Variables::, for more details. 1102007c8b2Snia 1112007c8b2SniaCompiling For Multiple Architectures 1122007c8b2Snia==================================== 1132007c8b2Snia 1142007c8b2Snia You can compile the package for more than one kind of computer at the 1152007c8b2Sniasame time, by placing the object files for each architecture in their 1162007c8b2Sniaown directory. To do this, you can use GNU `make'. `cd' to the 1172007c8b2Sniadirectory where you want the object files and executables to go and run 1182007c8b2Sniathe `configure' script. `configure' automatically checks for the 1192007c8b2Sniasource code in the directory that `configure' is in and in `..'. This 1202007c8b2Sniais known as a "VPATH" build. 1212007c8b2Snia 1222007c8b2Snia With a non-GNU `make', it is safer to compile the package for one 1232007c8b2Sniaarchitecture at a time in the source code directory. After you have 1242007c8b2Sniainstalled the package for one architecture, use `make distclean' before 1252007c8b2Sniareconfiguring for another architecture. 1262007c8b2Snia 1272007c8b2Snia On MacOS X 10.5 and later systems, you can create libraries and 1282007c8b2Sniaexecutables that work on multiple system types--known as "fat" or 1292007c8b2Snia"universal" binaries--by specifying multiple `-arch' options to the 1302007c8b2Sniacompiler but only a single `-arch' option to the preprocessor. Like 1312007c8b2Sniathis: 1322007c8b2Snia 1332007c8b2Snia ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1342007c8b2Snia CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1352007c8b2Snia CPP="gcc -E" CXXCPP="g++ -E" 1362007c8b2Snia 1372007c8b2Snia This is not guaranteed to produce working output in all cases, you 1382007c8b2Sniamay have to build one architecture at a time and combine the results 1392007c8b2Sniausing the `lipo' tool if you have problems. 1402007c8b2Snia 1412007c8b2SniaInstallation Names 1422007c8b2Snia================== 1432007c8b2Snia 1442007c8b2Snia By default, `make install' installs the package's commands under 1452007c8b2Snia`/usr/local/bin', include files under `/usr/local/include', etc. You 1462007c8b2Sniacan specify an installation prefix other than `/usr/local' by giving 1472007c8b2Snia`configure' the option `--prefix=PREFIX', where PREFIX must be an 1482007c8b2Sniaabsolute file name. 1492007c8b2Snia 1502007c8b2Snia You can specify separate installation prefixes for 1512007c8b2Sniaarchitecture-specific files and architecture-independent files. If you 1522007c8b2Sniapass the option `--exec-prefix=PREFIX' to `configure', the package uses 1532007c8b2SniaPREFIX as the prefix for installing programs and libraries. 1542007c8b2SniaDocumentation and other data files still use the regular prefix. 1552007c8b2Snia 1562007c8b2Snia In addition, if you use an unusual directory layout you can give 1572007c8b2Sniaoptions like `--bindir=DIR' to specify different values for particular 1582007c8b2Sniakinds of files. Run `configure --help' for a list of the directories 1592007c8b2Sniayou can set and what kinds of files go in them. In general, the 1602007c8b2Sniadefault for these options is expressed in terms of `${prefix}', so that 1612007c8b2Sniaspecifying just `--prefix' will affect all of the other directory 1622007c8b2Sniaspecifications that were not explicitly provided. 1632007c8b2Snia 1642007c8b2Snia The most portable way to affect installation locations is to pass the 1652007c8b2Sniacorrect locations to `configure'; however, many packages provide one or 1662007c8b2Sniaboth of the following shortcuts of passing variable assignments to the 1672007c8b2Snia`make install' command line to change installation locations without 1682007c8b2Sniahaving to reconfigure or recompile. 1692007c8b2Snia 1702007c8b2Snia The first method involves providing an override variable for each 1712007c8b2Sniaaffected directory. For example, `make install 1722007c8b2Sniaprefix=/alternate/directory' will choose an alternate location for all 1732007c8b2Sniadirectory configuration variables that were expressed in terms of 1742007c8b2Snia`${prefix}'. Any directories that were specified during `configure', 1752007c8b2Sniabut not in terms of `${prefix}', must each be overridden at install 1762007c8b2Sniatime for the entire installation to be relocated. The approach of 1772007c8b2Sniamakefile variable overrides for each directory variable is required by 1782007c8b2Sniathe GNU Coding Standards, and ideally causes no recompilation. 1792007c8b2SniaHowever, some platforms have known limitations with the semantics of 1802007c8b2Sniashared libraries that end up requiring recompilation when using this 1812007c8b2Sniamethod, particularly noticeable in packages that use GNU Libtool. 1822007c8b2Snia 1832007c8b2Snia The second method involves providing the `DESTDIR' variable. For 1842007c8b2Sniaexample, `make install DESTDIR=/alternate/directory' will prepend 1852007c8b2Snia`/alternate/directory' before all installation names. The approach of 1862007c8b2Snia`DESTDIR' overrides is not required by the GNU Coding Standards, and 1872007c8b2Sniadoes not work on platforms that have drive letters. On the other hand, 1882007c8b2Sniait does better at avoiding recompilation issues, and works well even 1892007c8b2Sniawhen some directory options were not specified in terms of `${prefix}' 1902007c8b2Sniaat `configure' time. 1912007c8b2Snia 1922007c8b2SniaOptional Features 1932007c8b2Snia================= 1942007c8b2Snia 1952007c8b2Snia If the package supports it, you can cause programs to be installed 1962007c8b2Sniawith an extra prefix or suffix on their names by giving `configure' the 1972007c8b2Sniaoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1982007c8b2Snia 1992007c8b2Snia Some packages pay attention to `--enable-FEATURE' options to 2002007c8b2Snia`configure', where FEATURE indicates an optional part of the package. 2012007c8b2SniaThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 2022007c8b2Sniais something like `gnu-as' or `x' (for the X Window System). The 2032007c8b2Snia`README' should mention any `--enable-' and `--with-' options that the 2042007c8b2Sniapackage recognizes. 2052007c8b2Snia 2062007c8b2Snia For packages that use the X Window System, `configure' can usually 2072007c8b2Sniafind the X include and library files automatically, but if it doesn't, 2082007c8b2Sniayou can use the `configure' options `--x-includes=DIR' and 2092007c8b2Snia`--x-libraries=DIR' to specify their locations. 2102007c8b2Snia 2112007c8b2Snia Some packages offer the ability to configure how verbose the 2122007c8b2Sniaexecution of `make' will be. For these packages, running `./configure 2132007c8b2Snia--enable-silent-rules' sets the default to minimal output, which can be 2142007c8b2Sniaoverridden with `make V=1'; while running `./configure 2152007c8b2Snia--disable-silent-rules' sets the default to verbose, which can be 2162007c8b2Sniaoverridden with `make V=0'. 2172007c8b2Snia 2182007c8b2SniaParticular systems 2192007c8b2Snia================== 2202007c8b2Snia 2212007c8b2Snia On HP-UX, the default C compiler is not ANSI C compatible. If GNU 2222007c8b2SniaCC is not installed, it is recommended to use the following options in 2232007c8b2Sniaorder to use an ANSI C compiler: 2242007c8b2Snia 2252007c8b2Snia ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 2262007c8b2Snia 2272007c8b2Sniaand if that doesn't work, install pre-built binaries of GCC for HP-UX. 2282007c8b2Snia 2292007c8b2Snia HP-UX `make' updates targets which have the same time stamps as 2302007c8b2Sniatheir prerequisites, which makes it generally unusable when shipped 2312007c8b2Sniagenerated files such as `configure' are involved. Use GNU `make' 2322007c8b2Sniainstead. 2332007c8b2Snia 2342007c8b2Snia On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 2352007c8b2Sniaparse its `<wchar.h>' header file. The option `-nodtk' can be used as 2362007c8b2Sniaa workaround. If GNU CC is not installed, it is therefore recommended 2372007c8b2Sniato try 2382007c8b2Snia 2392007c8b2Snia ./configure CC="cc" 2402007c8b2Snia 2412007c8b2Sniaand if that doesn't work, try 2422007c8b2Snia 2432007c8b2Snia ./configure CC="cc -nodtk" 2442007c8b2Snia 2452007c8b2Snia On Solaris, don't put `/usr/ucb' early in your `PATH'. This 2462007c8b2Sniadirectory contains several dysfunctional programs; working variants of 2472007c8b2Sniathese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 2482007c8b2Sniain your `PATH', put it _after_ `/usr/bin'. 2492007c8b2Snia 2502007c8b2Snia On Haiku, software installed for all users goes in `/boot/common', 2512007c8b2Snianot `/usr/local'. It is recommended to use the following options: 2522007c8b2Snia 2532007c8b2Snia ./configure --prefix=/boot/common 2542007c8b2Snia 2552007c8b2SniaSpecifying the System Type 2562007c8b2Snia========================== 2572007c8b2Snia 2582007c8b2Snia There may be some features `configure' cannot figure out 2592007c8b2Sniaautomatically, but needs to determine by the type of machine the package 2602007c8b2Sniawill run on. Usually, assuming the package is built to be run on the 2612007c8b2Snia_same_ architectures, `configure' can figure that out, but if it prints 2622007c8b2Sniaa message saying it cannot guess the machine type, give it the 2632007c8b2Snia`--build=TYPE' option. TYPE can either be a short name for the system 2642007c8b2Sniatype, such as `sun4', or a canonical name which has the form: 2652007c8b2Snia 2662007c8b2Snia CPU-COMPANY-SYSTEM 2672007c8b2Snia 2682007c8b2Sniawhere SYSTEM can have one of these forms: 2692007c8b2Snia 2702007c8b2Snia OS 2712007c8b2Snia KERNEL-OS 2722007c8b2Snia 2732007c8b2Snia See the file `config.sub' for the possible values of each field. If 2742007c8b2Snia`config.sub' isn't included in this package, then this package doesn't 2752007c8b2Snianeed to know the machine type. 2762007c8b2Snia 2772007c8b2Snia If you are _building_ compiler tools for cross-compiling, you should 2782007c8b2Sniause the option `--target=TYPE' to select the type of system they will 2792007c8b2Sniaproduce code for. 2802007c8b2Snia 2812007c8b2Snia If you want to _use_ a cross compiler, that generates code for a 2822007c8b2Sniaplatform different from the build platform, you should specify the 2832007c8b2Snia"host" platform (i.e., that on which the generated programs will 2842007c8b2Sniaeventually be run) with `--host=TYPE'. 2852007c8b2Snia 2862007c8b2SniaSharing Defaults 2872007c8b2Snia================ 2882007c8b2Snia 2892007c8b2Snia If you want to set default values for `configure' scripts to share, 2902007c8b2Sniayou can create a site shell script called `config.site' that gives 2912007c8b2Sniadefault values for variables like `CC', `cache_file', and `prefix'. 2922007c8b2Snia`configure' looks for `PREFIX/share/config.site' if it exists, then 2932007c8b2Snia`PREFIX/etc/config.site' if it exists. Or, you can set the 2942007c8b2Snia`CONFIG_SITE' environment variable to the location of the site script. 2952007c8b2SniaA warning: not all `configure' scripts look for a site script. 2962007c8b2Snia 2972007c8b2SniaDefining Variables 2982007c8b2Snia================== 2992007c8b2Snia 3002007c8b2Snia Variables not defined in a site shell script can be set in the 3012007c8b2Sniaenvironment passed to `configure'. However, some packages may run 3022007c8b2Sniaconfigure again during the build, and the customized values of these 3032007c8b2Sniavariables may be lost. In order to avoid this problem, you should set 3042007c8b2Sniathem in the `configure' command line, using `VAR=value'. For example: 3052007c8b2Snia 3062007c8b2Snia ./configure CC=/usr/local2/bin/gcc 3072007c8b2Snia 3082007c8b2Sniacauses the specified `gcc' to be used as the C compiler (unless it is 3092007c8b2Sniaoverridden in the site shell script). 3102007c8b2Snia 3112007c8b2SniaUnfortunately, this technique does not work for `CONFIG_SHELL' due to 3122007c8b2Sniaan Autoconf bug. Until the bug is fixed you can use this workaround: 3132007c8b2Snia 3142007c8b2Snia CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 3152007c8b2Snia 3162007c8b2Snia`configure' Invocation 3172007c8b2Snia====================== 3182007c8b2Snia 3192007c8b2Snia `configure' recognizes the following options to control how it 3202007c8b2Sniaoperates. 3212007c8b2Snia 3222007c8b2Snia`--help' 3232007c8b2Snia`-h' 3242007c8b2Snia Print a summary of all of the options to `configure', and exit. 3252007c8b2Snia 3262007c8b2Snia`--help=short' 3272007c8b2Snia`--help=recursive' 3282007c8b2Snia Print a summary of the options unique to this package's 3292007c8b2Snia `configure', and exit. The `short' variant lists options used 3302007c8b2Snia only in the top level, while the `recursive' variant lists options 3312007c8b2Snia also present in any nested packages. 3322007c8b2Snia 3332007c8b2Snia`--version' 3342007c8b2Snia`-V' 3352007c8b2Snia Print the version of Autoconf used to generate the `configure' 3362007c8b2Snia script, and exit. 3372007c8b2Snia 3382007c8b2Snia`--cache-file=FILE' 3392007c8b2Snia Enable the cache: use and save the results of the tests in FILE, 3402007c8b2Snia traditionally `config.cache'. FILE defaults to `/dev/null' to 3412007c8b2Snia disable caching. 3422007c8b2Snia 3432007c8b2Snia`--config-cache' 3442007c8b2Snia`-C' 3452007c8b2Snia Alias for `--cache-file=config.cache'. 3462007c8b2Snia 3472007c8b2Snia`--quiet' 3482007c8b2Snia`--silent' 3492007c8b2Snia`-q' 3502007c8b2Snia Do not print messages saying which checks are being made. To 3512007c8b2Snia suppress all normal output, redirect it to `/dev/null' (any error 3522007c8b2Snia messages will still be shown). 3532007c8b2Snia 3542007c8b2Snia`--srcdir=DIR' 3552007c8b2Snia Look for the package's source code in directory DIR. Usually 3562007c8b2Snia `configure' can determine that directory automatically. 3572007c8b2Snia 3582007c8b2Snia`--prefix=DIR' 3592007c8b2Snia Use DIR as the installation prefix. *note Installation Names:: 3602007c8b2Snia for more details, including other options available for fine-tuning 3612007c8b2Snia the installation locations. 3622007c8b2Snia 3632007c8b2Snia`--no-create' 3642007c8b2Snia`-n' 3652007c8b2Snia Run the configure checks, but stop before creating any output 3662007c8b2Snia files. 3672007c8b2Snia 3682007c8b2Snia`configure' also accepts some other, not widely useful, options. Run 3692007c8b2Snia`configure --help' for more details. 3702007c8b2Snia 371