19c9ff80cSmrgInstallation Instructions 29c9ff80cSmrg************************* 31f0ac6a5Smrg 4d21ab8bcSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5d21ab8bcSmrgInc. 61f0ac6a5Smrg 7d21ab8bcSmrg Copying and distribution of this file, with or without modification, 8d21ab8bcSmrgare permitted in any medium without royalty provided the copyright 9d21ab8bcSmrgnotice and this notice are preserved. This file is offered as-is, 10d21ab8bcSmrgwithout warranty of any kind. 119c9ff80cSmrg 129c9ff80cSmrgBasic Installation 139c9ff80cSmrg================== 149c9ff80cSmrg 159c9ff80cSmrg Briefly, the shell commands `./configure; make; make install' should 169c9ff80cSmrgconfigure, build, and install this package. The following 179c9ff80cSmrgmore-detailed instructions are generic; see the `README' file for 18d21ab8bcSmrginstructions specific to this package. Some packages provide this 19d21ab8bcSmrg`INSTALL' file but do not implement all of the features documented 20d21ab8bcSmrgbelow. The lack of an optional feature in a given package is not 21d21ab8bcSmrgnecessarily a bug. More recommendations for GNU packages can be found 22d21ab8bcSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 239c9ff80cSmrg 249c9ff80cSmrg The `configure' shell script attempts to guess correct values for 259c9ff80cSmrgvarious system-dependent variables used during compilation. It uses 269c9ff80cSmrgthose values to create a `Makefile' in each directory of the package. 279c9ff80cSmrgIt may also create one or more `.h' files containing system-dependent 289c9ff80cSmrgdefinitions. Finally, it creates a shell script `config.status' that 299c9ff80cSmrgyou can run in the future to recreate the current configuration, and a 309c9ff80cSmrgfile `config.log' containing compiler output (useful mainly for 319c9ff80cSmrgdebugging `configure'). 329c9ff80cSmrg 339c9ff80cSmrg It can also use an optional file (typically called `config.cache' 349c9ff80cSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 359c9ff80cSmrgthe results of its tests to speed up reconfiguring. Caching is 369c9ff80cSmrgdisabled by default to prevent problems with accidental use of stale 379c9ff80cSmrgcache files. 389c9ff80cSmrg 399c9ff80cSmrg If you need to do unusual things to compile the package, please try 409c9ff80cSmrgto figure out how `configure' could check whether to do them, and mail 419c9ff80cSmrgdiffs or instructions to the address given in the `README' so they can 429c9ff80cSmrgbe considered for the next release. If you are using the cache, and at 439c9ff80cSmrgsome point `config.cache' contains results you don't want to keep, you 449c9ff80cSmrgmay remove or edit it. 459c9ff80cSmrg 469c9ff80cSmrg The file `configure.ac' (or `configure.in') is used to create 479c9ff80cSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 489c9ff80cSmrgyou want to change it or regenerate `configure' using a newer version 499c9ff80cSmrgof `autoconf'. 509c9ff80cSmrg 51d21ab8bcSmrg The simplest way to compile this package is: 529c9ff80cSmrg 539c9ff80cSmrg 1. `cd' to the directory containing the package's source code and type 549c9ff80cSmrg `./configure' to configure the package for your system. 559c9ff80cSmrg 569c9ff80cSmrg Running `configure' might take a while. While running, it prints 579c9ff80cSmrg some messages telling which features it is checking for. 589c9ff80cSmrg 599c9ff80cSmrg 2. Type `make' to compile the package. 609c9ff80cSmrg 619c9ff80cSmrg 3. Optionally, type `make check' to run any self-tests that come with 62d21ab8bcSmrg the package, generally using the just-built uninstalled binaries. 639c9ff80cSmrg 649c9ff80cSmrg 4. Type `make install' to install the programs and any data files and 65d21ab8bcSmrg documentation. When installing into a prefix owned by root, it is 66d21ab8bcSmrg recommended that the package be configured and built as a regular 67d21ab8bcSmrg user, and only the `make install' phase executed with root 68d21ab8bcSmrg privileges. 69d21ab8bcSmrg 70d21ab8bcSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71d21ab8bcSmrg this time using the binaries in their final installed location. 72d21ab8bcSmrg This target does not install anything. Running this target as a 73d21ab8bcSmrg regular user, particularly if the prior `make install' required 74d21ab8bcSmrg root privileges, verifies that the installation completed 75d21ab8bcSmrg correctly. 76d21ab8bcSmrg 77d21ab8bcSmrg 6. You can remove the program binaries and object files from the 789c9ff80cSmrg source code directory by typing `make clean'. To also remove the 799c9ff80cSmrg files that `configure' created (so you can compile the package for 809c9ff80cSmrg a different kind of computer), type `make distclean'. There is 819c9ff80cSmrg also a `make maintainer-clean' target, but that is intended mainly 829c9ff80cSmrg for the package's developers. If you use it, you may have to get 839c9ff80cSmrg all sorts of other programs in order to regenerate files that came 849c9ff80cSmrg with the distribution. 859c9ff80cSmrg 86d21ab8bcSmrg 7. Often, you can also type `make uninstall' to remove the installed 87d21ab8bcSmrg files again. In practice, not all packages have tested that 88d21ab8bcSmrg uninstallation works correctly, even though it is required by the 89d21ab8bcSmrg GNU Coding Standards. 90d21ab8bcSmrg 91d21ab8bcSmrg 8. Some packages, particularly those that use Automake, provide `make 92d21ab8bcSmrg distcheck', which can by used by developers to test that all other 93d21ab8bcSmrg targets like `make install' and `make uninstall' work correctly. 94d21ab8bcSmrg This target is generally not run by end users. 959c9ff80cSmrg 969c9ff80cSmrgCompilers and Options 979c9ff80cSmrg===================== 989c9ff80cSmrg 999c9ff80cSmrg Some systems require unusual options for compilation or linking that 1009c9ff80cSmrgthe `configure' script does not know about. Run `./configure --help' 1019c9ff80cSmrgfor details on some of the pertinent environment variables. 1029c9ff80cSmrg 1039c9ff80cSmrg You can give `configure' initial values for configuration parameters 1049c9ff80cSmrgby setting variables in the command line or in the environment. Here 1059c9ff80cSmrgis an example: 1069c9ff80cSmrg 1079c9ff80cSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 1089c9ff80cSmrg 1099c9ff80cSmrg *Note Defining Variables::, for more details. 1109c9ff80cSmrg 1119c9ff80cSmrgCompiling For Multiple Architectures 1129c9ff80cSmrg==================================== 1139c9ff80cSmrg 1149c9ff80cSmrg You can compile the package for more than one kind of computer at the 1159c9ff80cSmrgsame time, by placing the object files for each architecture in their 1169c9ff80cSmrgown directory. To do this, you can use GNU `make'. `cd' to the 1179c9ff80cSmrgdirectory where you want the object files and executables to go and run 1189c9ff80cSmrgthe `configure' script. `configure' automatically checks for the 119d21ab8bcSmrgsource code in the directory that `configure' is in and in `..'. This 120d21ab8bcSmrgis known as a "VPATH" build. 1219c9ff80cSmrg 1229c9ff80cSmrg With a non-GNU `make', it is safer to compile the package for one 1239c9ff80cSmrgarchitecture at a time in the source code directory. After you have 1249c9ff80cSmrginstalled the package for one architecture, use `make distclean' before 1259c9ff80cSmrgreconfiguring for another architecture. 1269c9ff80cSmrg 1279c9ff80cSmrg On MacOS X 10.5 and later systems, you can create libraries and 1289c9ff80cSmrgexecutables that work on multiple system types--known as "fat" or 1299c9ff80cSmrg"universal" binaries--by specifying multiple `-arch' options to the 1309c9ff80cSmrgcompiler but only a single `-arch' option to the preprocessor. Like 1319c9ff80cSmrgthis: 1329c9ff80cSmrg 1339c9ff80cSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1349c9ff80cSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1359c9ff80cSmrg CPP="gcc -E" CXXCPP="g++ -E" 1369c9ff80cSmrg 1379c9ff80cSmrg This is not guaranteed to produce working output in all cases, you 1389c9ff80cSmrgmay have to build one architecture at a time and combine the results 1399c9ff80cSmrgusing the `lipo' tool if you have problems. 1409c9ff80cSmrg 1419c9ff80cSmrgInstallation Names 1429c9ff80cSmrg================== 1439c9ff80cSmrg 1449c9ff80cSmrg By default, `make install' installs the package's commands under 1459c9ff80cSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1469c9ff80cSmrgcan specify an installation prefix other than `/usr/local' by giving 147d21ab8bcSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148d21ab8bcSmrgabsolute file name. 1499c9ff80cSmrg 1509c9ff80cSmrg You can specify separate installation prefixes for 1519c9ff80cSmrgarchitecture-specific files and architecture-independent files. If you 1529c9ff80cSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1539c9ff80cSmrgPREFIX as the prefix for installing programs and libraries. 1549c9ff80cSmrgDocumentation and other data files still use the regular prefix. 1559c9ff80cSmrg 1569c9ff80cSmrg In addition, if you use an unusual directory layout you can give 1579c9ff80cSmrgoptions like `--bindir=DIR' to specify different values for particular 1589c9ff80cSmrgkinds of files. Run `configure --help' for a list of the directories 159d21ab8bcSmrgyou can set and what kinds of files go in them. In general, the 160d21ab8bcSmrgdefault for these options is expressed in terms of `${prefix}', so that 161d21ab8bcSmrgspecifying just `--prefix' will affect all of the other directory 162d21ab8bcSmrgspecifications that were not explicitly provided. 163d21ab8bcSmrg 164d21ab8bcSmrg The most portable way to affect installation locations is to pass the 165d21ab8bcSmrgcorrect locations to `configure'; however, many packages provide one or 166d21ab8bcSmrgboth of the following shortcuts of passing variable assignments to the 167d21ab8bcSmrg`make install' command line to change installation locations without 168d21ab8bcSmrghaving to reconfigure or recompile. 169d21ab8bcSmrg 170d21ab8bcSmrg The first method involves providing an override variable for each 171d21ab8bcSmrgaffected directory. For example, `make install 172d21ab8bcSmrgprefix=/alternate/directory' will choose an alternate location for all 173d21ab8bcSmrgdirectory configuration variables that were expressed in terms of 174d21ab8bcSmrg`${prefix}'. Any directories that were specified during `configure', 175d21ab8bcSmrgbut not in terms of `${prefix}', must each be overridden at install 176d21ab8bcSmrgtime for the entire installation to be relocated. The approach of 177d21ab8bcSmrgmakefile variable overrides for each directory variable is required by 178d21ab8bcSmrgthe GNU Coding Standards, and ideally causes no recompilation. 179d21ab8bcSmrgHowever, some platforms have known limitations with the semantics of 180d21ab8bcSmrgshared libraries that end up requiring recompilation when using this 181d21ab8bcSmrgmethod, particularly noticeable in packages that use GNU Libtool. 182d21ab8bcSmrg 183d21ab8bcSmrg The second method involves providing the `DESTDIR' variable. For 184d21ab8bcSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 185d21ab8bcSmrg`/alternate/directory' before all installation names. The approach of 186d21ab8bcSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187d21ab8bcSmrgdoes not work on platforms that have drive letters. On the other hand, 188d21ab8bcSmrgit does better at avoiding recompilation issues, and works well even 189d21ab8bcSmrgwhen some directory options were not specified in terms of `${prefix}' 190d21ab8bcSmrgat `configure' time. 191d21ab8bcSmrg 192d21ab8bcSmrgOptional Features 193d21ab8bcSmrg================= 1949c9ff80cSmrg 1959c9ff80cSmrg If the package supports it, you can cause programs to be installed 1969c9ff80cSmrgwith an extra prefix or suffix on their names by giving `configure' the 1979c9ff80cSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1989c9ff80cSmrg 1999c9ff80cSmrg Some packages pay attention to `--enable-FEATURE' options to 2009c9ff80cSmrg`configure', where FEATURE indicates an optional part of the package. 2019c9ff80cSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 2029c9ff80cSmrgis something like `gnu-as' or `x' (for the X Window System). The 2039c9ff80cSmrg`README' should mention any `--enable-' and `--with-' options that the 2049c9ff80cSmrgpackage recognizes. 2059c9ff80cSmrg 2069c9ff80cSmrg For packages that use the X Window System, `configure' can usually 2079c9ff80cSmrgfind the X include and library files automatically, but if it doesn't, 2089c9ff80cSmrgyou can use the `configure' options `--x-includes=DIR' and 2099c9ff80cSmrg`--x-libraries=DIR' to specify their locations. 2109c9ff80cSmrg 211d21ab8bcSmrg Some packages offer the ability to configure how verbose the 212d21ab8bcSmrgexecution of `make' will be. For these packages, running `./configure 213d21ab8bcSmrg--enable-silent-rules' sets the default to minimal output, which can be 214d21ab8bcSmrgoverridden with `make V=1'; while running `./configure 215d21ab8bcSmrg--disable-silent-rules' sets the default to verbose, which can be 216d21ab8bcSmrgoverridden with `make V=0'. 217d21ab8bcSmrg 2189c9ff80cSmrgParticular systems 2199c9ff80cSmrg================== 2209c9ff80cSmrg 2219c9ff80cSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 2229c9ff80cSmrgCC is not installed, it is recommended to use the following options in 2239c9ff80cSmrgorder to use an ANSI C compiler: 2249c9ff80cSmrg 225d21ab8bcSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 2269c9ff80cSmrg 2279c9ff80cSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 2289c9ff80cSmrg 229d21ab8bcSmrg HP-UX `make' updates targets which have the same time stamps as 230d21ab8bcSmrgtheir prerequisites, which makes it generally unusable when shipped 231d21ab8bcSmrggenerated files such as `configure' are involved. Use GNU `make' 232d21ab8bcSmrginstead. 233d21ab8bcSmrg 2349c9ff80cSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 2359c9ff80cSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 2369c9ff80cSmrga workaround. If GNU CC is not installed, it is therefore recommended 2379c9ff80cSmrgto try 2389c9ff80cSmrg 2399c9ff80cSmrg ./configure CC="cc" 2409c9ff80cSmrg 2419c9ff80cSmrgand if that doesn't work, try 2429c9ff80cSmrg 2439c9ff80cSmrg ./configure CC="cc -nodtk" 2449c9ff80cSmrg 245d21ab8bcSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246d21ab8bcSmrgdirectory contains several dysfunctional programs; working variants of 247d21ab8bcSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248d21ab8bcSmrgin your `PATH', put it _after_ `/usr/bin'. 249d21ab8bcSmrg 250d21ab8bcSmrg On Haiku, software installed for all users goes in `/boot/common', 251d21ab8bcSmrgnot `/usr/local'. It is recommended to use the following options: 252d21ab8bcSmrg 253d21ab8bcSmrg ./configure --prefix=/boot/common 254d21ab8bcSmrg 2559c9ff80cSmrgSpecifying the System Type 2569c9ff80cSmrg========================== 2579c9ff80cSmrg 2589c9ff80cSmrg There may be some features `configure' cannot figure out 2599c9ff80cSmrgautomatically, but needs to determine by the type of machine the package 2609c9ff80cSmrgwill run on. Usually, assuming the package is built to be run on the 2619c9ff80cSmrg_same_ architectures, `configure' can figure that out, but if it prints 2629c9ff80cSmrga message saying it cannot guess the machine type, give it the 2639c9ff80cSmrg`--build=TYPE' option. TYPE can either be a short name for the system 2649c9ff80cSmrgtype, such as `sun4', or a canonical name which has the form: 2659c9ff80cSmrg 2669c9ff80cSmrg CPU-COMPANY-SYSTEM 2679c9ff80cSmrg 2689c9ff80cSmrgwhere SYSTEM can have one of these forms: 2699c9ff80cSmrg 270d21ab8bcSmrg OS 271d21ab8bcSmrg KERNEL-OS 2729c9ff80cSmrg 2739c9ff80cSmrg See the file `config.sub' for the possible values of each field. If 2749c9ff80cSmrg`config.sub' isn't included in this package, then this package doesn't 2759c9ff80cSmrgneed to know the machine type. 2769c9ff80cSmrg 2779c9ff80cSmrg If you are _building_ compiler tools for cross-compiling, you should 2789c9ff80cSmrguse the option `--target=TYPE' to select the type of system they will 2799c9ff80cSmrgproduce code for. 2809c9ff80cSmrg 2819c9ff80cSmrg If you want to _use_ a cross compiler, that generates code for a 2829c9ff80cSmrgplatform different from the build platform, you should specify the 2839c9ff80cSmrg"host" platform (i.e., that on which the generated programs will 2849c9ff80cSmrgeventually be run) with `--host=TYPE'. 2859c9ff80cSmrg 2869c9ff80cSmrgSharing Defaults 2879c9ff80cSmrg================ 2889c9ff80cSmrg 2899c9ff80cSmrg If you want to set default values for `configure' scripts to share, 2909c9ff80cSmrgyou can create a site shell script called `config.site' that gives 2919c9ff80cSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 2929c9ff80cSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2939c9ff80cSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2949c9ff80cSmrg`CONFIG_SITE' environment variable to the location of the site script. 2959c9ff80cSmrgA warning: not all `configure' scripts look for a site script. 2969c9ff80cSmrg 2979c9ff80cSmrgDefining Variables 2989c9ff80cSmrg================== 2999c9ff80cSmrg 3009c9ff80cSmrg Variables not defined in a site shell script can be set in the 3019c9ff80cSmrgenvironment passed to `configure'. However, some packages may run 3029c9ff80cSmrgconfigure again during the build, and the customized values of these 3039c9ff80cSmrgvariables may be lost. In order to avoid this problem, you should set 3049c9ff80cSmrgthem in the `configure' command line, using `VAR=value'. For example: 3059c9ff80cSmrg 3069c9ff80cSmrg ./configure CC=/usr/local2/bin/gcc 3079c9ff80cSmrg 3089c9ff80cSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 3099c9ff80cSmrgoverridden in the site shell script). 3109c9ff80cSmrg 3119c9ff80cSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 3129c9ff80cSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 3139c9ff80cSmrg 3149c9ff80cSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 3159c9ff80cSmrg 3169c9ff80cSmrg`configure' Invocation 3179c9ff80cSmrg====================== 3189c9ff80cSmrg 3199c9ff80cSmrg `configure' recognizes the following options to control how it 3209c9ff80cSmrgoperates. 3219c9ff80cSmrg 3229c9ff80cSmrg`--help' 3239c9ff80cSmrg`-h' 3249c9ff80cSmrg Print a summary of all of the options to `configure', and exit. 3259c9ff80cSmrg 3269c9ff80cSmrg`--help=short' 3279c9ff80cSmrg`--help=recursive' 3289c9ff80cSmrg Print a summary of the options unique to this package's 3299c9ff80cSmrg `configure', and exit. The `short' variant lists options used 3309c9ff80cSmrg only in the top level, while the `recursive' variant lists options 3319c9ff80cSmrg also present in any nested packages. 3329c9ff80cSmrg 3339c9ff80cSmrg`--version' 3349c9ff80cSmrg`-V' 3359c9ff80cSmrg Print the version of Autoconf used to generate the `configure' 3369c9ff80cSmrg script, and exit. 3379c9ff80cSmrg 3389c9ff80cSmrg`--cache-file=FILE' 3399c9ff80cSmrg Enable the cache: use and save the results of the tests in FILE, 3409c9ff80cSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 3419c9ff80cSmrg disable caching. 3429c9ff80cSmrg 3439c9ff80cSmrg`--config-cache' 3449c9ff80cSmrg`-C' 3459c9ff80cSmrg Alias for `--cache-file=config.cache'. 3469c9ff80cSmrg 3479c9ff80cSmrg`--quiet' 3489c9ff80cSmrg`--silent' 3499c9ff80cSmrg`-q' 3509c9ff80cSmrg Do not print messages saying which checks are being made. To 3519c9ff80cSmrg suppress all normal output, redirect it to `/dev/null' (any error 3529c9ff80cSmrg messages will still be shown). 3539c9ff80cSmrg 3549c9ff80cSmrg`--srcdir=DIR' 3559c9ff80cSmrg Look for the package's source code in directory DIR. Usually 3569c9ff80cSmrg `configure' can determine that directory automatically. 3579c9ff80cSmrg 3589c9ff80cSmrg`--prefix=DIR' 359d21ab8bcSmrg Use DIR as the installation prefix. *note Installation Names:: 3609c9ff80cSmrg for more details, including other options available for fine-tuning 3619c9ff80cSmrg the installation locations. 3629c9ff80cSmrg 3639c9ff80cSmrg`--no-create' 3649c9ff80cSmrg`-n' 3659c9ff80cSmrg Run the configure checks, but stop before creating any output 3669c9ff80cSmrg files. 3679c9ff80cSmrg 3689c9ff80cSmrg`configure' also accepts some other, not widely useful, options. Run 3699c9ff80cSmrg`configure --help' for more details. 3701f0ac6a5Smrg 371