1972599cfSmrgInstallation Instructions 2972599cfSmrg************************* 3972599cfSmrg 45eeb4e8fSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 55eeb4e8fSmrgInc. 6972599cfSmrg 75eeb4e8fSmrg Copying and distribution of this file, with or without modification, 85eeb4e8fSmrgare permitted in any medium without royalty provided the copyright 95eeb4e8fSmrgnotice and this notice are preserved. This file is offered as-is, 105eeb4e8fSmrgwithout warranty of any kind. 11972599cfSmrg 12972599cfSmrgBasic Installation 13972599cfSmrg================== 14972599cfSmrg 15972599cfSmrg Briefly, the shell commands `./configure; make; make install' should 16972599cfSmrgconfigure, build, and install this package. The following 17972599cfSmrgmore-detailed instructions are generic; see the `README' file for 185eeb4e8fSmrginstructions specific to this package. Some packages provide this 195eeb4e8fSmrg`INSTALL' file but do not implement all of the features documented 205eeb4e8fSmrgbelow. The lack of an optional feature in a given package is not 215eeb4e8fSmrgnecessarily a bug. More recommendations for GNU packages can be found 225eeb4e8fSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 23972599cfSmrg 24972599cfSmrg The `configure' shell script attempts to guess correct values for 25972599cfSmrgvarious system-dependent variables used during compilation. It uses 26972599cfSmrgthose values to create a `Makefile' in each directory of the package. 27972599cfSmrgIt may also create one or more `.h' files containing system-dependent 28972599cfSmrgdefinitions. Finally, it creates a shell script `config.status' that 29972599cfSmrgyou can run in the future to recreate the current configuration, and a 30972599cfSmrgfile `config.log' containing compiler output (useful mainly for 31972599cfSmrgdebugging `configure'). 32972599cfSmrg 33972599cfSmrg It can also use an optional file (typically called `config.cache' 34972599cfSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35972599cfSmrgthe results of its tests to speed up reconfiguring. Caching is 36972599cfSmrgdisabled by default to prevent problems with accidental use of stale 37972599cfSmrgcache files. 38972599cfSmrg 39972599cfSmrg If you need to do unusual things to compile the package, please try 40972599cfSmrgto figure out how `configure' could check whether to do them, and mail 41972599cfSmrgdiffs or instructions to the address given in the `README' so they can 42972599cfSmrgbe considered for the next release. If you are using the cache, and at 43972599cfSmrgsome point `config.cache' contains results you don't want to keep, you 44972599cfSmrgmay remove or edit it. 45972599cfSmrg 46972599cfSmrg The file `configure.ac' (or `configure.in') is used to create 47972599cfSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 48972599cfSmrgyou want to change it or regenerate `configure' using a newer version 49972599cfSmrgof `autoconf'. 50972599cfSmrg 515eeb4e8fSmrg The simplest way to compile this package is: 52972599cfSmrg 53972599cfSmrg 1. `cd' to the directory containing the package's source code and type 54972599cfSmrg `./configure' to configure the package for your system. 55972599cfSmrg 56972599cfSmrg Running `configure' might take a while. While running, it prints 57972599cfSmrg some messages telling which features it is checking for. 58972599cfSmrg 59972599cfSmrg 2. Type `make' to compile the package. 60972599cfSmrg 61972599cfSmrg 3. Optionally, type `make check' to run any self-tests that come with 625eeb4e8fSmrg the package, generally using the just-built uninstalled binaries. 63972599cfSmrg 64972599cfSmrg 4. Type `make install' to install the programs and any data files and 655eeb4e8fSmrg documentation. When installing into a prefix owned by root, it is 665eeb4e8fSmrg recommended that the package be configured and built as a regular 675eeb4e8fSmrg user, and only the `make install' phase executed with root 685eeb4e8fSmrg privileges. 695eeb4e8fSmrg 705eeb4e8fSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 715eeb4e8fSmrg this time using the binaries in their final installed location. 725eeb4e8fSmrg This target does not install anything. Running this target as a 735eeb4e8fSmrg regular user, particularly if the prior `make install' required 745eeb4e8fSmrg root privileges, verifies that the installation completed 755eeb4e8fSmrg correctly. 765eeb4e8fSmrg 775eeb4e8fSmrg 6. You can remove the program binaries and object files from the 78972599cfSmrg source code directory by typing `make clean'. To also remove the 79972599cfSmrg files that `configure' created (so you can compile the package for 80972599cfSmrg a different kind of computer), type `make distclean'. There is 81972599cfSmrg also a `make maintainer-clean' target, but that is intended mainly 82972599cfSmrg for the package's developers. If you use it, you may have to get 83972599cfSmrg all sorts of other programs in order to regenerate files that came 84972599cfSmrg with the distribution. 85972599cfSmrg 865eeb4e8fSmrg 7. Often, you can also type `make uninstall' to remove the installed 875eeb4e8fSmrg files again. In practice, not all packages have tested that 885eeb4e8fSmrg uninstallation works correctly, even though it is required by the 895eeb4e8fSmrg GNU Coding Standards. 905eeb4e8fSmrg 915eeb4e8fSmrg 8. Some packages, particularly those that use Automake, provide `make 925eeb4e8fSmrg distcheck', which can by used by developers to test that all other 935eeb4e8fSmrg targets like `make install' and `make uninstall' work correctly. 945eeb4e8fSmrg This target is generally not run by end users. 95972599cfSmrg 96972599cfSmrgCompilers and Options 97972599cfSmrg===================== 98972599cfSmrg 99972599cfSmrg Some systems require unusual options for compilation or linking that 100972599cfSmrgthe `configure' script does not know about. Run `./configure --help' 101972599cfSmrgfor details on some of the pertinent environment variables. 102972599cfSmrg 103972599cfSmrg You can give `configure' initial values for configuration parameters 104972599cfSmrgby setting variables in the command line or in the environment. Here 105972599cfSmrgis an example: 106972599cfSmrg 107972599cfSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108972599cfSmrg 109972599cfSmrg *Note Defining Variables::, for more details. 110972599cfSmrg 111972599cfSmrgCompiling For Multiple Architectures 112972599cfSmrg==================================== 113972599cfSmrg 114972599cfSmrg You can compile the package for more than one kind of computer at the 115972599cfSmrgsame time, by placing the object files for each architecture in their 116972599cfSmrgown directory. To do this, you can use GNU `make'. `cd' to the 117972599cfSmrgdirectory where you want the object files and executables to go and run 118972599cfSmrgthe `configure' script. `configure' automatically checks for the 1195eeb4e8fSmrgsource code in the directory that `configure' is in and in `..'. This 1205eeb4e8fSmrgis known as a "VPATH" build. 121972599cfSmrg 122972599cfSmrg With a non-GNU `make', it is safer to compile the package for one 123972599cfSmrgarchitecture at a time in the source code directory. After you have 124972599cfSmrginstalled the package for one architecture, use `make distclean' before 125972599cfSmrgreconfiguring for another architecture. 126972599cfSmrg 127972599cfSmrg On MacOS X 10.5 and later systems, you can create libraries and 128972599cfSmrgexecutables that work on multiple system types--known as "fat" or 129972599cfSmrg"universal" binaries--by specifying multiple `-arch' options to the 130972599cfSmrgcompiler but only a single `-arch' option to the preprocessor. Like 131972599cfSmrgthis: 132972599cfSmrg 133972599cfSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134972599cfSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135972599cfSmrg CPP="gcc -E" CXXCPP="g++ -E" 136972599cfSmrg 137972599cfSmrg This is not guaranteed to produce working output in all cases, you 138972599cfSmrgmay have to build one architecture at a time and combine the results 139972599cfSmrgusing the `lipo' tool if you have problems. 140972599cfSmrg 141972599cfSmrgInstallation Names 142972599cfSmrg================== 143972599cfSmrg 144972599cfSmrg By default, `make install' installs the package's commands under 145972599cfSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146972599cfSmrgcan specify an installation prefix other than `/usr/local' by giving 1475eeb4e8fSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 1485eeb4e8fSmrgabsolute file name. 149972599cfSmrg 150972599cfSmrg You can specify separate installation prefixes for 151972599cfSmrgarchitecture-specific files and architecture-independent files. If you 152972599cfSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153972599cfSmrgPREFIX as the prefix for installing programs and libraries. 154972599cfSmrgDocumentation and other data files still use the regular prefix. 155972599cfSmrg 156972599cfSmrg In addition, if you use an unusual directory layout you can give 157972599cfSmrgoptions like `--bindir=DIR' to specify different values for particular 158972599cfSmrgkinds of files. Run `configure --help' for a list of the directories 1595eeb4e8fSmrgyou can set and what kinds of files go in them. In general, the 1605eeb4e8fSmrgdefault for these options is expressed in terms of `${prefix}', so that 1615eeb4e8fSmrgspecifying just `--prefix' will affect all of the other directory 1625eeb4e8fSmrgspecifications that were not explicitly provided. 1635eeb4e8fSmrg 1645eeb4e8fSmrg The most portable way to affect installation locations is to pass the 1655eeb4e8fSmrgcorrect locations to `configure'; however, many packages provide one or 1665eeb4e8fSmrgboth of the following shortcuts of passing variable assignments to the 1675eeb4e8fSmrg`make install' command line to change installation locations without 1685eeb4e8fSmrghaving to reconfigure or recompile. 1695eeb4e8fSmrg 1705eeb4e8fSmrg The first method involves providing an override variable for each 1715eeb4e8fSmrgaffected directory. For example, `make install 1725eeb4e8fSmrgprefix=/alternate/directory' will choose an alternate location for all 1735eeb4e8fSmrgdirectory configuration variables that were expressed in terms of 1745eeb4e8fSmrg`${prefix}'. Any directories that were specified during `configure', 1755eeb4e8fSmrgbut not in terms of `${prefix}', must each be overridden at install 1765eeb4e8fSmrgtime for the entire installation to be relocated. The approach of 1775eeb4e8fSmrgmakefile variable overrides for each directory variable is required by 1785eeb4e8fSmrgthe GNU Coding Standards, and ideally causes no recompilation. 1795eeb4e8fSmrgHowever, some platforms have known limitations with the semantics of 1805eeb4e8fSmrgshared libraries that end up requiring recompilation when using this 1815eeb4e8fSmrgmethod, particularly noticeable in packages that use GNU Libtool. 1825eeb4e8fSmrg 1835eeb4e8fSmrg The second method involves providing the `DESTDIR' variable. For 1845eeb4e8fSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 1855eeb4e8fSmrg`/alternate/directory' before all installation names. The approach of 1865eeb4e8fSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 1875eeb4e8fSmrgdoes not work on platforms that have drive letters. On the other hand, 1885eeb4e8fSmrgit does better at avoiding recompilation issues, and works well even 1895eeb4e8fSmrgwhen some directory options were not specified in terms of `${prefix}' 1905eeb4e8fSmrgat `configure' time. 1915eeb4e8fSmrg 1925eeb4e8fSmrgOptional Features 1935eeb4e8fSmrg================= 194972599cfSmrg 195972599cfSmrg If the package supports it, you can cause programs to be installed 196972599cfSmrgwith an extra prefix or suffix on their names by giving `configure' the 197972599cfSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198972599cfSmrg 199972599cfSmrg Some packages pay attention to `--enable-FEATURE' options to 200972599cfSmrg`configure', where FEATURE indicates an optional part of the package. 201972599cfSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202972599cfSmrgis something like `gnu-as' or `x' (for the X Window System). The 203972599cfSmrg`README' should mention any `--enable-' and `--with-' options that the 204972599cfSmrgpackage recognizes. 205972599cfSmrg 206972599cfSmrg For packages that use the X Window System, `configure' can usually 207972599cfSmrgfind the X include and library files automatically, but if it doesn't, 208972599cfSmrgyou can use the `configure' options `--x-includes=DIR' and 209972599cfSmrg`--x-libraries=DIR' to specify their locations. 210972599cfSmrg 2115eeb4e8fSmrg Some packages offer the ability to configure how verbose the 2125eeb4e8fSmrgexecution of `make' will be. For these packages, running `./configure 2135eeb4e8fSmrg--enable-silent-rules' sets the default to minimal output, which can be 2145eeb4e8fSmrgoverridden with `make V=1'; while running `./configure 2155eeb4e8fSmrg--disable-silent-rules' sets the default to verbose, which can be 2165eeb4e8fSmrgoverridden with `make V=0'. 2175eeb4e8fSmrg 218972599cfSmrgParticular systems 219972599cfSmrg================== 220972599cfSmrg 221972599cfSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222972599cfSmrgCC is not installed, it is recommended to use the following options in 223972599cfSmrgorder to use an ANSI C compiler: 224972599cfSmrg 2255eeb4e8fSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226972599cfSmrg 227972599cfSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228972599cfSmrg 2295eeb4e8fSmrg HP-UX `make' updates targets which have the same time stamps as 2305eeb4e8fSmrgtheir prerequisites, which makes it generally unusable when shipped 2315eeb4e8fSmrggenerated files such as `configure' are involved. Use GNU `make' 2325eeb4e8fSmrginstead. 2335eeb4e8fSmrg 234972599cfSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235972599cfSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236972599cfSmrga workaround. If GNU CC is not installed, it is therefore recommended 237972599cfSmrgto try 238972599cfSmrg 239972599cfSmrg ./configure CC="cc" 240972599cfSmrg 241972599cfSmrgand if that doesn't work, try 242972599cfSmrg 243972599cfSmrg ./configure CC="cc -nodtk" 244972599cfSmrg 2455eeb4e8fSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 2465eeb4e8fSmrgdirectory contains several dysfunctional programs; working variants of 2475eeb4e8fSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 2485eeb4e8fSmrgin your `PATH', put it _after_ `/usr/bin'. 2495eeb4e8fSmrg 2505eeb4e8fSmrg On Haiku, software installed for all users goes in `/boot/common', 2515eeb4e8fSmrgnot `/usr/local'. It is recommended to use the following options: 2525eeb4e8fSmrg 2535eeb4e8fSmrg ./configure --prefix=/boot/common 2545eeb4e8fSmrg 255972599cfSmrgSpecifying the System Type 256972599cfSmrg========================== 257972599cfSmrg 258972599cfSmrg There may be some features `configure' cannot figure out 259972599cfSmrgautomatically, but needs to determine by the type of machine the package 260972599cfSmrgwill run on. Usually, assuming the package is built to be run on the 261972599cfSmrg_same_ architectures, `configure' can figure that out, but if it prints 262972599cfSmrga message saying it cannot guess the machine type, give it the 263972599cfSmrg`--build=TYPE' option. TYPE can either be a short name for the system 264972599cfSmrgtype, such as `sun4', or a canonical name which has the form: 265972599cfSmrg 266972599cfSmrg CPU-COMPANY-SYSTEM 267972599cfSmrg 268972599cfSmrgwhere SYSTEM can have one of these forms: 269972599cfSmrg 2705eeb4e8fSmrg OS 2715eeb4e8fSmrg KERNEL-OS 272972599cfSmrg 273972599cfSmrg See the file `config.sub' for the possible values of each field. If 274972599cfSmrg`config.sub' isn't included in this package, then this package doesn't 275972599cfSmrgneed to know the machine type. 276972599cfSmrg 277972599cfSmrg If you are _building_ compiler tools for cross-compiling, you should 278972599cfSmrguse the option `--target=TYPE' to select the type of system they will 279972599cfSmrgproduce code for. 280972599cfSmrg 281972599cfSmrg If you want to _use_ a cross compiler, that generates code for a 282972599cfSmrgplatform different from the build platform, you should specify the 283972599cfSmrg"host" platform (i.e., that on which the generated programs will 284972599cfSmrgeventually be run) with `--host=TYPE'. 285972599cfSmrg 286972599cfSmrgSharing Defaults 287972599cfSmrg================ 288972599cfSmrg 289972599cfSmrg If you want to set default values for `configure' scripts to share, 290972599cfSmrgyou can create a site shell script called `config.site' that gives 291972599cfSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 292972599cfSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293972599cfSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294972599cfSmrg`CONFIG_SITE' environment variable to the location of the site script. 295972599cfSmrgA warning: not all `configure' scripts look for a site script. 296972599cfSmrg 297972599cfSmrgDefining Variables 298972599cfSmrg================== 299972599cfSmrg 300972599cfSmrg Variables not defined in a site shell script can be set in the 301972599cfSmrgenvironment passed to `configure'. However, some packages may run 302972599cfSmrgconfigure again during the build, and the customized values of these 303972599cfSmrgvariables may be lost. In order to avoid this problem, you should set 304972599cfSmrgthem in the `configure' command line, using `VAR=value'. For example: 305972599cfSmrg 306972599cfSmrg ./configure CC=/usr/local2/bin/gcc 307972599cfSmrg 308972599cfSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 309972599cfSmrgoverridden in the site shell script). 310972599cfSmrg 311972599cfSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312972599cfSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313972599cfSmrg 314972599cfSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315972599cfSmrg 316972599cfSmrg`configure' Invocation 317972599cfSmrg====================== 318972599cfSmrg 319972599cfSmrg `configure' recognizes the following options to control how it 320972599cfSmrgoperates. 321972599cfSmrg 322972599cfSmrg`--help' 323972599cfSmrg`-h' 324972599cfSmrg Print a summary of all of the options to `configure', and exit. 325972599cfSmrg 326972599cfSmrg`--help=short' 327972599cfSmrg`--help=recursive' 328972599cfSmrg Print a summary of the options unique to this package's 329972599cfSmrg `configure', and exit. The `short' variant lists options used 330972599cfSmrg only in the top level, while the `recursive' variant lists options 331972599cfSmrg also present in any nested packages. 332972599cfSmrg 333972599cfSmrg`--version' 334972599cfSmrg`-V' 335972599cfSmrg Print the version of Autoconf used to generate the `configure' 336972599cfSmrg script, and exit. 337972599cfSmrg 338972599cfSmrg`--cache-file=FILE' 339972599cfSmrg Enable the cache: use and save the results of the tests in FILE, 340972599cfSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341972599cfSmrg disable caching. 342972599cfSmrg 343972599cfSmrg`--config-cache' 344972599cfSmrg`-C' 345972599cfSmrg Alias for `--cache-file=config.cache'. 346972599cfSmrg 347972599cfSmrg`--quiet' 348972599cfSmrg`--silent' 349972599cfSmrg`-q' 350972599cfSmrg Do not print messages saying which checks are being made. To 351972599cfSmrg suppress all normal output, redirect it to `/dev/null' (any error 352972599cfSmrg messages will still be shown). 353972599cfSmrg 354972599cfSmrg`--srcdir=DIR' 355972599cfSmrg Look for the package's source code in directory DIR. Usually 356972599cfSmrg `configure' can determine that directory automatically. 357972599cfSmrg 358972599cfSmrg`--prefix=DIR' 3595eeb4e8fSmrg Use DIR as the installation prefix. *note Installation Names:: 360972599cfSmrg for more details, including other options available for fine-tuning 361972599cfSmrg the installation locations. 362972599cfSmrg 363972599cfSmrg`--no-create' 364972599cfSmrg`-n' 365972599cfSmrg Run the configure checks, but stop before creating any output 366972599cfSmrg files. 367972599cfSmrg 368972599cfSmrg`configure' also accepts some other, not widely useful, options. Run 369972599cfSmrg`configure --help' for more details. 370972599cfSmrg 371