155074dd0SmrgInstallation Instructions 255074dd0Smrg************************* 355074dd0Smrg 4054b3d00SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5054b3d00SmrgInc. 655074dd0Smrg 7054b3d00Smrg Copying and distribution of this file, with or without modification, 8054b3d00Smrgare permitted in any medium without royalty provided the copyright 9054b3d00Smrgnotice and this notice are preserved. This file is offered as-is, 10054b3d00Smrgwithout warranty of any kind. 1155074dd0Smrg 1255074dd0SmrgBasic Installation 1355074dd0Smrg================== 1455074dd0Smrg 1555074dd0Smrg Briefly, the shell commands `./configure; make; make install' should 1655074dd0Smrgconfigure, build, and install this package. The following 1755074dd0Smrgmore-detailed instructions are generic; see the `README' file for 18054b3d00Smrginstructions specific to this package. Some packages provide this 19054b3d00Smrg`INSTALL' file but do not implement all of the features documented 20054b3d00Smrgbelow. The lack of an optional feature in a given package is not 21054b3d00Smrgnecessarily a bug. More recommendations for GNU packages can be found 22054b3d00Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 2355074dd0Smrg 2455074dd0Smrg The `configure' shell script attempts to guess correct values for 2555074dd0Smrgvarious system-dependent variables used during compilation. It uses 2655074dd0Smrgthose values to create a `Makefile' in each directory of the package. 2755074dd0SmrgIt may also create one or more `.h' files containing system-dependent 2855074dd0Smrgdefinitions. Finally, it creates a shell script `config.status' that 2955074dd0Smrgyou can run in the future to recreate the current configuration, and a 3055074dd0Smrgfile `config.log' containing compiler output (useful mainly for 3155074dd0Smrgdebugging `configure'). 3255074dd0Smrg 3355074dd0Smrg It can also use an optional file (typically called `config.cache' 3455074dd0Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 3555074dd0Smrgthe results of its tests to speed up reconfiguring. Caching is 3655074dd0Smrgdisabled by default to prevent problems with accidental use of stale 3755074dd0Smrgcache files. 3855074dd0Smrg 3955074dd0Smrg If you need to do unusual things to compile the package, please try 4055074dd0Smrgto figure out how `configure' could check whether to do them, and mail 4155074dd0Smrgdiffs or instructions to the address given in the `README' so they can 4255074dd0Smrgbe considered for the next release. If you are using the cache, and at 4355074dd0Smrgsome point `config.cache' contains results you don't want to keep, you 4455074dd0Smrgmay remove or edit it. 4555074dd0Smrg 4655074dd0Smrg The file `configure.ac' (or `configure.in') is used to create 4755074dd0Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 4855074dd0Smrgyou want to change it or regenerate `configure' using a newer version 4955074dd0Smrgof `autoconf'. 5055074dd0Smrg 51054b3d00Smrg The simplest way to compile this package is: 5255074dd0Smrg 5355074dd0Smrg 1. `cd' to the directory containing the package's source code and type 5455074dd0Smrg `./configure' to configure the package for your system. 5555074dd0Smrg 5655074dd0Smrg Running `configure' might take a while. While running, it prints 5755074dd0Smrg some messages telling which features it is checking for. 5855074dd0Smrg 5955074dd0Smrg 2. Type `make' to compile the package. 6055074dd0Smrg 6155074dd0Smrg 3. Optionally, type `make check' to run any self-tests that come with 62054b3d00Smrg the package, generally using the just-built uninstalled binaries. 6355074dd0Smrg 6455074dd0Smrg 4. Type `make install' to install the programs and any data files and 65054b3d00Smrg documentation. When installing into a prefix owned by root, it is 66054b3d00Smrg recommended that the package be configured and built as a regular 67054b3d00Smrg user, and only the `make install' phase executed with root 68054b3d00Smrg privileges. 69054b3d00Smrg 70054b3d00Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71054b3d00Smrg this time using the binaries in their final installed location. 72054b3d00Smrg This target does not install anything. Running this target as a 73054b3d00Smrg regular user, particularly if the prior `make install' required 74054b3d00Smrg root privileges, verifies that the installation completed 75054b3d00Smrg correctly. 76054b3d00Smrg 77054b3d00Smrg 6. You can remove the program binaries and object files from the 7855074dd0Smrg source code directory by typing `make clean'. To also remove the 7955074dd0Smrg files that `configure' created (so you can compile the package for 8055074dd0Smrg a different kind of computer), type `make distclean'. There is 8155074dd0Smrg also a `make maintainer-clean' target, but that is intended mainly 8255074dd0Smrg for the package's developers. If you use it, you may have to get 8355074dd0Smrg all sorts of other programs in order to regenerate files that came 8455074dd0Smrg with the distribution. 8555074dd0Smrg 86054b3d00Smrg 7. Often, you can also type `make uninstall' to remove the installed 87054b3d00Smrg files again. In practice, not all packages have tested that 88054b3d00Smrg uninstallation works correctly, even though it is required by the 89054b3d00Smrg GNU Coding Standards. 90054b3d00Smrg 91054b3d00Smrg 8. Some packages, particularly those that use Automake, provide `make 92054b3d00Smrg distcheck', which can by used by developers to test that all other 93054b3d00Smrg targets like `make install' and `make uninstall' work correctly. 94054b3d00Smrg This target is generally not run by end users. 9555074dd0Smrg 9655074dd0SmrgCompilers and Options 9755074dd0Smrg===================== 9855074dd0Smrg 9955074dd0Smrg Some systems require unusual options for compilation or linking that 10055074dd0Smrgthe `configure' script does not know about. Run `./configure --help' 10155074dd0Smrgfor details on some of the pertinent environment variables. 10255074dd0Smrg 10355074dd0Smrg You can give `configure' initial values for configuration parameters 10455074dd0Smrgby setting variables in the command line or in the environment. Here 10555074dd0Smrgis an example: 10655074dd0Smrg 10755074dd0Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 10855074dd0Smrg 10955074dd0Smrg *Note Defining Variables::, for more details. 11055074dd0Smrg 11155074dd0SmrgCompiling For Multiple Architectures 11255074dd0Smrg==================================== 11355074dd0Smrg 11455074dd0Smrg You can compile the package for more than one kind of computer at the 11555074dd0Smrgsame time, by placing the object files for each architecture in their 11655074dd0Smrgown directory. To do this, you can use GNU `make'. `cd' to the 11755074dd0Smrgdirectory where you want the object files and executables to go and run 11855074dd0Smrgthe `configure' script. `configure' automatically checks for the 119054b3d00Smrgsource code in the directory that `configure' is in and in `..'. This 120054b3d00Smrgis known as a "VPATH" build. 12155074dd0Smrg 12255074dd0Smrg With a non-GNU `make', it is safer to compile the package for one 12355074dd0Smrgarchitecture at a time in the source code directory. After you have 12455074dd0Smrginstalled the package for one architecture, use `make distclean' before 12555074dd0Smrgreconfiguring for another architecture. 12655074dd0Smrg 12755074dd0Smrg On MacOS X 10.5 and later systems, you can create libraries and 12855074dd0Smrgexecutables that work on multiple system types--known as "fat" or 12955074dd0Smrg"universal" binaries--by specifying multiple `-arch' options to the 13055074dd0Smrgcompiler but only a single `-arch' option to the preprocessor. Like 13155074dd0Smrgthis: 13255074dd0Smrg 13355074dd0Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13455074dd0Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13555074dd0Smrg CPP="gcc -E" CXXCPP="g++ -E" 13655074dd0Smrg 13755074dd0Smrg This is not guaranteed to produce working output in all cases, you 13855074dd0Smrgmay have to build one architecture at a time and combine the results 13955074dd0Smrgusing the `lipo' tool if you have problems. 14055074dd0Smrg 14155074dd0SmrgInstallation Names 14255074dd0Smrg================== 14355074dd0Smrg 14455074dd0Smrg By default, `make install' installs the package's commands under 14555074dd0Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 14655074dd0Smrgcan specify an installation prefix other than `/usr/local' by giving 147054b3d00Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148054b3d00Smrgabsolute file name. 14955074dd0Smrg 15055074dd0Smrg You can specify separate installation prefixes for 15155074dd0Smrgarchitecture-specific files and architecture-independent files. If you 15255074dd0Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 15355074dd0SmrgPREFIX as the prefix for installing programs and libraries. 15455074dd0SmrgDocumentation and other data files still use the regular prefix. 15555074dd0Smrg 15655074dd0Smrg In addition, if you use an unusual directory layout you can give 15755074dd0Smrgoptions like `--bindir=DIR' to specify different values for particular 15855074dd0Smrgkinds of files. Run `configure --help' for a list of the directories 159054b3d00Smrgyou can set and what kinds of files go in them. In general, the 160054b3d00Smrgdefault for these options is expressed in terms of `${prefix}', so that 161054b3d00Smrgspecifying just `--prefix' will affect all of the other directory 162054b3d00Smrgspecifications that were not explicitly provided. 163054b3d00Smrg 164054b3d00Smrg The most portable way to affect installation locations is to pass the 165054b3d00Smrgcorrect locations to `configure'; however, many packages provide one or 166054b3d00Smrgboth of the following shortcuts of passing variable assignments to the 167054b3d00Smrg`make install' command line to change installation locations without 168054b3d00Smrghaving to reconfigure or recompile. 169054b3d00Smrg 170054b3d00Smrg The first method involves providing an override variable for each 171054b3d00Smrgaffected directory. For example, `make install 172054b3d00Smrgprefix=/alternate/directory' will choose an alternate location for all 173054b3d00Smrgdirectory configuration variables that were expressed in terms of 174054b3d00Smrg`${prefix}'. Any directories that were specified during `configure', 175054b3d00Smrgbut not in terms of `${prefix}', must each be overridden at install 176054b3d00Smrgtime for the entire installation to be relocated. The approach of 177054b3d00Smrgmakefile variable overrides for each directory variable is required by 178054b3d00Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179054b3d00SmrgHowever, some platforms have known limitations with the semantics of 180054b3d00Smrgshared libraries that end up requiring recompilation when using this 181054b3d00Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182054b3d00Smrg 183054b3d00Smrg The second method involves providing the `DESTDIR' variable. For 184054b3d00Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185054b3d00Smrg`/alternate/directory' before all installation names. The approach of 186054b3d00Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187054b3d00Smrgdoes not work on platforms that have drive letters. On the other hand, 188054b3d00Smrgit does better at avoiding recompilation issues, and works well even 189054b3d00Smrgwhen some directory options were not specified in terms of `${prefix}' 190054b3d00Smrgat `configure' time. 191054b3d00Smrg 192054b3d00SmrgOptional Features 193054b3d00Smrg================= 19455074dd0Smrg 19555074dd0Smrg If the package supports it, you can cause programs to be installed 19655074dd0Smrgwith an extra prefix or suffix on their names by giving `configure' the 19755074dd0Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 19855074dd0Smrg 19955074dd0Smrg Some packages pay attention to `--enable-FEATURE' options to 20055074dd0Smrg`configure', where FEATURE indicates an optional part of the package. 20155074dd0SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 20255074dd0Smrgis something like `gnu-as' or `x' (for the X Window System). The 20355074dd0Smrg`README' should mention any `--enable-' and `--with-' options that the 20455074dd0Smrgpackage recognizes. 20555074dd0Smrg 20655074dd0Smrg For packages that use the X Window System, `configure' can usually 20755074dd0Smrgfind the X include and library files automatically, but if it doesn't, 20855074dd0Smrgyou can use the `configure' options `--x-includes=DIR' and 20955074dd0Smrg`--x-libraries=DIR' to specify their locations. 21055074dd0Smrg 211054b3d00Smrg Some packages offer the ability to configure how verbose the 212054b3d00Smrgexecution of `make' will be. For these packages, running `./configure 213054b3d00Smrg--enable-silent-rules' sets the default to minimal output, which can be 214054b3d00Smrgoverridden with `make V=1'; while running `./configure 215054b3d00Smrg--disable-silent-rules' sets the default to verbose, which can be 216054b3d00Smrgoverridden with `make V=0'. 217054b3d00Smrg 21855074dd0SmrgParticular systems 21955074dd0Smrg================== 22055074dd0Smrg 22155074dd0Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 22255074dd0SmrgCC is not installed, it is recommended to use the following options in 22355074dd0Smrgorder to use an ANSI C compiler: 22455074dd0Smrg 225054b3d00Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 22655074dd0Smrg 22755074dd0Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 22855074dd0Smrg 229054b3d00Smrg HP-UX `make' updates targets which have the same time stamps as 230054b3d00Smrgtheir prerequisites, which makes it generally unusable when shipped 231054b3d00Smrggenerated files such as `configure' are involved. Use GNU `make' 232054b3d00Smrginstead. 233054b3d00Smrg 23455074dd0Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 23555074dd0Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 23655074dd0Smrga workaround. If GNU CC is not installed, it is therefore recommended 23755074dd0Smrgto try 23855074dd0Smrg 23955074dd0Smrg ./configure CC="cc" 24055074dd0Smrg 24155074dd0Smrgand if that doesn't work, try 24255074dd0Smrg 24355074dd0Smrg ./configure CC="cc -nodtk" 24455074dd0Smrg 245054b3d00Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246054b3d00Smrgdirectory contains several dysfunctional programs; working variants of 247054b3d00Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248054b3d00Smrgin your `PATH', put it _after_ `/usr/bin'. 249054b3d00Smrg 250054b3d00Smrg On Haiku, software installed for all users goes in `/boot/common', 251054b3d00Smrgnot `/usr/local'. It is recommended to use the following options: 252054b3d00Smrg 253054b3d00Smrg ./configure --prefix=/boot/common 254054b3d00Smrg 25555074dd0SmrgSpecifying the System Type 25655074dd0Smrg========================== 25755074dd0Smrg 25855074dd0Smrg There may be some features `configure' cannot figure out 25955074dd0Smrgautomatically, but needs to determine by the type of machine the package 26055074dd0Smrgwill run on. Usually, assuming the package is built to be run on the 26155074dd0Smrg_same_ architectures, `configure' can figure that out, but if it prints 26255074dd0Smrga message saying it cannot guess the machine type, give it the 26355074dd0Smrg`--build=TYPE' option. TYPE can either be a short name for the system 26455074dd0Smrgtype, such as `sun4', or a canonical name which has the form: 26555074dd0Smrg 26655074dd0Smrg CPU-COMPANY-SYSTEM 26755074dd0Smrg 26855074dd0Smrgwhere SYSTEM can have one of these forms: 26955074dd0Smrg 270054b3d00Smrg OS 271054b3d00Smrg KERNEL-OS 27255074dd0Smrg 27355074dd0Smrg See the file `config.sub' for the possible values of each field. If 27455074dd0Smrg`config.sub' isn't included in this package, then this package doesn't 27555074dd0Smrgneed to know the machine type. 27655074dd0Smrg 27755074dd0Smrg If you are _building_ compiler tools for cross-compiling, you should 27855074dd0Smrguse the option `--target=TYPE' to select the type of system they will 27955074dd0Smrgproduce code for. 28055074dd0Smrg 28155074dd0Smrg If you want to _use_ a cross compiler, that generates code for a 28255074dd0Smrgplatform different from the build platform, you should specify the 28355074dd0Smrg"host" platform (i.e., that on which the generated programs will 28455074dd0Smrgeventually be run) with `--host=TYPE'. 28555074dd0Smrg 28655074dd0SmrgSharing Defaults 28755074dd0Smrg================ 28855074dd0Smrg 28955074dd0Smrg If you want to set default values for `configure' scripts to share, 29055074dd0Smrgyou can create a site shell script called `config.site' that gives 29155074dd0Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 29255074dd0Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 29355074dd0Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 29455074dd0Smrg`CONFIG_SITE' environment variable to the location of the site script. 29555074dd0SmrgA warning: not all `configure' scripts look for a site script. 29655074dd0Smrg 29755074dd0SmrgDefining Variables 29855074dd0Smrg================== 29955074dd0Smrg 30055074dd0Smrg Variables not defined in a site shell script can be set in the 30155074dd0Smrgenvironment passed to `configure'. However, some packages may run 30255074dd0Smrgconfigure again during the build, and the customized values of these 30355074dd0Smrgvariables may be lost. In order to avoid this problem, you should set 30455074dd0Smrgthem in the `configure' command line, using `VAR=value'. For example: 30555074dd0Smrg 30655074dd0Smrg ./configure CC=/usr/local2/bin/gcc 30755074dd0Smrg 30855074dd0Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 30955074dd0Smrgoverridden in the site shell script). 31055074dd0Smrg 31155074dd0SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 31255074dd0Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 31355074dd0Smrg 31455074dd0Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 31555074dd0Smrg 31655074dd0Smrg`configure' Invocation 31755074dd0Smrg====================== 31855074dd0Smrg 31955074dd0Smrg `configure' recognizes the following options to control how it 32055074dd0Smrgoperates. 32155074dd0Smrg 32255074dd0Smrg`--help' 32355074dd0Smrg`-h' 32455074dd0Smrg Print a summary of all of the options to `configure', and exit. 32555074dd0Smrg 32655074dd0Smrg`--help=short' 32755074dd0Smrg`--help=recursive' 32855074dd0Smrg Print a summary of the options unique to this package's 32955074dd0Smrg `configure', and exit. The `short' variant lists options used 33055074dd0Smrg only in the top level, while the `recursive' variant lists options 33155074dd0Smrg also present in any nested packages. 33255074dd0Smrg 33355074dd0Smrg`--version' 33455074dd0Smrg`-V' 33555074dd0Smrg Print the version of Autoconf used to generate the `configure' 33655074dd0Smrg script, and exit. 33755074dd0Smrg 33855074dd0Smrg`--cache-file=FILE' 33955074dd0Smrg Enable the cache: use and save the results of the tests in FILE, 34055074dd0Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 34155074dd0Smrg disable caching. 34255074dd0Smrg 34355074dd0Smrg`--config-cache' 34455074dd0Smrg`-C' 34555074dd0Smrg Alias for `--cache-file=config.cache'. 34655074dd0Smrg 34755074dd0Smrg`--quiet' 34855074dd0Smrg`--silent' 34955074dd0Smrg`-q' 35055074dd0Smrg Do not print messages saying which checks are being made. To 35155074dd0Smrg suppress all normal output, redirect it to `/dev/null' (any error 35255074dd0Smrg messages will still be shown). 35355074dd0Smrg 35455074dd0Smrg`--srcdir=DIR' 35555074dd0Smrg Look for the package's source code in directory DIR. Usually 35655074dd0Smrg `configure' can determine that directory automatically. 35755074dd0Smrg 35855074dd0Smrg`--prefix=DIR' 359054b3d00Smrg Use DIR as the installation prefix. *note Installation Names:: 36055074dd0Smrg for more details, including other options available for fine-tuning 36155074dd0Smrg the installation locations. 36255074dd0Smrg 36355074dd0Smrg`--no-create' 36455074dd0Smrg`-n' 36555074dd0Smrg Run the configure checks, but stop before creating any output 36655074dd0Smrg files. 36755074dd0Smrg 36855074dd0Smrg`configure' also accepts some other, not widely useful, options. Run 36955074dd0Smrg`configure --help' for more details. 37055074dd0Smrg 371