165d490d0SmrgInstallation Instructions 265d490d0Smrg************************* 365d490d0Smrg 4bd2ed648SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5bd2ed648SmrgInc. 665d490d0Smrg 7bd2ed648Smrg Copying and distribution of this file, with or without modification, 8bd2ed648Smrgare permitted in any medium without royalty provided the copyright 9bd2ed648Smrgnotice and this notice are preserved. This file is offered as-is, 10bd2ed648Smrgwithout warranty of any kind. 1165d490d0Smrg 1265d490d0SmrgBasic Installation 1365d490d0Smrg================== 1465d490d0Smrg 1565d490d0Smrg Briefly, the shell commands `./configure; make; make install' should 1665d490d0Smrgconfigure, build, and install this package. The following 1765d490d0Smrgmore-detailed instructions are generic; see the `README' file for 18bd2ed648Smrginstructions specific to this package. Some packages provide this 19bd2ed648Smrg`INSTALL' file but do not implement all of the features documented 20bd2ed648Smrgbelow. The lack of an optional feature in a given package is not 21bd2ed648Smrgnecessarily a bug. More recommendations for GNU packages can be found 22bd2ed648Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 2365d490d0Smrg 2465d490d0Smrg The `configure' shell script attempts to guess correct values for 2565d490d0Smrgvarious system-dependent variables used during compilation. It uses 2665d490d0Smrgthose values to create a `Makefile' in each directory of the package. 2765d490d0SmrgIt may also create one or more `.h' files containing system-dependent 2865d490d0Smrgdefinitions. Finally, it creates a shell script `config.status' that 2965d490d0Smrgyou can run in the future to recreate the current configuration, and a 3065d490d0Smrgfile `config.log' containing compiler output (useful mainly for 3165d490d0Smrgdebugging `configure'). 3265d490d0Smrg 3365d490d0Smrg It can also use an optional file (typically called `config.cache' 3465d490d0Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 3565d490d0Smrgthe results of its tests to speed up reconfiguring. Caching is 3665d490d0Smrgdisabled by default to prevent problems with accidental use of stale 3765d490d0Smrgcache files. 3865d490d0Smrg 3965d490d0Smrg If you need to do unusual things to compile the package, please try 4065d490d0Smrgto figure out how `configure' could check whether to do them, and mail 4165d490d0Smrgdiffs or instructions to the address given in the `README' so they can 4265d490d0Smrgbe considered for the next release. If you are using the cache, and at 4365d490d0Smrgsome point `config.cache' contains results you don't want to keep, you 4465d490d0Smrgmay remove or edit it. 4565d490d0Smrg 4665d490d0Smrg The file `configure.ac' (or `configure.in') is used to create 4765d490d0Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 4865d490d0Smrgyou want to change it or regenerate `configure' using a newer version 4965d490d0Smrgof `autoconf'. 5065d490d0Smrg 51bd2ed648Smrg The simplest way to compile this package is: 5265d490d0Smrg 5365d490d0Smrg 1. `cd' to the directory containing the package's source code and type 5465d490d0Smrg `./configure' to configure the package for your system. 5565d490d0Smrg 5665d490d0Smrg Running `configure' might take a while. While running, it prints 5765d490d0Smrg some messages telling which features it is checking for. 5865d490d0Smrg 5965d490d0Smrg 2. Type `make' to compile the package. 6065d490d0Smrg 6165d490d0Smrg 3. Optionally, type `make check' to run any self-tests that come with 62bd2ed648Smrg the package, generally using the just-built uninstalled binaries. 6365d490d0Smrg 6465d490d0Smrg 4. Type `make install' to install the programs and any data files and 65bd2ed648Smrg documentation. When installing into a prefix owned by root, it is 66bd2ed648Smrg recommended that the package be configured and built as a regular 67bd2ed648Smrg user, and only the `make install' phase executed with root 68bd2ed648Smrg privileges. 69bd2ed648Smrg 70bd2ed648Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71bd2ed648Smrg this time using the binaries in their final installed location. 72bd2ed648Smrg This target does not install anything. Running this target as a 73bd2ed648Smrg regular user, particularly if the prior `make install' required 74bd2ed648Smrg root privileges, verifies that the installation completed 75bd2ed648Smrg correctly. 76bd2ed648Smrg 77bd2ed648Smrg 6. You can remove the program binaries and object files from the 7865d490d0Smrg source code directory by typing `make clean'. To also remove the 7965d490d0Smrg files that `configure' created (so you can compile the package for 8065d490d0Smrg a different kind of computer), type `make distclean'. There is 8165d490d0Smrg also a `make maintainer-clean' target, but that is intended mainly 8265d490d0Smrg for the package's developers. If you use it, you may have to get 8365d490d0Smrg all sorts of other programs in order to regenerate files that came 8465d490d0Smrg with the distribution. 8565d490d0Smrg 86bd2ed648Smrg 7. Often, you can also type `make uninstall' to remove the installed 87bd2ed648Smrg files again. In practice, not all packages have tested that 88bd2ed648Smrg uninstallation works correctly, even though it is required by the 89bd2ed648Smrg GNU Coding Standards. 90bd2ed648Smrg 91bd2ed648Smrg 8. Some packages, particularly those that use Automake, provide `make 92bd2ed648Smrg distcheck', which can by used by developers to test that all other 93bd2ed648Smrg targets like `make install' and `make uninstall' work correctly. 94bd2ed648Smrg This target is generally not run by end users. 9565d490d0Smrg 9665d490d0SmrgCompilers and Options 9765d490d0Smrg===================== 9865d490d0Smrg 9965d490d0Smrg Some systems require unusual options for compilation or linking that 10065d490d0Smrgthe `configure' script does not know about. Run `./configure --help' 10165d490d0Smrgfor details on some of the pertinent environment variables. 10265d490d0Smrg 10365d490d0Smrg You can give `configure' initial values for configuration parameters 10465d490d0Smrgby setting variables in the command line or in the environment. Here 10565d490d0Smrgis an example: 10665d490d0Smrg 10765d490d0Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 10865d490d0Smrg 10965d490d0Smrg *Note Defining Variables::, for more details. 11065d490d0Smrg 11165d490d0SmrgCompiling For Multiple Architectures 11265d490d0Smrg==================================== 11365d490d0Smrg 11465d490d0Smrg You can compile the package for more than one kind of computer at the 11565d490d0Smrgsame time, by placing the object files for each architecture in their 11665d490d0Smrgown directory. To do this, you can use GNU `make'. `cd' to the 11765d490d0Smrgdirectory where you want the object files and executables to go and run 11865d490d0Smrgthe `configure' script. `configure' automatically checks for the 119bd2ed648Smrgsource code in the directory that `configure' is in and in `..'. This 120bd2ed648Smrgis known as a "VPATH" build. 12165d490d0Smrg 12265d490d0Smrg With a non-GNU `make', it is safer to compile the package for one 12365d490d0Smrgarchitecture at a time in the source code directory. After you have 12465d490d0Smrginstalled the package for one architecture, use `make distclean' before 12565d490d0Smrgreconfiguring for another architecture. 12665d490d0Smrg 12765d490d0Smrg On MacOS X 10.5 and later systems, you can create libraries and 12865d490d0Smrgexecutables that work on multiple system types--known as "fat" or 12965d490d0Smrg"universal" binaries--by specifying multiple `-arch' options to the 13065d490d0Smrgcompiler but only a single `-arch' option to the preprocessor. Like 13165d490d0Smrgthis: 13265d490d0Smrg 13365d490d0Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13465d490d0Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13565d490d0Smrg CPP="gcc -E" CXXCPP="g++ -E" 13665d490d0Smrg 13765d490d0Smrg This is not guaranteed to produce working output in all cases, you 13865d490d0Smrgmay have to build one architecture at a time and combine the results 13965d490d0Smrgusing the `lipo' tool if you have problems. 14065d490d0Smrg 14165d490d0SmrgInstallation Names 14265d490d0Smrg================== 14365d490d0Smrg 14465d490d0Smrg By default, `make install' installs the package's commands under 14565d490d0Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 14665d490d0Smrgcan specify an installation prefix other than `/usr/local' by giving 147bd2ed648Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148bd2ed648Smrgabsolute file name. 14965d490d0Smrg 15065d490d0Smrg You can specify separate installation prefixes for 15165d490d0Smrgarchitecture-specific files and architecture-independent files. If you 15265d490d0Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 15365d490d0SmrgPREFIX as the prefix for installing programs and libraries. 15465d490d0SmrgDocumentation and other data files still use the regular prefix. 15565d490d0Smrg 15665d490d0Smrg In addition, if you use an unusual directory layout you can give 15765d490d0Smrgoptions like `--bindir=DIR' to specify different values for particular 15865d490d0Smrgkinds of files. Run `configure --help' for a list of the directories 159bd2ed648Smrgyou can set and what kinds of files go in them. In general, the 160bd2ed648Smrgdefault for these options is expressed in terms of `${prefix}', so that 161bd2ed648Smrgspecifying just `--prefix' will affect all of the other directory 162bd2ed648Smrgspecifications that were not explicitly provided. 163bd2ed648Smrg 164bd2ed648Smrg The most portable way to affect installation locations is to pass the 165bd2ed648Smrgcorrect locations to `configure'; however, many packages provide one or 166bd2ed648Smrgboth of the following shortcuts of passing variable assignments to the 167bd2ed648Smrg`make install' command line to change installation locations without 168bd2ed648Smrghaving to reconfigure or recompile. 169bd2ed648Smrg 170bd2ed648Smrg The first method involves providing an override variable for each 171bd2ed648Smrgaffected directory. For example, `make install 172bd2ed648Smrgprefix=/alternate/directory' will choose an alternate location for all 173bd2ed648Smrgdirectory configuration variables that were expressed in terms of 174bd2ed648Smrg`${prefix}'. Any directories that were specified during `configure', 175bd2ed648Smrgbut not in terms of `${prefix}', must each be overridden at install 176bd2ed648Smrgtime for the entire installation to be relocated. The approach of 177bd2ed648Smrgmakefile variable overrides for each directory variable is required by 178bd2ed648Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179bd2ed648SmrgHowever, some platforms have known limitations with the semantics of 180bd2ed648Smrgshared libraries that end up requiring recompilation when using this 181bd2ed648Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182bd2ed648Smrg 183bd2ed648Smrg The second method involves providing the `DESTDIR' variable. For 184bd2ed648Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185bd2ed648Smrg`/alternate/directory' before all installation names. The approach of 186bd2ed648Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187bd2ed648Smrgdoes not work on platforms that have drive letters. On the other hand, 188bd2ed648Smrgit does better at avoiding recompilation issues, and works well even 189bd2ed648Smrgwhen some directory options were not specified in terms of `${prefix}' 190bd2ed648Smrgat `configure' time. 191bd2ed648Smrg 192bd2ed648SmrgOptional Features 193bd2ed648Smrg================= 19465d490d0Smrg 19565d490d0Smrg If the package supports it, you can cause programs to be installed 19665d490d0Smrgwith an extra prefix or suffix on their names by giving `configure' the 19765d490d0Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 19865d490d0Smrg 19965d490d0Smrg Some packages pay attention to `--enable-FEATURE' options to 20065d490d0Smrg`configure', where FEATURE indicates an optional part of the package. 20165d490d0SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 20265d490d0Smrgis something like `gnu-as' or `x' (for the X Window System). The 20365d490d0Smrg`README' should mention any `--enable-' and `--with-' options that the 20465d490d0Smrgpackage recognizes. 20565d490d0Smrg 20665d490d0Smrg For packages that use the X Window System, `configure' can usually 20765d490d0Smrgfind the X include and library files automatically, but if it doesn't, 20865d490d0Smrgyou can use the `configure' options `--x-includes=DIR' and 20965d490d0Smrg`--x-libraries=DIR' to specify their locations. 21065d490d0Smrg 211bd2ed648Smrg Some packages offer the ability to configure how verbose the 212bd2ed648Smrgexecution of `make' will be. For these packages, running `./configure 213bd2ed648Smrg--enable-silent-rules' sets the default to minimal output, which can be 214bd2ed648Smrgoverridden with `make V=1'; while running `./configure 215bd2ed648Smrg--disable-silent-rules' sets the default to verbose, which can be 216bd2ed648Smrgoverridden with `make V=0'. 217bd2ed648Smrg 21865d490d0SmrgParticular systems 21965d490d0Smrg================== 22065d490d0Smrg 22165d490d0Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 22265d490d0SmrgCC is not installed, it is recommended to use the following options in 22365d490d0Smrgorder to use an ANSI C compiler: 22465d490d0Smrg 225bd2ed648Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 22665d490d0Smrg 22765d490d0Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 22865d490d0Smrg 229bd2ed648Smrg HP-UX `make' updates targets which have the same time stamps as 230bd2ed648Smrgtheir prerequisites, which makes it generally unusable when shipped 231bd2ed648Smrggenerated files such as `configure' are involved. Use GNU `make' 232bd2ed648Smrginstead. 233bd2ed648Smrg 23465d490d0Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 23565d490d0Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 23665d490d0Smrga workaround. If GNU CC is not installed, it is therefore recommended 23765d490d0Smrgto try 23865d490d0Smrg 23965d490d0Smrg ./configure CC="cc" 24065d490d0Smrg 24165d490d0Smrgand if that doesn't work, try 24265d490d0Smrg 24365d490d0Smrg ./configure CC="cc -nodtk" 24465d490d0Smrg 245bd2ed648Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246bd2ed648Smrgdirectory contains several dysfunctional programs; working variants of 247bd2ed648Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248bd2ed648Smrgin your `PATH', put it _after_ `/usr/bin'. 249bd2ed648Smrg 250bd2ed648Smrg On Haiku, software installed for all users goes in `/boot/common', 251bd2ed648Smrgnot `/usr/local'. It is recommended to use the following options: 252bd2ed648Smrg 253bd2ed648Smrg ./configure --prefix=/boot/common 254bd2ed648Smrg 25565d490d0SmrgSpecifying the System Type 25665d490d0Smrg========================== 25765d490d0Smrg 25865d490d0Smrg There may be some features `configure' cannot figure out 25965d490d0Smrgautomatically, but needs to determine by the type of machine the package 26065d490d0Smrgwill run on. Usually, assuming the package is built to be run on the 26165d490d0Smrg_same_ architectures, `configure' can figure that out, but if it prints 26265d490d0Smrga message saying it cannot guess the machine type, give it the 26365d490d0Smrg`--build=TYPE' option. TYPE can either be a short name for the system 26465d490d0Smrgtype, such as `sun4', or a canonical name which has the form: 26565d490d0Smrg 26665d490d0Smrg CPU-COMPANY-SYSTEM 26765d490d0Smrg 26865d490d0Smrgwhere SYSTEM can have one of these forms: 26965d490d0Smrg 270bd2ed648Smrg OS 271bd2ed648Smrg KERNEL-OS 27265d490d0Smrg 27365d490d0Smrg See the file `config.sub' for the possible values of each field. If 27465d490d0Smrg`config.sub' isn't included in this package, then this package doesn't 27565d490d0Smrgneed to know the machine type. 27665d490d0Smrg 27765d490d0Smrg If you are _building_ compiler tools for cross-compiling, you should 27865d490d0Smrguse the option `--target=TYPE' to select the type of system they will 27965d490d0Smrgproduce code for. 28065d490d0Smrg 28165d490d0Smrg If you want to _use_ a cross compiler, that generates code for a 28265d490d0Smrgplatform different from the build platform, you should specify the 28365d490d0Smrg"host" platform (i.e., that on which the generated programs will 28465d490d0Smrgeventually be run) with `--host=TYPE'. 28565d490d0Smrg 28665d490d0SmrgSharing Defaults 28765d490d0Smrg================ 28865d490d0Smrg 28965d490d0Smrg If you want to set default values for `configure' scripts to share, 29065d490d0Smrgyou can create a site shell script called `config.site' that gives 29165d490d0Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 29265d490d0Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 29365d490d0Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 29465d490d0Smrg`CONFIG_SITE' environment variable to the location of the site script. 29565d490d0SmrgA warning: not all `configure' scripts look for a site script. 29665d490d0Smrg 29765d490d0SmrgDefining Variables 29865d490d0Smrg================== 29965d490d0Smrg 30065d490d0Smrg Variables not defined in a site shell script can be set in the 30165d490d0Smrgenvironment passed to `configure'. However, some packages may run 30265d490d0Smrgconfigure again during the build, and the customized values of these 30365d490d0Smrgvariables may be lost. In order to avoid this problem, you should set 30465d490d0Smrgthem in the `configure' command line, using `VAR=value'. For example: 30565d490d0Smrg 30665d490d0Smrg ./configure CC=/usr/local2/bin/gcc 30765d490d0Smrg 30865d490d0Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 30965d490d0Smrgoverridden in the site shell script). 31065d490d0Smrg 31165d490d0SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 31265d490d0Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 31365d490d0Smrg 31465d490d0Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 31565d490d0Smrg 31665d490d0Smrg`configure' Invocation 31765d490d0Smrg====================== 31865d490d0Smrg 31965d490d0Smrg `configure' recognizes the following options to control how it 32065d490d0Smrgoperates. 32165d490d0Smrg 32265d490d0Smrg`--help' 32365d490d0Smrg`-h' 32465d490d0Smrg Print a summary of all of the options to `configure', and exit. 32565d490d0Smrg 32665d490d0Smrg`--help=short' 32765d490d0Smrg`--help=recursive' 32865d490d0Smrg Print a summary of the options unique to this package's 32965d490d0Smrg `configure', and exit. The `short' variant lists options used 33065d490d0Smrg only in the top level, while the `recursive' variant lists options 33165d490d0Smrg also present in any nested packages. 33265d490d0Smrg 33365d490d0Smrg`--version' 33465d490d0Smrg`-V' 33565d490d0Smrg Print the version of Autoconf used to generate the `configure' 33665d490d0Smrg script, and exit. 33765d490d0Smrg 33865d490d0Smrg`--cache-file=FILE' 33965d490d0Smrg Enable the cache: use and save the results of the tests in FILE, 34065d490d0Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 34165d490d0Smrg disable caching. 34265d490d0Smrg 34365d490d0Smrg`--config-cache' 34465d490d0Smrg`-C' 34565d490d0Smrg Alias for `--cache-file=config.cache'. 34665d490d0Smrg 34765d490d0Smrg`--quiet' 34865d490d0Smrg`--silent' 34965d490d0Smrg`-q' 35065d490d0Smrg Do not print messages saying which checks are being made. To 35165d490d0Smrg suppress all normal output, redirect it to `/dev/null' (any error 35265d490d0Smrg messages will still be shown). 35365d490d0Smrg 35465d490d0Smrg`--srcdir=DIR' 35565d490d0Smrg Look for the package's source code in directory DIR. Usually 35665d490d0Smrg `configure' can determine that directory automatically. 35765d490d0Smrg 35865d490d0Smrg`--prefix=DIR' 359bd2ed648Smrg Use DIR as the installation prefix. *note Installation Names:: 36065d490d0Smrg for more details, including other options available for fine-tuning 36165d490d0Smrg the installation locations. 36265d490d0Smrg 36365d490d0Smrg`--no-create' 36465d490d0Smrg`-n' 36565d490d0Smrg Run the configure checks, but stop before creating any output 36665d490d0Smrg files. 36765d490d0Smrg 36865d490d0Smrg`configure' also accepts some other, not widely useful, options. Run 36965d490d0Smrg`configure --help' for more details. 37065d490d0Smrg 371