18fff3f40SmrgInstallation Instructions 28fff3f40Smrg************************* 38fff3f40Smrg 46a45684fSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 56a45684fSmrgInc. 68fff3f40Smrg 76a45684fSmrg Copying and distribution of this file, with or without modification, 86a45684fSmrgare permitted in any medium without royalty provided the copyright 96a45684fSmrgnotice and this notice are preserved. This file is offered as-is, 106a45684fSmrgwithout warranty of any kind. 118fff3f40Smrg 128fff3f40SmrgBasic Installation 138fff3f40Smrg================== 148fff3f40Smrg 158fff3f40Smrg Briefly, the shell commands `./configure; make; make install' should 168fff3f40Smrgconfigure, build, and install this package. The following 178fff3f40Smrgmore-detailed instructions are generic; see the `README' file for 186a45684fSmrginstructions specific to this package. Some packages provide this 196a45684fSmrg`INSTALL' file but do not implement all of the features documented 206a45684fSmrgbelow. The lack of an optional feature in a given package is not 216a45684fSmrgnecessarily a bug. More recommendations for GNU packages can be found 226a45684fSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 238fff3f40Smrg 248fff3f40Smrg The `configure' shell script attempts to guess correct values for 258fff3f40Smrgvarious system-dependent variables used during compilation. It uses 268fff3f40Smrgthose values to create a `Makefile' in each directory of the package. 278fff3f40SmrgIt may also create one or more `.h' files containing system-dependent 288fff3f40Smrgdefinitions. Finally, it creates a shell script `config.status' that 298fff3f40Smrgyou can run in the future to recreate the current configuration, and a 308fff3f40Smrgfile `config.log' containing compiler output (useful mainly for 318fff3f40Smrgdebugging `configure'). 328fff3f40Smrg 338fff3f40Smrg It can also use an optional file (typically called `config.cache' 348fff3f40Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 358fff3f40Smrgthe results of its tests to speed up reconfiguring. Caching is 368fff3f40Smrgdisabled by default to prevent problems with accidental use of stale 378fff3f40Smrgcache files. 388fff3f40Smrg 398fff3f40Smrg If you need to do unusual things to compile the package, please try 408fff3f40Smrgto figure out how `configure' could check whether to do them, and mail 418fff3f40Smrgdiffs or instructions to the address given in the `README' so they can 428fff3f40Smrgbe considered for the next release. If you are using the cache, and at 438fff3f40Smrgsome point `config.cache' contains results you don't want to keep, you 448fff3f40Smrgmay remove or edit it. 458fff3f40Smrg 468fff3f40Smrg The file `configure.ac' (or `configure.in') is used to create 478fff3f40Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 488fff3f40Smrgyou want to change it or regenerate `configure' using a newer version 498fff3f40Smrgof `autoconf'. 508fff3f40Smrg 516a45684fSmrg The simplest way to compile this package is: 528fff3f40Smrg 538fff3f40Smrg 1. `cd' to the directory containing the package's source code and type 548fff3f40Smrg `./configure' to configure the package for your system. 558fff3f40Smrg 568fff3f40Smrg Running `configure' might take a while. While running, it prints 578fff3f40Smrg some messages telling which features it is checking for. 588fff3f40Smrg 598fff3f40Smrg 2. Type `make' to compile the package. 608fff3f40Smrg 618fff3f40Smrg 3. Optionally, type `make check' to run any self-tests that come with 626a45684fSmrg the package, generally using the just-built uninstalled binaries. 638fff3f40Smrg 648fff3f40Smrg 4. Type `make install' to install the programs and any data files and 656a45684fSmrg documentation. When installing into a prefix owned by root, it is 666a45684fSmrg recommended that the package be configured and built as a regular 676a45684fSmrg user, and only the `make install' phase executed with root 686a45684fSmrg privileges. 696a45684fSmrg 706a45684fSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 716a45684fSmrg this time using the binaries in their final installed location. 726a45684fSmrg This target does not install anything. Running this target as a 736a45684fSmrg regular user, particularly if the prior `make install' required 746a45684fSmrg root privileges, verifies that the installation completed 756a45684fSmrg correctly. 766a45684fSmrg 776a45684fSmrg 6. You can remove the program binaries and object files from the 788fff3f40Smrg source code directory by typing `make clean'. To also remove the 798fff3f40Smrg files that `configure' created (so you can compile the package for 808fff3f40Smrg a different kind of computer), type `make distclean'. There is 818fff3f40Smrg also a `make maintainer-clean' target, but that is intended mainly 828fff3f40Smrg for the package's developers. If you use it, you may have to get 838fff3f40Smrg all sorts of other programs in order to regenerate files that came 848fff3f40Smrg with the distribution. 858fff3f40Smrg 866a45684fSmrg 7. Often, you can also type `make uninstall' to remove the installed 876a45684fSmrg files again. In practice, not all packages have tested that 886a45684fSmrg uninstallation works correctly, even though it is required by the 896a45684fSmrg GNU Coding Standards. 906a45684fSmrg 916a45684fSmrg 8. Some packages, particularly those that use Automake, provide `make 926a45684fSmrg distcheck', which can by used by developers to test that all other 936a45684fSmrg targets like `make install' and `make uninstall' work correctly. 946a45684fSmrg This target is generally not run by end users. 958fff3f40Smrg 968fff3f40SmrgCompilers and Options 978fff3f40Smrg===================== 988fff3f40Smrg 998fff3f40Smrg Some systems require unusual options for compilation or linking that 1008fff3f40Smrgthe `configure' script does not know about. Run `./configure --help' 1018fff3f40Smrgfor details on some of the pertinent environment variables. 1028fff3f40Smrg 1038fff3f40Smrg You can give `configure' initial values for configuration parameters 1048fff3f40Smrgby setting variables in the command line or in the environment. Here 1058fff3f40Smrgis an example: 1068fff3f40Smrg 1078fff3f40Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 1088fff3f40Smrg 1098fff3f40Smrg *Note Defining Variables::, for more details. 1108fff3f40Smrg 1118fff3f40SmrgCompiling For Multiple Architectures 1128fff3f40Smrg==================================== 1138fff3f40Smrg 1148fff3f40Smrg You can compile the package for more than one kind of computer at the 1158fff3f40Smrgsame time, by placing the object files for each architecture in their 1168fff3f40Smrgown directory. To do this, you can use GNU `make'. `cd' to the 1178fff3f40Smrgdirectory where you want the object files and executables to go and run 1188fff3f40Smrgthe `configure' script. `configure' automatically checks for the 1196a45684fSmrgsource code in the directory that `configure' is in and in `..'. This 1206a45684fSmrgis known as a "VPATH" build. 1218fff3f40Smrg 1228fff3f40Smrg With a non-GNU `make', it is safer to compile the package for one 1238fff3f40Smrgarchitecture at a time in the source code directory. After you have 1248fff3f40Smrginstalled the package for one architecture, use `make distclean' before 1258fff3f40Smrgreconfiguring for another architecture. 1268fff3f40Smrg 1278fff3f40Smrg On MacOS X 10.5 and later systems, you can create libraries and 1288fff3f40Smrgexecutables that work on multiple system types--known as "fat" or 1298fff3f40Smrg"universal" binaries--by specifying multiple `-arch' options to the 1308fff3f40Smrgcompiler but only a single `-arch' option to the preprocessor. Like 1318fff3f40Smrgthis: 1328fff3f40Smrg 1338fff3f40Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1348fff3f40Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1358fff3f40Smrg CPP="gcc -E" CXXCPP="g++ -E" 1368fff3f40Smrg 1378fff3f40Smrg This is not guaranteed to produce working output in all cases, you 1388fff3f40Smrgmay have to build one architecture at a time and combine the results 1398fff3f40Smrgusing the `lipo' tool if you have problems. 1408fff3f40Smrg 1418fff3f40SmrgInstallation Names 1428fff3f40Smrg================== 1438fff3f40Smrg 1448fff3f40Smrg By default, `make install' installs the package's commands under 1458fff3f40Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1468fff3f40Smrgcan specify an installation prefix other than `/usr/local' by giving 1476a45684fSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 1486a45684fSmrgabsolute file name. 1498fff3f40Smrg 1508fff3f40Smrg You can specify separate installation prefixes for 1518fff3f40Smrgarchitecture-specific files and architecture-independent files. If you 1528fff3f40Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1538fff3f40SmrgPREFIX as the prefix for installing programs and libraries. 1548fff3f40SmrgDocumentation and other data files still use the regular prefix. 1558fff3f40Smrg 1568fff3f40Smrg In addition, if you use an unusual directory layout you can give 1578fff3f40Smrgoptions like `--bindir=DIR' to specify different values for particular 1588fff3f40Smrgkinds of files. Run `configure --help' for a list of the directories 1596a45684fSmrgyou can set and what kinds of files go in them. In general, the 1606a45684fSmrgdefault for these options is expressed in terms of `${prefix}', so that 1616a45684fSmrgspecifying just `--prefix' will affect all of the other directory 1626a45684fSmrgspecifications that were not explicitly provided. 1636a45684fSmrg 1646a45684fSmrg The most portable way to affect installation locations is to pass the 1656a45684fSmrgcorrect locations to `configure'; however, many packages provide one or 1666a45684fSmrgboth of the following shortcuts of passing variable assignments to the 1676a45684fSmrg`make install' command line to change installation locations without 1686a45684fSmrghaving to reconfigure or recompile. 1696a45684fSmrg 1706a45684fSmrg The first method involves providing an override variable for each 1716a45684fSmrgaffected directory. For example, `make install 1726a45684fSmrgprefix=/alternate/directory' will choose an alternate location for all 1736a45684fSmrgdirectory configuration variables that were expressed in terms of 1746a45684fSmrg`${prefix}'. Any directories that were specified during `configure', 1756a45684fSmrgbut not in terms of `${prefix}', must each be overridden at install 1766a45684fSmrgtime for the entire installation to be relocated. The approach of 1776a45684fSmrgmakefile variable overrides for each directory variable is required by 1786a45684fSmrgthe GNU Coding Standards, and ideally causes no recompilation. 1796a45684fSmrgHowever, some platforms have known limitations with the semantics of 1806a45684fSmrgshared libraries that end up requiring recompilation when using this 1816a45684fSmrgmethod, particularly noticeable in packages that use GNU Libtool. 1826a45684fSmrg 1836a45684fSmrg The second method involves providing the `DESTDIR' variable. For 1846a45684fSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 1856a45684fSmrg`/alternate/directory' before all installation names. The approach of 1866a45684fSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 1876a45684fSmrgdoes not work on platforms that have drive letters. On the other hand, 1886a45684fSmrgit does better at avoiding recompilation issues, and works well even 1896a45684fSmrgwhen some directory options were not specified in terms of `${prefix}' 1906a45684fSmrgat `configure' time. 1916a45684fSmrg 1926a45684fSmrgOptional Features 1936a45684fSmrg================= 1948fff3f40Smrg 1958fff3f40Smrg If the package supports it, you can cause programs to be installed 1968fff3f40Smrgwith an extra prefix or suffix on their names by giving `configure' the 1978fff3f40Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1988fff3f40Smrg 1998fff3f40Smrg Some packages pay attention to `--enable-FEATURE' options to 2008fff3f40Smrg`configure', where FEATURE indicates an optional part of the package. 2018fff3f40SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 2028fff3f40Smrgis something like `gnu-as' or `x' (for the X Window System). The 2038fff3f40Smrg`README' should mention any `--enable-' and `--with-' options that the 2048fff3f40Smrgpackage recognizes. 2058fff3f40Smrg 2068fff3f40Smrg For packages that use the X Window System, `configure' can usually 2078fff3f40Smrgfind the X include and library files automatically, but if it doesn't, 2088fff3f40Smrgyou can use the `configure' options `--x-includes=DIR' and 2098fff3f40Smrg`--x-libraries=DIR' to specify their locations. 2108fff3f40Smrg 2116a45684fSmrg Some packages offer the ability to configure how verbose the 2126a45684fSmrgexecution of `make' will be. For these packages, running `./configure 2136a45684fSmrg--enable-silent-rules' sets the default to minimal output, which can be 2146a45684fSmrgoverridden with `make V=1'; while running `./configure 2156a45684fSmrg--disable-silent-rules' sets the default to verbose, which can be 2166a45684fSmrgoverridden with `make V=0'. 2176a45684fSmrg 2188fff3f40SmrgParticular systems 2198fff3f40Smrg================== 2208fff3f40Smrg 2218fff3f40Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 2228fff3f40SmrgCC is not installed, it is recommended to use the following options in 2238fff3f40Smrgorder to use an ANSI C compiler: 2248fff3f40Smrg 2256a45684fSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 2268fff3f40Smrg 2278fff3f40Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 2288fff3f40Smrg 2296a45684fSmrg HP-UX `make' updates targets which have the same time stamps as 2306a45684fSmrgtheir prerequisites, which makes it generally unusable when shipped 2316a45684fSmrggenerated files such as `configure' are involved. Use GNU `make' 2326a45684fSmrginstead. 2336a45684fSmrg 2348fff3f40Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 2358fff3f40Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 2368fff3f40Smrga workaround. If GNU CC is not installed, it is therefore recommended 2378fff3f40Smrgto try 2388fff3f40Smrg 2398fff3f40Smrg ./configure CC="cc" 2408fff3f40Smrg 2418fff3f40Smrgand if that doesn't work, try 2428fff3f40Smrg 2438fff3f40Smrg ./configure CC="cc -nodtk" 2448fff3f40Smrg 2456a45684fSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 2466a45684fSmrgdirectory contains several dysfunctional programs; working variants of 2476a45684fSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 2486a45684fSmrgin your `PATH', put it _after_ `/usr/bin'. 2496a45684fSmrg 2506a45684fSmrg On Haiku, software installed for all users goes in `/boot/common', 2516a45684fSmrgnot `/usr/local'. It is recommended to use the following options: 2526a45684fSmrg 2536a45684fSmrg ./configure --prefix=/boot/common 2546a45684fSmrg 2558fff3f40SmrgSpecifying the System Type 2568fff3f40Smrg========================== 2578fff3f40Smrg 2588fff3f40Smrg There may be some features `configure' cannot figure out 2598fff3f40Smrgautomatically, but needs to determine by the type of machine the package 2608fff3f40Smrgwill run on. Usually, assuming the package is built to be run on the 2618fff3f40Smrg_same_ architectures, `configure' can figure that out, but if it prints 2628fff3f40Smrga message saying it cannot guess the machine type, give it the 2638fff3f40Smrg`--build=TYPE' option. TYPE can either be a short name for the system 2648fff3f40Smrgtype, such as `sun4', or a canonical name which has the form: 2658fff3f40Smrg 2668fff3f40Smrg CPU-COMPANY-SYSTEM 2678fff3f40Smrg 2688fff3f40Smrgwhere SYSTEM can have one of these forms: 2698fff3f40Smrg 2706a45684fSmrg OS 2716a45684fSmrg KERNEL-OS 2728fff3f40Smrg 2738fff3f40Smrg See the file `config.sub' for the possible values of each field. If 2748fff3f40Smrg`config.sub' isn't included in this package, then this package doesn't 2758fff3f40Smrgneed to know the machine type. 2768fff3f40Smrg 2778fff3f40Smrg If you are _building_ compiler tools for cross-compiling, you should 2788fff3f40Smrguse the option `--target=TYPE' to select the type of system they will 2798fff3f40Smrgproduce code for. 2808fff3f40Smrg 2818fff3f40Smrg If you want to _use_ a cross compiler, that generates code for a 2828fff3f40Smrgplatform different from the build platform, you should specify the 2838fff3f40Smrg"host" platform (i.e., that on which the generated programs will 2848fff3f40Smrgeventually be run) with `--host=TYPE'. 2858fff3f40Smrg 2868fff3f40SmrgSharing Defaults 2878fff3f40Smrg================ 2888fff3f40Smrg 2898fff3f40Smrg If you want to set default values for `configure' scripts to share, 2908fff3f40Smrgyou can create a site shell script called `config.site' that gives 2918fff3f40Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 2928fff3f40Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2938fff3f40Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2948fff3f40Smrg`CONFIG_SITE' environment variable to the location of the site script. 2958fff3f40SmrgA warning: not all `configure' scripts look for a site script. 2968fff3f40Smrg 2978fff3f40SmrgDefining Variables 2988fff3f40Smrg================== 2998fff3f40Smrg 3008fff3f40Smrg Variables not defined in a site shell script can be set in the 3018fff3f40Smrgenvironment passed to `configure'. However, some packages may run 3028fff3f40Smrgconfigure again during the build, and the customized values of these 3038fff3f40Smrgvariables may be lost. In order to avoid this problem, you should set 3048fff3f40Smrgthem in the `configure' command line, using `VAR=value'. For example: 3058fff3f40Smrg 3068fff3f40Smrg ./configure CC=/usr/local2/bin/gcc 3078fff3f40Smrg 3088fff3f40Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 3098fff3f40Smrgoverridden in the site shell script). 3108fff3f40Smrg 3118fff3f40SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 3128fff3f40Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 3138fff3f40Smrg 3148fff3f40Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 3158fff3f40Smrg 3168fff3f40Smrg`configure' Invocation 3178fff3f40Smrg====================== 3188fff3f40Smrg 3198fff3f40Smrg `configure' recognizes the following options to control how it 3208fff3f40Smrgoperates. 3218fff3f40Smrg 3228fff3f40Smrg`--help' 3238fff3f40Smrg`-h' 3248fff3f40Smrg Print a summary of all of the options to `configure', and exit. 3258fff3f40Smrg 3268fff3f40Smrg`--help=short' 3278fff3f40Smrg`--help=recursive' 3288fff3f40Smrg Print a summary of the options unique to this package's 3298fff3f40Smrg `configure', and exit. The `short' variant lists options used 3308fff3f40Smrg only in the top level, while the `recursive' variant lists options 3318fff3f40Smrg also present in any nested packages. 3328fff3f40Smrg 3338fff3f40Smrg`--version' 3348fff3f40Smrg`-V' 3358fff3f40Smrg Print the version of Autoconf used to generate the `configure' 3368fff3f40Smrg script, and exit. 3378fff3f40Smrg 3388fff3f40Smrg`--cache-file=FILE' 3398fff3f40Smrg Enable the cache: use and save the results of the tests in FILE, 3408fff3f40Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 3418fff3f40Smrg disable caching. 3428fff3f40Smrg 3438fff3f40Smrg`--config-cache' 3448fff3f40Smrg`-C' 3458fff3f40Smrg Alias for `--cache-file=config.cache'. 3468fff3f40Smrg 3478fff3f40Smrg`--quiet' 3488fff3f40Smrg`--silent' 3498fff3f40Smrg`-q' 3508fff3f40Smrg Do not print messages saying which checks are being made. To 3518fff3f40Smrg suppress all normal output, redirect it to `/dev/null' (any error 3528fff3f40Smrg messages will still be shown). 3538fff3f40Smrg 3548fff3f40Smrg`--srcdir=DIR' 3558fff3f40Smrg Look for the package's source code in directory DIR. Usually 3568fff3f40Smrg `configure' can determine that directory automatically. 3578fff3f40Smrg 3588fff3f40Smrg`--prefix=DIR' 3596a45684fSmrg Use DIR as the installation prefix. *note Installation Names:: 3608fff3f40Smrg for more details, including other options available for fine-tuning 3618fff3f40Smrg the installation locations. 3628fff3f40Smrg 3638fff3f40Smrg`--no-create' 3648fff3f40Smrg`-n' 3658fff3f40Smrg Run the configure checks, but stop before creating any output 3668fff3f40Smrg files. 3678fff3f40Smrg 3688fff3f40Smrg`configure' also accepts some other, not widely useful, options. Run 3698fff3f40Smrg`configure --help' for more details. 3708fff3f40Smrg 371