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