1fda9279dSmrgInstallation Instructions 2fda9279dSmrg************************* 3fda9279dSmrg 416ee1e9aSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 516ee1e9aSmrgInc. 6fda9279dSmrg 716ee1e9aSmrg Copying and distribution of this file, with or without modification, 816ee1e9aSmrgare permitted in any medium without royalty provided the copyright 916ee1e9aSmrgnotice and this notice are preserved. This file is offered as-is, 1016ee1e9aSmrgwithout warranty of any kind. 11fda9279dSmrg 12fda9279dSmrgBasic Installation 13fda9279dSmrg================== 14fda9279dSmrg 15fda9279dSmrg Briefly, the shell commands `./configure; make; make install' should 16fda9279dSmrgconfigure, build, and install this package. The following 17fda9279dSmrgmore-detailed instructions are generic; see the `README' file for 1816ee1e9aSmrginstructions specific to this package. Some packages provide this 1916ee1e9aSmrg`INSTALL' file but do not implement all of the features documented 2016ee1e9aSmrgbelow. The lack of an optional feature in a given package is not 2116ee1e9aSmrgnecessarily a bug. More recommendations for GNU packages can be found 2216ee1e9aSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 23fda9279dSmrg 24fda9279dSmrg The `configure' shell script attempts to guess correct values for 25fda9279dSmrgvarious system-dependent variables used during compilation. It uses 26fda9279dSmrgthose values to create a `Makefile' in each directory of the package. 27fda9279dSmrgIt may also create one or more `.h' files containing system-dependent 28fda9279dSmrgdefinitions. Finally, it creates a shell script `config.status' that 29fda9279dSmrgyou can run in the future to recreate the current configuration, and a 30fda9279dSmrgfile `config.log' containing compiler output (useful mainly for 31fda9279dSmrgdebugging `configure'). 32fda9279dSmrg 33fda9279dSmrg It can also use an optional file (typically called `config.cache' 34fda9279dSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35fda9279dSmrgthe results of its tests to speed up reconfiguring. Caching is 36fda9279dSmrgdisabled by default to prevent problems with accidental use of stale 37fda9279dSmrgcache files. 38fda9279dSmrg 39fda9279dSmrg If you need to do unusual things to compile the package, please try 40fda9279dSmrgto figure out how `configure' could check whether to do them, and mail 41fda9279dSmrgdiffs or instructions to the address given in the `README' so they can 42fda9279dSmrgbe considered for the next release. If you are using the cache, and at 43fda9279dSmrgsome point `config.cache' contains results you don't want to keep, you 44fda9279dSmrgmay remove or edit it. 45fda9279dSmrg 46fda9279dSmrg The file `configure.ac' (or `configure.in') is used to create 47fda9279dSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 48fda9279dSmrgyou want to change it or regenerate `configure' using a newer version 49fda9279dSmrgof `autoconf'. 50fda9279dSmrg 5116ee1e9aSmrg The simplest way to compile this package is: 52fda9279dSmrg 53fda9279dSmrg 1. `cd' to the directory containing the package's source code and type 54fda9279dSmrg `./configure' to configure the package for your system. 55fda9279dSmrg 56fda9279dSmrg Running `configure' might take a while. While running, it prints 57fda9279dSmrg some messages telling which features it is checking for. 58fda9279dSmrg 59fda9279dSmrg 2. Type `make' to compile the package. 60fda9279dSmrg 61fda9279dSmrg 3. Optionally, type `make check' to run any self-tests that come with 6216ee1e9aSmrg the package, generally using the just-built uninstalled binaries. 63fda9279dSmrg 64fda9279dSmrg 4. Type `make install' to install the programs and any data files and 6516ee1e9aSmrg documentation. When installing into a prefix owned by root, it is 6616ee1e9aSmrg recommended that the package be configured and built as a regular 6716ee1e9aSmrg user, and only the `make install' phase executed with root 6816ee1e9aSmrg privileges. 6916ee1e9aSmrg 7016ee1e9aSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 7116ee1e9aSmrg this time using the binaries in their final installed location. 7216ee1e9aSmrg This target does not install anything. Running this target as a 7316ee1e9aSmrg regular user, particularly if the prior `make install' required 7416ee1e9aSmrg root privileges, verifies that the installation completed 7516ee1e9aSmrg correctly. 7616ee1e9aSmrg 7716ee1e9aSmrg 6. You can remove the program binaries and object files from the 78fda9279dSmrg source code directory by typing `make clean'. To also remove the 79fda9279dSmrg files that `configure' created (so you can compile the package for 80fda9279dSmrg a different kind of computer), type `make distclean'. There is 81fda9279dSmrg also a `make maintainer-clean' target, but that is intended mainly 82fda9279dSmrg for the package's developers. If you use it, you may have to get 83fda9279dSmrg all sorts of other programs in order to regenerate files that came 84fda9279dSmrg with the distribution. 85fda9279dSmrg 8616ee1e9aSmrg 7. Often, you can also type `make uninstall' to remove the installed 8716ee1e9aSmrg files again. In practice, not all packages have tested that 8816ee1e9aSmrg uninstallation works correctly, even though it is required by the 8916ee1e9aSmrg GNU Coding Standards. 9016ee1e9aSmrg 9116ee1e9aSmrg 8. Some packages, particularly those that use Automake, provide `make 9216ee1e9aSmrg distcheck', which can by used by developers to test that all other 9316ee1e9aSmrg targets like `make install' and `make uninstall' work correctly. 9416ee1e9aSmrg This target is generally not run by end users. 95fda9279dSmrg 96fda9279dSmrgCompilers and Options 97fda9279dSmrg===================== 98fda9279dSmrg 99fda9279dSmrg Some systems require unusual options for compilation or linking that 100fda9279dSmrgthe `configure' script does not know about. Run `./configure --help' 101fda9279dSmrgfor details on some of the pertinent environment variables. 102fda9279dSmrg 103fda9279dSmrg You can give `configure' initial values for configuration parameters 104fda9279dSmrgby setting variables in the command line or in the environment. Here 105fda9279dSmrgis an example: 106fda9279dSmrg 107fda9279dSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108fda9279dSmrg 109fda9279dSmrg *Note Defining Variables::, for more details. 110fda9279dSmrg 111fda9279dSmrgCompiling For Multiple Architectures 112fda9279dSmrg==================================== 113fda9279dSmrg 114fda9279dSmrg You can compile the package for more than one kind of computer at the 115fda9279dSmrgsame time, by placing the object files for each architecture in their 116fda9279dSmrgown directory. To do this, you can use GNU `make'. `cd' to the 117fda9279dSmrgdirectory where you want the object files and executables to go and run 118fda9279dSmrgthe `configure' script. `configure' automatically checks for the 11916ee1e9aSmrgsource code in the directory that `configure' is in and in `..'. This 12016ee1e9aSmrgis known as a "VPATH" build. 121fda9279dSmrg 122fda9279dSmrg With a non-GNU `make', it is safer to compile the package for one 123fda9279dSmrgarchitecture at a time in the source code directory. After you have 124fda9279dSmrginstalled the package for one architecture, use `make distclean' before 125fda9279dSmrgreconfiguring for another architecture. 126fda9279dSmrg 127fda9279dSmrg On MacOS X 10.5 and later systems, you can create libraries and 128fda9279dSmrgexecutables that work on multiple system types--known as "fat" or 129fda9279dSmrg"universal" binaries--by specifying multiple `-arch' options to the 130fda9279dSmrgcompiler but only a single `-arch' option to the preprocessor. Like 131fda9279dSmrgthis: 132fda9279dSmrg 133fda9279dSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134fda9279dSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135fda9279dSmrg CPP="gcc -E" CXXCPP="g++ -E" 136fda9279dSmrg 137fda9279dSmrg This is not guaranteed to produce working output in all cases, you 138fda9279dSmrgmay have to build one architecture at a time and combine the results 139fda9279dSmrgusing the `lipo' tool if you have problems. 140fda9279dSmrg 141fda9279dSmrgInstallation Names 142fda9279dSmrg================== 143fda9279dSmrg 144fda9279dSmrg By default, `make install' installs the package's commands under 145fda9279dSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146fda9279dSmrgcan specify an installation prefix other than `/usr/local' by giving 14716ee1e9aSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 14816ee1e9aSmrgabsolute file name. 149fda9279dSmrg 150fda9279dSmrg You can specify separate installation prefixes for 151fda9279dSmrgarchitecture-specific files and architecture-independent files. If you 152fda9279dSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153fda9279dSmrgPREFIX as the prefix for installing programs and libraries. 154fda9279dSmrgDocumentation and other data files still use the regular prefix. 155fda9279dSmrg 156fda9279dSmrg In addition, if you use an unusual directory layout you can give 157fda9279dSmrgoptions like `--bindir=DIR' to specify different values for particular 158fda9279dSmrgkinds of files. Run `configure --help' for a list of the directories 15916ee1e9aSmrgyou can set and what kinds of files go in them. In general, the 16016ee1e9aSmrgdefault for these options is expressed in terms of `${prefix}', so that 16116ee1e9aSmrgspecifying just `--prefix' will affect all of the other directory 16216ee1e9aSmrgspecifications that were not explicitly provided. 16316ee1e9aSmrg 16416ee1e9aSmrg The most portable way to affect installation locations is to pass the 16516ee1e9aSmrgcorrect locations to `configure'; however, many packages provide one or 16616ee1e9aSmrgboth of the following shortcuts of passing variable assignments to the 16716ee1e9aSmrg`make install' command line to change installation locations without 16816ee1e9aSmrghaving to reconfigure or recompile. 16916ee1e9aSmrg 17016ee1e9aSmrg The first method involves providing an override variable for each 17116ee1e9aSmrgaffected directory. For example, `make install 17216ee1e9aSmrgprefix=/alternate/directory' will choose an alternate location for all 17316ee1e9aSmrgdirectory configuration variables that were expressed in terms of 17416ee1e9aSmrg`${prefix}'. Any directories that were specified during `configure', 17516ee1e9aSmrgbut not in terms of `${prefix}', must each be overridden at install 17616ee1e9aSmrgtime for the entire installation to be relocated. The approach of 17716ee1e9aSmrgmakefile variable overrides for each directory variable is required by 17816ee1e9aSmrgthe GNU Coding Standards, and ideally causes no recompilation. 17916ee1e9aSmrgHowever, some platforms have known limitations with the semantics of 18016ee1e9aSmrgshared libraries that end up requiring recompilation when using this 18116ee1e9aSmrgmethod, particularly noticeable in packages that use GNU Libtool. 18216ee1e9aSmrg 18316ee1e9aSmrg The second method involves providing the `DESTDIR' variable. For 18416ee1e9aSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 18516ee1e9aSmrg`/alternate/directory' before all installation names. The approach of 18616ee1e9aSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 18716ee1e9aSmrgdoes not work on platforms that have drive letters. On the other hand, 18816ee1e9aSmrgit does better at avoiding recompilation issues, and works well even 18916ee1e9aSmrgwhen some directory options were not specified in terms of `${prefix}' 19016ee1e9aSmrgat `configure' time. 19116ee1e9aSmrg 19216ee1e9aSmrgOptional Features 19316ee1e9aSmrg================= 194fda9279dSmrg 195fda9279dSmrg If the package supports it, you can cause programs to be installed 196fda9279dSmrgwith an extra prefix or suffix on their names by giving `configure' the 197fda9279dSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198fda9279dSmrg 199fda9279dSmrg Some packages pay attention to `--enable-FEATURE' options to 200fda9279dSmrg`configure', where FEATURE indicates an optional part of the package. 201fda9279dSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202fda9279dSmrgis something like `gnu-as' or `x' (for the X Window System). The 203fda9279dSmrg`README' should mention any `--enable-' and `--with-' options that the 204fda9279dSmrgpackage recognizes. 205fda9279dSmrg 206fda9279dSmrg For packages that use the X Window System, `configure' can usually 207fda9279dSmrgfind the X include and library files automatically, but if it doesn't, 208fda9279dSmrgyou can use the `configure' options `--x-includes=DIR' and 209fda9279dSmrg`--x-libraries=DIR' to specify their locations. 210fda9279dSmrg 21116ee1e9aSmrg Some packages offer the ability to configure how verbose the 21216ee1e9aSmrgexecution of `make' will be. For these packages, running `./configure 21316ee1e9aSmrg--enable-silent-rules' sets the default to minimal output, which can be 21416ee1e9aSmrgoverridden with `make V=1'; while running `./configure 21516ee1e9aSmrg--disable-silent-rules' sets the default to verbose, which can be 21616ee1e9aSmrgoverridden with `make V=0'. 21716ee1e9aSmrg 218fda9279dSmrgParticular systems 219fda9279dSmrg================== 220fda9279dSmrg 221fda9279dSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222fda9279dSmrgCC is not installed, it is recommended to use the following options in 223fda9279dSmrgorder to use an ANSI C compiler: 224fda9279dSmrg 22516ee1e9aSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226fda9279dSmrg 227fda9279dSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228fda9279dSmrg 22916ee1e9aSmrg HP-UX `make' updates targets which have the same time stamps as 23016ee1e9aSmrgtheir prerequisites, which makes it generally unusable when shipped 23116ee1e9aSmrggenerated files such as `configure' are involved. Use GNU `make' 23216ee1e9aSmrginstead. 23316ee1e9aSmrg 234fda9279dSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235fda9279dSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236fda9279dSmrga workaround. If GNU CC is not installed, it is therefore recommended 237fda9279dSmrgto try 238fda9279dSmrg 239fda9279dSmrg ./configure CC="cc" 240fda9279dSmrg 241fda9279dSmrgand if that doesn't work, try 242fda9279dSmrg 243fda9279dSmrg ./configure CC="cc -nodtk" 244fda9279dSmrg 24516ee1e9aSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 24616ee1e9aSmrgdirectory contains several dysfunctional programs; working variants of 24716ee1e9aSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 24816ee1e9aSmrgin your `PATH', put it _after_ `/usr/bin'. 24916ee1e9aSmrg 25016ee1e9aSmrg On Haiku, software installed for all users goes in `/boot/common', 25116ee1e9aSmrgnot `/usr/local'. It is recommended to use the following options: 25216ee1e9aSmrg 25316ee1e9aSmrg ./configure --prefix=/boot/common 25416ee1e9aSmrg 255fda9279dSmrgSpecifying the System Type 256fda9279dSmrg========================== 257fda9279dSmrg 258fda9279dSmrg There may be some features `configure' cannot figure out 259fda9279dSmrgautomatically, but needs to determine by the type of machine the package 260fda9279dSmrgwill run on. Usually, assuming the package is built to be run on the 261fda9279dSmrg_same_ architectures, `configure' can figure that out, but if it prints 262fda9279dSmrga message saying it cannot guess the machine type, give it the 263fda9279dSmrg`--build=TYPE' option. TYPE can either be a short name for the system 264fda9279dSmrgtype, such as `sun4', or a canonical name which has the form: 265fda9279dSmrg 266fda9279dSmrg CPU-COMPANY-SYSTEM 267fda9279dSmrg 268fda9279dSmrgwhere SYSTEM can have one of these forms: 269fda9279dSmrg 27016ee1e9aSmrg OS 27116ee1e9aSmrg KERNEL-OS 272fda9279dSmrg 273fda9279dSmrg See the file `config.sub' for the possible values of each field. If 274fda9279dSmrg`config.sub' isn't included in this package, then this package doesn't 275fda9279dSmrgneed to know the machine type. 276fda9279dSmrg 277fda9279dSmrg If you are _building_ compiler tools for cross-compiling, you should 278fda9279dSmrguse the option `--target=TYPE' to select the type of system they will 279fda9279dSmrgproduce code for. 280fda9279dSmrg 281fda9279dSmrg If you want to _use_ a cross compiler, that generates code for a 282fda9279dSmrgplatform different from the build platform, you should specify the 283fda9279dSmrg"host" platform (i.e., that on which the generated programs will 284fda9279dSmrgeventually be run) with `--host=TYPE'. 285fda9279dSmrg 286fda9279dSmrgSharing Defaults 287fda9279dSmrg================ 288fda9279dSmrg 289fda9279dSmrg If you want to set default values for `configure' scripts to share, 290fda9279dSmrgyou can create a site shell script called `config.site' that gives 291fda9279dSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 292fda9279dSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293fda9279dSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294fda9279dSmrg`CONFIG_SITE' environment variable to the location of the site script. 295fda9279dSmrgA warning: not all `configure' scripts look for a site script. 296fda9279dSmrg 297fda9279dSmrgDefining Variables 298fda9279dSmrg================== 299fda9279dSmrg 300fda9279dSmrg Variables not defined in a site shell script can be set in the 301fda9279dSmrgenvironment passed to `configure'. However, some packages may run 302fda9279dSmrgconfigure again during the build, and the customized values of these 303fda9279dSmrgvariables may be lost. In order to avoid this problem, you should set 304fda9279dSmrgthem in the `configure' command line, using `VAR=value'. For example: 305fda9279dSmrg 306fda9279dSmrg ./configure CC=/usr/local2/bin/gcc 307fda9279dSmrg 308fda9279dSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 309fda9279dSmrgoverridden in the site shell script). 310fda9279dSmrg 311fda9279dSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312fda9279dSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313fda9279dSmrg 314fda9279dSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315fda9279dSmrg 316fda9279dSmrg`configure' Invocation 317fda9279dSmrg====================== 318fda9279dSmrg 319fda9279dSmrg `configure' recognizes the following options to control how it 320fda9279dSmrgoperates. 321fda9279dSmrg 322fda9279dSmrg`--help' 323fda9279dSmrg`-h' 324fda9279dSmrg Print a summary of all of the options to `configure', and exit. 325fda9279dSmrg 326fda9279dSmrg`--help=short' 327fda9279dSmrg`--help=recursive' 328fda9279dSmrg Print a summary of the options unique to this package's 329fda9279dSmrg `configure', and exit. The `short' variant lists options used 330fda9279dSmrg only in the top level, while the `recursive' variant lists options 331fda9279dSmrg also present in any nested packages. 332fda9279dSmrg 333fda9279dSmrg`--version' 334fda9279dSmrg`-V' 335fda9279dSmrg Print the version of Autoconf used to generate the `configure' 336fda9279dSmrg script, and exit. 337fda9279dSmrg 338fda9279dSmrg`--cache-file=FILE' 339fda9279dSmrg Enable the cache: use and save the results of the tests in FILE, 340fda9279dSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341fda9279dSmrg disable caching. 342fda9279dSmrg 343fda9279dSmrg`--config-cache' 344fda9279dSmrg`-C' 345fda9279dSmrg Alias for `--cache-file=config.cache'. 346fda9279dSmrg 347fda9279dSmrg`--quiet' 348fda9279dSmrg`--silent' 349fda9279dSmrg`-q' 350fda9279dSmrg Do not print messages saying which checks are being made. To 351fda9279dSmrg suppress all normal output, redirect it to `/dev/null' (any error 352fda9279dSmrg messages will still be shown). 353fda9279dSmrg 354fda9279dSmrg`--srcdir=DIR' 355fda9279dSmrg Look for the package's source code in directory DIR. Usually 356fda9279dSmrg `configure' can determine that directory automatically. 357fda9279dSmrg 358fda9279dSmrg`--prefix=DIR' 35916ee1e9aSmrg Use DIR as the installation prefix. *note Installation Names:: 360fda9279dSmrg for more details, including other options available for fine-tuning 361fda9279dSmrg the installation locations. 362fda9279dSmrg 363fda9279dSmrg`--no-create' 364fda9279dSmrg`-n' 365fda9279dSmrg Run the configure checks, but stop before creating any output 366fda9279dSmrg files. 367fda9279dSmrg 368fda9279dSmrg`configure' also accepts some other, not widely useful, options. Run 369fda9279dSmrg`configure --help' for more details. 370fda9279dSmrg 371