INSTALL revision 1e449e82
1aa9e3350SmrgInstallation Instructions 2aa9e3350Smrg************************* 3aa9e3350Smrg 41e449e82SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 51e449e82SmrgInc. 6aa9e3350Smrg 71e449e82Smrg Copying and distribution of this file, with or without modification, 81e449e82Smrgare permitted in any medium without royalty provided the copyright 91e449e82Smrgnotice and this notice are preserved. This file is offered as-is, 101e449e82Smrgwithout warranty of any kind. 11aa9e3350Smrg 12aa9e3350SmrgBasic Installation 13aa9e3350Smrg================== 14aa9e3350Smrg 15aa9e3350Smrg Briefly, the shell commands `./configure; make; make install' should 16aa9e3350Smrgconfigure, build, and install this package. The following 17aa9e3350Smrgmore-detailed instructions are generic; see the `README' file for 181e449e82Smrginstructions specific to this package. Some packages provide this 191e449e82Smrg`INSTALL' file but do not implement all of the features documented 201e449e82Smrgbelow. The lack of an optional feature in a given package is not 211e449e82Smrgnecessarily a bug. More recommendations for GNU packages can be found 221e449e82Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 23aa9e3350Smrg 24aa9e3350Smrg The `configure' shell script attempts to guess correct values for 25aa9e3350Smrgvarious system-dependent variables used during compilation. It uses 26aa9e3350Smrgthose values to create a `Makefile' in each directory of the package. 27aa9e3350SmrgIt may also create one or more `.h' files containing system-dependent 28aa9e3350Smrgdefinitions. Finally, it creates a shell script `config.status' that 29aa9e3350Smrgyou can run in the future to recreate the current configuration, and a 30aa9e3350Smrgfile `config.log' containing compiler output (useful mainly for 31aa9e3350Smrgdebugging `configure'). 32aa9e3350Smrg 33aa9e3350Smrg It can also use an optional file (typically called `config.cache' 34aa9e3350Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35aa9e3350Smrgthe results of its tests to speed up reconfiguring. Caching is 36aa9e3350Smrgdisabled by default to prevent problems with accidental use of stale 37aa9e3350Smrgcache files. 38aa9e3350Smrg 39aa9e3350Smrg If you need to do unusual things to compile the package, please try 40aa9e3350Smrgto figure out how `configure' could check whether to do them, and mail 41aa9e3350Smrgdiffs or instructions to the address given in the `README' so they can 42aa9e3350Smrgbe considered for the next release. If you are using the cache, and at 43aa9e3350Smrgsome point `config.cache' contains results you don't want to keep, you 44aa9e3350Smrgmay remove or edit it. 45aa9e3350Smrg 46aa9e3350Smrg The file `configure.ac' (or `configure.in') is used to create 47aa9e3350Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 48aa9e3350Smrgyou want to change it or regenerate `configure' using a newer version 49aa9e3350Smrgof `autoconf'. 50aa9e3350Smrg 511e449e82Smrg The simplest way to compile this package is: 52aa9e3350Smrg 53aa9e3350Smrg 1. `cd' to the directory containing the package's source code and type 54aa9e3350Smrg `./configure' to configure the package for your system. 55aa9e3350Smrg 56aa9e3350Smrg Running `configure' might take a while. While running, it prints 57aa9e3350Smrg some messages telling which features it is checking for. 58aa9e3350Smrg 59aa9e3350Smrg 2. Type `make' to compile the package. 60aa9e3350Smrg 61aa9e3350Smrg 3. Optionally, type `make check' to run any self-tests that come with 621e449e82Smrg the package, generally using the just-built uninstalled binaries. 63aa9e3350Smrg 64aa9e3350Smrg 4. Type `make install' to install the programs and any data files and 651e449e82Smrg documentation. When installing into a prefix owned by root, it is 661e449e82Smrg recommended that the package be configured and built as a regular 671e449e82Smrg user, and only the `make install' phase executed with root 681e449e82Smrg privileges. 691e449e82Smrg 701e449e82Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 711e449e82Smrg this time using the binaries in their final installed location. 721e449e82Smrg This target does not install anything. Running this target as a 731e449e82Smrg regular user, particularly if the prior `make install' required 741e449e82Smrg root privileges, verifies that the installation completed 751e449e82Smrg correctly. 761e449e82Smrg 771e449e82Smrg 6. You can remove the program binaries and object files from the 78aa9e3350Smrg source code directory by typing `make clean'. To also remove the 79aa9e3350Smrg files that `configure' created (so you can compile the package for 80aa9e3350Smrg a different kind of computer), type `make distclean'. There is 81aa9e3350Smrg also a `make maintainer-clean' target, but that is intended mainly 82aa9e3350Smrg for the package's developers. If you use it, you may have to get 83aa9e3350Smrg all sorts of other programs in order to regenerate files that came 84aa9e3350Smrg with the distribution. 85aa9e3350Smrg 861e449e82Smrg 7. Often, you can also type `make uninstall' to remove the installed 871e449e82Smrg files again. In practice, not all packages have tested that 881e449e82Smrg uninstallation works correctly, even though it is required by the 891e449e82Smrg GNU Coding Standards. 901e449e82Smrg 911e449e82Smrg 8. Some packages, particularly those that use Automake, provide `make 921e449e82Smrg distcheck', which can by used by developers to test that all other 931e449e82Smrg targets like `make install' and `make uninstall' work correctly. 941e449e82Smrg This target is generally not run by end users. 95aa9e3350Smrg 96aa9e3350SmrgCompilers and Options 97aa9e3350Smrg===================== 98aa9e3350Smrg 99aa9e3350Smrg Some systems require unusual options for compilation or linking that 100aa9e3350Smrgthe `configure' script does not know about. Run `./configure --help' 101aa9e3350Smrgfor details on some of the pertinent environment variables. 102aa9e3350Smrg 103aa9e3350Smrg You can give `configure' initial values for configuration parameters 104aa9e3350Smrgby setting variables in the command line or in the environment. Here 105aa9e3350Smrgis an example: 106aa9e3350Smrg 107aa9e3350Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108aa9e3350Smrg 109aa9e3350Smrg *Note Defining Variables::, for more details. 110aa9e3350Smrg 111aa9e3350SmrgCompiling For Multiple Architectures 112aa9e3350Smrg==================================== 113aa9e3350Smrg 114aa9e3350Smrg You can compile the package for more than one kind of computer at the 115aa9e3350Smrgsame time, by placing the object files for each architecture in their 116aa9e3350Smrgown directory. To do this, you can use GNU `make'. `cd' to the 117aa9e3350Smrgdirectory where you want the object files and executables to go and run 118aa9e3350Smrgthe `configure' script. `configure' automatically checks for the 1191e449e82Smrgsource code in the directory that `configure' is in and in `..'. This 1201e449e82Smrgis known as a "VPATH" build. 121aa9e3350Smrg 122aa9e3350Smrg With a non-GNU `make', it is safer to compile the package for one 123aa9e3350Smrgarchitecture at a time in the source code directory. After you have 124aa9e3350Smrginstalled the package for one architecture, use `make distclean' before 125aa9e3350Smrgreconfiguring for another architecture. 126aa9e3350Smrg 127aa9e3350Smrg On MacOS X 10.5 and later systems, you can create libraries and 128aa9e3350Smrgexecutables that work on multiple system types--known as "fat" or 129aa9e3350Smrg"universal" binaries--by specifying multiple `-arch' options to the 130aa9e3350Smrgcompiler but only a single `-arch' option to the preprocessor. Like 131aa9e3350Smrgthis: 132aa9e3350Smrg 133aa9e3350Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134aa9e3350Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135aa9e3350Smrg CPP="gcc -E" CXXCPP="g++ -E" 136aa9e3350Smrg 137aa9e3350Smrg This is not guaranteed to produce working output in all cases, you 138aa9e3350Smrgmay have to build one architecture at a time and combine the results 139aa9e3350Smrgusing the `lipo' tool if you have problems. 140aa9e3350Smrg 141aa9e3350SmrgInstallation Names 142aa9e3350Smrg================== 143aa9e3350Smrg 144aa9e3350Smrg By default, `make install' installs the package's commands under 145aa9e3350Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146aa9e3350Smrgcan specify an installation prefix other than `/usr/local' by giving 1471e449e82Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 1481e449e82Smrgabsolute file name. 149aa9e3350Smrg 150aa9e3350Smrg You can specify separate installation prefixes for 151aa9e3350Smrgarchitecture-specific files and architecture-independent files. If you 152aa9e3350Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153aa9e3350SmrgPREFIX as the prefix for installing programs and libraries. 154aa9e3350SmrgDocumentation and other data files still use the regular prefix. 155aa9e3350Smrg 156aa9e3350Smrg In addition, if you use an unusual directory layout you can give 157aa9e3350Smrgoptions like `--bindir=DIR' to specify different values for particular 158aa9e3350Smrgkinds of files. Run `configure --help' for a list of the directories 1591e449e82Smrgyou can set and what kinds of files go in them. In general, the 1601e449e82Smrgdefault for these options is expressed in terms of `${prefix}', so that 1611e449e82Smrgspecifying just `--prefix' will affect all of the other directory 1621e449e82Smrgspecifications that were not explicitly provided. 1631e449e82Smrg 1641e449e82Smrg The most portable way to affect installation locations is to pass the 1651e449e82Smrgcorrect locations to `configure'; however, many packages provide one or 1661e449e82Smrgboth of the following shortcuts of passing variable assignments to the 1671e449e82Smrg`make install' command line to change installation locations without 1681e449e82Smrghaving to reconfigure or recompile. 1691e449e82Smrg 1701e449e82Smrg The first method involves providing an override variable for each 1711e449e82Smrgaffected directory. For example, `make install 1721e449e82Smrgprefix=/alternate/directory' will choose an alternate location for all 1731e449e82Smrgdirectory configuration variables that were expressed in terms of 1741e449e82Smrg`${prefix}'. Any directories that were specified during `configure', 1751e449e82Smrgbut not in terms of `${prefix}', must each be overridden at install 1761e449e82Smrgtime for the entire installation to be relocated. The approach of 1771e449e82Smrgmakefile variable overrides for each directory variable is required by 1781e449e82Smrgthe GNU Coding Standards, and ideally causes no recompilation. 1791e449e82SmrgHowever, some platforms have known limitations with the semantics of 1801e449e82Smrgshared libraries that end up requiring recompilation when using this 1811e449e82Smrgmethod, particularly noticeable in packages that use GNU Libtool. 1821e449e82Smrg 1831e449e82Smrg The second method involves providing the `DESTDIR' variable. For 1841e449e82Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 1851e449e82Smrg`/alternate/directory' before all installation names. The approach of 1861e449e82Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 1871e449e82Smrgdoes not work on platforms that have drive letters. On the other hand, 1881e449e82Smrgit does better at avoiding recompilation issues, and works well even 1891e449e82Smrgwhen some directory options were not specified in terms of `${prefix}' 1901e449e82Smrgat `configure' time. 1911e449e82Smrg 1921e449e82SmrgOptional Features 1931e449e82Smrg================= 194aa9e3350Smrg 195aa9e3350Smrg If the package supports it, you can cause programs to be installed 196aa9e3350Smrgwith an extra prefix or suffix on their names by giving `configure' the 197aa9e3350Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198aa9e3350Smrg 199aa9e3350Smrg Some packages pay attention to `--enable-FEATURE' options to 200aa9e3350Smrg`configure', where FEATURE indicates an optional part of the package. 201aa9e3350SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202aa9e3350Smrgis something like `gnu-as' or `x' (for the X Window System). The 203aa9e3350Smrg`README' should mention any `--enable-' and `--with-' options that the 204aa9e3350Smrgpackage recognizes. 205aa9e3350Smrg 206aa9e3350Smrg For packages that use the X Window System, `configure' can usually 207aa9e3350Smrgfind the X include and library files automatically, but if it doesn't, 208aa9e3350Smrgyou can use the `configure' options `--x-includes=DIR' and 209aa9e3350Smrg`--x-libraries=DIR' to specify their locations. 210aa9e3350Smrg 2111e449e82Smrg Some packages offer the ability to configure how verbose the 2121e449e82Smrgexecution of `make' will be. For these packages, running `./configure 2131e449e82Smrg--enable-silent-rules' sets the default to minimal output, which can be 2141e449e82Smrgoverridden with `make V=1'; while running `./configure 2151e449e82Smrg--disable-silent-rules' sets the default to verbose, which can be 2161e449e82Smrgoverridden with `make V=0'. 2171e449e82Smrg 218aa9e3350SmrgParticular systems 219aa9e3350Smrg================== 220aa9e3350Smrg 221aa9e3350Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222aa9e3350SmrgCC is not installed, it is recommended to use the following options in 223aa9e3350Smrgorder to use an ANSI C compiler: 224aa9e3350Smrg 2251e449e82Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226aa9e3350Smrg 227aa9e3350Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228aa9e3350Smrg 2291e449e82Smrg HP-UX `make' updates targets which have the same time stamps as 2301e449e82Smrgtheir prerequisites, which makes it generally unusable when shipped 2311e449e82Smrggenerated files such as `configure' are involved. Use GNU `make' 2321e449e82Smrginstead. 2331e449e82Smrg 234aa9e3350Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235aa9e3350Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236aa9e3350Smrga workaround. If GNU CC is not installed, it is therefore recommended 237aa9e3350Smrgto try 238aa9e3350Smrg 239aa9e3350Smrg ./configure CC="cc" 240aa9e3350Smrg 241aa9e3350Smrgand if that doesn't work, try 242aa9e3350Smrg 243aa9e3350Smrg ./configure CC="cc -nodtk" 244aa9e3350Smrg 2451e449e82Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 2461e449e82Smrgdirectory contains several dysfunctional programs; working variants of 2471e449e82Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 2481e449e82Smrgin your `PATH', put it _after_ `/usr/bin'. 2491e449e82Smrg 2501e449e82Smrg On Haiku, software installed for all users goes in `/boot/common', 2511e449e82Smrgnot `/usr/local'. It is recommended to use the following options: 2521e449e82Smrg 2531e449e82Smrg ./configure --prefix=/boot/common 2541e449e82Smrg 255aa9e3350SmrgSpecifying the System Type 256aa9e3350Smrg========================== 257aa9e3350Smrg 258aa9e3350Smrg There may be some features `configure' cannot figure out 259aa9e3350Smrgautomatically, but needs to determine by the type of machine the package 260aa9e3350Smrgwill run on. Usually, assuming the package is built to be run on the 261aa9e3350Smrg_same_ architectures, `configure' can figure that out, but if it prints 262aa9e3350Smrga message saying it cannot guess the machine type, give it the 263aa9e3350Smrg`--build=TYPE' option. TYPE can either be a short name for the system 264aa9e3350Smrgtype, such as `sun4', or a canonical name which has the form: 265aa9e3350Smrg 266aa9e3350Smrg CPU-COMPANY-SYSTEM 267aa9e3350Smrg 268aa9e3350Smrgwhere SYSTEM can have one of these forms: 269aa9e3350Smrg 2701e449e82Smrg OS 2711e449e82Smrg KERNEL-OS 272aa9e3350Smrg 273aa9e3350Smrg See the file `config.sub' for the possible values of each field. If 274aa9e3350Smrg`config.sub' isn't included in this package, then this package doesn't 275aa9e3350Smrgneed to know the machine type. 276aa9e3350Smrg 277aa9e3350Smrg If you are _building_ compiler tools for cross-compiling, you should 278aa9e3350Smrguse the option `--target=TYPE' to select the type of system they will 279aa9e3350Smrgproduce code for. 280aa9e3350Smrg 281aa9e3350Smrg If you want to _use_ a cross compiler, that generates code for a 282aa9e3350Smrgplatform different from the build platform, you should specify the 283aa9e3350Smrg"host" platform (i.e., that on which the generated programs will 284aa9e3350Smrgeventually be run) with `--host=TYPE'. 285aa9e3350Smrg 286aa9e3350SmrgSharing Defaults 287aa9e3350Smrg================ 288aa9e3350Smrg 289aa9e3350Smrg If you want to set default values for `configure' scripts to share, 290aa9e3350Smrgyou can create a site shell script called `config.site' that gives 291aa9e3350Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 292aa9e3350Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293aa9e3350Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294aa9e3350Smrg`CONFIG_SITE' environment variable to the location of the site script. 295aa9e3350SmrgA warning: not all `configure' scripts look for a site script. 296aa9e3350Smrg 297aa9e3350SmrgDefining Variables 298aa9e3350Smrg================== 299aa9e3350Smrg 300aa9e3350Smrg Variables not defined in a site shell script can be set in the 301aa9e3350Smrgenvironment passed to `configure'. However, some packages may run 302aa9e3350Smrgconfigure again during the build, and the customized values of these 303aa9e3350Smrgvariables may be lost. In order to avoid this problem, you should set 304aa9e3350Smrgthem in the `configure' command line, using `VAR=value'. For example: 305aa9e3350Smrg 306aa9e3350Smrg ./configure CC=/usr/local2/bin/gcc 307aa9e3350Smrg 308aa9e3350Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 309aa9e3350Smrgoverridden in the site shell script). 310aa9e3350Smrg 311aa9e3350SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312aa9e3350Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313aa9e3350Smrg 314aa9e3350Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315aa9e3350Smrg 316aa9e3350Smrg`configure' Invocation 317aa9e3350Smrg====================== 318aa9e3350Smrg 319aa9e3350Smrg `configure' recognizes the following options to control how it 320aa9e3350Smrgoperates. 321aa9e3350Smrg 322aa9e3350Smrg`--help' 323aa9e3350Smrg`-h' 324aa9e3350Smrg Print a summary of all of the options to `configure', and exit. 325aa9e3350Smrg 326aa9e3350Smrg`--help=short' 327aa9e3350Smrg`--help=recursive' 328aa9e3350Smrg Print a summary of the options unique to this package's 329aa9e3350Smrg `configure', and exit. The `short' variant lists options used 330aa9e3350Smrg only in the top level, while the `recursive' variant lists options 331aa9e3350Smrg also present in any nested packages. 332aa9e3350Smrg 333aa9e3350Smrg`--version' 334aa9e3350Smrg`-V' 335aa9e3350Smrg Print the version of Autoconf used to generate the `configure' 336aa9e3350Smrg script, and exit. 337aa9e3350Smrg 338aa9e3350Smrg`--cache-file=FILE' 339aa9e3350Smrg Enable the cache: use and save the results of the tests in FILE, 340aa9e3350Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341aa9e3350Smrg disable caching. 342aa9e3350Smrg 343aa9e3350Smrg`--config-cache' 344aa9e3350Smrg`-C' 345aa9e3350Smrg Alias for `--cache-file=config.cache'. 346aa9e3350Smrg 347aa9e3350Smrg`--quiet' 348aa9e3350Smrg`--silent' 349aa9e3350Smrg`-q' 350aa9e3350Smrg Do not print messages saying which checks are being made. To 351aa9e3350Smrg suppress all normal output, redirect it to `/dev/null' (any error 352aa9e3350Smrg messages will still be shown). 353aa9e3350Smrg 354aa9e3350Smrg`--srcdir=DIR' 355aa9e3350Smrg Look for the package's source code in directory DIR. Usually 356aa9e3350Smrg `configure' can determine that directory automatically. 357aa9e3350Smrg 358aa9e3350Smrg`--prefix=DIR' 3591e449e82Smrg Use DIR as the installation prefix. *note Installation Names:: 360aa9e3350Smrg for more details, including other options available for fine-tuning 361aa9e3350Smrg the installation locations. 362aa9e3350Smrg 363aa9e3350Smrg`--no-create' 364aa9e3350Smrg`-n' 365aa9e3350Smrg Run the configure checks, but stop before creating any output 366aa9e3350Smrg files. 367aa9e3350Smrg 368aa9e3350Smrg`configure' also accepts some other, not widely useful, options. Run 369aa9e3350Smrg`configure --help' for more details. 370aa9e3350Smrg 371