165912f00SmrgInstallation Instructions 265912f00Smrg************************* 365912f00Smrg 4c166fba9SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5c166fba9SmrgInc. 665912f00Smrg 7c166fba9Smrg Copying and distribution of this file, with or without modification, 8c166fba9Smrgare permitted in any medium without royalty provided the copyright 9c166fba9Smrgnotice and this notice are preserved. This file is offered as-is, 10c166fba9Smrgwithout warranty of any kind. 1165912f00Smrg 1265912f00SmrgBasic Installation 1365912f00Smrg================== 1465912f00Smrg 1565912f00Smrg Briefly, the shell commands `./configure; make; make install' should 1665912f00Smrgconfigure, build, and install this package. The following 1765912f00Smrgmore-detailed instructions are generic; see the `README' file for 18c166fba9Smrginstructions specific to this package. Some packages provide this 19c166fba9Smrg`INSTALL' file but do not implement all of the features documented 20c166fba9Smrgbelow. The lack of an optional feature in a given package is not 21c166fba9Smrgnecessarily a bug. More recommendations for GNU packages can be found 22c166fba9Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 2365912f00Smrg 2465912f00Smrg The `configure' shell script attempts to guess correct values for 2565912f00Smrgvarious system-dependent variables used during compilation. It uses 2665912f00Smrgthose values to create a `Makefile' in each directory of the package. 2765912f00SmrgIt may also create one or more `.h' files containing system-dependent 2865912f00Smrgdefinitions. Finally, it creates a shell script `config.status' that 2965912f00Smrgyou can run in the future to recreate the current configuration, and a 3065912f00Smrgfile `config.log' containing compiler output (useful mainly for 3165912f00Smrgdebugging `configure'). 3265912f00Smrg 3365912f00Smrg It can also use an optional file (typically called `config.cache' 3465912f00Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 3565912f00Smrgthe results of its tests to speed up reconfiguring. Caching is 3665912f00Smrgdisabled by default to prevent problems with accidental use of stale 3765912f00Smrgcache files. 3865912f00Smrg 3965912f00Smrg If you need to do unusual things to compile the package, please try 4065912f00Smrgto figure out how `configure' could check whether to do them, and mail 4165912f00Smrgdiffs or instructions to the address given in the `README' so they can 4265912f00Smrgbe considered for the next release. If you are using the cache, and at 4365912f00Smrgsome point `config.cache' contains results you don't want to keep, you 4465912f00Smrgmay remove or edit it. 4565912f00Smrg 4665912f00Smrg The file `configure.ac' (or `configure.in') is used to create 4765912f00Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 4865912f00Smrgyou want to change it or regenerate `configure' using a newer version 4965912f00Smrgof `autoconf'. 5065912f00Smrg 51c166fba9Smrg The simplest way to compile this package is: 5265912f00Smrg 5365912f00Smrg 1. `cd' to the directory containing the package's source code and type 5465912f00Smrg `./configure' to configure the package for your system. 5565912f00Smrg 5665912f00Smrg Running `configure' might take a while. While running, it prints 5765912f00Smrg some messages telling which features it is checking for. 5865912f00Smrg 5965912f00Smrg 2. Type `make' to compile the package. 6065912f00Smrg 6165912f00Smrg 3. Optionally, type `make check' to run any self-tests that come with 62c166fba9Smrg the package, generally using the just-built uninstalled binaries. 6365912f00Smrg 6465912f00Smrg 4. Type `make install' to install the programs and any data files and 65c166fba9Smrg documentation. When installing into a prefix owned by root, it is 66c166fba9Smrg recommended that the package be configured and built as a regular 67c166fba9Smrg user, and only the `make install' phase executed with root 68c166fba9Smrg privileges. 69c166fba9Smrg 70c166fba9Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71c166fba9Smrg this time using the binaries in their final installed location. 72c166fba9Smrg This target does not install anything. Running this target as a 73c166fba9Smrg regular user, particularly if the prior `make install' required 74c166fba9Smrg root privileges, verifies that the installation completed 75c166fba9Smrg correctly. 76c166fba9Smrg 77c166fba9Smrg 6. You can remove the program binaries and object files from the 7865912f00Smrg source code directory by typing `make clean'. To also remove the 7965912f00Smrg files that `configure' created (so you can compile the package for 8065912f00Smrg a different kind of computer), type `make distclean'. There is 8165912f00Smrg also a `make maintainer-clean' target, but that is intended mainly 8265912f00Smrg for the package's developers. If you use it, you may have to get 8365912f00Smrg all sorts of other programs in order to regenerate files that came 8465912f00Smrg with the distribution. 8565912f00Smrg 86c166fba9Smrg 7. Often, you can also type `make uninstall' to remove the installed 87c166fba9Smrg files again. In practice, not all packages have tested that 88c166fba9Smrg uninstallation works correctly, even though it is required by the 89c166fba9Smrg GNU Coding Standards. 90c166fba9Smrg 91c166fba9Smrg 8. Some packages, particularly those that use Automake, provide `make 92c166fba9Smrg distcheck', which can by used by developers to test that all other 93c166fba9Smrg targets like `make install' and `make uninstall' work correctly. 94c166fba9Smrg This target is generally not run by end users. 9565912f00Smrg 9665912f00SmrgCompilers and Options 9765912f00Smrg===================== 9865912f00Smrg 9965912f00Smrg Some systems require unusual options for compilation or linking that 10065912f00Smrgthe `configure' script does not know about. Run `./configure --help' 10165912f00Smrgfor details on some of the pertinent environment variables. 10265912f00Smrg 10365912f00Smrg You can give `configure' initial values for configuration parameters 10465912f00Smrgby setting variables in the command line or in the environment. Here 10565912f00Smrgis an example: 10665912f00Smrg 10765912f00Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 10865912f00Smrg 10965912f00Smrg *Note Defining Variables::, for more details. 11065912f00Smrg 11165912f00SmrgCompiling For Multiple Architectures 11265912f00Smrg==================================== 11365912f00Smrg 11465912f00Smrg You can compile the package for more than one kind of computer at the 11565912f00Smrgsame time, by placing the object files for each architecture in their 11665912f00Smrgown directory. To do this, you can use GNU `make'. `cd' to the 11765912f00Smrgdirectory where you want the object files and executables to go and run 11865912f00Smrgthe `configure' script. `configure' automatically checks for the 119c166fba9Smrgsource code in the directory that `configure' is in and in `..'. This 120c166fba9Smrgis known as a "VPATH" build. 12165912f00Smrg 12265912f00Smrg With a non-GNU `make', it is safer to compile the package for one 12365912f00Smrgarchitecture at a time in the source code directory. After you have 12465912f00Smrginstalled the package for one architecture, use `make distclean' before 12565912f00Smrgreconfiguring for another architecture. 12665912f00Smrg 12765912f00Smrg On MacOS X 10.5 and later systems, you can create libraries and 12865912f00Smrgexecutables that work on multiple system types--known as "fat" or 12965912f00Smrg"universal" binaries--by specifying multiple `-arch' options to the 13065912f00Smrgcompiler but only a single `-arch' option to the preprocessor. Like 13165912f00Smrgthis: 13265912f00Smrg 13365912f00Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13465912f00Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13565912f00Smrg CPP="gcc -E" CXXCPP="g++ -E" 13665912f00Smrg 13765912f00Smrg This is not guaranteed to produce working output in all cases, you 13865912f00Smrgmay have to build one architecture at a time and combine the results 13965912f00Smrgusing the `lipo' tool if you have problems. 14065912f00Smrg 14165912f00SmrgInstallation Names 14265912f00Smrg================== 14365912f00Smrg 14465912f00Smrg By default, `make install' installs the package's commands under 14565912f00Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 14665912f00Smrgcan specify an installation prefix other than `/usr/local' by giving 147c166fba9Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148c166fba9Smrgabsolute file name. 14965912f00Smrg 15065912f00Smrg You can specify separate installation prefixes for 15165912f00Smrgarchitecture-specific files and architecture-independent files. If you 15265912f00Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 15365912f00SmrgPREFIX as the prefix for installing programs and libraries. 15465912f00SmrgDocumentation and other data files still use the regular prefix. 15565912f00Smrg 15665912f00Smrg In addition, if you use an unusual directory layout you can give 15765912f00Smrgoptions like `--bindir=DIR' to specify different values for particular 15865912f00Smrgkinds of files. Run `configure --help' for a list of the directories 159c166fba9Smrgyou can set and what kinds of files go in them. In general, the 160c166fba9Smrgdefault for these options is expressed in terms of `${prefix}', so that 161c166fba9Smrgspecifying just `--prefix' will affect all of the other directory 162c166fba9Smrgspecifications that were not explicitly provided. 163c166fba9Smrg 164c166fba9Smrg The most portable way to affect installation locations is to pass the 165c166fba9Smrgcorrect locations to `configure'; however, many packages provide one or 166c166fba9Smrgboth of the following shortcuts of passing variable assignments to the 167c166fba9Smrg`make install' command line to change installation locations without 168c166fba9Smrghaving to reconfigure or recompile. 169c166fba9Smrg 170c166fba9Smrg The first method involves providing an override variable for each 171c166fba9Smrgaffected directory. For example, `make install 172c166fba9Smrgprefix=/alternate/directory' will choose an alternate location for all 173c166fba9Smrgdirectory configuration variables that were expressed in terms of 174c166fba9Smrg`${prefix}'. Any directories that were specified during `configure', 175c166fba9Smrgbut not in terms of `${prefix}', must each be overridden at install 176c166fba9Smrgtime for the entire installation to be relocated. The approach of 177c166fba9Smrgmakefile variable overrides for each directory variable is required by 178c166fba9Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179c166fba9SmrgHowever, some platforms have known limitations with the semantics of 180c166fba9Smrgshared libraries that end up requiring recompilation when using this 181c166fba9Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182c166fba9Smrg 183c166fba9Smrg The second method involves providing the `DESTDIR' variable. For 184c166fba9Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185c166fba9Smrg`/alternate/directory' before all installation names. The approach of 186c166fba9Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187c166fba9Smrgdoes not work on platforms that have drive letters. On the other hand, 188c166fba9Smrgit does better at avoiding recompilation issues, and works well even 189c166fba9Smrgwhen some directory options were not specified in terms of `${prefix}' 190c166fba9Smrgat `configure' time. 191c166fba9Smrg 192c166fba9SmrgOptional Features 193c166fba9Smrg================= 19465912f00Smrg 19565912f00Smrg If the package supports it, you can cause programs to be installed 19665912f00Smrgwith an extra prefix or suffix on their names by giving `configure' the 19765912f00Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 19865912f00Smrg 19965912f00Smrg Some packages pay attention to `--enable-FEATURE' options to 20065912f00Smrg`configure', where FEATURE indicates an optional part of the package. 20165912f00SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 20265912f00Smrgis something like `gnu-as' or `x' (for the X Window System). The 20365912f00Smrg`README' should mention any `--enable-' and `--with-' options that the 20465912f00Smrgpackage recognizes. 20565912f00Smrg 20665912f00Smrg For packages that use the X Window System, `configure' can usually 20765912f00Smrgfind the X include and library files automatically, but if it doesn't, 20865912f00Smrgyou can use the `configure' options `--x-includes=DIR' and 20965912f00Smrg`--x-libraries=DIR' to specify their locations. 21065912f00Smrg 211c166fba9Smrg Some packages offer the ability to configure how verbose the 212c166fba9Smrgexecution of `make' will be. For these packages, running `./configure 213c166fba9Smrg--enable-silent-rules' sets the default to minimal output, which can be 214c166fba9Smrgoverridden with `make V=1'; while running `./configure 215c166fba9Smrg--disable-silent-rules' sets the default to verbose, which can be 216c166fba9Smrgoverridden with `make V=0'. 217c166fba9Smrg 21865912f00SmrgParticular systems 21965912f00Smrg================== 22065912f00Smrg 22165912f00Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 22265912f00SmrgCC is not installed, it is recommended to use the following options in 22365912f00Smrgorder to use an ANSI C compiler: 22465912f00Smrg 225c166fba9Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 22665912f00Smrg 22765912f00Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 22865912f00Smrg 229c166fba9Smrg HP-UX `make' updates targets which have the same time stamps as 230c166fba9Smrgtheir prerequisites, which makes it generally unusable when shipped 231c166fba9Smrggenerated files such as `configure' are involved. Use GNU `make' 232c166fba9Smrginstead. 233c166fba9Smrg 23465912f00Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 23565912f00Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 23665912f00Smrga workaround. If GNU CC is not installed, it is therefore recommended 23765912f00Smrgto try 23865912f00Smrg 23965912f00Smrg ./configure CC="cc" 24065912f00Smrg 24165912f00Smrgand if that doesn't work, try 24265912f00Smrg 24365912f00Smrg ./configure CC="cc -nodtk" 24465912f00Smrg 245c166fba9Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246c166fba9Smrgdirectory contains several dysfunctional programs; working variants of 247c166fba9Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248c166fba9Smrgin your `PATH', put it _after_ `/usr/bin'. 249c166fba9Smrg 250c166fba9Smrg On Haiku, software installed for all users goes in `/boot/common', 251c166fba9Smrgnot `/usr/local'. It is recommended to use the following options: 252c166fba9Smrg 253c166fba9Smrg ./configure --prefix=/boot/common 254c166fba9Smrg 25565912f00SmrgSpecifying the System Type 25665912f00Smrg========================== 25765912f00Smrg 25865912f00Smrg There may be some features `configure' cannot figure out 25965912f00Smrgautomatically, but needs to determine by the type of machine the package 26065912f00Smrgwill run on. Usually, assuming the package is built to be run on the 26165912f00Smrg_same_ architectures, `configure' can figure that out, but if it prints 26265912f00Smrga message saying it cannot guess the machine type, give it the 26365912f00Smrg`--build=TYPE' option. TYPE can either be a short name for the system 26465912f00Smrgtype, such as `sun4', or a canonical name which has the form: 26565912f00Smrg 26665912f00Smrg CPU-COMPANY-SYSTEM 26765912f00Smrg 26865912f00Smrgwhere SYSTEM can have one of these forms: 26965912f00Smrg 270c166fba9Smrg OS 271c166fba9Smrg KERNEL-OS 27265912f00Smrg 27365912f00Smrg See the file `config.sub' for the possible values of each field. If 27465912f00Smrg`config.sub' isn't included in this package, then this package doesn't 27565912f00Smrgneed to know the machine type. 27665912f00Smrg 27765912f00Smrg If you are _building_ compiler tools for cross-compiling, you should 27865912f00Smrguse the option `--target=TYPE' to select the type of system they will 27965912f00Smrgproduce code for. 28065912f00Smrg 28165912f00Smrg If you want to _use_ a cross compiler, that generates code for a 28265912f00Smrgplatform different from the build platform, you should specify the 28365912f00Smrg"host" platform (i.e., that on which the generated programs will 28465912f00Smrgeventually be run) with `--host=TYPE'. 28565912f00Smrg 28665912f00SmrgSharing Defaults 28765912f00Smrg================ 28865912f00Smrg 28965912f00Smrg If you want to set default values for `configure' scripts to share, 29065912f00Smrgyou can create a site shell script called `config.site' that gives 29165912f00Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 29265912f00Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 29365912f00Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 29465912f00Smrg`CONFIG_SITE' environment variable to the location of the site script. 29565912f00SmrgA warning: not all `configure' scripts look for a site script. 29665912f00Smrg 29765912f00SmrgDefining Variables 29865912f00Smrg================== 29965912f00Smrg 30065912f00Smrg Variables not defined in a site shell script can be set in the 30165912f00Smrgenvironment passed to `configure'. However, some packages may run 30265912f00Smrgconfigure again during the build, and the customized values of these 30365912f00Smrgvariables may be lost. In order to avoid this problem, you should set 30465912f00Smrgthem in the `configure' command line, using `VAR=value'. For example: 30565912f00Smrg 30665912f00Smrg ./configure CC=/usr/local2/bin/gcc 30765912f00Smrg 30865912f00Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 30965912f00Smrgoverridden in the site shell script). 31065912f00Smrg 31165912f00SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 31265912f00Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 31365912f00Smrg 31465912f00Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 31565912f00Smrg 31665912f00Smrg`configure' Invocation 31765912f00Smrg====================== 31865912f00Smrg 31965912f00Smrg `configure' recognizes the following options to control how it 32065912f00Smrgoperates. 32165912f00Smrg 32265912f00Smrg`--help' 32365912f00Smrg`-h' 32465912f00Smrg Print a summary of all of the options to `configure', and exit. 32565912f00Smrg 32665912f00Smrg`--help=short' 32765912f00Smrg`--help=recursive' 32865912f00Smrg Print a summary of the options unique to this package's 32965912f00Smrg `configure', and exit. The `short' variant lists options used 33065912f00Smrg only in the top level, while the `recursive' variant lists options 33165912f00Smrg also present in any nested packages. 33265912f00Smrg 33365912f00Smrg`--version' 33465912f00Smrg`-V' 33565912f00Smrg Print the version of Autoconf used to generate the `configure' 33665912f00Smrg script, and exit. 33765912f00Smrg 33865912f00Smrg`--cache-file=FILE' 33965912f00Smrg Enable the cache: use and save the results of the tests in FILE, 34065912f00Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 34165912f00Smrg disable caching. 34265912f00Smrg 34365912f00Smrg`--config-cache' 34465912f00Smrg`-C' 34565912f00Smrg Alias for `--cache-file=config.cache'. 34665912f00Smrg 34765912f00Smrg`--quiet' 34865912f00Smrg`--silent' 34965912f00Smrg`-q' 35065912f00Smrg Do not print messages saying which checks are being made. To 35165912f00Smrg suppress all normal output, redirect it to `/dev/null' (any error 35265912f00Smrg messages will still be shown). 35365912f00Smrg 35465912f00Smrg`--srcdir=DIR' 35565912f00Smrg Look for the package's source code in directory DIR. Usually 35665912f00Smrg `configure' can determine that directory automatically. 35765912f00Smrg 35865912f00Smrg`--prefix=DIR' 359c166fba9Smrg Use DIR as the installation prefix. *note Installation Names:: 36065912f00Smrg for more details, including other options available for fine-tuning 36165912f00Smrg the installation locations. 36265912f00Smrg 36365912f00Smrg`--no-create' 36465912f00Smrg`-n' 36565912f00Smrg Run the configure checks, but stop before creating any output 36665912f00Smrg files. 36765912f00Smrg 36865912f00Smrg`configure' also accepts some other, not widely useful, options. Run 36965912f00Smrg`configure --help' for more details. 37065912f00Smrg 371