156957a04SmrgInstallation Instructions 256957a04Smrg************************* 356957a04Smrg 4b312a94cSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5b312a94cSmrgInc. 656957a04Smrg 7b312a94cSmrg Copying and distribution of this file, with or without modification, 8b312a94cSmrgare permitted in any medium without royalty provided the copyright 9b312a94cSmrgnotice and this notice are preserved. This file is offered as-is, 10b312a94cSmrgwithout warranty of any kind. 1156957a04Smrg 1256957a04SmrgBasic Installation 1356957a04Smrg================== 1456957a04Smrg 1556957a04Smrg Briefly, the shell commands `./configure; make; make install' should 1656957a04Smrgconfigure, build, and install this package. The following 1756957a04Smrgmore-detailed instructions are generic; see the `README' file for 18b312a94cSmrginstructions specific to this package. Some packages provide this 19b312a94cSmrg`INSTALL' file but do not implement all of the features documented 20b312a94cSmrgbelow. The lack of an optional feature in a given package is not 21b312a94cSmrgnecessarily a bug. More recommendations for GNU packages can be found 22b312a94cSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 2356957a04Smrg 2456957a04Smrg The `configure' shell script attempts to guess correct values for 2556957a04Smrgvarious system-dependent variables used during compilation. It uses 2656957a04Smrgthose values to create a `Makefile' in each directory of the package. 2756957a04SmrgIt may also create one or more `.h' files containing system-dependent 2856957a04Smrgdefinitions. Finally, it creates a shell script `config.status' that 2956957a04Smrgyou can run in the future to recreate the current configuration, and a 3056957a04Smrgfile `config.log' containing compiler output (useful mainly for 3156957a04Smrgdebugging `configure'). 3256957a04Smrg 3356957a04Smrg It can also use an optional file (typically called `config.cache' 3456957a04Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 3556957a04Smrgthe results of its tests to speed up reconfiguring. Caching is 3656957a04Smrgdisabled by default to prevent problems with accidental use of stale 3756957a04Smrgcache files. 3856957a04Smrg 3956957a04Smrg If you need to do unusual things to compile the package, please try 4056957a04Smrgto figure out how `configure' could check whether to do them, and mail 4156957a04Smrgdiffs or instructions to the address given in the `README' so they can 4256957a04Smrgbe considered for the next release. If you are using the cache, and at 4356957a04Smrgsome point `config.cache' contains results you don't want to keep, you 4456957a04Smrgmay remove or edit it. 4556957a04Smrg 4656957a04Smrg The file `configure.ac' (or `configure.in') is used to create 4756957a04Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 4856957a04Smrgyou want to change it or regenerate `configure' using a newer version 4956957a04Smrgof `autoconf'. 5056957a04Smrg 51b312a94cSmrg The simplest way to compile this package is: 5256957a04Smrg 5356957a04Smrg 1. `cd' to the directory containing the package's source code and type 5456957a04Smrg `./configure' to configure the package for your system. 5556957a04Smrg 5656957a04Smrg Running `configure' might take a while. While running, it prints 5756957a04Smrg some messages telling which features it is checking for. 5856957a04Smrg 5956957a04Smrg 2. Type `make' to compile the package. 6056957a04Smrg 6156957a04Smrg 3. Optionally, type `make check' to run any self-tests that come with 62b312a94cSmrg the package, generally using the just-built uninstalled binaries. 6356957a04Smrg 6456957a04Smrg 4. Type `make install' to install the programs and any data files and 65b312a94cSmrg documentation. When installing into a prefix owned by root, it is 66b312a94cSmrg recommended that the package be configured and built as a regular 67b312a94cSmrg user, and only the `make install' phase executed with root 68b312a94cSmrg privileges. 69b312a94cSmrg 70b312a94cSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71b312a94cSmrg this time using the binaries in their final installed location. 72b312a94cSmrg This target does not install anything. Running this target as a 73b312a94cSmrg regular user, particularly if the prior `make install' required 74b312a94cSmrg root privileges, verifies that the installation completed 75b312a94cSmrg correctly. 76b312a94cSmrg 77b312a94cSmrg 6. You can remove the program binaries and object files from the 7856957a04Smrg source code directory by typing `make clean'. To also remove the 7956957a04Smrg files that `configure' created (so you can compile the package for 8056957a04Smrg a different kind of computer), type `make distclean'. There is 8156957a04Smrg also a `make maintainer-clean' target, but that is intended mainly 8256957a04Smrg for the package's developers. If you use it, you may have to get 8356957a04Smrg all sorts of other programs in order to regenerate files that came 8456957a04Smrg with the distribution. 8556957a04Smrg 86b312a94cSmrg 7. Often, you can also type `make uninstall' to remove the installed 87b312a94cSmrg files again. In practice, not all packages have tested that 88b312a94cSmrg uninstallation works correctly, even though it is required by the 89b312a94cSmrg GNU Coding Standards. 90b312a94cSmrg 91b312a94cSmrg 8. Some packages, particularly those that use Automake, provide `make 92b312a94cSmrg distcheck', which can by used by developers to test that all other 93b312a94cSmrg targets like `make install' and `make uninstall' work correctly. 94b312a94cSmrg This target is generally not run by end users. 9556957a04Smrg 9656957a04SmrgCompilers and Options 9756957a04Smrg===================== 9856957a04Smrg 9956957a04Smrg Some systems require unusual options for compilation or linking that 10056957a04Smrgthe `configure' script does not know about. Run `./configure --help' 10156957a04Smrgfor details on some of the pertinent environment variables. 10256957a04Smrg 10356957a04Smrg You can give `configure' initial values for configuration parameters 10456957a04Smrgby setting variables in the command line or in the environment. Here 10556957a04Smrgis an example: 10656957a04Smrg 10756957a04Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 10856957a04Smrg 10956957a04Smrg *Note Defining Variables::, for more details. 11056957a04Smrg 11156957a04SmrgCompiling For Multiple Architectures 11256957a04Smrg==================================== 11356957a04Smrg 11456957a04Smrg You can compile the package for more than one kind of computer at the 11556957a04Smrgsame time, by placing the object files for each architecture in their 11656957a04Smrgown directory. To do this, you can use GNU `make'. `cd' to the 11756957a04Smrgdirectory where you want the object files and executables to go and run 11856957a04Smrgthe `configure' script. `configure' automatically checks for the 119b312a94cSmrgsource code in the directory that `configure' is in and in `..'. This 120b312a94cSmrgis known as a "VPATH" build. 12156957a04Smrg 12256957a04Smrg With a non-GNU `make', it is safer to compile the package for one 12356957a04Smrgarchitecture at a time in the source code directory. After you have 12456957a04Smrginstalled the package for one architecture, use `make distclean' before 12556957a04Smrgreconfiguring for another architecture. 12656957a04Smrg 12756957a04Smrg On MacOS X 10.5 and later systems, you can create libraries and 12856957a04Smrgexecutables that work on multiple system types--known as "fat" or 12956957a04Smrg"universal" binaries--by specifying multiple `-arch' options to the 13056957a04Smrgcompiler but only a single `-arch' option to the preprocessor. Like 13156957a04Smrgthis: 13256957a04Smrg 13356957a04Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13456957a04Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13556957a04Smrg CPP="gcc -E" CXXCPP="g++ -E" 13656957a04Smrg 13756957a04Smrg This is not guaranteed to produce working output in all cases, you 13856957a04Smrgmay have to build one architecture at a time and combine the results 13956957a04Smrgusing the `lipo' tool if you have problems. 14056957a04Smrg 14156957a04SmrgInstallation Names 14256957a04Smrg================== 14356957a04Smrg 14456957a04Smrg By default, `make install' installs the package's commands under 14556957a04Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 14656957a04Smrgcan specify an installation prefix other than `/usr/local' by giving 147b312a94cSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148b312a94cSmrgabsolute file name. 14956957a04Smrg 15056957a04Smrg You can specify separate installation prefixes for 15156957a04Smrgarchitecture-specific files and architecture-independent files. If you 15256957a04Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 15356957a04SmrgPREFIX as the prefix for installing programs and libraries. 15456957a04SmrgDocumentation and other data files still use the regular prefix. 15556957a04Smrg 15656957a04Smrg In addition, if you use an unusual directory layout you can give 15756957a04Smrgoptions like `--bindir=DIR' to specify different values for particular 15856957a04Smrgkinds of files. Run `configure --help' for a list of the directories 159b312a94cSmrgyou can set and what kinds of files go in them. In general, the 160b312a94cSmrgdefault for these options is expressed in terms of `${prefix}', so that 161b312a94cSmrgspecifying just `--prefix' will affect all of the other directory 162b312a94cSmrgspecifications that were not explicitly provided. 163b312a94cSmrg 164b312a94cSmrg The most portable way to affect installation locations is to pass the 165b312a94cSmrgcorrect locations to `configure'; however, many packages provide one or 166b312a94cSmrgboth of the following shortcuts of passing variable assignments to the 167b312a94cSmrg`make install' command line to change installation locations without 168b312a94cSmrghaving to reconfigure or recompile. 169b312a94cSmrg 170b312a94cSmrg The first method involves providing an override variable for each 171b312a94cSmrgaffected directory. For example, `make install 172b312a94cSmrgprefix=/alternate/directory' will choose an alternate location for all 173b312a94cSmrgdirectory configuration variables that were expressed in terms of 174b312a94cSmrg`${prefix}'. Any directories that were specified during `configure', 175b312a94cSmrgbut not in terms of `${prefix}', must each be overridden at install 176b312a94cSmrgtime for the entire installation to be relocated. The approach of 177b312a94cSmrgmakefile variable overrides for each directory variable is required by 178b312a94cSmrgthe GNU Coding Standards, and ideally causes no recompilation. 179b312a94cSmrgHowever, some platforms have known limitations with the semantics of 180b312a94cSmrgshared libraries that end up requiring recompilation when using this 181b312a94cSmrgmethod, particularly noticeable in packages that use GNU Libtool. 182b312a94cSmrg 183b312a94cSmrg The second method involves providing the `DESTDIR' variable. For 184b312a94cSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 185b312a94cSmrg`/alternate/directory' before all installation names. The approach of 186b312a94cSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187b312a94cSmrgdoes not work on platforms that have drive letters. On the other hand, 188b312a94cSmrgit does better at avoiding recompilation issues, and works well even 189b312a94cSmrgwhen some directory options were not specified in terms of `${prefix}' 190b312a94cSmrgat `configure' time. 191b312a94cSmrg 192b312a94cSmrgOptional Features 193b312a94cSmrg================= 19456957a04Smrg 19556957a04Smrg If the package supports it, you can cause programs to be installed 19656957a04Smrgwith an extra prefix or suffix on their names by giving `configure' the 19756957a04Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 19856957a04Smrg 19956957a04Smrg Some packages pay attention to `--enable-FEATURE' options to 20056957a04Smrg`configure', where FEATURE indicates an optional part of the package. 20156957a04SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 20256957a04Smrgis something like `gnu-as' or `x' (for the X Window System). The 20356957a04Smrg`README' should mention any `--enable-' and `--with-' options that the 20456957a04Smrgpackage recognizes. 20556957a04Smrg 20656957a04Smrg For packages that use the X Window System, `configure' can usually 20756957a04Smrgfind the X include and library files automatically, but if it doesn't, 20856957a04Smrgyou can use the `configure' options `--x-includes=DIR' and 20956957a04Smrg`--x-libraries=DIR' to specify their locations. 21056957a04Smrg 211b312a94cSmrg Some packages offer the ability to configure how verbose the 212b312a94cSmrgexecution of `make' will be. For these packages, running `./configure 213b312a94cSmrg--enable-silent-rules' sets the default to minimal output, which can be 214b312a94cSmrgoverridden with `make V=1'; while running `./configure 215b312a94cSmrg--disable-silent-rules' sets the default to verbose, which can be 216b312a94cSmrgoverridden with `make V=0'. 217b312a94cSmrg 21856957a04SmrgParticular systems 21956957a04Smrg================== 22056957a04Smrg 22156957a04Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 22256957a04SmrgCC is not installed, it is recommended to use the following options in 22356957a04Smrgorder to use an ANSI C compiler: 22456957a04Smrg 225b312a94cSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 22656957a04Smrg 22756957a04Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 22856957a04Smrg 229b312a94cSmrg HP-UX `make' updates targets which have the same time stamps as 230b312a94cSmrgtheir prerequisites, which makes it generally unusable when shipped 231b312a94cSmrggenerated files such as `configure' are involved. Use GNU `make' 232b312a94cSmrginstead. 233b312a94cSmrg 23456957a04Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 23556957a04Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 23656957a04Smrga workaround. If GNU CC is not installed, it is therefore recommended 23756957a04Smrgto try 23856957a04Smrg 23956957a04Smrg ./configure CC="cc" 24056957a04Smrg 24156957a04Smrgand if that doesn't work, try 24256957a04Smrg 24356957a04Smrg ./configure CC="cc -nodtk" 24456957a04Smrg 245b312a94cSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246b312a94cSmrgdirectory contains several dysfunctional programs; working variants of 247b312a94cSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248b312a94cSmrgin your `PATH', put it _after_ `/usr/bin'. 249b312a94cSmrg 250b312a94cSmrg On Haiku, software installed for all users goes in `/boot/common', 251b312a94cSmrgnot `/usr/local'. It is recommended to use the following options: 252b312a94cSmrg 253b312a94cSmrg ./configure --prefix=/boot/common 254b312a94cSmrg 25556957a04SmrgSpecifying the System Type 25656957a04Smrg========================== 25756957a04Smrg 25856957a04Smrg There may be some features `configure' cannot figure out 25956957a04Smrgautomatically, but needs to determine by the type of machine the package 26056957a04Smrgwill run on. Usually, assuming the package is built to be run on the 26156957a04Smrg_same_ architectures, `configure' can figure that out, but if it prints 26256957a04Smrga message saying it cannot guess the machine type, give it the 26356957a04Smrg`--build=TYPE' option. TYPE can either be a short name for the system 26456957a04Smrgtype, such as `sun4', or a canonical name which has the form: 26556957a04Smrg 26656957a04Smrg CPU-COMPANY-SYSTEM 26756957a04Smrg 26856957a04Smrgwhere SYSTEM can have one of these forms: 26956957a04Smrg 270b312a94cSmrg OS 271b312a94cSmrg KERNEL-OS 27256957a04Smrg 27356957a04Smrg See the file `config.sub' for the possible values of each field. If 27456957a04Smrg`config.sub' isn't included in this package, then this package doesn't 27556957a04Smrgneed to know the machine type. 27656957a04Smrg 27756957a04Smrg If you are _building_ compiler tools for cross-compiling, you should 27856957a04Smrguse the option `--target=TYPE' to select the type of system they will 27956957a04Smrgproduce code for. 28056957a04Smrg 28156957a04Smrg If you want to _use_ a cross compiler, that generates code for a 28256957a04Smrgplatform different from the build platform, you should specify the 28356957a04Smrg"host" platform (i.e., that on which the generated programs will 28456957a04Smrgeventually be run) with `--host=TYPE'. 28556957a04Smrg 28656957a04SmrgSharing Defaults 28756957a04Smrg================ 28856957a04Smrg 28956957a04Smrg If you want to set default values for `configure' scripts to share, 29056957a04Smrgyou can create a site shell script called `config.site' that gives 29156957a04Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 29256957a04Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 29356957a04Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 29456957a04Smrg`CONFIG_SITE' environment variable to the location of the site script. 29556957a04SmrgA warning: not all `configure' scripts look for a site script. 29656957a04Smrg 29756957a04SmrgDefining Variables 29856957a04Smrg================== 29956957a04Smrg 30056957a04Smrg Variables not defined in a site shell script can be set in the 30156957a04Smrgenvironment passed to `configure'. However, some packages may run 30256957a04Smrgconfigure again during the build, and the customized values of these 30356957a04Smrgvariables may be lost. In order to avoid this problem, you should set 30456957a04Smrgthem in the `configure' command line, using `VAR=value'. For example: 30556957a04Smrg 30656957a04Smrg ./configure CC=/usr/local2/bin/gcc 30756957a04Smrg 30856957a04Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 30956957a04Smrgoverridden in the site shell script). 31056957a04Smrg 31156957a04SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 31256957a04Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 31356957a04Smrg 31456957a04Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 31556957a04Smrg 31656957a04Smrg`configure' Invocation 31756957a04Smrg====================== 31856957a04Smrg 31956957a04Smrg `configure' recognizes the following options to control how it 32056957a04Smrgoperates. 32156957a04Smrg 32256957a04Smrg`--help' 32356957a04Smrg`-h' 32456957a04Smrg Print a summary of all of the options to `configure', and exit. 32556957a04Smrg 32656957a04Smrg`--help=short' 32756957a04Smrg`--help=recursive' 32856957a04Smrg Print a summary of the options unique to this package's 32956957a04Smrg `configure', and exit. The `short' variant lists options used 33056957a04Smrg only in the top level, while the `recursive' variant lists options 33156957a04Smrg also present in any nested packages. 33256957a04Smrg 33356957a04Smrg`--version' 33456957a04Smrg`-V' 33556957a04Smrg Print the version of Autoconf used to generate the `configure' 33656957a04Smrg script, and exit. 33756957a04Smrg 33856957a04Smrg`--cache-file=FILE' 33956957a04Smrg Enable the cache: use and save the results of the tests in FILE, 34056957a04Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 34156957a04Smrg disable caching. 34256957a04Smrg 34356957a04Smrg`--config-cache' 34456957a04Smrg`-C' 34556957a04Smrg Alias for `--cache-file=config.cache'. 34656957a04Smrg 34756957a04Smrg`--quiet' 34856957a04Smrg`--silent' 34956957a04Smrg`-q' 35056957a04Smrg Do not print messages saying which checks are being made. To 35156957a04Smrg suppress all normal output, redirect it to `/dev/null' (any error 35256957a04Smrg messages will still be shown). 35356957a04Smrg 35456957a04Smrg`--srcdir=DIR' 35556957a04Smrg Look for the package's source code in directory DIR. Usually 35656957a04Smrg `configure' can determine that directory automatically. 35756957a04Smrg 35856957a04Smrg`--prefix=DIR' 359b312a94cSmrg Use DIR as the installation prefix. *note Installation Names:: 36056957a04Smrg for more details, including other options available for fine-tuning 36156957a04Smrg the installation locations. 36256957a04Smrg 36356957a04Smrg`--no-create' 36456957a04Smrg`-n' 36556957a04Smrg Run the configure checks, but stop before creating any output 36656957a04Smrg files. 36756957a04Smrg 36856957a04Smrg`configure' also accepts some other, not widely useful, options. Run 36956957a04Smrg`configure --help' for more details. 37056957a04Smrg 371