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