1cf8f59bfSmrgInstallation Instructions 2cf8f59bfSmrg************************* 3cf8f59bfSmrg 40cfee914SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 50cfee914SmrgInc. 6cf8f59bfSmrg 70cfee914Smrg Copying and distribution of this file, with or without modification, 80cfee914Smrgare permitted in any medium without royalty provided the copyright 90cfee914Smrgnotice and this notice are preserved. This file is offered as-is, 100cfee914Smrgwithout warranty of any kind. 11cf8f59bfSmrg 12cf8f59bfSmrgBasic Installation 13cf8f59bfSmrg================== 14cf8f59bfSmrg 15cf8f59bfSmrg Briefly, the shell commands `./configure; make; make install' should 16cf8f59bfSmrgconfigure, build, and install this package. The following 17cf8f59bfSmrgmore-detailed instructions are generic; see the `README' file for 180cfee914Smrginstructions specific to this package. Some packages provide this 190cfee914Smrg`INSTALL' file but do not implement all of the features documented 200cfee914Smrgbelow. The lack of an optional feature in a given package is not 210cfee914Smrgnecessarily a bug. More recommendations for GNU packages can be found 220cfee914Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 23cf8f59bfSmrg 24cf8f59bfSmrg The `configure' shell script attempts to guess correct values for 25cf8f59bfSmrgvarious system-dependent variables used during compilation. It uses 26cf8f59bfSmrgthose values to create a `Makefile' in each directory of the package. 27cf8f59bfSmrgIt may also create one or more `.h' files containing system-dependent 28cf8f59bfSmrgdefinitions. Finally, it creates a shell script `config.status' that 29cf8f59bfSmrgyou can run in the future to recreate the current configuration, and a 30cf8f59bfSmrgfile `config.log' containing compiler output (useful mainly for 31cf8f59bfSmrgdebugging `configure'). 32cf8f59bfSmrg 33cf8f59bfSmrg It can also use an optional file (typically called `config.cache' 34cf8f59bfSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35cf8f59bfSmrgthe results of its tests to speed up reconfiguring. Caching is 36cf8f59bfSmrgdisabled by default to prevent problems with accidental use of stale 37cf8f59bfSmrgcache files. 38cf8f59bfSmrg 39cf8f59bfSmrg If you need to do unusual things to compile the package, please try 40cf8f59bfSmrgto figure out how `configure' could check whether to do them, and mail 41cf8f59bfSmrgdiffs or instructions to the address given in the `README' so they can 42cf8f59bfSmrgbe considered for the next release. If you are using the cache, and at 43cf8f59bfSmrgsome point `config.cache' contains results you don't want to keep, you 44cf8f59bfSmrgmay remove or edit it. 45cf8f59bfSmrg 46cf8f59bfSmrg The file `configure.ac' (or `configure.in') is used to create 47cf8f59bfSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 48cf8f59bfSmrgyou want to change it or regenerate `configure' using a newer version 49cf8f59bfSmrgof `autoconf'. 50cf8f59bfSmrg 510cfee914Smrg The simplest way to compile this package is: 52cf8f59bfSmrg 53cf8f59bfSmrg 1. `cd' to the directory containing the package's source code and type 54cf8f59bfSmrg `./configure' to configure the package for your system. 55cf8f59bfSmrg 56cf8f59bfSmrg Running `configure' might take a while. While running, it prints 57cf8f59bfSmrg some messages telling which features it is checking for. 58cf8f59bfSmrg 59cf8f59bfSmrg 2. Type `make' to compile the package. 60cf8f59bfSmrg 61cf8f59bfSmrg 3. Optionally, type `make check' to run any self-tests that come with 620cfee914Smrg the package, generally using the just-built uninstalled binaries. 63cf8f59bfSmrg 64cf8f59bfSmrg 4. Type `make install' to install the programs and any data files and 650cfee914Smrg documentation. When installing into a prefix owned by root, it is 660cfee914Smrg recommended that the package be configured and built as a regular 670cfee914Smrg user, and only the `make install' phase executed with root 680cfee914Smrg privileges. 690cfee914Smrg 700cfee914Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 710cfee914Smrg this time using the binaries in their final installed location. 720cfee914Smrg This target does not install anything. Running this target as a 730cfee914Smrg regular user, particularly if the prior `make install' required 740cfee914Smrg root privileges, verifies that the installation completed 750cfee914Smrg correctly. 760cfee914Smrg 770cfee914Smrg 6. You can remove the program binaries and object files from the 78cf8f59bfSmrg source code directory by typing `make clean'. To also remove the 79cf8f59bfSmrg files that `configure' created (so you can compile the package for 80cf8f59bfSmrg a different kind of computer), type `make distclean'. There is 81cf8f59bfSmrg also a `make maintainer-clean' target, but that is intended mainly 82cf8f59bfSmrg for the package's developers. If you use it, you may have to get 83cf8f59bfSmrg all sorts of other programs in order to regenerate files that came 84cf8f59bfSmrg with the distribution. 85cf8f59bfSmrg 860cfee914Smrg 7. Often, you can also type `make uninstall' to remove the installed 870cfee914Smrg files again. In practice, not all packages have tested that 880cfee914Smrg uninstallation works correctly, even though it is required by the 890cfee914Smrg GNU Coding Standards. 900cfee914Smrg 910cfee914Smrg 8. Some packages, particularly those that use Automake, provide `make 920cfee914Smrg distcheck', which can by used by developers to test that all other 930cfee914Smrg targets like `make install' and `make uninstall' work correctly. 940cfee914Smrg This target is generally not run by end users. 95cf8f59bfSmrg 96cf8f59bfSmrgCompilers and Options 97cf8f59bfSmrg===================== 98cf8f59bfSmrg 99cf8f59bfSmrg Some systems require unusual options for compilation or linking that 100cf8f59bfSmrgthe `configure' script does not know about. Run `./configure --help' 101cf8f59bfSmrgfor details on some of the pertinent environment variables. 102cf8f59bfSmrg 103cf8f59bfSmrg You can give `configure' initial values for configuration parameters 104cf8f59bfSmrgby setting variables in the command line or in the environment. Here 105cf8f59bfSmrgis an example: 106cf8f59bfSmrg 107cf8f59bfSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108cf8f59bfSmrg 109cf8f59bfSmrg *Note Defining Variables::, for more details. 110cf8f59bfSmrg 111cf8f59bfSmrgCompiling For Multiple Architectures 112cf8f59bfSmrg==================================== 113cf8f59bfSmrg 114cf8f59bfSmrg You can compile the package for more than one kind of computer at the 115cf8f59bfSmrgsame time, by placing the object files for each architecture in their 116cf8f59bfSmrgown directory. To do this, you can use GNU `make'. `cd' to the 117cf8f59bfSmrgdirectory where you want the object files and executables to go and run 118cf8f59bfSmrgthe `configure' script. `configure' automatically checks for the 1190cfee914Smrgsource code in the directory that `configure' is in and in `..'. This 1200cfee914Smrgis known as a "VPATH" build. 121cf8f59bfSmrg 122cf8f59bfSmrg With a non-GNU `make', it is safer to compile the package for one 123cf8f59bfSmrgarchitecture at a time in the source code directory. After you have 124cf8f59bfSmrginstalled the package for one architecture, use `make distclean' before 125cf8f59bfSmrgreconfiguring for another architecture. 126cf8f59bfSmrg 127cf8f59bfSmrg On MacOS X 10.5 and later systems, you can create libraries and 128cf8f59bfSmrgexecutables that work on multiple system types--known as "fat" or 129cf8f59bfSmrg"universal" binaries--by specifying multiple `-arch' options to the 130cf8f59bfSmrgcompiler but only a single `-arch' option to the preprocessor. Like 131cf8f59bfSmrgthis: 132cf8f59bfSmrg 133cf8f59bfSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134cf8f59bfSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135cf8f59bfSmrg CPP="gcc -E" CXXCPP="g++ -E" 136cf8f59bfSmrg 137cf8f59bfSmrg This is not guaranteed to produce working output in all cases, you 138cf8f59bfSmrgmay have to build one architecture at a time and combine the results 139cf8f59bfSmrgusing the `lipo' tool if you have problems. 140cf8f59bfSmrg 141cf8f59bfSmrgInstallation Names 142cf8f59bfSmrg================== 143cf8f59bfSmrg 144cf8f59bfSmrg By default, `make install' installs the package's commands under 145cf8f59bfSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146cf8f59bfSmrgcan specify an installation prefix other than `/usr/local' by giving 1470cfee914Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 1480cfee914Smrgabsolute file name. 149cf8f59bfSmrg 150cf8f59bfSmrg You can specify separate installation prefixes for 151cf8f59bfSmrgarchitecture-specific files and architecture-independent files. If you 152cf8f59bfSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153cf8f59bfSmrgPREFIX as the prefix for installing programs and libraries. 154cf8f59bfSmrgDocumentation and other data files still use the regular prefix. 155cf8f59bfSmrg 156cf8f59bfSmrg In addition, if you use an unusual directory layout you can give 157cf8f59bfSmrgoptions like `--bindir=DIR' to specify different values for particular 158cf8f59bfSmrgkinds of files. Run `configure --help' for a list of the directories 1590cfee914Smrgyou can set and what kinds of files go in them. In general, the 1600cfee914Smrgdefault for these options is expressed in terms of `${prefix}', so that 1610cfee914Smrgspecifying just `--prefix' will affect all of the other directory 1620cfee914Smrgspecifications that were not explicitly provided. 1630cfee914Smrg 1640cfee914Smrg The most portable way to affect installation locations is to pass the 1650cfee914Smrgcorrect locations to `configure'; however, many packages provide one or 1660cfee914Smrgboth of the following shortcuts of passing variable assignments to the 1670cfee914Smrg`make install' command line to change installation locations without 1680cfee914Smrghaving to reconfigure or recompile. 1690cfee914Smrg 1700cfee914Smrg The first method involves providing an override variable for each 1710cfee914Smrgaffected directory. For example, `make install 1720cfee914Smrgprefix=/alternate/directory' will choose an alternate location for all 1730cfee914Smrgdirectory configuration variables that were expressed in terms of 1740cfee914Smrg`${prefix}'. Any directories that were specified during `configure', 1750cfee914Smrgbut not in terms of `${prefix}', must each be overridden at install 1760cfee914Smrgtime for the entire installation to be relocated. The approach of 1770cfee914Smrgmakefile variable overrides for each directory variable is required by 1780cfee914Smrgthe GNU Coding Standards, and ideally causes no recompilation. 1790cfee914SmrgHowever, some platforms have known limitations with the semantics of 1800cfee914Smrgshared libraries that end up requiring recompilation when using this 1810cfee914Smrgmethod, particularly noticeable in packages that use GNU Libtool. 1820cfee914Smrg 1830cfee914Smrg The second method involves providing the `DESTDIR' variable. For 1840cfee914Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 1850cfee914Smrg`/alternate/directory' before all installation names. The approach of 1860cfee914Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 1870cfee914Smrgdoes not work on platforms that have drive letters. On the other hand, 1880cfee914Smrgit does better at avoiding recompilation issues, and works well even 1890cfee914Smrgwhen some directory options were not specified in terms of `${prefix}' 1900cfee914Smrgat `configure' time. 1910cfee914Smrg 1920cfee914SmrgOptional Features 1930cfee914Smrg================= 194cf8f59bfSmrg 195cf8f59bfSmrg If the package supports it, you can cause programs to be installed 196cf8f59bfSmrgwith an extra prefix or suffix on their names by giving `configure' the 197cf8f59bfSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198cf8f59bfSmrg 199cf8f59bfSmrg Some packages pay attention to `--enable-FEATURE' options to 200cf8f59bfSmrg`configure', where FEATURE indicates an optional part of the package. 201cf8f59bfSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202cf8f59bfSmrgis something like `gnu-as' or `x' (for the X Window System). The 203cf8f59bfSmrg`README' should mention any `--enable-' and `--with-' options that the 204cf8f59bfSmrgpackage recognizes. 205cf8f59bfSmrg 206cf8f59bfSmrg For packages that use the X Window System, `configure' can usually 207cf8f59bfSmrgfind the X include and library files automatically, but if it doesn't, 208cf8f59bfSmrgyou can use the `configure' options `--x-includes=DIR' and 209cf8f59bfSmrg`--x-libraries=DIR' to specify their locations. 210cf8f59bfSmrg 2110cfee914Smrg Some packages offer the ability to configure how verbose the 2120cfee914Smrgexecution of `make' will be. For these packages, running `./configure 2130cfee914Smrg--enable-silent-rules' sets the default to minimal output, which can be 2140cfee914Smrgoverridden with `make V=1'; while running `./configure 2150cfee914Smrg--disable-silent-rules' sets the default to verbose, which can be 2160cfee914Smrgoverridden with `make V=0'. 2170cfee914Smrg 218cf8f59bfSmrgParticular systems 219cf8f59bfSmrg================== 220cf8f59bfSmrg 221cf8f59bfSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222cf8f59bfSmrgCC is not installed, it is recommended to use the following options in 223cf8f59bfSmrgorder to use an ANSI C compiler: 224cf8f59bfSmrg 2250cfee914Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226cf8f59bfSmrg 227cf8f59bfSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228cf8f59bfSmrg 2290cfee914Smrg HP-UX `make' updates targets which have the same time stamps as 2300cfee914Smrgtheir prerequisites, which makes it generally unusable when shipped 2310cfee914Smrggenerated files such as `configure' are involved. Use GNU `make' 2320cfee914Smrginstead. 2330cfee914Smrg 234cf8f59bfSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235cf8f59bfSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236cf8f59bfSmrga workaround. If GNU CC is not installed, it is therefore recommended 237cf8f59bfSmrgto try 238cf8f59bfSmrg 239cf8f59bfSmrg ./configure CC="cc" 240cf8f59bfSmrg 241cf8f59bfSmrgand if that doesn't work, try 242cf8f59bfSmrg 243cf8f59bfSmrg ./configure CC="cc -nodtk" 244cf8f59bfSmrg 2450cfee914Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 2460cfee914Smrgdirectory contains several dysfunctional programs; working variants of 2470cfee914Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 2480cfee914Smrgin your `PATH', put it _after_ `/usr/bin'. 2490cfee914Smrg 2500cfee914Smrg On Haiku, software installed for all users goes in `/boot/common', 2510cfee914Smrgnot `/usr/local'. It is recommended to use the following options: 2520cfee914Smrg 2530cfee914Smrg ./configure --prefix=/boot/common 2540cfee914Smrg 255cf8f59bfSmrgSpecifying the System Type 256cf8f59bfSmrg========================== 257cf8f59bfSmrg 258cf8f59bfSmrg There may be some features `configure' cannot figure out 259cf8f59bfSmrgautomatically, but needs to determine by the type of machine the package 260cf8f59bfSmrgwill run on. Usually, assuming the package is built to be run on the 261cf8f59bfSmrg_same_ architectures, `configure' can figure that out, but if it prints 262cf8f59bfSmrga message saying it cannot guess the machine type, give it the 263cf8f59bfSmrg`--build=TYPE' option. TYPE can either be a short name for the system 264cf8f59bfSmrgtype, such as `sun4', or a canonical name which has the form: 265cf8f59bfSmrg 266cf8f59bfSmrg CPU-COMPANY-SYSTEM 267cf8f59bfSmrg 268cf8f59bfSmrgwhere SYSTEM can have one of these forms: 269cf8f59bfSmrg 2700cfee914Smrg OS 2710cfee914Smrg KERNEL-OS 272cf8f59bfSmrg 273cf8f59bfSmrg See the file `config.sub' for the possible values of each field. If 274cf8f59bfSmrg`config.sub' isn't included in this package, then this package doesn't 275cf8f59bfSmrgneed to know the machine type. 276cf8f59bfSmrg 277cf8f59bfSmrg If you are _building_ compiler tools for cross-compiling, you should 278cf8f59bfSmrguse the option `--target=TYPE' to select the type of system they will 279cf8f59bfSmrgproduce code for. 280cf8f59bfSmrg 281cf8f59bfSmrg If you want to _use_ a cross compiler, that generates code for a 282cf8f59bfSmrgplatform different from the build platform, you should specify the 283cf8f59bfSmrg"host" platform (i.e., that on which the generated programs will 284cf8f59bfSmrgeventually be run) with `--host=TYPE'. 285cf8f59bfSmrg 286cf8f59bfSmrgSharing Defaults 287cf8f59bfSmrg================ 288cf8f59bfSmrg 289cf8f59bfSmrg If you want to set default values for `configure' scripts to share, 290cf8f59bfSmrgyou can create a site shell script called `config.site' that gives 291cf8f59bfSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 292cf8f59bfSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293cf8f59bfSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294cf8f59bfSmrg`CONFIG_SITE' environment variable to the location of the site script. 295cf8f59bfSmrgA warning: not all `configure' scripts look for a site script. 296cf8f59bfSmrg 297cf8f59bfSmrgDefining Variables 298cf8f59bfSmrg================== 299cf8f59bfSmrg 300cf8f59bfSmrg Variables not defined in a site shell script can be set in the 301cf8f59bfSmrgenvironment passed to `configure'. However, some packages may run 302cf8f59bfSmrgconfigure again during the build, and the customized values of these 303cf8f59bfSmrgvariables may be lost. In order to avoid this problem, you should set 304cf8f59bfSmrgthem in the `configure' command line, using `VAR=value'. For example: 305cf8f59bfSmrg 306cf8f59bfSmrg ./configure CC=/usr/local2/bin/gcc 307cf8f59bfSmrg 308cf8f59bfSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 309cf8f59bfSmrgoverridden in the site shell script). 310cf8f59bfSmrg 311cf8f59bfSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312cf8f59bfSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313cf8f59bfSmrg 314cf8f59bfSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315cf8f59bfSmrg 316cf8f59bfSmrg`configure' Invocation 317cf8f59bfSmrg====================== 318cf8f59bfSmrg 319cf8f59bfSmrg `configure' recognizes the following options to control how it 320cf8f59bfSmrgoperates. 321cf8f59bfSmrg 322cf8f59bfSmrg`--help' 323cf8f59bfSmrg`-h' 324cf8f59bfSmrg Print a summary of all of the options to `configure', and exit. 325cf8f59bfSmrg 326cf8f59bfSmrg`--help=short' 327cf8f59bfSmrg`--help=recursive' 328cf8f59bfSmrg Print a summary of the options unique to this package's 329cf8f59bfSmrg `configure', and exit. The `short' variant lists options used 330cf8f59bfSmrg only in the top level, while the `recursive' variant lists options 331cf8f59bfSmrg also present in any nested packages. 332cf8f59bfSmrg 333cf8f59bfSmrg`--version' 334cf8f59bfSmrg`-V' 335cf8f59bfSmrg Print the version of Autoconf used to generate the `configure' 336cf8f59bfSmrg script, and exit. 337cf8f59bfSmrg 338cf8f59bfSmrg`--cache-file=FILE' 339cf8f59bfSmrg Enable the cache: use and save the results of the tests in FILE, 340cf8f59bfSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341cf8f59bfSmrg disable caching. 342cf8f59bfSmrg 343cf8f59bfSmrg`--config-cache' 344cf8f59bfSmrg`-C' 345cf8f59bfSmrg Alias for `--cache-file=config.cache'. 346cf8f59bfSmrg 347cf8f59bfSmrg`--quiet' 348cf8f59bfSmrg`--silent' 349cf8f59bfSmrg`-q' 350cf8f59bfSmrg Do not print messages saying which checks are being made. To 351cf8f59bfSmrg suppress all normal output, redirect it to `/dev/null' (any error 352cf8f59bfSmrg messages will still be shown). 353cf8f59bfSmrg 354cf8f59bfSmrg`--srcdir=DIR' 355cf8f59bfSmrg Look for the package's source code in directory DIR. Usually 356cf8f59bfSmrg `configure' can determine that directory automatically. 357cf8f59bfSmrg 358cf8f59bfSmrg`--prefix=DIR' 3590cfee914Smrg Use DIR as the installation prefix. *note Installation Names:: 360cf8f59bfSmrg for more details, including other options available for fine-tuning 361cf8f59bfSmrg the installation locations. 362cf8f59bfSmrg 363cf8f59bfSmrg`--no-create' 364cf8f59bfSmrg`-n' 365cf8f59bfSmrg Run the configure checks, but stop before creating any output 366cf8f59bfSmrg files. 367cf8f59bfSmrg 368cf8f59bfSmrg`configure' also accepts some other, not widely useful, options. Run 369cf8f59bfSmrg`configure --help' for more details. 370cf8f59bfSmrg 371