INSTALL revision 541411ce
1eeced2e6SmrgInstallation Instructions 2eeced2e6Smrg************************* 3eeced2e6Smrg 4541411ceSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5541411ceSmrgInc. 6eeced2e6Smrg 7541411ceSmrg Copying and distribution of this file, with or without modification, 8541411ceSmrgare permitted in any medium without royalty provided the copyright 9541411ceSmrgnotice and this notice are preserved. This file is offered as-is, 10541411ceSmrgwithout warranty of any kind. 11eeced2e6Smrg 12eeced2e6SmrgBasic Installation 13eeced2e6Smrg================== 14eeced2e6Smrg 15eeced2e6Smrg Briefly, the shell commands `./configure; make; make install' should 16eeced2e6Smrgconfigure, build, and install this package. The following 17eeced2e6Smrgmore-detailed instructions are generic; see the `README' file for 18541411ceSmrginstructions specific to this package. Some packages provide this 19541411ceSmrg`INSTALL' file but do not implement all of the features documented 20541411ceSmrgbelow. The lack of an optional feature in a given package is not 21541411ceSmrgnecessarily a bug. More recommendations for GNU packages can be found 22541411ceSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 23eeced2e6Smrg 24eeced2e6Smrg The `configure' shell script attempts to guess correct values for 25eeced2e6Smrgvarious system-dependent variables used during compilation. It uses 26eeced2e6Smrgthose values to create a `Makefile' in each directory of the package. 27eeced2e6SmrgIt may also create one or more `.h' files containing system-dependent 28eeced2e6Smrgdefinitions. Finally, it creates a shell script `config.status' that 29eeced2e6Smrgyou can run in the future to recreate the current configuration, and a 30eeced2e6Smrgfile `config.log' containing compiler output (useful mainly for 31eeced2e6Smrgdebugging `configure'). 32eeced2e6Smrg 33eeced2e6Smrg It can also use an optional file (typically called `config.cache' 34eeced2e6Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35eeced2e6Smrgthe results of its tests to speed up reconfiguring. Caching is 36eeced2e6Smrgdisabled by default to prevent problems with accidental use of stale 37eeced2e6Smrgcache files. 38eeced2e6Smrg 39eeced2e6Smrg If you need to do unusual things to compile the package, please try 40eeced2e6Smrgto figure out how `configure' could check whether to do them, and mail 41eeced2e6Smrgdiffs or instructions to the address given in the `README' so they can 42eeced2e6Smrgbe considered for the next release. If you are using the cache, and at 43eeced2e6Smrgsome point `config.cache' contains results you don't want to keep, you 44eeced2e6Smrgmay remove or edit it. 45eeced2e6Smrg 46eeced2e6Smrg The file `configure.ac' (or `configure.in') is used to create 47eeced2e6Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 48eeced2e6Smrgyou want to change it or regenerate `configure' using a newer version 49eeced2e6Smrgof `autoconf'. 50eeced2e6Smrg 51541411ceSmrg The simplest way to compile this package is: 52eeced2e6Smrg 53eeced2e6Smrg 1. `cd' to the directory containing the package's source code and type 54eeced2e6Smrg `./configure' to configure the package for your system. 55eeced2e6Smrg 56eeced2e6Smrg Running `configure' might take a while. While running, it prints 57eeced2e6Smrg some messages telling which features it is checking for. 58eeced2e6Smrg 59eeced2e6Smrg 2. Type `make' to compile the package. 60eeced2e6Smrg 61eeced2e6Smrg 3. Optionally, type `make check' to run any self-tests that come with 62541411ceSmrg the package, generally using the just-built uninstalled binaries. 63eeced2e6Smrg 64eeced2e6Smrg 4. Type `make install' to install the programs and any data files and 65541411ceSmrg documentation. When installing into a prefix owned by root, it is 66541411ceSmrg recommended that the package be configured and built as a regular 67541411ceSmrg user, and only the `make install' phase executed with root 68541411ceSmrg privileges. 69541411ceSmrg 70541411ceSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71541411ceSmrg this time using the binaries in their final installed location. 72541411ceSmrg This target does not install anything. Running this target as a 73541411ceSmrg regular user, particularly if the prior `make install' required 74541411ceSmrg root privileges, verifies that the installation completed 75541411ceSmrg correctly. 76541411ceSmrg 77541411ceSmrg 6. You can remove the program binaries and object files from the 78eeced2e6Smrg source code directory by typing `make clean'. To also remove the 79eeced2e6Smrg files that `configure' created (so you can compile the package for 80eeced2e6Smrg a different kind of computer), type `make distclean'. There is 81eeced2e6Smrg also a `make maintainer-clean' target, but that is intended mainly 82eeced2e6Smrg for the package's developers. If you use it, you may have to get 83eeced2e6Smrg all sorts of other programs in order to regenerate files that came 84eeced2e6Smrg with the distribution. 85eeced2e6Smrg 86541411ceSmrg 7. Often, you can also type `make uninstall' to remove the installed 87541411ceSmrg files again. In practice, not all packages have tested that 88541411ceSmrg uninstallation works correctly, even though it is required by the 89541411ceSmrg GNU Coding Standards. 90541411ceSmrg 91541411ceSmrg 8. Some packages, particularly those that use Automake, provide `make 92541411ceSmrg distcheck', which can by used by developers to test that all other 93541411ceSmrg targets like `make install' and `make uninstall' work correctly. 94541411ceSmrg This target is generally not run by end users. 95eeced2e6Smrg 96eeced2e6SmrgCompilers and Options 97eeced2e6Smrg===================== 98eeced2e6Smrg 99eeced2e6Smrg Some systems require unusual options for compilation or linking that 100eeced2e6Smrgthe `configure' script does not know about. Run `./configure --help' 101eeced2e6Smrgfor details on some of the pertinent environment variables. 102eeced2e6Smrg 103eeced2e6Smrg You can give `configure' initial values for configuration parameters 104eeced2e6Smrgby setting variables in the command line or in the environment. Here 105eeced2e6Smrgis an example: 106eeced2e6Smrg 107eeced2e6Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108eeced2e6Smrg 109eeced2e6Smrg *Note Defining Variables::, for more details. 110eeced2e6Smrg 111eeced2e6SmrgCompiling For Multiple Architectures 112eeced2e6Smrg==================================== 113eeced2e6Smrg 114eeced2e6Smrg You can compile the package for more than one kind of computer at the 115eeced2e6Smrgsame time, by placing the object files for each architecture in their 116eeced2e6Smrgown directory. To do this, you can use GNU `make'. `cd' to the 117eeced2e6Smrgdirectory where you want the object files and executables to go and run 118eeced2e6Smrgthe `configure' script. `configure' automatically checks for the 119541411ceSmrgsource code in the directory that `configure' is in and in `..'. This 120541411ceSmrgis known as a "VPATH" build. 121eeced2e6Smrg 122eeced2e6Smrg With a non-GNU `make', it is safer to compile the package for one 123eeced2e6Smrgarchitecture at a time in the source code directory. After you have 124eeced2e6Smrginstalled the package for one architecture, use `make distclean' before 125eeced2e6Smrgreconfiguring for another architecture. 126eeced2e6Smrg 127eeced2e6Smrg On MacOS X 10.5 and later systems, you can create libraries and 128eeced2e6Smrgexecutables that work on multiple system types--known as "fat" or 129eeced2e6Smrg"universal" binaries--by specifying multiple `-arch' options to the 130eeced2e6Smrgcompiler but only a single `-arch' option to the preprocessor. Like 131eeced2e6Smrgthis: 132eeced2e6Smrg 133eeced2e6Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134eeced2e6Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135eeced2e6Smrg CPP="gcc -E" CXXCPP="g++ -E" 136eeced2e6Smrg 137eeced2e6Smrg This is not guaranteed to produce working output in all cases, you 138eeced2e6Smrgmay have to build one architecture at a time and combine the results 139eeced2e6Smrgusing the `lipo' tool if you have problems. 140eeced2e6Smrg 141eeced2e6SmrgInstallation Names 142eeced2e6Smrg================== 143eeced2e6Smrg 144eeced2e6Smrg By default, `make install' installs the package's commands under 145eeced2e6Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146eeced2e6Smrgcan specify an installation prefix other than `/usr/local' by giving 147541411ceSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148541411ceSmrgabsolute file name. 149eeced2e6Smrg 150eeced2e6Smrg You can specify separate installation prefixes for 151eeced2e6Smrgarchitecture-specific files and architecture-independent files. If you 152eeced2e6Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153eeced2e6SmrgPREFIX as the prefix for installing programs and libraries. 154eeced2e6SmrgDocumentation and other data files still use the regular prefix. 155eeced2e6Smrg 156eeced2e6Smrg In addition, if you use an unusual directory layout you can give 157eeced2e6Smrgoptions like `--bindir=DIR' to specify different values for particular 158eeced2e6Smrgkinds of files. Run `configure --help' for a list of the directories 159541411ceSmrgyou can set and what kinds of files go in them. In general, the 160541411ceSmrgdefault for these options is expressed in terms of `${prefix}', so that 161541411ceSmrgspecifying just `--prefix' will affect all of the other directory 162541411ceSmrgspecifications that were not explicitly provided. 163541411ceSmrg 164541411ceSmrg The most portable way to affect installation locations is to pass the 165541411ceSmrgcorrect locations to `configure'; however, many packages provide one or 166541411ceSmrgboth of the following shortcuts of passing variable assignments to the 167541411ceSmrg`make install' command line to change installation locations without 168541411ceSmrghaving to reconfigure or recompile. 169541411ceSmrg 170541411ceSmrg The first method involves providing an override variable for each 171541411ceSmrgaffected directory. For example, `make install 172541411ceSmrgprefix=/alternate/directory' will choose an alternate location for all 173541411ceSmrgdirectory configuration variables that were expressed in terms of 174541411ceSmrg`${prefix}'. Any directories that were specified during `configure', 175541411ceSmrgbut not in terms of `${prefix}', must each be overridden at install 176541411ceSmrgtime for the entire installation to be relocated. The approach of 177541411ceSmrgmakefile variable overrides for each directory variable is required by 178541411ceSmrgthe GNU Coding Standards, and ideally causes no recompilation. 179541411ceSmrgHowever, some platforms have known limitations with the semantics of 180541411ceSmrgshared libraries that end up requiring recompilation when using this 181541411ceSmrgmethod, particularly noticeable in packages that use GNU Libtool. 182541411ceSmrg 183541411ceSmrg The second method involves providing the `DESTDIR' variable. For 184541411ceSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 185541411ceSmrg`/alternate/directory' before all installation names. The approach of 186541411ceSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187541411ceSmrgdoes not work on platforms that have drive letters. On the other hand, 188541411ceSmrgit does better at avoiding recompilation issues, and works well even 189541411ceSmrgwhen some directory options were not specified in terms of `${prefix}' 190541411ceSmrgat `configure' time. 191541411ceSmrg 192541411ceSmrgOptional Features 193541411ceSmrg================= 194eeced2e6Smrg 195eeced2e6Smrg If the package supports it, you can cause programs to be installed 196eeced2e6Smrgwith an extra prefix or suffix on their names by giving `configure' the 197eeced2e6Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198eeced2e6Smrg 199eeced2e6Smrg Some packages pay attention to `--enable-FEATURE' options to 200eeced2e6Smrg`configure', where FEATURE indicates an optional part of the package. 201eeced2e6SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202eeced2e6Smrgis something like `gnu-as' or `x' (for the X Window System). The 203eeced2e6Smrg`README' should mention any `--enable-' and `--with-' options that the 204eeced2e6Smrgpackage recognizes. 205eeced2e6Smrg 206eeced2e6Smrg For packages that use the X Window System, `configure' can usually 207eeced2e6Smrgfind the X include and library files automatically, but if it doesn't, 208eeced2e6Smrgyou can use the `configure' options `--x-includes=DIR' and 209eeced2e6Smrg`--x-libraries=DIR' to specify their locations. 210eeced2e6Smrg 211541411ceSmrg Some packages offer the ability to configure how verbose the 212541411ceSmrgexecution of `make' will be. For these packages, running `./configure 213541411ceSmrg--enable-silent-rules' sets the default to minimal output, which can be 214541411ceSmrgoverridden with `make V=1'; while running `./configure 215541411ceSmrg--disable-silent-rules' sets the default to verbose, which can be 216541411ceSmrgoverridden with `make V=0'. 217541411ceSmrg 218eeced2e6SmrgParticular systems 219eeced2e6Smrg================== 220eeced2e6Smrg 221eeced2e6Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222eeced2e6SmrgCC is not installed, it is recommended to use the following options in 223eeced2e6Smrgorder to use an ANSI C compiler: 224eeced2e6Smrg 225541411ceSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226eeced2e6Smrg 227eeced2e6Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228eeced2e6Smrg 229541411ceSmrg HP-UX `make' updates targets which have the same time stamps as 230541411ceSmrgtheir prerequisites, which makes it generally unusable when shipped 231541411ceSmrggenerated files such as `configure' are involved. Use GNU `make' 232541411ceSmrginstead. 233541411ceSmrg 234eeced2e6Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235eeced2e6Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236eeced2e6Smrga workaround. If GNU CC is not installed, it is therefore recommended 237eeced2e6Smrgto try 238eeced2e6Smrg 239eeced2e6Smrg ./configure CC="cc" 240eeced2e6Smrg 241eeced2e6Smrgand if that doesn't work, try 242eeced2e6Smrg 243eeced2e6Smrg ./configure CC="cc -nodtk" 244eeced2e6Smrg 245541411ceSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246541411ceSmrgdirectory contains several dysfunctional programs; working variants of 247541411ceSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248541411ceSmrgin your `PATH', put it _after_ `/usr/bin'. 249541411ceSmrg 250541411ceSmrg On Haiku, software installed for all users goes in `/boot/common', 251541411ceSmrgnot `/usr/local'. It is recommended to use the following options: 252541411ceSmrg 253541411ceSmrg ./configure --prefix=/boot/common 254541411ceSmrg 255eeced2e6SmrgSpecifying the System Type 256eeced2e6Smrg========================== 257eeced2e6Smrg 258eeced2e6Smrg There may be some features `configure' cannot figure out 259eeced2e6Smrgautomatically, but needs to determine by the type of machine the package 260eeced2e6Smrgwill run on. Usually, assuming the package is built to be run on the 261eeced2e6Smrg_same_ architectures, `configure' can figure that out, but if it prints 262eeced2e6Smrga message saying it cannot guess the machine type, give it the 263eeced2e6Smrg`--build=TYPE' option. TYPE can either be a short name for the system 264eeced2e6Smrgtype, such as `sun4', or a canonical name which has the form: 265eeced2e6Smrg 266eeced2e6Smrg CPU-COMPANY-SYSTEM 267eeced2e6Smrg 268eeced2e6Smrgwhere SYSTEM can have one of these forms: 269eeced2e6Smrg 270541411ceSmrg OS 271541411ceSmrg KERNEL-OS 272eeced2e6Smrg 273eeced2e6Smrg See the file `config.sub' for the possible values of each field. If 274eeced2e6Smrg`config.sub' isn't included in this package, then this package doesn't 275eeced2e6Smrgneed to know the machine type. 276eeced2e6Smrg 277eeced2e6Smrg If you are _building_ compiler tools for cross-compiling, you should 278eeced2e6Smrguse the option `--target=TYPE' to select the type of system they will 279eeced2e6Smrgproduce code for. 280eeced2e6Smrg 281eeced2e6Smrg If you want to _use_ a cross compiler, that generates code for a 282eeced2e6Smrgplatform different from the build platform, you should specify the 283eeced2e6Smrg"host" platform (i.e., that on which the generated programs will 284eeced2e6Smrgeventually be run) with `--host=TYPE'. 285eeced2e6Smrg 286eeced2e6SmrgSharing Defaults 287eeced2e6Smrg================ 288eeced2e6Smrg 289eeced2e6Smrg If you want to set default values for `configure' scripts to share, 290eeced2e6Smrgyou can create a site shell script called `config.site' that gives 291eeced2e6Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 292eeced2e6Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293eeced2e6Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294eeced2e6Smrg`CONFIG_SITE' environment variable to the location of the site script. 295eeced2e6SmrgA warning: not all `configure' scripts look for a site script. 296eeced2e6Smrg 297eeced2e6SmrgDefining Variables 298eeced2e6Smrg================== 299eeced2e6Smrg 300eeced2e6Smrg Variables not defined in a site shell script can be set in the 301eeced2e6Smrgenvironment passed to `configure'. However, some packages may run 302eeced2e6Smrgconfigure again during the build, and the customized values of these 303eeced2e6Smrgvariables may be lost. In order to avoid this problem, you should set 304eeced2e6Smrgthem in the `configure' command line, using `VAR=value'. For example: 305eeced2e6Smrg 306eeced2e6Smrg ./configure CC=/usr/local2/bin/gcc 307eeced2e6Smrg 308eeced2e6Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 309eeced2e6Smrgoverridden in the site shell script). 310eeced2e6Smrg 311eeced2e6SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312eeced2e6Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313eeced2e6Smrg 314eeced2e6Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315eeced2e6Smrg 316eeced2e6Smrg`configure' Invocation 317eeced2e6Smrg====================== 318eeced2e6Smrg 319eeced2e6Smrg `configure' recognizes the following options to control how it 320eeced2e6Smrgoperates. 321eeced2e6Smrg 322eeced2e6Smrg`--help' 323eeced2e6Smrg`-h' 324eeced2e6Smrg Print a summary of all of the options to `configure', and exit. 325eeced2e6Smrg 326eeced2e6Smrg`--help=short' 327eeced2e6Smrg`--help=recursive' 328eeced2e6Smrg Print a summary of the options unique to this package's 329eeced2e6Smrg `configure', and exit. The `short' variant lists options used 330eeced2e6Smrg only in the top level, while the `recursive' variant lists options 331eeced2e6Smrg also present in any nested packages. 332eeced2e6Smrg 333eeced2e6Smrg`--version' 334eeced2e6Smrg`-V' 335eeced2e6Smrg Print the version of Autoconf used to generate the `configure' 336eeced2e6Smrg script, and exit. 337eeced2e6Smrg 338eeced2e6Smrg`--cache-file=FILE' 339eeced2e6Smrg Enable the cache: use and save the results of the tests in FILE, 340eeced2e6Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341eeced2e6Smrg disable caching. 342eeced2e6Smrg 343eeced2e6Smrg`--config-cache' 344eeced2e6Smrg`-C' 345eeced2e6Smrg Alias for `--cache-file=config.cache'. 346eeced2e6Smrg 347eeced2e6Smrg`--quiet' 348eeced2e6Smrg`--silent' 349eeced2e6Smrg`-q' 350eeced2e6Smrg Do not print messages saying which checks are being made. To 351eeced2e6Smrg suppress all normal output, redirect it to `/dev/null' (any error 352eeced2e6Smrg messages will still be shown). 353eeced2e6Smrg 354eeced2e6Smrg`--srcdir=DIR' 355eeced2e6Smrg Look for the package's source code in directory DIR. Usually 356eeced2e6Smrg `configure' can determine that directory automatically. 357eeced2e6Smrg 358eeced2e6Smrg`--prefix=DIR' 359541411ceSmrg Use DIR as the installation prefix. *note Installation Names:: 360eeced2e6Smrg for more details, including other options available for fine-tuning 361eeced2e6Smrg the installation locations. 362eeced2e6Smrg 363eeced2e6Smrg`--no-create' 364eeced2e6Smrg`-n' 365eeced2e6Smrg Run the configure checks, but stop before creating any output 366eeced2e6Smrg files. 367eeced2e6Smrg 368eeced2e6Smrg`configure' also accepts some other, not widely useful, options. Run 369eeced2e6Smrg`configure --help' for more details. 370eeced2e6Smrg 371