INSTALL revision c1d6e445
1524e9589SmrgInstallation Instructions 2524e9589Smrg************************* 3524e9589Smrg 4c1d6e445SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5c1d6e445SmrgInc. 6524e9589Smrg 7c1d6e445Smrg Copying and distribution of this file, with or without modification, 8c1d6e445Smrgare permitted in any medium without royalty provided the copyright 9c1d6e445Smrgnotice and this notice are preserved. This file is offered as-is, 10c1d6e445Smrgwithout warranty of any kind. 11524e9589Smrg 12524e9589SmrgBasic Installation 13524e9589Smrg================== 14524e9589Smrg 15524e9589Smrg Briefly, the shell commands `./configure; make; make install' should 16524e9589Smrgconfigure, build, and install this package. The following 17524e9589Smrgmore-detailed instructions are generic; see the `README' file for 18c1d6e445Smrginstructions specific to this package. Some packages provide this 19c1d6e445Smrg`INSTALL' file but do not implement all of the features documented 20c1d6e445Smrgbelow. The lack of an optional feature in a given package is not 21c1d6e445Smrgnecessarily a bug. More recommendations for GNU packages can be found 22c1d6e445Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 23524e9589Smrg 24524e9589Smrg The `configure' shell script attempts to guess correct values for 25524e9589Smrgvarious system-dependent variables used during compilation. It uses 26524e9589Smrgthose values to create a `Makefile' in each directory of the package. 27524e9589SmrgIt may also create one or more `.h' files containing system-dependent 28524e9589Smrgdefinitions. Finally, it creates a shell script `config.status' that 29524e9589Smrgyou can run in the future to recreate the current configuration, and a 30524e9589Smrgfile `config.log' containing compiler output (useful mainly for 31524e9589Smrgdebugging `configure'). 32524e9589Smrg 33524e9589Smrg It can also use an optional file (typically called `config.cache' 34524e9589Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35524e9589Smrgthe results of its tests to speed up reconfiguring. Caching is 36524e9589Smrgdisabled by default to prevent problems with accidental use of stale 37524e9589Smrgcache files. 38524e9589Smrg 39524e9589Smrg If you need to do unusual things to compile the package, please try 40524e9589Smrgto figure out how `configure' could check whether to do them, and mail 41524e9589Smrgdiffs or instructions to the address given in the `README' so they can 42524e9589Smrgbe considered for the next release. If you are using the cache, and at 43524e9589Smrgsome point `config.cache' contains results you don't want to keep, you 44524e9589Smrgmay remove or edit it. 45524e9589Smrg 46524e9589Smrg The file `configure.ac' (or `configure.in') is used to create 47524e9589Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 48524e9589Smrgyou want to change it or regenerate `configure' using a newer version 49524e9589Smrgof `autoconf'. 50524e9589Smrg 51c1d6e445Smrg The simplest way to compile this package is: 52524e9589Smrg 53524e9589Smrg 1. `cd' to the directory containing the package's source code and type 54524e9589Smrg `./configure' to configure the package for your system. 55524e9589Smrg 56524e9589Smrg Running `configure' might take a while. While running, it prints 57524e9589Smrg some messages telling which features it is checking for. 58524e9589Smrg 59524e9589Smrg 2. Type `make' to compile the package. 60524e9589Smrg 61524e9589Smrg 3. Optionally, type `make check' to run any self-tests that come with 62c1d6e445Smrg the package, generally using the just-built uninstalled binaries. 63524e9589Smrg 64524e9589Smrg 4. Type `make install' to install the programs and any data files and 65c1d6e445Smrg documentation. When installing into a prefix owned by root, it is 66c1d6e445Smrg recommended that the package be configured and built as a regular 67c1d6e445Smrg user, and only the `make install' phase executed with root 68c1d6e445Smrg privileges. 69c1d6e445Smrg 70c1d6e445Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71c1d6e445Smrg this time using the binaries in their final installed location. 72c1d6e445Smrg This target does not install anything. Running this target as a 73c1d6e445Smrg regular user, particularly if the prior `make install' required 74c1d6e445Smrg root privileges, verifies that the installation completed 75c1d6e445Smrg correctly. 76c1d6e445Smrg 77c1d6e445Smrg 6. You can remove the program binaries and object files from the 78524e9589Smrg source code directory by typing `make clean'. To also remove the 79524e9589Smrg files that `configure' created (so you can compile the package for 80524e9589Smrg a different kind of computer), type `make distclean'. There is 81524e9589Smrg also a `make maintainer-clean' target, but that is intended mainly 82524e9589Smrg for the package's developers. If you use it, you may have to get 83524e9589Smrg all sorts of other programs in order to regenerate files that came 84524e9589Smrg with the distribution. 85524e9589Smrg 86c1d6e445Smrg 7. Often, you can also type `make uninstall' to remove the installed 87c1d6e445Smrg files again. In practice, not all packages have tested that 88c1d6e445Smrg uninstallation works correctly, even though it is required by the 89c1d6e445Smrg GNU Coding Standards. 90c1d6e445Smrg 91c1d6e445Smrg 8. Some packages, particularly those that use Automake, provide `make 92c1d6e445Smrg distcheck', which can by used by developers to test that all other 93c1d6e445Smrg targets like `make install' and `make uninstall' work correctly. 94c1d6e445Smrg This target is generally not run by end users. 95524e9589Smrg 96524e9589SmrgCompilers and Options 97524e9589Smrg===================== 98524e9589Smrg 99524e9589Smrg Some systems require unusual options for compilation or linking that 100524e9589Smrgthe `configure' script does not know about. Run `./configure --help' 101524e9589Smrgfor details on some of the pertinent environment variables. 102524e9589Smrg 103524e9589Smrg You can give `configure' initial values for configuration parameters 104524e9589Smrgby setting variables in the command line or in the environment. Here 105524e9589Smrgis an example: 106524e9589Smrg 107524e9589Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108524e9589Smrg 109524e9589Smrg *Note Defining Variables::, for more details. 110524e9589Smrg 111524e9589SmrgCompiling For Multiple Architectures 112524e9589Smrg==================================== 113524e9589Smrg 114524e9589Smrg You can compile the package for more than one kind of computer at the 115524e9589Smrgsame time, by placing the object files for each architecture in their 116524e9589Smrgown directory. To do this, you can use GNU `make'. `cd' to the 117524e9589Smrgdirectory where you want the object files and executables to go and run 118524e9589Smrgthe `configure' script. `configure' automatically checks for the 119c1d6e445Smrgsource code in the directory that `configure' is in and in `..'. This 120c1d6e445Smrgis known as a "VPATH" build. 121524e9589Smrg 122524e9589Smrg With a non-GNU `make', it is safer to compile the package for one 123524e9589Smrgarchitecture at a time in the source code directory. After you have 124524e9589Smrginstalled the package for one architecture, use `make distclean' before 125524e9589Smrgreconfiguring for another architecture. 126524e9589Smrg 127524e9589Smrg On MacOS X 10.5 and later systems, you can create libraries and 128524e9589Smrgexecutables that work on multiple system types--known as "fat" or 129524e9589Smrg"universal" binaries--by specifying multiple `-arch' options to the 130524e9589Smrgcompiler but only a single `-arch' option to the preprocessor. Like 131524e9589Smrgthis: 132524e9589Smrg 133524e9589Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134524e9589Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135524e9589Smrg CPP="gcc -E" CXXCPP="g++ -E" 136524e9589Smrg 137524e9589Smrg This is not guaranteed to produce working output in all cases, you 138524e9589Smrgmay have to build one architecture at a time and combine the results 139524e9589Smrgusing the `lipo' tool if you have problems. 140524e9589Smrg 141524e9589SmrgInstallation Names 142524e9589Smrg================== 143524e9589Smrg 144524e9589Smrg By default, `make install' installs the package's commands under 145524e9589Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146524e9589Smrgcan specify an installation prefix other than `/usr/local' by giving 147c1d6e445Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148c1d6e445Smrgabsolute file name. 149524e9589Smrg 150524e9589Smrg You can specify separate installation prefixes for 151524e9589Smrgarchitecture-specific files and architecture-independent files. If you 152524e9589Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153524e9589SmrgPREFIX as the prefix for installing programs and libraries. 154524e9589SmrgDocumentation and other data files still use the regular prefix. 155524e9589Smrg 156524e9589Smrg In addition, if you use an unusual directory layout you can give 157524e9589Smrgoptions like `--bindir=DIR' to specify different values for particular 158524e9589Smrgkinds of files. Run `configure --help' for a list of the directories 159c1d6e445Smrgyou can set and what kinds of files go in them. In general, the 160c1d6e445Smrgdefault for these options is expressed in terms of `${prefix}', so that 161c1d6e445Smrgspecifying just `--prefix' will affect all of the other directory 162c1d6e445Smrgspecifications that were not explicitly provided. 163c1d6e445Smrg 164c1d6e445Smrg The most portable way to affect installation locations is to pass the 165c1d6e445Smrgcorrect locations to `configure'; however, many packages provide one or 166c1d6e445Smrgboth of the following shortcuts of passing variable assignments to the 167c1d6e445Smrg`make install' command line to change installation locations without 168c1d6e445Smrghaving to reconfigure or recompile. 169c1d6e445Smrg 170c1d6e445Smrg The first method involves providing an override variable for each 171c1d6e445Smrgaffected directory. For example, `make install 172c1d6e445Smrgprefix=/alternate/directory' will choose an alternate location for all 173c1d6e445Smrgdirectory configuration variables that were expressed in terms of 174c1d6e445Smrg`${prefix}'. Any directories that were specified during `configure', 175c1d6e445Smrgbut not in terms of `${prefix}', must each be overridden at install 176c1d6e445Smrgtime for the entire installation to be relocated. The approach of 177c1d6e445Smrgmakefile variable overrides for each directory variable is required by 178c1d6e445Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179c1d6e445SmrgHowever, some platforms have known limitations with the semantics of 180c1d6e445Smrgshared libraries that end up requiring recompilation when using this 181c1d6e445Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182c1d6e445Smrg 183c1d6e445Smrg The second method involves providing the `DESTDIR' variable. For 184c1d6e445Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185c1d6e445Smrg`/alternate/directory' before all installation names. The approach of 186c1d6e445Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187c1d6e445Smrgdoes not work on platforms that have drive letters. On the other hand, 188c1d6e445Smrgit does better at avoiding recompilation issues, and works well even 189c1d6e445Smrgwhen some directory options were not specified in terms of `${prefix}' 190c1d6e445Smrgat `configure' time. 191c1d6e445Smrg 192c1d6e445SmrgOptional Features 193c1d6e445Smrg================= 194524e9589Smrg 195524e9589Smrg If the package supports it, you can cause programs to be installed 196524e9589Smrgwith an extra prefix or suffix on their names by giving `configure' the 197524e9589Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198524e9589Smrg 199524e9589Smrg Some packages pay attention to `--enable-FEATURE' options to 200524e9589Smrg`configure', where FEATURE indicates an optional part of the package. 201524e9589SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202524e9589Smrgis something like `gnu-as' or `x' (for the X Window System). The 203524e9589Smrg`README' should mention any `--enable-' and `--with-' options that the 204524e9589Smrgpackage recognizes. 205524e9589Smrg 206524e9589Smrg For packages that use the X Window System, `configure' can usually 207524e9589Smrgfind the X include and library files automatically, but if it doesn't, 208524e9589Smrgyou can use the `configure' options `--x-includes=DIR' and 209524e9589Smrg`--x-libraries=DIR' to specify their locations. 210524e9589Smrg 211c1d6e445Smrg Some packages offer the ability to configure how verbose the 212c1d6e445Smrgexecution of `make' will be. For these packages, running `./configure 213c1d6e445Smrg--enable-silent-rules' sets the default to minimal output, which can be 214c1d6e445Smrgoverridden with `make V=1'; while running `./configure 215c1d6e445Smrg--disable-silent-rules' sets the default to verbose, which can be 216c1d6e445Smrgoverridden with `make V=0'. 217c1d6e445Smrg 218524e9589SmrgParticular systems 219524e9589Smrg================== 220524e9589Smrg 221524e9589Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222524e9589SmrgCC is not installed, it is recommended to use the following options in 223524e9589Smrgorder to use an ANSI C compiler: 224524e9589Smrg 225c1d6e445Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226524e9589Smrg 227524e9589Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228524e9589Smrg 229c1d6e445Smrg HP-UX `make' updates targets which have the same time stamps as 230c1d6e445Smrgtheir prerequisites, which makes it generally unusable when shipped 231c1d6e445Smrggenerated files such as `configure' are involved. Use GNU `make' 232c1d6e445Smrginstead. 233c1d6e445Smrg 234524e9589Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235524e9589Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236524e9589Smrga workaround. If GNU CC is not installed, it is therefore recommended 237524e9589Smrgto try 238524e9589Smrg 239524e9589Smrg ./configure CC="cc" 240524e9589Smrg 241524e9589Smrgand if that doesn't work, try 242524e9589Smrg 243524e9589Smrg ./configure CC="cc -nodtk" 244524e9589Smrg 245c1d6e445Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246c1d6e445Smrgdirectory contains several dysfunctional programs; working variants of 247c1d6e445Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248c1d6e445Smrgin your `PATH', put it _after_ `/usr/bin'. 249c1d6e445Smrg 250c1d6e445Smrg On Haiku, software installed for all users goes in `/boot/common', 251c1d6e445Smrgnot `/usr/local'. It is recommended to use the following options: 252c1d6e445Smrg 253c1d6e445Smrg ./configure --prefix=/boot/common 254c1d6e445Smrg 255524e9589SmrgSpecifying the System Type 256524e9589Smrg========================== 257524e9589Smrg 258524e9589Smrg There may be some features `configure' cannot figure out 259524e9589Smrgautomatically, but needs to determine by the type of machine the package 260524e9589Smrgwill run on. Usually, assuming the package is built to be run on the 261524e9589Smrg_same_ architectures, `configure' can figure that out, but if it prints 262524e9589Smrga message saying it cannot guess the machine type, give it the 263524e9589Smrg`--build=TYPE' option. TYPE can either be a short name for the system 264524e9589Smrgtype, such as `sun4', or a canonical name which has the form: 265524e9589Smrg 266524e9589Smrg CPU-COMPANY-SYSTEM 267524e9589Smrg 268524e9589Smrgwhere SYSTEM can have one of these forms: 269524e9589Smrg 270c1d6e445Smrg OS 271c1d6e445Smrg KERNEL-OS 272524e9589Smrg 273524e9589Smrg See the file `config.sub' for the possible values of each field. If 274524e9589Smrg`config.sub' isn't included in this package, then this package doesn't 275524e9589Smrgneed to know the machine type. 276524e9589Smrg 277524e9589Smrg If you are _building_ compiler tools for cross-compiling, you should 278524e9589Smrguse the option `--target=TYPE' to select the type of system they will 279524e9589Smrgproduce code for. 280524e9589Smrg 281524e9589Smrg If you want to _use_ a cross compiler, that generates code for a 282524e9589Smrgplatform different from the build platform, you should specify the 283524e9589Smrg"host" platform (i.e., that on which the generated programs will 284524e9589Smrgeventually be run) with `--host=TYPE'. 285524e9589Smrg 286524e9589SmrgSharing Defaults 287524e9589Smrg================ 288524e9589Smrg 289524e9589Smrg If you want to set default values for `configure' scripts to share, 290524e9589Smrgyou can create a site shell script called `config.site' that gives 291524e9589Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 292524e9589Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293524e9589Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294524e9589Smrg`CONFIG_SITE' environment variable to the location of the site script. 295524e9589SmrgA warning: not all `configure' scripts look for a site script. 296524e9589Smrg 297524e9589SmrgDefining Variables 298524e9589Smrg================== 299524e9589Smrg 300524e9589Smrg Variables not defined in a site shell script can be set in the 301524e9589Smrgenvironment passed to `configure'. However, some packages may run 302524e9589Smrgconfigure again during the build, and the customized values of these 303524e9589Smrgvariables may be lost. In order to avoid this problem, you should set 304524e9589Smrgthem in the `configure' command line, using `VAR=value'. For example: 305524e9589Smrg 306524e9589Smrg ./configure CC=/usr/local2/bin/gcc 307524e9589Smrg 308524e9589Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 309524e9589Smrgoverridden in the site shell script). 310524e9589Smrg 311524e9589SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312524e9589Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313524e9589Smrg 314524e9589Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315524e9589Smrg 316524e9589Smrg`configure' Invocation 317524e9589Smrg====================== 318524e9589Smrg 319524e9589Smrg `configure' recognizes the following options to control how it 320524e9589Smrgoperates. 321524e9589Smrg 322524e9589Smrg`--help' 323524e9589Smrg`-h' 324524e9589Smrg Print a summary of all of the options to `configure', and exit. 325524e9589Smrg 326524e9589Smrg`--help=short' 327524e9589Smrg`--help=recursive' 328524e9589Smrg Print a summary of the options unique to this package's 329524e9589Smrg `configure', and exit. The `short' variant lists options used 330524e9589Smrg only in the top level, while the `recursive' variant lists options 331524e9589Smrg also present in any nested packages. 332524e9589Smrg 333524e9589Smrg`--version' 334524e9589Smrg`-V' 335524e9589Smrg Print the version of Autoconf used to generate the `configure' 336524e9589Smrg script, and exit. 337524e9589Smrg 338524e9589Smrg`--cache-file=FILE' 339524e9589Smrg Enable the cache: use and save the results of the tests in FILE, 340524e9589Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341524e9589Smrg disable caching. 342524e9589Smrg 343524e9589Smrg`--config-cache' 344524e9589Smrg`-C' 345524e9589Smrg Alias for `--cache-file=config.cache'. 346524e9589Smrg 347524e9589Smrg`--quiet' 348524e9589Smrg`--silent' 349524e9589Smrg`-q' 350524e9589Smrg Do not print messages saying which checks are being made. To 351524e9589Smrg suppress all normal output, redirect it to `/dev/null' (any error 352524e9589Smrg messages will still be shown). 353524e9589Smrg 354524e9589Smrg`--srcdir=DIR' 355524e9589Smrg Look for the package's source code in directory DIR. Usually 356524e9589Smrg `configure' can determine that directory automatically. 357524e9589Smrg 358524e9589Smrg`--prefix=DIR' 359c1d6e445Smrg Use DIR as the installation prefix. *note Installation Names:: 360524e9589Smrg for more details, including other options available for fine-tuning 361524e9589Smrg the installation locations. 362524e9589Smrg 363524e9589Smrg`--no-create' 364524e9589Smrg`-n' 365524e9589Smrg Run the configure checks, but stop before creating any output 366524e9589Smrg files. 367524e9589Smrg 368524e9589Smrg`configure' also accepts some other, not widely useful, options. Run 369524e9589Smrg`configure --help' for more details. 370524e9589Smrg 371