1dc99b369SmrgInstallation Instructions 2dc99b369Smrg************************* 3dc99b369Smrg 45c30ecadSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 55c30ecadSmrgInc. 6dc99b369Smrg 75c30ecadSmrg Copying and distribution of this file, with or without modification, 85c30ecadSmrgare permitted in any medium without royalty provided the copyright 95c30ecadSmrgnotice and this notice are preserved. This file is offered as-is, 105c30ecadSmrgwithout warranty of any kind. 11dc99b369Smrg 12dc99b369SmrgBasic Installation 13dc99b369Smrg================== 14dc99b369Smrg 15dc99b369Smrg Briefly, the shell commands `./configure; make; make install' should 16dc99b369Smrgconfigure, build, and install this package. The following 17dc99b369Smrgmore-detailed instructions are generic; see the `README' file for 185c30ecadSmrginstructions specific to this package. Some packages provide this 195c30ecadSmrg`INSTALL' file but do not implement all of the features documented 205c30ecadSmrgbelow. The lack of an optional feature in a given package is not 215c30ecadSmrgnecessarily a bug. More recommendations for GNU packages can be found 225c30ecadSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 23dc99b369Smrg 24dc99b369Smrg The `configure' shell script attempts to guess correct values for 25dc99b369Smrgvarious system-dependent variables used during compilation. It uses 26dc99b369Smrgthose values to create a `Makefile' in each directory of the package. 27dc99b369SmrgIt may also create one or more `.h' files containing system-dependent 28dc99b369Smrgdefinitions. Finally, it creates a shell script `config.status' that 29dc99b369Smrgyou can run in the future to recreate the current configuration, and a 30dc99b369Smrgfile `config.log' containing compiler output (useful mainly for 31dc99b369Smrgdebugging `configure'). 32dc99b369Smrg 33dc99b369Smrg It can also use an optional file (typically called `config.cache' 34dc99b369Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35dc99b369Smrgthe results of its tests to speed up reconfiguring. Caching is 36dc99b369Smrgdisabled by default to prevent problems with accidental use of stale 37dc99b369Smrgcache files. 38dc99b369Smrg 39dc99b369Smrg If you need to do unusual things to compile the package, please try 40dc99b369Smrgto figure out how `configure' could check whether to do them, and mail 41dc99b369Smrgdiffs or instructions to the address given in the `README' so they can 42dc99b369Smrgbe considered for the next release. If you are using the cache, and at 43dc99b369Smrgsome point `config.cache' contains results you don't want to keep, you 44dc99b369Smrgmay remove or edit it. 45dc99b369Smrg 46dc99b369Smrg The file `configure.ac' (or `configure.in') is used to create 47dc99b369Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 48dc99b369Smrgyou want to change it or regenerate `configure' using a newer version 49dc99b369Smrgof `autoconf'. 50dc99b369Smrg 515c30ecadSmrg The simplest way to compile this package is: 52dc99b369Smrg 53dc99b369Smrg 1. `cd' to the directory containing the package's source code and type 54dc99b369Smrg `./configure' to configure the package for your system. 55dc99b369Smrg 56dc99b369Smrg Running `configure' might take a while. While running, it prints 57dc99b369Smrg some messages telling which features it is checking for. 58dc99b369Smrg 59dc99b369Smrg 2. Type `make' to compile the package. 60dc99b369Smrg 61dc99b369Smrg 3. Optionally, type `make check' to run any self-tests that come with 625c30ecadSmrg the package, generally using the just-built uninstalled binaries. 63dc99b369Smrg 64dc99b369Smrg 4. Type `make install' to install the programs and any data files and 655c30ecadSmrg documentation. When installing into a prefix owned by root, it is 665c30ecadSmrg recommended that the package be configured and built as a regular 675c30ecadSmrg user, and only the `make install' phase executed with root 685c30ecadSmrg privileges. 695c30ecadSmrg 705c30ecadSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 715c30ecadSmrg this time using the binaries in their final installed location. 725c30ecadSmrg This target does not install anything. Running this target as a 735c30ecadSmrg regular user, particularly if the prior `make install' required 745c30ecadSmrg root privileges, verifies that the installation completed 755c30ecadSmrg correctly. 765c30ecadSmrg 775c30ecadSmrg 6. You can remove the program binaries and object files from the 78dc99b369Smrg source code directory by typing `make clean'. To also remove the 79dc99b369Smrg files that `configure' created (so you can compile the package for 80dc99b369Smrg a different kind of computer), type `make distclean'. There is 81dc99b369Smrg also a `make maintainer-clean' target, but that is intended mainly 82dc99b369Smrg for the package's developers. If you use it, you may have to get 83dc99b369Smrg all sorts of other programs in order to regenerate files that came 84dc99b369Smrg with the distribution. 85dc99b369Smrg 865c30ecadSmrg 7. Often, you can also type `make uninstall' to remove the installed 875c30ecadSmrg files again. In practice, not all packages have tested that 885c30ecadSmrg uninstallation works correctly, even though it is required by the 895c30ecadSmrg GNU Coding Standards. 905c30ecadSmrg 915c30ecadSmrg 8. Some packages, particularly those that use Automake, provide `make 925c30ecadSmrg distcheck', which can by used by developers to test that all other 935c30ecadSmrg targets like `make install' and `make uninstall' work correctly. 945c30ecadSmrg This target is generally not run by end users. 95dc99b369Smrg 96dc99b369SmrgCompilers and Options 97dc99b369Smrg===================== 98dc99b369Smrg 99dc99b369Smrg Some systems require unusual options for compilation or linking that 100dc99b369Smrgthe `configure' script does not know about. Run `./configure --help' 101dc99b369Smrgfor details on some of the pertinent environment variables. 102dc99b369Smrg 103dc99b369Smrg You can give `configure' initial values for configuration parameters 104dc99b369Smrgby setting variables in the command line or in the environment. Here 105dc99b369Smrgis an example: 106dc99b369Smrg 107dc99b369Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108dc99b369Smrg 109dc99b369Smrg *Note Defining Variables::, for more details. 110dc99b369Smrg 111dc99b369SmrgCompiling For Multiple Architectures 112dc99b369Smrg==================================== 113dc99b369Smrg 114dc99b369Smrg You can compile the package for more than one kind of computer at the 115dc99b369Smrgsame time, by placing the object files for each architecture in their 116dc99b369Smrgown directory. To do this, you can use GNU `make'. `cd' to the 117dc99b369Smrgdirectory where you want the object files and executables to go and run 118dc99b369Smrgthe `configure' script. `configure' automatically checks for the 1195c30ecadSmrgsource code in the directory that `configure' is in and in `..'. This 1205c30ecadSmrgis known as a "VPATH" build. 121dc99b369Smrg 122dc99b369Smrg With a non-GNU `make', it is safer to compile the package for one 123dc99b369Smrgarchitecture at a time in the source code directory. After you have 124dc99b369Smrginstalled the package for one architecture, use `make distclean' before 125dc99b369Smrgreconfiguring for another architecture. 126dc99b369Smrg 127dc99b369Smrg On MacOS X 10.5 and later systems, you can create libraries and 128dc99b369Smrgexecutables that work on multiple system types--known as "fat" or 129dc99b369Smrg"universal" binaries--by specifying multiple `-arch' options to the 130dc99b369Smrgcompiler but only a single `-arch' option to the preprocessor. Like 131dc99b369Smrgthis: 132dc99b369Smrg 133dc99b369Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134dc99b369Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135dc99b369Smrg CPP="gcc -E" CXXCPP="g++ -E" 136dc99b369Smrg 137dc99b369Smrg This is not guaranteed to produce working output in all cases, you 138dc99b369Smrgmay have to build one architecture at a time and combine the results 139dc99b369Smrgusing the `lipo' tool if you have problems. 140dc99b369Smrg 141dc99b369SmrgInstallation Names 142dc99b369Smrg================== 143dc99b369Smrg 144dc99b369Smrg By default, `make install' installs the package's commands under 145dc99b369Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146dc99b369Smrgcan specify an installation prefix other than `/usr/local' by giving 1475c30ecadSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 1485c30ecadSmrgabsolute file name. 149dc99b369Smrg 150dc99b369Smrg You can specify separate installation prefixes for 151dc99b369Smrgarchitecture-specific files and architecture-independent files. If you 152dc99b369Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153dc99b369SmrgPREFIX as the prefix for installing programs and libraries. 154dc99b369SmrgDocumentation and other data files still use the regular prefix. 155dc99b369Smrg 156dc99b369Smrg In addition, if you use an unusual directory layout you can give 157dc99b369Smrgoptions like `--bindir=DIR' to specify different values for particular 158dc99b369Smrgkinds of files. Run `configure --help' for a list of the directories 1595c30ecadSmrgyou can set and what kinds of files go in them. In general, the 1605c30ecadSmrgdefault for these options is expressed in terms of `${prefix}', so that 1615c30ecadSmrgspecifying just `--prefix' will affect all of the other directory 1625c30ecadSmrgspecifications that were not explicitly provided. 1635c30ecadSmrg 1645c30ecadSmrg The most portable way to affect installation locations is to pass the 1655c30ecadSmrgcorrect locations to `configure'; however, many packages provide one or 1665c30ecadSmrgboth of the following shortcuts of passing variable assignments to the 1675c30ecadSmrg`make install' command line to change installation locations without 1685c30ecadSmrghaving to reconfigure or recompile. 1695c30ecadSmrg 1705c30ecadSmrg The first method involves providing an override variable for each 1715c30ecadSmrgaffected directory. For example, `make install 1725c30ecadSmrgprefix=/alternate/directory' will choose an alternate location for all 1735c30ecadSmrgdirectory configuration variables that were expressed in terms of 1745c30ecadSmrg`${prefix}'. Any directories that were specified during `configure', 1755c30ecadSmrgbut not in terms of `${prefix}', must each be overridden at install 1765c30ecadSmrgtime for the entire installation to be relocated. The approach of 1775c30ecadSmrgmakefile variable overrides for each directory variable is required by 1785c30ecadSmrgthe GNU Coding Standards, and ideally causes no recompilation. 1795c30ecadSmrgHowever, some platforms have known limitations with the semantics of 1805c30ecadSmrgshared libraries that end up requiring recompilation when using this 1815c30ecadSmrgmethod, particularly noticeable in packages that use GNU Libtool. 1825c30ecadSmrg 1835c30ecadSmrg The second method involves providing the `DESTDIR' variable. For 1845c30ecadSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 1855c30ecadSmrg`/alternate/directory' before all installation names. The approach of 1865c30ecadSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 1875c30ecadSmrgdoes not work on platforms that have drive letters. On the other hand, 1885c30ecadSmrgit does better at avoiding recompilation issues, and works well even 1895c30ecadSmrgwhen some directory options were not specified in terms of `${prefix}' 1905c30ecadSmrgat `configure' time. 1915c30ecadSmrg 1925c30ecadSmrgOptional Features 1935c30ecadSmrg================= 194dc99b369Smrg 195dc99b369Smrg If the package supports it, you can cause programs to be installed 196dc99b369Smrgwith an extra prefix or suffix on their names by giving `configure' the 197dc99b369Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198dc99b369Smrg 199dc99b369Smrg Some packages pay attention to `--enable-FEATURE' options to 200dc99b369Smrg`configure', where FEATURE indicates an optional part of the package. 201dc99b369SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202dc99b369Smrgis something like `gnu-as' or `x' (for the X Window System). The 203dc99b369Smrg`README' should mention any `--enable-' and `--with-' options that the 204dc99b369Smrgpackage recognizes. 205dc99b369Smrg 206dc99b369Smrg For packages that use the X Window System, `configure' can usually 207dc99b369Smrgfind the X include and library files automatically, but if it doesn't, 208dc99b369Smrgyou can use the `configure' options `--x-includes=DIR' and 209dc99b369Smrg`--x-libraries=DIR' to specify their locations. 210dc99b369Smrg 2115c30ecadSmrg Some packages offer the ability to configure how verbose the 2125c30ecadSmrgexecution of `make' will be. For these packages, running `./configure 2135c30ecadSmrg--enable-silent-rules' sets the default to minimal output, which can be 2145c30ecadSmrgoverridden with `make V=1'; while running `./configure 2155c30ecadSmrg--disable-silent-rules' sets the default to verbose, which can be 2165c30ecadSmrgoverridden with `make V=0'. 2175c30ecadSmrg 218dc99b369SmrgParticular systems 219dc99b369Smrg================== 220dc99b369Smrg 221dc99b369Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222dc99b369SmrgCC is not installed, it is recommended to use the following options in 223dc99b369Smrgorder to use an ANSI C compiler: 224dc99b369Smrg 2255c30ecadSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226dc99b369Smrg 227dc99b369Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228dc99b369Smrg 2295c30ecadSmrg HP-UX `make' updates targets which have the same time stamps as 2305c30ecadSmrgtheir prerequisites, which makes it generally unusable when shipped 2315c30ecadSmrggenerated files such as `configure' are involved. Use GNU `make' 2325c30ecadSmrginstead. 2335c30ecadSmrg 234dc99b369Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235dc99b369Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236dc99b369Smrga workaround. If GNU CC is not installed, it is therefore recommended 237dc99b369Smrgto try 238dc99b369Smrg 239dc99b369Smrg ./configure CC="cc" 240dc99b369Smrg 241dc99b369Smrgand if that doesn't work, try 242dc99b369Smrg 243dc99b369Smrg ./configure CC="cc -nodtk" 244dc99b369Smrg 2455c30ecadSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 2465c30ecadSmrgdirectory contains several dysfunctional programs; working variants of 2475c30ecadSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 2485c30ecadSmrgin your `PATH', put it _after_ `/usr/bin'. 2495c30ecadSmrg 2505c30ecadSmrg On Haiku, software installed for all users goes in `/boot/common', 2515c30ecadSmrgnot `/usr/local'. It is recommended to use the following options: 2525c30ecadSmrg 2535c30ecadSmrg ./configure --prefix=/boot/common 2545c30ecadSmrg 255dc99b369SmrgSpecifying the System Type 256dc99b369Smrg========================== 257dc99b369Smrg 258dc99b369Smrg There may be some features `configure' cannot figure out 259dc99b369Smrgautomatically, but needs to determine by the type of machine the package 260dc99b369Smrgwill run on. Usually, assuming the package is built to be run on the 261dc99b369Smrg_same_ architectures, `configure' can figure that out, but if it prints 262dc99b369Smrga message saying it cannot guess the machine type, give it the 263dc99b369Smrg`--build=TYPE' option. TYPE can either be a short name for the system 264dc99b369Smrgtype, such as `sun4', or a canonical name which has the form: 265dc99b369Smrg 266dc99b369Smrg CPU-COMPANY-SYSTEM 267dc99b369Smrg 268dc99b369Smrgwhere SYSTEM can have one of these forms: 269dc99b369Smrg 2705c30ecadSmrg OS 2715c30ecadSmrg KERNEL-OS 272dc99b369Smrg 273dc99b369Smrg See the file `config.sub' for the possible values of each field. If 274dc99b369Smrg`config.sub' isn't included in this package, then this package doesn't 275dc99b369Smrgneed to know the machine type. 276dc99b369Smrg 277dc99b369Smrg If you are _building_ compiler tools for cross-compiling, you should 278dc99b369Smrguse the option `--target=TYPE' to select the type of system they will 279dc99b369Smrgproduce code for. 280dc99b369Smrg 281dc99b369Smrg If you want to _use_ a cross compiler, that generates code for a 282dc99b369Smrgplatform different from the build platform, you should specify the 283dc99b369Smrg"host" platform (i.e., that on which the generated programs will 284dc99b369Smrgeventually be run) with `--host=TYPE'. 285dc99b369Smrg 286dc99b369SmrgSharing Defaults 287dc99b369Smrg================ 288dc99b369Smrg 289dc99b369Smrg If you want to set default values for `configure' scripts to share, 290dc99b369Smrgyou can create a site shell script called `config.site' that gives 291dc99b369Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 292dc99b369Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293dc99b369Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294dc99b369Smrg`CONFIG_SITE' environment variable to the location of the site script. 295dc99b369SmrgA warning: not all `configure' scripts look for a site script. 296dc99b369Smrg 297dc99b369SmrgDefining Variables 298dc99b369Smrg================== 299dc99b369Smrg 300dc99b369Smrg Variables not defined in a site shell script can be set in the 301dc99b369Smrgenvironment passed to `configure'. However, some packages may run 302dc99b369Smrgconfigure again during the build, and the customized values of these 303dc99b369Smrgvariables may be lost. In order to avoid this problem, you should set 304dc99b369Smrgthem in the `configure' command line, using `VAR=value'. For example: 305dc99b369Smrg 306dc99b369Smrg ./configure CC=/usr/local2/bin/gcc 307dc99b369Smrg 308dc99b369Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 309dc99b369Smrgoverridden in the site shell script). 310dc99b369Smrg 311dc99b369SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312dc99b369Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313dc99b369Smrg 314dc99b369Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315dc99b369Smrg 316dc99b369Smrg`configure' Invocation 317dc99b369Smrg====================== 318dc99b369Smrg 319dc99b369Smrg `configure' recognizes the following options to control how it 320dc99b369Smrgoperates. 321dc99b369Smrg 322dc99b369Smrg`--help' 323dc99b369Smrg`-h' 324dc99b369Smrg Print a summary of all of the options to `configure', and exit. 325dc99b369Smrg 326dc99b369Smrg`--help=short' 327dc99b369Smrg`--help=recursive' 328dc99b369Smrg Print a summary of the options unique to this package's 329dc99b369Smrg `configure', and exit. The `short' variant lists options used 330dc99b369Smrg only in the top level, while the `recursive' variant lists options 331dc99b369Smrg also present in any nested packages. 332dc99b369Smrg 333dc99b369Smrg`--version' 334dc99b369Smrg`-V' 335dc99b369Smrg Print the version of Autoconf used to generate the `configure' 336dc99b369Smrg script, and exit. 337dc99b369Smrg 338dc99b369Smrg`--cache-file=FILE' 339dc99b369Smrg Enable the cache: use and save the results of the tests in FILE, 340dc99b369Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341dc99b369Smrg disable caching. 342dc99b369Smrg 343dc99b369Smrg`--config-cache' 344dc99b369Smrg`-C' 345dc99b369Smrg Alias for `--cache-file=config.cache'. 346dc99b369Smrg 347dc99b369Smrg`--quiet' 348dc99b369Smrg`--silent' 349dc99b369Smrg`-q' 350dc99b369Smrg Do not print messages saying which checks are being made. To 351dc99b369Smrg suppress all normal output, redirect it to `/dev/null' (any error 352dc99b369Smrg messages will still be shown). 353dc99b369Smrg 354dc99b369Smrg`--srcdir=DIR' 355dc99b369Smrg Look for the package's source code in directory DIR. Usually 356dc99b369Smrg `configure' can determine that directory automatically. 357dc99b369Smrg 358dc99b369Smrg`--prefix=DIR' 3595c30ecadSmrg Use DIR as the installation prefix. *note Installation Names:: 360dc99b369Smrg for more details, including other options available for fine-tuning 361dc99b369Smrg the installation locations. 362dc99b369Smrg 363dc99b369Smrg`--no-create' 364dc99b369Smrg`-n' 365dc99b369Smrg Run the configure checks, but stop before creating any output 366dc99b369Smrg files. 367dc99b369Smrg 368dc99b369Smrg`configure' also accepts some other, not widely useful, options. Run 369dc99b369Smrg`configure --help' for more details. 370dc99b369Smrg 371