149dc963fSmrgInstallation Instructions 249dc963fSmrg************************* 34b0ead49Smrg 426372658SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 526372658SmrgInc. 64b0ead49Smrg 726372658Smrg Copying and distribution of this file, with or without modification, 826372658Smrgare permitted in any medium without royalty provided the copyright 926372658Smrgnotice and this notice are preserved. This file is offered as-is, 1026372658Smrgwithout warranty of any kind. 1149dc963fSmrg 1249dc963fSmrgBasic Installation 1349dc963fSmrg================== 1449dc963fSmrg 1549dc963fSmrg Briefly, the shell commands `./configure; make; make install' should 1649dc963fSmrgconfigure, build, and install this package. The following 1749dc963fSmrgmore-detailed instructions are generic; see the `README' file for 1826372658Smrginstructions specific to this package. Some packages provide this 1926372658Smrg`INSTALL' file but do not implement all of the features documented 2026372658Smrgbelow. The lack of an optional feature in a given package is not 2126372658Smrgnecessarily a bug. More recommendations for GNU packages can be found 2226372658Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 2349dc963fSmrg 2449dc963fSmrg The `configure' shell script attempts to guess correct values for 2549dc963fSmrgvarious system-dependent variables used during compilation. It uses 2649dc963fSmrgthose values to create a `Makefile' in each directory of the package. 2749dc963fSmrgIt may also create one or more `.h' files containing system-dependent 2849dc963fSmrgdefinitions. Finally, it creates a shell script `config.status' that 2949dc963fSmrgyou can run in the future to recreate the current configuration, and a 3049dc963fSmrgfile `config.log' containing compiler output (useful mainly for 3149dc963fSmrgdebugging `configure'). 3249dc963fSmrg 3349dc963fSmrg It can also use an optional file (typically called `config.cache' 3449dc963fSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 3549dc963fSmrgthe results of its tests to speed up reconfiguring. Caching is 3649dc963fSmrgdisabled by default to prevent problems with accidental use of stale 3749dc963fSmrgcache files. 3849dc963fSmrg 3949dc963fSmrg If you need to do unusual things to compile the package, please try 4049dc963fSmrgto figure out how `configure' could check whether to do them, and mail 4149dc963fSmrgdiffs or instructions to the address given in the `README' so they can 4249dc963fSmrgbe considered for the next release. If you are using the cache, and at 4349dc963fSmrgsome point `config.cache' contains results you don't want to keep, you 4449dc963fSmrgmay remove or edit it. 4549dc963fSmrg 4649dc963fSmrg The file `configure.ac' (or `configure.in') is used to create 4749dc963fSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 4849dc963fSmrgyou want to change it or regenerate `configure' using a newer version 4949dc963fSmrgof `autoconf'. 5049dc963fSmrg 5126372658Smrg The simplest way to compile this package is: 5249dc963fSmrg 5349dc963fSmrg 1. `cd' to the directory containing the package's source code and type 5449dc963fSmrg `./configure' to configure the package for your system. 5549dc963fSmrg 5649dc963fSmrg Running `configure' might take a while. While running, it prints 5749dc963fSmrg some messages telling which features it is checking for. 5849dc963fSmrg 5949dc963fSmrg 2. Type `make' to compile the package. 6049dc963fSmrg 6149dc963fSmrg 3. Optionally, type `make check' to run any self-tests that come with 6226372658Smrg the package, generally using the just-built uninstalled binaries. 6349dc963fSmrg 6449dc963fSmrg 4. Type `make install' to install the programs and any data files and 6526372658Smrg documentation. When installing into a prefix owned by root, it is 6626372658Smrg recommended that the package be configured and built as a regular 6726372658Smrg user, and only the `make install' phase executed with root 6826372658Smrg privileges. 6926372658Smrg 7026372658Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 7126372658Smrg this time using the binaries in their final installed location. 7226372658Smrg This target does not install anything. Running this target as a 7326372658Smrg regular user, particularly if the prior `make install' required 7426372658Smrg root privileges, verifies that the installation completed 7526372658Smrg correctly. 7626372658Smrg 7726372658Smrg 6. You can remove the program binaries and object files from the 7849dc963fSmrg source code directory by typing `make clean'. To also remove the 7949dc963fSmrg files that `configure' created (so you can compile the package for 8049dc963fSmrg a different kind of computer), type `make distclean'. There is 8149dc963fSmrg also a `make maintainer-clean' target, but that is intended mainly 8249dc963fSmrg for the package's developers. If you use it, you may have to get 8349dc963fSmrg all sorts of other programs in order to regenerate files that came 8449dc963fSmrg with the distribution. 8549dc963fSmrg 8626372658Smrg 7. Often, you can also type `make uninstall' to remove the installed 8726372658Smrg files again. In practice, not all packages have tested that 8826372658Smrg uninstallation works correctly, even though it is required by the 8926372658Smrg GNU Coding Standards. 9026372658Smrg 9126372658Smrg 8. Some packages, particularly those that use Automake, provide `make 9226372658Smrg distcheck', which can by used by developers to test that all other 9326372658Smrg targets like `make install' and `make uninstall' work correctly. 9426372658Smrg This target is generally not run by end users. 9549dc963fSmrg 9649dc963fSmrgCompilers and Options 9749dc963fSmrg===================== 9849dc963fSmrg 9949dc963fSmrg Some systems require unusual options for compilation or linking that 10049dc963fSmrgthe `configure' script does not know about. Run `./configure --help' 10149dc963fSmrgfor details on some of the pertinent environment variables. 10249dc963fSmrg 10349dc963fSmrg You can give `configure' initial values for configuration parameters 10449dc963fSmrgby setting variables in the command line or in the environment. Here 10549dc963fSmrgis an example: 10649dc963fSmrg 10749dc963fSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 10849dc963fSmrg 10949dc963fSmrg *Note Defining Variables::, for more details. 11049dc963fSmrg 11149dc963fSmrgCompiling For Multiple Architectures 11249dc963fSmrg==================================== 11349dc963fSmrg 11449dc963fSmrg You can compile the package for more than one kind of computer at the 11549dc963fSmrgsame time, by placing the object files for each architecture in their 11649dc963fSmrgown directory. To do this, you can use GNU `make'. `cd' to the 11749dc963fSmrgdirectory where you want the object files and executables to go and run 11849dc963fSmrgthe `configure' script. `configure' automatically checks for the 11926372658Smrgsource code in the directory that `configure' is in and in `..'. This 12026372658Smrgis known as a "VPATH" build. 12149dc963fSmrg 12249dc963fSmrg With a non-GNU `make', it is safer to compile the package for one 12349dc963fSmrgarchitecture at a time in the source code directory. After you have 12449dc963fSmrginstalled the package for one architecture, use `make distclean' before 12549dc963fSmrgreconfiguring for another architecture. 12649dc963fSmrg 12749dc963fSmrg On MacOS X 10.5 and later systems, you can create libraries and 12849dc963fSmrgexecutables that work on multiple system types--known as "fat" or 12949dc963fSmrg"universal" binaries--by specifying multiple `-arch' options to the 13049dc963fSmrgcompiler but only a single `-arch' option to the preprocessor. Like 13149dc963fSmrgthis: 13249dc963fSmrg 13349dc963fSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13449dc963fSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13549dc963fSmrg CPP="gcc -E" CXXCPP="g++ -E" 13649dc963fSmrg 13749dc963fSmrg This is not guaranteed to produce working output in all cases, you 13849dc963fSmrgmay have to build one architecture at a time and combine the results 13949dc963fSmrgusing the `lipo' tool if you have problems. 14049dc963fSmrg 14149dc963fSmrgInstallation Names 14249dc963fSmrg================== 14349dc963fSmrg 14449dc963fSmrg By default, `make install' installs the package's commands under 14549dc963fSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 14649dc963fSmrgcan specify an installation prefix other than `/usr/local' by giving 14726372658Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 14826372658Smrgabsolute file name. 14949dc963fSmrg 15049dc963fSmrg You can specify separate installation prefixes for 15149dc963fSmrgarchitecture-specific files and architecture-independent files. If you 15249dc963fSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 15349dc963fSmrgPREFIX as the prefix for installing programs and libraries. 15449dc963fSmrgDocumentation and other data files still use the regular prefix. 15549dc963fSmrg 15649dc963fSmrg In addition, if you use an unusual directory layout you can give 15749dc963fSmrgoptions like `--bindir=DIR' to specify different values for particular 15849dc963fSmrgkinds of files. Run `configure --help' for a list of the directories 15926372658Smrgyou can set and what kinds of files go in them. In general, the 16026372658Smrgdefault for these options is expressed in terms of `${prefix}', so that 16126372658Smrgspecifying just `--prefix' will affect all of the other directory 16226372658Smrgspecifications that were not explicitly provided. 16326372658Smrg 16426372658Smrg The most portable way to affect installation locations is to pass the 16526372658Smrgcorrect locations to `configure'; however, many packages provide one or 16626372658Smrgboth of the following shortcuts of passing variable assignments to the 16726372658Smrg`make install' command line to change installation locations without 16826372658Smrghaving to reconfigure or recompile. 16926372658Smrg 17026372658Smrg The first method involves providing an override variable for each 17126372658Smrgaffected directory. For example, `make install 17226372658Smrgprefix=/alternate/directory' will choose an alternate location for all 17326372658Smrgdirectory configuration variables that were expressed in terms of 17426372658Smrg`${prefix}'. Any directories that were specified during `configure', 17526372658Smrgbut not in terms of `${prefix}', must each be overridden at install 17626372658Smrgtime for the entire installation to be relocated. The approach of 17726372658Smrgmakefile variable overrides for each directory variable is required by 17826372658Smrgthe GNU Coding Standards, and ideally causes no recompilation. 17926372658SmrgHowever, some platforms have known limitations with the semantics of 18026372658Smrgshared libraries that end up requiring recompilation when using this 18126372658Smrgmethod, particularly noticeable in packages that use GNU Libtool. 18226372658Smrg 18326372658Smrg The second method involves providing the `DESTDIR' variable. For 18426372658Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 18526372658Smrg`/alternate/directory' before all installation names. The approach of 18626372658Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 18726372658Smrgdoes not work on platforms that have drive letters. On the other hand, 18826372658Smrgit does better at avoiding recompilation issues, and works well even 18926372658Smrgwhen some directory options were not specified in terms of `${prefix}' 19026372658Smrgat `configure' time. 19126372658Smrg 19226372658SmrgOptional Features 19326372658Smrg================= 19449dc963fSmrg 19549dc963fSmrg If the package supports it, you can cause programs to be installed 19649dc963fSmrgwith an extra prefix or suffix on their names by giving `configure' the 19749dc963fSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 19849dc963fSmrg 19949dc963fSmrg Some packages pay attention to `--enable-FEATURE' options to 20049dc963fSmrg`configure', where FEATURE indicates an optional part of the package. 20149dc963fSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 20249dc963fSmrgis something like `gnu-as' or `x' (for the X Window System). The 20349dc963fSmrg`README' should mention any `--enable-' and `--with-' options that the 20449dc963fSmrgpackage recognizes. 20549dc963fSmrg 20649dc963fSmrg For packages that use the X Window System, `configure' can usually 20749dc963fSmrgfind the X include and library files automatically, but if it doesn't, 20849dc963fSmrgyou can use the `configure' options `--x-includes=DIR' and 20949dc963fSmrg`--x-libraries=DIR' to specify their locations. 21049dc963fSmrg 21126372658Smrg Some packages offer the ability to configure how verbose the 21226372658Smrgexecution of `make' will be. For these packages, running `./configure 21326372658Smrg--enable-silent-rules' sets the default to minimal output, which can be 21426372658Smrgoverridden with `make V=1'; while running `./configure 21526372658Smrg--disable-silent-rules' sets the default to verbose, which can be 21626372658Smrgoverridden with `make V=0'. 21726372658Smrg 21849dc963fSmrgParticular systems 21949dc963fSmrg================== 22049dc963fSmrg 22149dc963fSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 22249dc963fSmrgCC is not installed, it is recommended to use the following options in 22349dc963fSmrgorder to use an ANSI C compiler: 22449dc963fSmrg 22526372658Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 22649dc963fSmrg 22749dc963fSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 22849dc963fSmrg 22926372658Smrg HP-UX `make' updates targets which have the same time stamps as 23026372658Smrgtheir prerequisites, which makes it generally unusable when shipped 23126372658Smrggenerated files such as `configure' are involved. Use GNU `make' 23226372658Smrginstead. 23326372658Smrg 23449dc963fSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 23549dc963fSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 23649dc963fSmrga workaround. If GNU CC is not installed, it is therefore recommended 23749dc963fSmrgto try 23849dc963fSmrg 23949dc963fSmrg ./configure CC="cc" 24049dc963fSmrg 24149dc963fSmrgand if that doesn't work, try 24249dc963fSmrg 24349dc963fSmrg ./configure CC="cc -nodtk" 24449dc963fSmrg 24526372658Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 24626372658Smrgdirectory contains several dysfunctional programs; working variants of 24726372658Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 24826372658Smrgin your `PATH', put it _after_ `/usr/bin'. 24926372658Smrg 25026372658Smrg On Haiku, software installed for all users goes in `/boot/common', 25126372658Smrgnot `/usr/local'. It is recommended to use the following options: 25226372658Smrg 25326372658Smrg ./configure --prefix=/boot/common 25426372658Smrg 25549dc963fSmrgSpecifying the System Type 25649dc963fSmrg========================== 25749dc963fSmrg 25849dc963fSmrg There may be some features `configure' cannot figure out 25949dc963fSmrgautomatically, but needs to determine by the type of machine the package 26049dc963fSmrgwill run on. Usually, assuming the package is built to be run on the 26149dc963fSmrg_same_ architectures, `configure' can figure that out, but if it prints 26249dc963fSmrga message saying it cannot guess the machine type, give it the 26349dc963fSmrg`--build=TYPE' option. TYPE can either be a short name for the system 26449dc963fSmrgtype, such as `sun4', or a canonical name which has the form: 26549dc963fSmrg 26649dc963fSmrg CPU-COMPANY-SYSTEM 26749dc963fSmrg 26849dc963fSmrgwhere SYSTEM can have one of these forms: 26949dc963fSmrg 27026372658Smrg OS 27126372658Smrg KERNEL-OS 27249dc963fSmrg 27349dc963fSmrg See the file `config.sub' for the possible values of each field. If 27449dc963fSmrg`config.sub' isn't included in this package, then this package doesn't 27549dc963fSmrgneed to know the machine type. 27649dc963fSmrg 27749dc963fSmrg If you are _building_ compiler tools for cross-compiling, you should 27849dc963fSmrguse the option `--target=TYPE' to select the type of system they will 27949dc963fSmrgproduce code for. 28049dc963fSmrg 28149dc963fSmrg If you want to _use_ a cross compiler, that generates code for a 28249dc963fSmrgplatform different from the build platform, you should specify the 28349dc963fSmrg"host" platform (i.e., that on which the generated programs will 28449dc963fSmrgeventually be run) with `--host=TYPE'. 28549dc963fSmrg 28649dc963fSmrgSharing Defaults 28749dc963fSmrg================ 28849dc963fSmrg 28949dc963fSmrg If you want to set default values for `configure' scripts to share, 29049dc963fSmrgyou can create a site shell script called `config.site' that gives 29149dc963fSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 29249dc963fSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 29349dc963fSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 29449dc963fSmrg`CONFIG_SITE' environment variable to the location of the site script. 29549dc963fSmrgA warning: not all `configure' scripts look for a site script. 29649dc963fSmrg 29749dc963fSmrgDefining Variables 29849dc963fSmrg================== 29949dc963fSmrg 30049dc963fSmrg Variables not defined in a site shell script can be set in the 30149dc963fSmrgenvironment passed to `configure'. However, some packages may run 30249dc963fSmrgconfigure again during the build, and the customized values of these 30349dc963fSmrgvariables may be lost. In order to avoid this problem, you should set 30449dc963fSmrgthem in the `configure' command line, using `VAR=value'. For example: 30549dc963fSmrg 30649dc963fSmrg ./configure CC=/usr/local2/bin/gcc 30749dc963fSmrg 30849dc963fSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 30949dc963fSmrgoverridden in the site shell script). 31049dc963fSmrg 31149dc963fSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 31249dc963fSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 31349dc963fSmrg 31449dc963fSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 31549dc963fSmrg 31649dc963fSmrg`configure' Invocation 31749dc963fSmrg====================== 31849dc963fSmrg 31949dc963fSmrg `configure' recognizes the following options to control how it 32049dc963fSmrgoperates. 32149dc963fSmrg 32249dc963fSmrg`--help' 32349dc963fSmrg`-h' 32449dc963fSmrg Print a summary of all of the options to `configure', and exit. 32549dc963fSmrg 32649dc963fSmrg`--help=short' 32749dc963fSmrg`--help=recursive' 32849dc963fSmrg Print a summary of the options unique to this package's 32949dc963fSmrg `configure', and exit. The `short' variant lists options used 33049dc963fSmrg only in the top level, while the `recursive' variant lists options 33149dc963fSmrg also present in any nested packages. 33249dc963fSmrg 33349dc963fSmrg`--version' 33449dc963fSmrg`-V' 33549dc963fSmrg Print the version of Autoconf used to generate the `configure' 33649dc963fSmrg script, and exit. 33749dc963fSmrg 33849dc963fSmrg`--cache-file=FILE' 33949dc963fSmrg Enable the cache: use and save the results of the tests in FILE, 34049dc963fSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 34149dc963fSmrg disable caching. 34249dc963fSmrg 34349dc963fSmrg`--config-cache' 34449dc963fSmrg`-C' 34549dc963fSmrg Alias for `--cache-file=config.cache'. 34649dc963fSmrg 34749dc963fSmrg`--quiet' 34849dc963fSmrg`--silent' 34949dc963fSmrg`-q' 35049dc963fSmrg Do not print messages saying which checks are being made. To 35149dc963fSmrg suppress all normal output, redirect it to `/dev/null' (any error 35249dc963fSmrg messages will still be shown). 35349dc963fSmrg 35449dc963fSmrg`--srcdir=DIR' 35549dc963fSmrg Look for the package's source code in directory DIR. Usually 35649dc963fSmrg `configure' can determine that directory automatically. 35749dc963fSmrg 35849dc963fSmrg`--prefix=DIR' 35926372658Smrg Use DIR as the installation prefix. *note Installation Names:: 36049dc963fSmrg for more details, including other options available for fine-tuning 36149dc963fSmrg the installation locations. 36249dc963fSmrg 36349dc963fSmrg`--no-create' 36449dc963fSmrg`-n' 36549dc963fSmrg Run the configure checks, but stop before creating any output 36649dc963fSmrg files. 36749dc963fSmrg 36849dc963fSmrg`configure' also accepts some other, not widely useful, options. Run 36949dc963fSmrg`configure --help' for more details. 3704b0ead49Smrg 371