1ff559fabSmrgInstallation Instructions 2ff559fabSmrg************************* 3ff559fabSmrg 4fc544a13SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5fc544a13SmrgInc. 6ff559fabSmrg 7fc544a13Smrg Copying and distribution of this file, with or without modification, 8fc544a13Smrgare permitted in any medium without royalty provided the copyright 9fc544a13Smrgnotice and this notice are preserved. This file is offered as-is, 10fc544a13Smrgwithout warranty of any kind. 11ff559fabSmrg 12ff559fabSmrgBasic Installation 13ff559fabSmrg================== 14ff559fabSmrg 1544dda7b2Smrg Briefly, the shell commands `./configure; make; make install' should 1644dda7b2Smrgconfigure, build, and install this package. The following 1744dda7b2Smrgmore-detailed instructions are generic; see the `README' file for 18fc544a13Smrginstructions specific to this package. Some packages provide this 19fc544a13Smrg`INSTALL' file but do not implement all of the features documented 20fc544a13Smrgbelow. The lack of an optional feature in a given package is not 21fc544a13Smrgnecessarily a bug. More recommendations for GNU packages can be found 22fc544a13Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 23ff559fabSmrg 24ff559fabSmrg The `configure' shell script attempts to guess correct values for 25ff559fabSmrgvarious system-dependent variables used during compilation. It uses 26ff559fabSmrgthose values to create a `Makefile' in each directory of the package. 27ff559fabSmrgIt may also create one or more `.h' files containing system-dependent 28ff559fabSmrgdefinitions. Finally, it creates a shell script `config.status' that 29ff559fabSmrgyou can run in the future to recreate the current configuration, and a 30ff559fabSmrgfile `config.log' containing compiler output (useful mainly for 31ff559fabSmrgdebugging `configure'). 32ff559fabSmrg 33ff559fabSmrg It can also use an optional file (typically called `config.cache' 34ff559fabSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 3544dda7b2Smrgthe results of its tests to speed up reconfiguring. Caching is 36ff559fabSmrgdisabled by default to prevent problems with accidental use of stale 3744dda7b2Smrgcache files. 38ff559fabSmrg 39ff559fabSmrg If you need to do unusual things to compile the package, please try 40ff559fabSmrgto figure out how `configure' could check whether to do them, and mail 41ff559fabSmrgdiffs or instructions to the address given in the `README' so they can 42ff559fabSmrgbe considered for the next release. If you are using the cache, and at 43ff559fabSmrgsome point `config.cache' contains results you don't want to keep, you 44ff559fabSmrgmay remove or edit it. 45ff559fabSmrg 46ff559fabSmrg The file `configure.ac' (or `configure.in') is used to create 4744dda7b2Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 4844dda7b2Smrgyou want to change it or regenerate `configure' using a newer version 4944dda7b2Smrgof `autoconf'. 50ff559fabSmrg 51fc544a13Smrg The simplest way to compile this package is: 52ff559fabSmrg 53ff559fabSmrg 1. `cd' to the directory containing the package's source code and type 5444dda7b2Smrg `./configure' to configure the package for your system. 55ff559fabSmrg 5644dda7b2Smrg Running `configure' might take a while. While running, it prints 5744dda7b2Smrg some messages telling which features it is checking for. 58ff559fabSmrg 59ff559fabSmrg 2. Type `make' to compile the package. 60ff559fabSmrg 61ff559fabSmrg 3. Optionally, type `make check' to run any self-tests that come with 62fc544a13Smrg the package, generally using the just-built uninstalled binaries. 63ff559fabSmrg 64ff559fabSmrg 4. Type `make install' to install the programs and any data files and 65fc544a13Smrg documentation. When installing into a prefix owned by root, it is 66fc544a13Smrg recommended that the package be configured and built as a regular 67fc544a13Smrg user, and only the `make install' phase executed with root 68fc544a13Smrg privileges. 69fc544a13Smrg 70fc544a13Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71fc544a13Smrg this time using the binaries in their final installed location. 72fc544a13Smrg This target does not install anything. Running this target as a 73fc544a13Smrg regular user, particularly if the prior `make install' required 74fc544a13Smrg root privileges, verifies that the installation completed 75fc544a13Smrg correctly. 76fc544a13Smrg 77fc544a13Smrg 6. You can remove the program binaries and object files from the 78ff559fabSmrg source code directory by typing `make clean'. To also remove the 79ff559fabSmrg files that `configure' created (so you can compile the package for 80ff559fabSmrg a different kind of computer), type `make distclean'. There is 81ff559fabSmrg also a `make maintainer-clean' target, but that is intended mainly 82ff559fabSmrg for the package's developers. If you use it, you may have to get 83ff559fabSmrg all sorts of other programs in order to regenerate files that came 84ff559fabSmrg with the distribution. 85ff559fabSmrg 86fc544a13Smrg 7. Often, you can also type `make uninstall' to remove the installed 87fc544a13Smrg files again. In practice, not all packages have tested that 88fc544a13Smrg uninstallation works correctly, even though it is required by the 89fc544a13Smrg GNU Coding Standards. 90fc544a13Smrg 91fc544a13Smrg 8. Some packages, particularly those that use Automake, provide `make 92fc544a13Smrg distcheck', which can by used by developers to test that all other 93fc544a13Smrg targets like `make install' and `make uninstall' work correctly. 94fc544a13Smrg This target is generally not run by end users. 9544dda7b2Smrg 96ff559fabSmrgCompilers and Options 97ff559fabSmrg===================== 98ff559fabSmrg 9944dda7b2Smrg Some systems require unusual options for compilation or linking that 10044dda7b2Smrgthe `configure' script does not know about. Run `./configure --help' 10144dda7b2Smrgfor details on some of the pertinent environment variables. 102ff559fabSmrg 103ff559fabSmrg You can give `configure' initial values for configuration parameters 104ff559fabSmrgby setting variables in the command line or in the environment. Here 105ff559fabSmrgis an example: 106ff559fabSmrg 10744dda7b2Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108ff559fabSmrg 109ff559fabSmrg *Note Defining Variables::, for more details. 110ff559fabSmrg 111ff559fabSmrgCompiling For Multiple Architectures 112ff559fabSmrg==================================== 113ff559fabSmrg 11444dda7b2Smrg You can compile the package for more than one kind of computer at the 115ff559fabSmrgsame time, by placing the object files for each architecture in their 11644dda7b2Smrgown directory. To do this, you can use GNU `make'. `cd' to the 117ff559fabSmrgdirectory where you want the object files and executables to go and run 118ff559fabSmrgthe `configure' script. `configure' automatically checks for the 119fc544a13Smrgsource code in the directory that `configure' is in and in `..'. This 120fc544a13Smrgis known as a "VPATH" build. 121ff559fabSmrg 12244dda7b2Smrg With a non-GNU `make', it is safer to compile the package for one 12344dda7b2Smrgarchitecture at a time in the source code directory. After you have 12444dda7b2Smrginstalled the package for one architecture, use `make distclean' before 12544dda7b2Smrgreconfiguring for another architecture. 12644dda7b2Smrg 12744dda7b2Smrg On MacOS X 10.5 and later systems, you can create libraries and 12844dda7b2Smrgexecutables that work on multiple system types--known as "fat" or 12944dda7b2Smrg"universal" binaries--by specifying multiple `-arch' options to the 13044dda7b2Smrgcompiler but only a single `-arch' option to the preprocessor. Like 13144dda7b2Smrgthis: 13244dda7b2Smrg 13344dda7b2Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13444dda7b2Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13544dda7b2Smrg CPP="gcc -E" CXXCPP="g++ -E" 13644dda7b2Smrg 13744dda7b2Smrg This is not guaranteed to produce working output in all cases, you 13844dda7b2Smrgmay have to build one architecture at a time and combine the results 13944dda7b2Smrgusing the `lipo' tool if you have problems. 140ff559fabSmrg 141ff559fabSmrgInstallation Names 142ff559fabSmrg================== 143ff559fabSmrg 14444dda7b2Smrg By default, `make install' installs the package's commands under 14544dda7b2Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 14644dda7b2Smrgcan specify an installation prefix other than `/usr/local' by giving 147fc544a13Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148fc544a13Smrgabsolute file name. 149ff559fabSmrg 150ff559fabSmrg You can specify separate installation prefixes for 151ff559fabSmrgarchitecture-specific files and architecture-independent files. If you 15244dda7b2Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 15344dda7b2SmrgPREFIX as the prefix for installing programs and libraries. 15444dda7b2SmrgDocumentation and other data files still use the regular prefix. 155ff559fabSmrg 156ff559fabSmrg In addition, if you use an unusual directory layout you can give 157ff559fabSmrgoptions like `--bindir=DIR' to specify different values for particular 158ff559fabSmrgkinds of files. Run `configure --help' for a list of the directories 159fc544a13Smrgyou can set and what kinds of files go in them. In general, the 160fc544a13Smrgdefault for these options is expressed in terms of `${prefix}', so that 161fc544a13Smrgspecifying just `--prefix' will affect all of the other directory 162fc544a13Smrgspecifications that were not explicitly provided. 163fc544a13Smrg 164fc544a13Smrg The most portable way to affect installation locations is to pass the 165fc544a13Smrgcorrect locations to `configure'; however, many packages provide one or 166fc544a13Smrgboth of the following shortcuts of passing variable assignments to the 167fc544a13Smrg`make install' command line to change installation locations without 168fc544a13Smrghaving to reconfigure or recompile. 169fc544a13Smrg 170fc544a13Smrg The first method involves providing an override variable for each 171fc544a13Smrgaffected directory. For example, `make install 172fc544a13Smrgprefix=/alternate/directory' will choose an alternate location for all 173fc544a13Smrgdirectory configuration variables that were expressed in terms of 174fc544a13Smrg`${prefix}'. Any directories that were specified during `configure', 175fc544a13Smrgbut not in terms of `${prefix}', must each be overridden at install 176fc544a13Smrgtime for the entire installation to be relocated. The approach of 177fc544a13Smrgmakefile variable overrides for each directory variable is required by 178fc544a13Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179fc544a13SmrgHowever, some platforms have known limitations with the semantics of 180fc544a13Smrgshared libraries that end up requiring recompilation when using this 181fc544a13Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182fc544a13Smrg 183fc544a13Smrg The second method involves providing the `DESTDIR' variable. For 184fc544a13Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185fc544a13Smrg`/alternate/directory' before all installation names. The approach of 186fc544a13Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187fc544a13Smrgdoes not work on platforms that have drive letters. On the other hand, 188fc544a13Smrgit does better at avoiding recompilation issues, and works well even 189fc544a13Smrgwhen some directory options were not specified in terms of `${prefix}' 190fc544a13Smrgat `configure' time. 191fc544a13Smrg 192fc544a13SmrgOptional Features 193fc544a13Smrg================= 194ff559fabSmrg 195ff559fabSmrg If the package supports it, you can cause programs to be installed 196ff559fabSmrgwith an extra prefix or suffix on their names by giving `configure' the 197ff559fabSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198ff559fabSmrg 19944dda7b2Smrg Some packages pay attention to `--enable-FEATURE' options to 200ff559fabSmrg`configure', where FEATURE indicates an optional part of the package. 201ff559fabSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202ff559fabSmrgis something like `gnu-as' or `x' (for the X Window System). The 203ff559fabSmrg`README' should mention any `--enable-' and `--with-' options that the 204ff559fabSmrgpackage recognizes. 205ff559fabSmrg 206ff559fabSmrg For packages that use the X Window System, `configure' can usually 207ff559fabSmrgfind the X include and library files automatically, but if it doesn't, 208ff559fabSmrgyou can use the `configure' options `--x-includes=DIR' and 209ff559fabSmrg`--x-libraries=DIR' to specify their locations. 210ff559fabSmrg 211fc544a13Smrg Some packages offer the ability to configure how verbose the 212fc544a13Smrgexecution of `make' will be. For these packages, running `./configure 213fc544a13Smrg--enable-silent-rules' sets the default to minimal output, which can be 214fc544a13Smrgoverridden with `make V=1'; while running `./configure 215fc544a13Smrg--disable-silent-rules' sets the default to verbose, which can be 216fc544a13Smrgoverridden with `make V=0'. 217fc544a13Smrg 21844dda7b2SmrgParticular systems 21944dda7b2Smrg================== 22044dda7b2Smrg 22144dda7b2Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 22244dda7b2SmrgCC is not installed, it is recommended to use the following options in 22344dda7b2Smrgorder to use an ANSI C compiler: 22444dda7b2Smrg 225fc544a13Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 22644dda7b2Smrg 22744dda7b2Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 22844dda7b2Smrg 229fc544a13Smrg HP-UX `make' updates targets which have the same time stamps as 230fc544a13Smrgtheir prerequisites, which makes it generally unusable when shipped 231fc544a13Smrggenerated files such as `configure' are involved. Use GNU `make' 232fc544a13Smrginstead. 233fc544a13Smrg 23444dda7b2Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 23544dda7b2Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 23644dda7b2Smrga workaround. If GNU CC is not installed, it is therefore recommended 23744dda7b2Smrgto try 23844dda7b2Smrg 23944dda7b2Smrg ./configure CC="cc" 24044dda7b2Smrg 24144dda7b2Smrgand if that doesn't work, try 24244dda7b2Smrg 24344dda7b2Smrg ./configure CC="cc -nodtk" 24444dda7b2Smrg 245fc544a13Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246fc544a13Smrgdirectory contains several dysfunctional programs; working variants of 247fc544a13Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248fc544a13Smrgin your `PATH', put it _after_ `/usr/bin'. 249fc544a13Smrg 250fc544a13Smrg On Haiku, software installed for all users goes in `/boot/common', 251fc544a13Smrgnot `/usr/local'. It is recommended to use the following options: 252fc544a13Smrg 253fc544a13Smrg ./configure --prefix=/boot/common 254fc544a13Smrg 255ff559fabSmrgSpecifying the System Type 256ff559fabSmrg========================== 257ff559fabSmrg 25844dda7b2Smrg There may be some features `configure' cannot figure out 25944dda7b2Smrgautomatically, but needs to determine by the type of machine the package 26044dda7b2Smrgwill run on. Usually, assuming the package is built to be run on the 26144dda7b2Smrg_same_ architectures, `configure' can figure that out, but if it prints 26244dda7b2Smrga message saying it cannot guess the machine type, give it the 263ff559fabSmrg`--build=TYPE' option. TYPE can either be a short name for the system 264ff559fabSmrgtype, such as `sun4', or a canonical name which has the form: 265ff559fabSmrg 266ff559fabSmrg CPU-COMPANY-SYSTEM 267ff559fabSmrg 268ff559fabSmrgwhere SYSTEM can have one of these forms: 269ff559fabSmrg 270fc544a13Smrg OS 271fc544a13Smrg KERNEL-OS 272ff559fabSmrg 273ff559fabSmrg See the file `config.sub' for the possible values of each field. If 274ff559fabSmrg`config.sub' isn't included in this package, then this package doesn't 275ff559fabSmrgneed to know the machine type. 276ff559fabSmrg 277ff559fabSmrg If you are _building_ compiler tools for cross-compiling, you should 27844dda7b2Smrguse the option `--target=TYPE' to select the type of system they will 279ff559fabSmrgproduce code for. 280ff559fabSmrg 281ff559fabSmrg If you want to _use_ a cross compiler, that generates code for a 282ff559fabSmrgplatform different from the build platform, you should specify the 283ff559fabSmrg"host" platform (i.e., that on which the generated programs will 284ff559fabSmrgeventually be run) with `--host=TYPE'. 285ff559fabSmrg 286ff559fabSmrgSharing Defaults 287ff559fabSmrg================ 288ff559fabSmrg 28944dda7b2Smrg If you want to set default values for `configure' scripts to share, 29044dda7b2Smrgyou can create a site shell script called `config.site' that gives 29144dda7b2Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 292ff559fabSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293ff559fabSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294ff559fabSmrg`CONFIG_SITE' environment variable to the location of the site script. 295ff559fabSmrgA warning: not all `configure' scripts look for a site script. 296ff559fabSmrg 297ff559fabSmrgDefining Variables 298ff559fabSmrg================== 299ff559fabSmrg 30044dda7b2Smrg Variables not defined in a site shell script can be set in the 301ff559fabSmrgenvironment passed to `configure'. However, some packages may run 302ff559fabSmrgconfigure again during the build, and the customized values of these 303ff559fabSmrgvariables may be lost. In order to avoid this problem, you should set 304ff559fabSmrgthem in the `configure' command line, using `VAR=value'. For example: 305ff559fabSmrg 306ff559fabSmrg ./configure CC=/usr/local2/bin/gcc 307ff559fabSmrg 308ff559fabSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 30944dda7b2Smrgoverridden in the site shell script). 310ff559fabSmrg 31144dda7b2SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 31244dda7b2Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313ff559fabSmrg 31444dda7b2Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315ff559fabSmrg 316ff559fabSmrg`configure' Invocation 317ff559fabSmrg====================== 318ff559fabSmrg 31944dda7b2Smrg `configure' recognizes the following options to control how it 32044dda7b2Smrgoperates. 321ff559fabSmrg 322ff559fabSmrg`--help' 323ff559fabSmrg`-h' 32444dda7b2Smrg Print a summary of all of the options to `configure', and exit. 32544dda7b2Smrg 32644dda7b2Smrg`--help=short' 32744dda7b2Smrg`--help=recursive' 32844dda7b2Smrg Print a summary of the options unique to this package's 32944dda7b2Smrg `configure', and exit. The `short' variant lists options used 33044dda7b2Smrg only in the top level, while the `recursive' variant lists options 33144dda7b2Smrg also present in any nested packages. 332ff559fabSmrg 333ff559fabSmrg`--version' 334ff559fabSmrg`-V' 335ff559fabSmrg Print the version of Autoconf used to generate the `configure' 336ff559fabSmrg script, and exit. 337ff559fabSmrg 338ff559fabSmrg`--cache-file=FILE' 339ff559fabSmrg Enable the cache: use and save the results of the tests in FILE, 340ff559fabSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341ff559fabSmrg disable caching. 342ff559fabSmrg 343ff559fabSmrg`--config-cache' 344ff559fabSmrg`-C' 345ff559fabSmrg Alias for `--cache-file=config.cache'. 346ff559fabSmrg 347ff559fabSmrg`--quiet' 348ff559fabSmrg`--silent' 349ff559fabSmrg`-q' 350ff559fabSmrg Do not print messages saying which checks are being made. To 351ff559fabSmrg suppress all normal output, redirect it to `/dev/null' (any error 352ff559fabSmrg messages will still be shown). 353ff559fabSmrg 354ff559fabSmrg`--srcdir=DIR' 355ff559fabSmrg Look for the package's source code in directory DIR. Usually 356ff559fabSmrg `configure' can determine that directory automatically. 357ff559fabSmrg 35844dda7b2Smrg`--prefix=DIR' 359fc544a13Smrg Use DIR as the installation prefix. *note Installation Names:: 36044dda7b2Smrg for more details, including other options available for fine-tuning 36144dda7b2Smrg the installation locations. 36244dda7b2Smrg 36344dda7b2Smrg`--no-create' 36444dda7b2Smrg`-n' 36544dda7b2Smrg Run the configure checks, but stop before creating any output 36644dda7b2Smrg files. 36744dda7b2Smrg 368ff559fabSmrg`configure' also accepts some other, not widely useful, options. Run 369ff559fabSmrg`configure --help' for more details. 370ff559fabSmrg 371