1a96d7823SmrgInstallation Instructions 2a96d7823Smrg************************* 3a96d7823Smrg 4a96d7823SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5a96d7823SmrgInc. 6a96d7823Smrg 7a96d7823Smrg Copying and distribution of this file, with or without modification, 8a96d7823Smrgare permitted in any medium without royalty provided the copyright 9a96d7823Smrgnotice and this notice are preserved. This file is offered as-is, 10a96d7823Smrgwithout warranty of any kind. 11a96d7823Smrg 12a96d7823SmrgBasic Installation 13a96d7823Smrg================== 14a96d7823Smrg 15a96d7823Smrg Briefly, the shell commands `./configure; make; make install' should 16a96d7823Smrgconfigure, build, and install this package. The following 17a96d7823Smrgmore-detailed instructions are generic; see the `README' file for 18a96d7823Smrginstructions specific to this package. Some packages provide this 19a96d7823Smrg`INSTALL' file but do not implement all of the features documented 20a96d7823Smrgbelow. The lack of an optional feature in a given package is not 21a96d7823Smrgnecessarily a bug. More recommendations for GNU packages can be found 22a96d7823Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 23a96d7823Smrg 24a96d7823Smrg The `configure' shell script attempts to guess correct values for 25a96d7823Smrgvarious system-dependent variables used during compilation. It uses 26a96d7823Smrgthose values to create a `Makefile' in each directory of the package. 27a96d7823SmrgIt may also create one or more `.h' files containing system-dependent 28a96d7823Smrgdefinitions. Finally, it creates a shell script `config.status' that 29a96d7823Smrgyou can run in the future to recreate the current configuration, and a 30a96d7823Smrgfile `config.log' containing compiler output (useful mainly for 31a96d7823Smrgdebugging `configure'). 32a96d7823Smrg 33a96d7823Smrg It can also use an optional file (typically called `config.cache' 34a96d7823Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35a96d7823Smrgthe results of its tests to speed up reconfiguring. Caching is 36a96d7823Smrgdisabled by default to prevent problems with accidental use of stale 37a96d7823Smrgcache files. 38a96d7823Smrg 39a96d7823Smrg If you need to do unusual things to compile the package, please try 40a96d7823Smrgto figure out how `configure' could check whether to do them, and mail 41a96d7823Smrgdiffs or instructions to the address given in the `README' so they can 42a96d7823Smrgbe considered for the next release. If you are using the cache, and at 43a96d7823Smrgsome point `config.cache' contains results you don't want to keep, you 44a96d7823Smrgmay remove or edit it. 45a96d7823Smrg 46a96d7823Smrg The file `configure.ac' (or `configure.in') is used to create 47a96d7823Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 48a96d7823Smrgyou want to change it or regenerate `configure' using a newer version 49a96d7823Smrgof `autoconf'. 50a96d7823Smrg 51a96d7823Smrg The simplest way to compile this package is: 52a96d7823Smrg 53a96d7823Smrg 1. `cd' to the directory containing the package's source code and type 54a96d7823Smrg `./configure' to configure the package for your system. 55a96d7823Smrg 56a96d7823Smrg Running `configure' might take a while. While running, it prints 57a96d7823Smrg some messages telling which features it is checking for. 58a96d7823Smrg 59a96d7823Smrg 2. Type `make' to compile the package. 60a96d7823Smrg 61a96d7823Smrg 3. Optionally, type `make check' to run any self-tests that come with 62a96d7823Smrg the package, generally using the just-built uninstalled binaries. 63a96d7823Smrg 64a96d7823Smrg 4. Type `make install' to install the programs and any data files and 65a96d7823Smrg documentation. When installing into a prefix owned by root, it is 66a96d7823Smrg recommended that the package be configured and built as a regular 67a96d7823Smrg user, and only the `make install' phase executed with root 68a96d7823Smrg privileges. 69a96d7823Smrg 70a96d7823Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71a96d7823Smrg this time using the binaries in their final installed location. 72a96d7823Smrg This target does not install anything. Running this target as a 73a96d7823Smrg regular user, particularly if the prior `make install' required 74a96d7823Smrg root privileges, verifies that the installation completed 75a96d7823Smrg correctly. 76a96d7823Smrg 77a96d7823Smrg 6. You can remove the program binaries and object files from the 78a96d7823Smrg source code directory by typing `make clean'. To also remove the 79a96d7823Smrg files that `configure' created (so you can compile the package for 80a96d7823Smrg a different kind of computer), type `make distclean'. There is 81a96d7823Smrg also a `make maintainer-clean' target, but that is intended mainly 82a96d7823Smrg for the package's developers. If you use it, you may have to get 83a96d7823Smrg all sorts of other programs in order to regenerate files that came 84a96d7823Smrg with the distribution. 85a96d7823Smrg 86a96d7823Smrg 7. Often, you can also type `make uninstall' to remove the installed 87a96d7823Smrg files again. In practice, not all packages have tested that 88a96d7823Smrg uninstallation works correctly, even though it is required by the 89a96d7823Smrg GNU Coding Standards. 90a96d7823Smrg 91a96d7823Smrg 8. Some packages, particularly those that use Automake, provide `make 92a96d7823Smrg distcheck', which can by used by developers to test that all other 93a96d7823Smrg targets like `make install' and `make uninstall' work correctly. 94a96d7823Smrg This target is generally not run by end users. 95a96d7823Smrg 96a96d7823SmrgCompilers and Options 97a96d7823Smrg===================== 98a96d7823Smrg 99a96d7823Smrg Some systems require unusual options for compilation or linking that 100a96d7823Smrgthe `configure' script does not know about. Run `./configure --help' 101a96d7823Smrgfor details on some of the pertinent environment variables. 102a96d7823Smrg 103a96d7823Smrg You can give `configure' initial values for configuration parameters 104a96d7823Smrgby setting variables in the command line or in the environment. Here 105a96d7823Smrgis an example: 106a96d7823Smrg 107a96d7823Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108a96d7823Smrg 109a96d7823Smrg *Note Defining Variables::, for more details. 110a96d7823Smrg 111a96d7823SmrgCompiling For Multiple Architectures 112a96d7823Smrg==================================== 113a96d7823Smrg 114a96d7823Smrg You can compile the package for more than one kind of computer at the 115a96d7823Smrgsame time, by placing the object files for each architecture in their 116a96d7823Smrgown directory. To do this, you can use GNU `make'. `cd' to the 117a96d7823Smrgdirectory where you want the object files and executables to go and run 118a96d7823Smrgthe `configure' script. `configure' automatically checks for the 119a96d7823Smrgsource code in the directory that `configure' is in and in `..'. This 120a96d7823Smrgis known as a "VPATH" build. 121a96d7823Smrg 122a96d7823Smrg With a non-GNU `make', it is safer to compile the package for one 123a96d7823Smrgarchitecture at a time in the source code directory. After you have 124a96d7823Smrginstalled the package for one architecture, use `make distclean' before 125a96d7823Smrgreconfiguring for another architecture. 126a96d7823Smrg 127a96d7823Smrg On MacOS X 10.5 and later systems, you can create libraries and 128a96d7823Smrgexecutables that work on multiple system types--known as "fat" or 129a96d7823Smrg"universal" binaries--by specifying multiple `-arch' options to the 130a96d7823Smrgcompiler but only a single `-arch' option to the preprocessor. Like 131a96d7823Smrgthis: 132a96d7823Smrg 133a96d7823Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134a96d7823Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135a96d7823Smrg CPP="gcc -E" CXXCPP="g++ -E" 136a96d7823Smrg 137a96d7823Smrg This is not guaranteed to produce working output in all cases, you 138a96d7823Smrgmay have to build one architecture at a time and combine the results 139a96d7823Smrgusing the `lipo' tool if you have problems. 140a96d7823Smrg 141a96d7823SmrgInstallation Names 142a96d7823Smrg================== 143a96d7823Smrg 144a96d7823Smrg By default, `make install' installs the package's commands under 145a96d7823Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146a96d7823Smrgcan specify an installation prefix other than `/usr/local' by giving 147a96d7823Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148a96d7823Smrgabsolute file name. 149a96d7823Smrg 150a96d7823Smrg You can specify separate installation prefixes for 151a96d7823Smrgarchitecture-specific files and architecture-independent files. If you 152a96d7823Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153a96d7823SmrgPREFIX as the prefix for installing programs and libraries. 154a96d7823SmrgDocumentation and other data files still use the regular prefix. 155a96d7823Smrg 156a96d7823Smrg In addition, if you use an unusual directory layout you can give 157a96d7823Smrgoptions like `--bindir=DIR' to specify different values for particular 158a96d7823Smrgkinds of files. Run `configure --help' for a list of the directories 159a96d7823Smrgyou can set and what kinds of files go in them. In general, the 160a96d7823Smrgdefault for these options is expressed in terms of `${prefix}', so that 161a96d7823Smrgspecifying just `--prefix' will affect all of the other directory 162a96d7823Smrgspecifications that were not explicitly provided. 163a96d7823Smrg 164a96d7823Smrg The most portable way to affect installation locations is to pass the 165a96d7823Smrgcorrect locations to `configure'; however, many packages provide one or 166a96d7823Smrgboth of the following shortcuts of passing variable assignments to the 167a96d7823Smrg`make install' command line to change installation locations without 168a96d7823Smrghaving to reconfigure or recompile. 169a96d7823Smrg 170a96d7823Smrg The first method involves providing an override variable for each 171a96d7823Smrgaffected directory. For example, `make install 172a96d7823Smrgprefix=/alternate/directory' will choose an alternate location for all 173a96d7823Smrgdirectory configuration variables that were expressed in terms of 174a96d7823Smrg`${prefix}'. Any directories that were specified during `configure', 175a96d7823Smrgbut not in terms of `${prefix}', must each be overridden at install 176a96d7823Smrgtime for the entire installation to be relocated. The approach of 177a96d7823Smrgmakefile variable overrides for each directory variable is required by 178a96d7823Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179a96d7823SmrgHowever, some platforms have known limitations with the semantics of 180a96d7823Smrgshared libraries that end up requiring recompilation when using this 181a96d7823Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182a96d7823Smrg 183a96d7823Smrg The second method involves providing the `DESTDIR' variable. For 184a96d7823Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185a96d7823Smrg`/alternate/directory' before all installation names. The approach of 186a96d7823Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187a96d7823Smrgdoes not work on platforms that have drive letters. On the other hand, 188a96d7823Smrgit does better at avoiding recompilation issues, and works well even 189a96d7823Smrgwhen some directory options were not specified in terms of `${prefix}' 190a96d7823Smrgat `configure' time. 191a96d7823Smrg 192a96d7823SmrgOptional Features 193a96d7823Smrg================= 194a96d7823Smrg 195a96d7823Smrg If the package supports it, you can cause programs to be installed 196a96d7823Smrgwith an extra prefix or suffix on their names by giving `configure' the 197a96d7823Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198a96d7823Smrg 199a96d7823Smrg Some packages pay attention to `--enable-FEATURE' options to 200a96d7823Smrg`configure', where FEATURE indicates an optional part of the package. 201a96d7823SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202a96d7823Smrgis something like `gnu-as' or `x' (for the X Window System). The 203a96d7823Smrg`README' should mention any `--enable-' and `--with-' options that the 204a96d7823Smrgpackage recognizes. 205a96d7823Smrg 206a96d7823Smrg For packages that use the X Window System, `configure' can usually 207a96d7823Smrgfind the X include and library files automatically, but if it doesn't, 208a96d7823Smrgyou can use the `configure' options `--x-includes=DIR' and 209a96d7823Smrg`--x-libraries=DIR' to specify their locations. 210a96d7823Smrg 211a96d7823Smrg Some packages offer the ability to configure how verbose the 212a96d7823Smrgexecution of `make' will be. For these packages, running `./configure 213a96d7823Smrg--enable-silent-rules' sets the default to minimal output, which can be 214a96d7823Smrgoverridden with `make V=1'; while running `./configure 215a96d7823Smrg--disable-silent-rules' sets the default to verbose, which can be 216a96d7823Smrgoverridden with `make V=0'. 217a96d7823Smrg 218a96d7823SmrgParticular systems 219a96d7823Smrg================== 220a96d7823Smrg 221a96d7823Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222a96d7823SmrgCC is not installed, it is recommended to use the following options in 223a96d7823Smrgorder to use an ANSI C compiler: 224a96d7823Smrg 225a96d7823Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226a96d7823Smrg 227a96d7823Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228a96d7823Smrg 229a96d7823Smrg HP-UX `make' updates targets which have the same time stamps as 230a96d7823Smrgtheir prerequisites, which makes it generally unusable when shipped 231a96d7823Smrggenerated files such as `configure' are involved. Use GNU `make' 232a96d7823Smrginstead. 233a96d7823Smrg 234a96d7823Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235a96d7823Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236a96d7823Smrga workaround. If GNU CC is not installed, it is therefore recommended 237a96d7823Smrgto try 238a96d7823Smrg 239a96d7823Smrg ./configure CC="cc" 240a96d7823Smrg 241a96d7823Smrgand if that doesn't work, try 242a96d7823Smrg 243a96d7823Smrg ./configure CC="cc -nodtk" 244a96d7823Smrg 245a96d7823Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246a96d7823Smrgdirectory contains several dysfunctional programs; working variants of 247a96d7823Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248a96d7823Smrgin your `PATH', put it _after_ `/usr/bin'. 249a96d7823Smrg 250a96d7823Smrg On Haiku, software installed for all users goes in `/boot/common', 251a96d7823Smrgnot `/usr/local'. It is recommended to use the following options: 252a96d7823Smrg 253a96d7823Smrg ./configure --prefix=/boot/common 254a96d7823Smrg 255a96d7823SmrgSpecifying the System Type 256a96d7823Smrg========================== 257a96d7823Smrg 258a96d7823Smrg There may be some features `configure' cannot figure out 259a96d7823Smrgautomatically, but needs to determine by the type of machine the package 260a96d7823Smrgwill run on. Usually, assuming the package is built to be run on the 261a96d7823Smrg_same_ architectures, `configure' can figure that out, but if it prints 262a96d7823Smrga message saying it cannot guess the machine type, give it the 263a96d7823Smrg`--build=TYPE' option. TYPE can either be a short name for the system 264a96d7823Smrgtype, such as `sun4', or a canonical name which has the form: 265a96d7823Smrg 266a96d7823Smrg CPU-COMPANY-SYSTEM 267a96d7823Smrg 268a96d7823Smrgwhere SYSTEM can have one of these forms: 269a96d7823Smrg 270a96d7823Smrg OS 271a96d7823Smrg KERNEL-OS 272a96d7823Smrg 273a96d7823Smrg See the file `config.sub' for the possible values of each field. If 274a96d7823Smrg`config.sub' isn't included in this package, then this package doesn't 275a96d7823Smrgneed to know the machine type. 276a96d7823Smrg 277a96d7823Smrg If you are _building_ compiler tools for cross-compiling, you should 278a96d7823Smrguse the option `--target=TYPE' to select the type of system they will 279a96d7823Smrgproduce code for. 280a96d7823Smrg 281a96d7823Smrg If you want to _use_ a cross compiler, that generates code for a 282a96d7823Smrgplatform different from the build platform, you should specify the 283a96d7823Smrg"host" platform (i.e., that on which the generated programs will 284a96d7823Smrgeventually be run) with `--host=TYPE'. 285a96d7823Smrg 286a96d7823SmrgSharing Defaults 287a96d7823Smrg================ 288a96d7823Smrg 289a96d7823Smrg If you want to set default values for `configure' scripts to share, 290a96d7823Smrgyou can create a site shell script called `config.site' that gives 291a96d7823Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 292a96d7823Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293a96d7823Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294a96d7823Smrg`CONFIG_SITE' environment variable to the location of the site script. 295a96d7823SmrgA warning: not all `configure' scripts look for a site script. 296a96d7823Smrg 297a96d7823SmrgDefining Variables 298a96d7823Smrg================== 299a96d7823Smrg 300a96d7823Smrg Variables not defined in a site shell script can be set in the 301a96d7823Smrgenvironment passed to `configure'. However, some packages may run 302a96d7823Smrgconfigure again during the build, and the customized values of these 303a96d7823Smrgvariables may be lost. In order to avoid this problem, you should set 304a96d7823Smrgthem in the `configure' command line, using `VAR=value'. For example: 305a96d7823Smrg 306a96d7823Smrg ./configure CC=/usr/local2/bin/gcc 307a96d7823Smrg 308a96d7823Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 309a96d7823Smrgoverridden in the site shell script). 310a96d7823Smrg 311a96d7823SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312a96d7823Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313a96d7823Smrg 314a96d7823Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315a96d7823Smrg 316a96d7823Smrg`configure' Invocation 317a96d7823Smrg====================== 318a96d7823Smrg 319a96d7823Smrg `configure' recognizes the following options to control how it 320a96d7823Smrgoperates. 321a96d7823Smrg 322a96d7823Smrg`--help' 323a96d7823Smrg`-h' 324a96d7823Smrg Print a summary of all of the options to `configure', and exit. 325a96d7823Smrg 326a96d7823Smrg`--help=short' 327a96d7823Smrg`--help=recursive' 328a96d7823Smrg Print a summary of the options unique to this package's 329a96d7823Smrg `configure', and exit. The `short' variant lists options used 330a96d7823Smrg only in the top level, while the `recursive' variant lists options 331a96d7823Smrg also present in any nested packages. 332a96d7823Smrg 333a96d7823Smrg`--version' 334a96d7823Smrg`-V' 335a96d7823Smrg Print the version of Autoconf used to generate the `configure' 336a96d7823Smrg script, and exit. 337a96d7823Smrg 338a96d7823Smrg`--cache-file=FILE' 339a96d7823Smrg Enable the cache: use and save the results of the tests in FILE, 340a96d7823Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341a96d7823Smrg disable caching. 342a96d7823Smrg 343a96d7823Smrg`--config-cache' 344a96d7823Smrg`-C' 345a96d7823Smrg Alias for `--cache-file=config.cache'. 346a96d7823Smrg 347a96d7823Smrg`--quiet' 348a96d7823Smrg`--silent' 349a96d7823Smrg`-q' 350a96d7823Smrg Do not print messages saying which checks are being made. To 351a96d7823Smrg suppress all normal output, redirect it to `/dev/null' (any error 352a96d7823Smrg messages will still be shown). 353a96d7823Smrg 354a96d7823Smrg`--srcdir=DIR' 355a96d7823Smrg Look for the package's source code in directory DIR. Usually 356a96d7823Smrg `configure' can determine that directory automatically. 357a96d7823Smrg 358a96d7823Smrg`--prefix=DIR' 359a96d7823Smrg Use DIR as the installation prefix. *note Installation Names:: 360a96d7823Smrg for more details, including other options available for fine-tuning 361a96d7823Smrg the installation locations. 362a96d7823Smrg 363a96d7823Smrg`--no-create' 364a96d7823Smrg`-n' 365a96d7823Smrg Run the configure checks, but stop before creating any output 366a96d7823Smrg files. 367a96d7823Smrg 368a96d7823Smrg`configure' also accepts some other, not widely useful, options. Run 369a96d7823Smrg`configure --help' for more details. 370a96d7823Smrg 371