11a650d1eSmrgInstallation Instructions 21a650d1eSmrg************************* 31a650d1eSmrg 48a355152SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 58a355152SmrgInc. 61a650d1eSmrg 78a355152Smrg Copying and distribution of this file, with or without modification, 88a355152Smrgare permitted in any medium without royalty provided the copyright 98a355152Smrgnotice and this notice are preserved. This file is offered as-is, 108a355152Smrgwithout warranty of any kind. 111a650d1eSmrg 121a650d1eSmrgBasic Installation 131a650d1eSmrg================== 141a650d1eSmrg 151a650d1eSmrg Briefly, the shell commands `./configure; make; make install' should 161a650d1eSmrgconfigure, build, and install this package. The following 171a650d1eSmrgmore-detailed instructions are generic; see the `README' file for 188a355152Smrginstructions specific to this package. Some packages provide this 198a355152Smrg`INSTALL' file but do not implement all of the features documented 208a355152Smrgbelow. The lack of an optional feature in a given package is not 218a355152Smrgnecessarily a bug. More recommendations for GNU packages can be found 228a355152Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 231a650d1eSmrg 241a650d1eSmrg The `configure' shell script attempts to guess correct values for 251a650d1eSmrgvarious system-dependent variables used during compilation. It uses 261a650d1eSmrgthose values to create a `Makefile' in each directory of the package. 271a650d1eSmrgIt may also create one or more `.h' files containing system-dependent 281a650d1eSmrgdefinitions. Finally, it creates a shell script `config.status' that 291a650d1eSmrgyou can run in the future to recreate the current configuration, and a 301a650d1eSmrgfile `config.log' containing compiler output (useful mainly for 311a650d1eSmrgdebugging `configure'). 321a650d1eSmrg 331a650d1eSmrg It can also use an optional file (typically called `config.cache' 341a650d1eSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 351a650d1eSmrgthe results of its tests to speed up reconfiguring. Caching is 361a650d1eSmrgdisabled by default to prevent problems with accidental use of stale 371a650d1eSmrgcache files. 381a650d1eSmrg 391a650d1eSmrg If you need to do unusual things to compile the package, please try 401a650d1eSmrgto figure out how `configure' could check whether to do them, and mail 411a650d1eSmrgdiffs or instructions to the address given in the `README' so they can 421a650d1eSmrgbe considered for the next release. If you are using the cache, and at 431a650d1eSmrgsome point `config.cache' contains results you don't want to keep, you 441a650d1eSmrgmay remove or edit it. 451a650d1eSmrg 461a650d1eSmrg The file `configure.ac' (or `configure.in') is used to create 471a650d1eSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 481a650d1eSmrgyou want to change it or regenerate `configure' using a newer version 491a650d1eSmrgof `autoconf'. 501a650d1eSmrg 518a355152Smrg The simplest way to compile this package is: 521a650d1eSmrg 531a650d1eSmrg 1. `cd' to the directory containing the package's source code and type 541a650d1eSmrg `./configure' to configure the package for your system. 551a650d1eSmrg 561a650d1eSmrg Running `configure' might take a while. While running, it prints 571a650d1eSmrg some messages telling which features it is checking for. 581a650d1eSmrg 591a650d1eSmrg 2. Type `make' to compile the package. 601a650d1eSmrg 611a650d1eSmrg 3. Optionally, type `make check' to run any self-tests that come with 628a355152Smrg the package, generally using the just-built uninstalled binaries. 631a650d1eSmrg 641a650d1eSmrg 4. Type `make install' to install the programs and any data files and 658a355152Smrg documentation. When installing into a prefix owned by root, it is 668a355152Smrg recommended that the package be configured and built as a regular 678a355152Smrg user, and only the `make install' phase executed with root 688a355152Smrg privileges. 698a355152Smrg 708a355152Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 718a355152Smrg this time using the binaries in their final installed location. 728a355152Smrg This target does not install anything. Running this target as a 738a355152Smrg regular user, particularly if the prior `make install' required 748a355152Smrg root privileges, verifies that the installation completed 758a355152Smrg correctly. 768a355152Smrg 778a355152Smrg 6. You can remove the program binaries and object files from the 781a650d1eSmrg source code directory by typing `make clean'. To also remove the 791a650d1eSmrg files that `configure' created (so you can compile the package for 801a650d1eSmrg a different kind of computer), type `make distclean'. There is 811a650d1eSmrg also a `make maintainer-clean' target, but that is intended mainly 821a650d1eSmrg for the package's developers. If you use it, you may have to get 831a650d1eSmrg all sorts of other programs in order to regenerate files that came 841a650d1eSmrg with the distribution. 851a650d1eSmrg 868a355152Smrg 7. Often, you can also type `make uninstall' to remove the installed 878a355152Smrg files again. In practice, not all packages have tested that 888a355152Smrg uninstallation works correctly, even though it is required by the 898a355152Smrg GNU Coding Standards. 908a355152Smrg 918a355152Smrg 8. Some packages, particularly those that use Automake, provide `make 928a355152Smrg distcheck', which can by used by developers to test that all other 938a355152Smrg targets like `make install' and `make uninstall' work correctly. 948a355152Smrg This target is generally not run by end users. 951a650d1eSmrg 961a650d1eSmrgCompilers and Options 971a650d1eSmrg===================== 981a650d1eSmrg 991a650d1eSmrg Some systems require unusual options for compilation or linking that 1001a650d1eSmrgthe `configure' script does not know about. Run `./configure --help' 1011a650d1eSmrgfor details on some of the pertinent environment variables. 1021a650d1eSmrg 1031a650d1eSmrg You can give `configure' initial values for configuration parameters 1041a650d1eSmrgby setting variables in the command line or in the environment. Here 1051a650d1eSmrgis an example: 1061a650d1eSmrg 1071a650d1eSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 1081a650d1eSmrg 1091a650d1eSmrg *Note Defining Variables::, for more details. 1101a650d1eSmrg 1111a650d1eSmrgCompiling For Multiple Architectures 1121a650d1eSmrg==================================== 1131a650d1eSmrg 1141a650d1eSmrg You can compile the package for more than one kind of computer at the 1151a650d1eSmrgsame time, by placing the object files for each architecture in their 1161a650d1eSmrgown directory. To do this, you can use GNU `make'. `cd' to the 1171a650d1eSmrgdirectory where you want the object files and executables to go and run 1181a650d1eSmrgthe `configure' script. `configure' automatically checks for the 1198a355152Smrgsource code in the directory that `configure' is in and in `..'. This 1208a355152Smrgis known as a "VPATH" build. 1211a650d1eSmrg 1221a650d1eSmrg With a non-GNU `make', it is safer to compile the package for one 1231a650d1eSmrgarchitecture at a time in the source code directory. After you have 1241a650d1eSmrginstalled the package for one architecture, use `make distclean' before 1251a650d1eSmrgreconfiguring for another architecture. 1261a650d1eSmrg 1271a650d1eSmrg On MacOS X 10.5 and later systems, you can create libraries and 1281a650d1eSmrgexecutables that work on multiple system types--known as "fat" or 1291a650d1eSmrg"universal" binaries--by specifying multiple `-arch' options to the 1301a650d1eSmrgcompiler but only a single `-arch' option to the preprocessor. Like 1311a650d1eSmrgthis: 1321a650d1eSmrg 1331a650d1eSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1341a650d1eSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1351a650d1eSmrg CPP="gcc -E" CXXCPP="g++ -E" 1361a650d1eSmrg 1371a650d1eSmrg This is not guaranteed to produce working output in all cases, you 1381a650d1eSmrgmay have to build one architecture at a time and combine the results 1391a650d1eSmrgusing the `lipo' tool if you have problems. 1401a650d1eSmrg 1411a650d1eSmrgInstallation Names 1421a650d1eSmrg================== 1431a650d1eSmrg 1441a650d1eSmrg By default, `make install' installs the package's commands under 1451a650d1eSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1461a650d1eSmrgcan specify an installation prefix other than `/usr/local' by giving 1478a355152Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 1488a355152Smrgabsolute file name. 1491a650d1eSmrg 1501a650d1eSmrg You can specify separate installation prefixes for 1511a650d1eSmrgarchitecture-specific files and architecture-independent files. If you 1521a650d1eSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1531a650d1eSmrgPREFIX as the prefix for installing programs and libraries. 1541a650d1eSmrgDocumentation and other data files still use the regular prefix. 1551a650d1eSmrg 1561a650d1eSmrg In addition, if you use an unusual directory layout you can give 1571a650d1eSmrgoptions like `--bindir=DIR' to specify different values for particular 1581a650d1eSmrgkinds of files. Run `configure --help' for a list of the directories 1598a355152Smrgyou can set and what kinds of files go in them. In general, the 1608a355152Smrgdefault for these options is expressed in terms of `${prefix}', so that 1618a355152Smrgspecifying just `--prefix' will affect all of the other directory 1628a355152Smrgspecifications that were not explicitly provided. 1638a355152Smrg 1648a355152Smrg The most portable way to affect installation locations is to pass the 1658a355152Smrgcorrect locations to `configure'; however, many packages provide one or 1668a355152Smrgboth of the following shortcuts of passing variable assignments to the 1678a355152Smrg`make install' command line to change installation locations without 1688a355152Smrghaving to reconfigure or recompile. 1698a355152Smrg 1708a355152Smrg The first method involves providing an override variable for each 1718a355152Smrgaffected directory. For example, `make install 1728a355152Smrgprefix=/alternate/directory' will choose an alternate location for all 1738a355152Smrgdirectory configuration variables that were expressed in terms of 1748a355152Smrg`${prefix}'. Any directories that were specified during `configure', 1758a355152Smrgbut not in terms of `${prefix}', must each be overridden at install 1768a355152Smrgtime for the entire installation to be relocated. The approach of 1778a355152Smrgmakefile variable overrides for each directory variable is required by 1788a355152Smrgthe GNU Coding Standards, and ideally causes no recompilation. 1798a355152SmrgHowever, some platforms have known limitations with the semantics of 1808a355152Smrgshared libraries that end up requiring recompilation when using this 1818a355152Smrgmethod, particularly noticeable in packages that use GNU Libtool. 1828a355152Smrg 1838a355152Smrg The second method involves providing the `DESTDIR' variable. For 1848a355152Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 1858a355152Smrg`/alternate/directory' before all installation names. The approach of 1868a355152Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 1878a355152Smrgdoes not work on platforms that have drive letters. On the other hand, 1888a355152Smrgit does better at avoiding recompilation issues, and works well even 1898a355152Smrgwhen some directory options were not specified in terms of `${prefix}' 1908a355152Smrgat `configure' time. 1918a355152Smrg 1928a355152SmrgOptional Features 1938a355152Smrg================= 1941a650d1eSmrg 1951a650d1eSmrg If the package supports it, you can cause programs to be installed 1961a650d1eSmrgwith an extra prefix or suffix on their names by giving `configure' the 1971a650d1eSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1981a650d1eSmrg 1991a650d1eSmrg Some packages pay attention to `--enable-FEATURE' options to 2001a650d1eSmrg`configure', where FEATURE indicates an optional part of the package. 2011a650d1eSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 2021a650d1eSmrgis something like `gnu-as' or `x' (for the X Window System). The 2031a650d1eSmrg`README' should mention any `--enable-' and `--with-' options that the 2041a650d1eSmrgpackage recognizes. 2051a650d1eSmrg 2061a650d1eSmrg For packages that use the X Window System, `configure' can usually 2071a650d1eSmrgfind the X include and library files automatically, but if it doesn't, 2081a650d1eSmrgyou can use the `configure' options `--x-includes=DIR' and 2091a650d1eSmrg`--x-libraries=DIR' to specify their locations. 2101a650d1eSmrg 2118a355152Smrg Some packages offer the ability to configure how verbose the 2128a355152Smrgexecution of `make' will be. For these packages, running `./configure 2138a355152Smrg--enable-silent-rules' sets the default to minimal output, which can be 2148a355152Smrgoverridden with `make V=1'; while running `./configure 2158a355152Smrg--disable-silent-rules' sets the default to verbose, which can be 2168a355152Smrgoverridden with `make V=0'. 2178a355152Smrg 2181a650d1eSmrgParticular systems 2191a650d1eSmrg================== 2201a650d1eSmrg 2211a650d1eSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 2221a650d1eSmrgCC is not installed, it is recommended to use the following options in 2231a650d1eSmrgorder to use an ANSI C compiler: 2241a650d1eSmrg 2258a355152Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 2261a650d1eSmrg 2271a650d1eSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 2281a650d1eSmrg 2298a355152Smrg HP-UX `make' updates targets which have the same time stamps as 2308a355152Smrgtheir prerequisites, which makes it generally unusable when shipped 2318a355152Smrggenerated files such as `configure' are involved. Use GNU `make' 2328a355152Smrginstead. 2338a355152Smrg 2341a650d1eSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 2351a650d1eSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 2361a650d1eSmrga workaround. If GNU CC is not installed, it is therefore recommended 2371a650d1eSmrgto try 2381a650d1eSmrg 2391a650d1eSmrg ./configure CC="cc" 2401a650d1eSmrg 2411a650d1eSmrgand if that doesn't work, try 2421a650d1eSmrg 2431a650d1eSmrg ./configure CC="cc -nodtk" 2441a650d1eSmrg 2458a355152Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 2468a355152Smrgdirectory contains several dysfunctional programs; working variants of 2478a355152Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 2488a355152Smrgin your `PATH', put it _after_ `/usr/bin'. 2498a355152Smrg 2508a355152Smrg On Haiku, software installed for all users goes in `/boot/common', 2518a355152Smrgnot `/usr/local'. It is recommended to use the following options: 2528a355152Smrg 2538a355152Smrg ./configure --prefix=/boot/common 2548a355152Smrg 2551a650d1eSmrgSpecifying the System Type 2561a650d1eSmrg========================== 2571a650d1eSmrg 2581a650d1eSmrg There may be some features `configure' cannot figure out 2591a650d1eSmrgautomatically, but needs to determine by the type of machine the package 2601a650d1eSmrgwill run on. Usually, assuming the package is built to be run on the 2611a650d1eSmrg_same_ architectures, `configure' can figure that out, but if it prints 2621a650d1eSmrga message saying it cannot guess the machine type, give it the 2631a650d1eSmrg`--build=TYPE' option. TYPE can either be a short name for the system 2641a650d1eSmrgtype, such as `sun4', or a canonical name which has the form: 2651a650d1eSmrg 2661a650d1eSmrg CPU-COMPANY-SYSTEM 2671a650d1eSmrg 2681a650d1eSmrgwhere SYSTEM can have one of these forms: 2691a650d1eSmrg 2708a355152Smrg OS 2718a355152Smrg KERNEL-OS 2721a650d1eSmrg 2731a650d1eSmrg See the file `config.sub' for the possible values of each field. If 2741a650d1eSmrg`config.sub' isn't included in this package, then this package doesn't 2751a650d1eSmrgneed to know the machine type. 2761a650d1eSmrg 2771a650d1eSmrg If you are _building_ compiler tools for cross-compiling, you should 2781a650d1eSmrguse the option `--target=TYPE' to select the type of system they will 2791a650d1eSmrgproduce code for. 2801a650d1eSmrg 2811a650d1eSmrg If you want to _use_ a cross compiler, that generates code for a 2821a650d1eSmrgplatform different from the build platform, you should specify the 2831a650d1eSmrg"host" platform (i.e., that on which the generated programs will 2841a650d1eSmrgeventually be run) with `--host=TYPE'. 2851a650d1eSmrg 2861a650d1eSmrgSharing Defaults 2871a650d1eSmrg================ 2881a650d1eSmrg 2891a650d1eSmrg If you want to set default values for `configure' scripts to share, 2901a650d1eSmrgyou can create a site shell script called `config.site' that gives 2911a650d1eSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 2921a650d1eSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2931a650d1eSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2941a650d1eSmrg`CONFIG_SITE' environment variable to the location of the site script. 2951a650d1eSmrgA warning: not all `configure' scripts look for a site script. 2961a650d1eSmrg 2971a650d1eSmrgDefining Variables 2981a650d1eSmrg================== 2991a650d1eSmrg 3001a650d1eSmrg Variables not defined in a site shell script can be set in the 3011a650d1eSmrgenvironment passed to `configure'. However, some packages may run 3021a650d1eSmrgconfigure again during the build, and the customized values of these 3031a650d1eSmrgvariables may be lost. In order to avoid this problem, you should set 3041a650d1eSmrgthem in the `configure' command line, using `VAR=value'. For example: 3051a650d1eSmrg 3061a650d1eSmrg ./configure CC=/usr/local2/bin/gcc 3071a650d1eSmrg 3081a650d1eSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 3091a650d1eSmrgoverridden in the site shell script). 3101a650d1eSmrg 3111a650d1eSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 3121a650d1eSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 3131a650d1eSmrg 3141a650d1eSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 3151a650d1eSmrg 3161a650d1eSmrg`configure' Invocation 3171a650d1eSmrg====================== 3181a650d1eSmrg 3191a650d1eSmrg `configure' recognizes the following options to control how it 3201a650d1eSmrgoperates. 3211a650d1eSmrg 3221a650d1eSmrg`--help' 3231a650d1eSmrg`-h' 3241a650d1eSmrg Print a summary of all of the options to `configure', and exit. 3251a650d1eSmrg 3261a650d1eSmrg`--help=short' 3271a650d1eSmrg`--help=recursive' 3281a650d1eSmrg Print a summary of the options unique to this package's 3291a650d1eSmrg `configure', and exit. The `short' variant lists options used 3301a650d1eSmrg only in the top level, while the `recursive' variant lists options 3311a650d1eSmrg also present in any nested packages. 3321a650d1eSmrg 3331a650d1eSmrg`--version' 3341a650d1eSmrg`-V' 3351a650d1eSmrg Print the version of Autoconf used to generate the `configure' 3361a650d1eSmrg script, and exit. 3371a650d1eSmrg 3381a650d1eSmrg`--cache-file=FILE' 3391a650d1eSmrg Enable the cache: use and save the results of the tests in FILE, 3401a650d1eSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 3411a650d1eSmrg disable caching. 3421a650d1eSmrg 3431a650d1eSmrg`--config-cache' 3441a650d1eSmrg`-C' 3451a650d1eSmrg Alias for `--cache-file=config.cache'. 3461a650d1eSmrg 3471a650d1eSmrg`--quiet' 3481a650d1eSmrg`--silent' 3491a650d1eSmrg`-q' 3501a650d1eSmrg Do not print messages saying which checks are being made. To 3511a650d1eSmrg suppress all normal output, redirect it to `/dev/null' (any error 3521a650d1eSmrg messages will still be shown). 3531a650d1eSmrg 3541a650d1eSmrg`--srcdir=DIR' 3551a650d1eSmrg Look for the package's source code in directory DIR. Usually 3561a650d1eSmrg `configure' can determine that directory automatically. 3571a650d1eSmrg 3581a650d1eSmrg`--prefix=DIR' 3598a355152Smrg Use DIR as the installation prefix. *note Installation Names:: 3601a650d1eSmrg for more details, including other options available for fine-tuning 3611a650d1eSmrg the installation locations. 3621a650d1eSmrg 3631a650d1eSmrg`--no-create' 3641a650d1eSmrg`-n' 3651a650d1eSmrg Run the configure checks, but stop before creating any output 3661a650d1eSmrg files. 3671a650d1eSmrg 3681a650d1eSmrg`configure' also accepts some other, not widely useful, options. Run 3691a650d1eSmrg`configure --help' for more details. 3701a650d1eSmrg 371