1213fdd94SmrgInstallation Instructions 2213fdd94Smrg************************* 3213fdd94Smrg 418552c8aSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 518552c8aSmrgInc. 6213fdd94Smrg 718552c8aSmrg Copying and distribution of this file, with or without modification, 818552c8aSmrgare permitted in any medium without royalty provided the copyright 918552c8aSmrgnotice and this notice are preserved. This file is offered as-is, 1018552c8aSmrgwithout warranty of any kind. 11213fdd94Smrg 12213fdd94SmrgBasic Installation 13213fdd94Smrg================== 14213fdd94Smrg 15213fdd94Smrg Briefly, the shell commands `./configure; make; make install' should 16213fdd94Smrgconfigure, build, and install this package. The following 17213fdd94Smrgmore-detailed instructions are generic; see the `README' file for 1818552c8aSmrginstructions specific to this package. Some packages provide this 1918552c8aSmrg`INSTALL' file but do not implement all of the features documented 2018552c8aSmrgbelow. The lack of an optional feature in a given package is not 2118552c8aSmrgnecessarily a bug. More recommendations for GNU packages can be found 2218552c8aSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 23213fdd94Smrg 24213fdd94Smrg The `configure' shell script attempts to guess correct values for 25213fdd94Smrgvarious system-dependent variables used during compilation. It uses 26213fdd94Smrgthose values to create a `Makefile' in each directory of the package. 27213fdd94SmrgIt may also create one or more `.h' files containing system-dependent 28213fdd94Smrgdefinitions. Finally, it creates a shell script `config.status' that 29213fdd94Smrgyou can run in the future to recreate the current configuration, and a 30213fdd94Smrgfile `config.log' containing compiler output (useful mainly for 31213fdd94Smrgdebugging `configure'). 32213fdd94Smrg 33213fdd94Smrg It can also use an optional file (typically called `config.cache' 34213fdd94Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35213fdd94Smrgthe results of its tests to speed up reconfiguring. Caching is 36213fdd94Smrgdisabled by default to prevent problems with accidental use of stale 37213fdd94Smrgcache files. 38213fdd94Smrg 39213fdd94Smrg If you need to do unusual things to compile the package, please try 40213fdd94Smrgto figure out how `configure' could check whether to do them, and mail 41213fdd94Smrgdiffs or instructions to the address given in the `README' so they can 42213fdd94Smrgbe considered for the next release. If you are using the cache, and at 43213fdd94Smrgsome point `config.cache' contains results you don't want to keep, you 44213fdd94Smrgmay remove or edit it. 45213fdd94Smrg 46213fdd94Smrg The file `configure.ac' (or `configure.in') is used to create 47213fdd94Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 48213fdd94Smrgyou want to change it or regenerate `configure' using a newer version 49213fdd94Smrgof `autoconf'. 50213fdd94Smrg 5118552c8aSmrg The simplest way to compile this package is: 52213fdd94Smrg 53213fdd94Smrg 1. `cd' to the directory containing the package's source code and type 54213fdd94Smrg `./configure' to configure the package for your system. 55213fdd94Smrg 56213fdd94Smrg Running `configure' might take a while. While running, it prints 57213fdd94Smrg some messages telling which features it is checking for. 58213fdd94Smrg 59213fdd94Smrg 2. Type `make' to compile the package. 60213fdd94Smrg 61213fdd94Smrg 3. Optionally, type `make check' to run any self-tests that come with 6218552c8aSmrg the package, generally using the just-built uninstalled binaries. 63213fdd94Smrg 64213fdd94Smrg 4. Type `make install' to install the programs and any data files and 6518552c8aSmrg documentation. When installing into a prefix owned by root, it is 6618552c8aSmrg recommended that the package be configured and built as a regular 6718552c8aSmrg user, and only the `make install' phase executed with root 6818552c8aSmrg privileges. 6918552c8aSmrg 7018552c8aSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 7118552c8aSmrg this time using the binaries in their final installed location. 7218552c8aSmrg This target does not install anything. Running this target as a 7318552c8aSmrg regular user, particularly if the prior `make install' required 7418552c8aSmrg root privileges, verifies that the installation completed 7518552c8aSmrg correctly. 7618552c8aSmrg 7718552c8aSmrg 6. You can remove the program binaries and object files from the 78213fdd94Smrg source code directory by typing `make clean'. To also remove the 79213fdd94Smrg files that `configure' created (so you can compile the package for 80213fdd94Smrg a different kind of computer), type `make distclean'. There is 81213fdd94Smrg also a `make maintainer-clean' target, but that is intended mainly 82213fdd94Smrg for the package's developers. If you use it, you may have to get 83213fdd94Smrg all sorts of other programs in order to regenerate files that came 84213fdd94Smrg with the distribution. 85213fdd94Smrg 8618552c8aSmrg 7. Often, you can also type `make uninstall' to remove the installed 8718552c8aSmrg files again. In practice, not all packages have tested that 8818552c8aSmrg uninstallation works correctly, even though it is required by the 8918552c8aSmrg GNU Coding Standards. 9018552c8aSmrg 9118552c8aSmrg 8. Some packages, particularly those that use Automake, provide `make 9218552c8aSmrg distcheck', which can by used by developers to test that all other 9318552c8aSmrg targets like `make install' and `make uninstall' work correctly. 9418552c8aSmrg This target is generally not run by end users. 95213fdd94Smrg 96213fdd94SmrgCompilers and Options 97213fdd94Smrg===================== 98213fdd94Smrg 99213fdd94Smrg Some systems require unusual options for compilation or linking that 100213fdd94Smrgthe `configure' script does not know about. Run `./configure --help' 101213fdd94Smrgfor details on some of the pertinent environment variables. 102213fdd94Smrg 103213fdd94Smrg You can give `configure' initial values for configuration parameters 104213fdd94Smrgby setting variables in the command line or in the environment. Here 105213fdd94Smrgis an example: 106213fdd94Smrg 107213fdd94Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108213fdd94Smrg 109213fdd94Smrg *Note Defining Variables::, for more details. 110213fdd94Smrg 111213fdd94SmrgCompiling For Multiple Architectures 112213fdd94Smrg==================================== 113213fdd94Smrg 114213fdd94Smrg You can compile the package for more than one kind of computer at the 115213fdd94Smrgsame time, by placing the object files for each architecture in their 116213fdd94Smrgown directory. To do this, you can use GNU `make'. `cd' to the 117213fdd94Smrgdirectory where you want the object files and executables to go and run 118213fdd94Smrgthe `configure' script. `configure' automatically checks for the 11918552c8aSmrgsource code in the directory that `configure' is in and in `..'. This 12018552c8aSmrgis known as a "VPATH" build. 121213fdd94Smrg 122213fdd94Smrg With a non-GNU `make', it is safer to compile the package for one 123213fdd94Smrgarchitecture at a time in the source code directory. After you have 124213fdd94Smrginstalled the package for one architecture, use `make distclean' before 125213fdd94Smrgreconfiguring for another architecture. 126213fdd94Smrg 127213fdd94Smrg On MacOS X 10.5 and later systems, you can create libraries and 128213fdd94Smrgexecutables that work on multiple system types--known as "fat" or 129213fdd94Smrg"universal" binaries--by specifying multiple `-arch' options to the 130213fdd94Smrgcompiler but only a single `-arch' option to the preprocessor. Like 131213fdd94Smrgthis: 132213fdd94Smrg 133213fdd94Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134213fdd94Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135213fdd94Smrg CPP="gcc -E" CXXCPP="g++ -E" 136213fdd94Smrg 137213fdd94Smrg This is not guaranteed to produce working output in all cases, you 138213fdd94Smrgmay have to build one architecture at a time and combine the results 139213fdd94Smrgusing the `lipo' tool if you have problems. 140213fdd94Smrg 141213fdd94SmrgInstallation Names 142213fdd94Smrg================== 143213fdd94Smrg 144213fdd94Smrg By default, `make install' installs the package's commands under 145213fdd94Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146213fdd94Smrgcan specify an installation prefix other than `/usr/local' by giving 14718552c8aSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 14818552c8aSmrgabsolute file name. 149213fdd94Smrg 150213fdd94Smrg You can specify separate installation prefixes for 151213fdd94Smrgarchitecture-specific files and architecture-independent files. If you 152213fdd94Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153213fdd94SmrgPREFIX as the prefix for installing programs and libraries. 154213fdd94SmrgDocumentation and other data files still use the regular prefix. 155213fdd94Smrg 156213fdd94Smrg In addition, if you use an unusual directory layout you can give 157213fdd94Smrgoptions like `--bindir=DIR' to specify different values for particular 158213fdd94Smrgkinds of files. Run `configure --help' for a list of the directories 15918552c8aSmrgyou can set and what kinds of files go in them. In general, the 16018552c8aSmrgdefault for these options is expressed in terms of `${prefix}', so that 16118552c8aSmrgspecifying just `--prefix' will affect all of the other directory 16218552c8aSmrgspecifications that were not explicitly provided. 16318552c8aSmrg 16418552c8aSmrg The most portable way to affect installation locations is to pass the 16518552c8aSmrgcorrect locations to `configure'; however, many packages provide one or 16618552c8aSmrgboth of the following shortcuts of passing variable assignments to the 16718552c8aSmrg`make install' command line to change installation locations without 16818552c8aSmrghaving to reconfigure or recompile. 16918552c8aSmrg 17018552c8aSmrg The first method involves providing an override variable for each 17118552c8aSmrgaffected directory. For example, `make install 17218552c8aSmrgprefix=/alternate/directory' will choose an alternate location for all 17318552c8aSmrgdirectory configuration variables that were expressed in terms of 17418552c8aSmrg`${prefix}'. Any directories that were specified during `configure', 17518552c8aSmrgbut not in terms of `${prefix}', must each be overridden at install 17618552c8aSmrgtime for the entire installation to be relocated. The approach of 17718552c8aSmrgmakefile variable overrides for each directory variable is required by 17818552c8aSmrgthe GNU Coding Standards, and ideally causes no recompilation. 17918552c8aSmrgHowever, some platforms have known limitations with the semantics of 18018552c8aSmrgshared libraries that end up requiring recompilation when using this 18118552c8aSmrgmethod, particularly noticeable in packages that use GNU Libtool. 18218552c8aSmrg 18318552c8aSmrg The second method involves providing the `DESTDIR' variable. For 18418552c8aSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 18518552c8aSmrg`/alternate/directory' before all installation names. The approach of 18618552c8aSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 18718552c8aSmrgdoes not work on platforms that have drive letters. On the other hand, 18818552c8aSmrgit does better at avoiding recompilation issues, and works well even 18918552c8aSmrgwhen some directory options were not specified in terms of `${prefix}' 19018552c8aSmrgat `configure' time. 19118552c8aSmrg 19218552c8aSmrgOptional Features 19318552c8aSmrg================= 194213fdd94Smrg 195213fdd94Smrg If the package supports it, you can cause programs to be installed 196213fdd94Smrgwith an extra prefix or suffix on their names by giving `configure' the 197213fdd94Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198213fdd94Smrg 199213fdd94Smrg Some packages pay attention to `--enable-FEATURE' options to 200213fdd94Smrg`configure', where FEATURE indicates an optional part of the package. 201213fdd94SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202213fdd94Smrgis something like `gnu-as' or `x' (for the X Window System). The 203213fdd94Smrg`README' should mention any `--enable-' and `--with-' options that the 204213fdd94Smrgpackage recognizes. 205213fdd94Smrg 206213fdd94Smrg For packages that use the X Window System, `configure' can usually 207213fdd94Smrgfind the X include and library files automatically, but if it doesn't, 208213fdd94Smrgyou can use the `configure' options `--x-includes=DIR' and 209213fdd94Smrg`--x-libraries=DIR' to specify their locations. 210213fdd94Smrg 21118552c8aSmrg Some packages offer the ability to configure how verbose the 21218552c8aSmrgexecution of `make' will be. For these packages, running `./configure 21318552c8aSmrg--enable-silent-rules' sets the default to minimal output, which can be 21418552c8aSmrgoverridden with `make V=1'; while running `./configure 21518552c8aSmrg--disable-silent-rules' sets the default to verbose, which can be 21618552c8aSmrgoverridden with `make V=0'. 21718552c8aSmrg 218213fdd94SmrgParticular systems 219213fdd94Smrg================== 220213fdd94Smrg 221213fdd94Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222213fdd94SmrgCC is not installed, it is recommended to use the following options in 223213fdd94Smrgorder to use an ANSI C compiler: 224213fdd94Smrg 22518552c8aSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226213fdd94Smrg 227213fdd94Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228213fdd94Smrg 22918552c8aSmrg HP-UX `make' updates targets which have the same time stamps as 23018552c8aSmrgtheir prerequisites, which makes it generally unusable when shipped 23118552c8aSmrggenerated files such as `configure' are involved. Use GNU `make' 23218552c8aSmrginstead. 23318552c8aSmrg 234213fdd94Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235213fdd94Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236213fdd94Smrga workaround. If GNU CC is not installed, it is therefore recommended 237213fdd94Smrgto try 238213fdd94Smrg 239213fdd94Smrg ./configure CC="cc" 240213fdd94Smrg 241213fdd94Smrgand if that doesn't work, try 242213fdd94Smrg 243213fdd94Smrg ./configure CC="cc -nodtk" 244213fdd94Smrg 24518552c8aSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 24618552c8aSmrgdirectory contains several dysfunctional programs; working variants of 24718552c8aSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 24818552c8aSmrgin your `PATH', put it _after_ `/usr/bin'. 24918552c8aSmrg 25018552c8aSmrg On Haiku, software installed for all users goes in `/boot/common', 25118552c8aSmrgnot `/usr/local'. It is recommended to use the following options: 25218552c8aSmrg 25318552c8aSmrg ./configure --prefix=/boot/common 25418552c8aSmrg 255213fdd94SmrgSpecifying the System Type 256213fdd94Smrg========================== 257213fdd94Smrg 258213fdd94Smrg There may be some features `configure' cannot figure out 259213fdd94Smrgautomatically, but needs to determine by the type of machine the package 260213fdd94Smrgwill run on. Usually, assuming the package is built to be run on the 261213fdd94Smrg_same_ architectures, `configure' can figure that out, but if it prints 262213fdd94Smrga message saying it cannot guess the machine type, give it the 263213fdd94Smrg`--build=TYPE' option. TYPE can either be a short name for the system 264213fdd94Smrgtype, such as `sun4', or a canonical name which has the form: 265213fdd94Smrg 266213fdd94Smrg CPU-COMPANY-SYSTEM 267213fdd94Smrg 268213fdd94Smrgwhere SYSTEM can have one of these forms: 269213fdd94Smrg 27018552c8aSmrg OS 27118552c8aSmrg KERNEL-OS 272213fdd94Smrg 273213fdd94Smrg See the file `config.sub' for the possible values of each field. If 274213fdd94Smrg`config.sub' isn't included in this package, then this package doesn't 275213fdd94Smrgneed to know the machine type. 276213fdd94Smrg 277213fdd94Smrg If you are _building_ compiler tools for cross-compiling, you should 278213fdd94Smrguse the option `--target=TYPE' to select the type of system they will 279213fdd94Smrgproduce code for. 280213fdd94Smrg 281213fdd94Smrg If you want to _use_ a cross compiler, that generates code for a 282213fdd94Smrgplatform different from the build platform, you should specify the 283213fdd94Smrg"host" platform (i.e., that on which the generated programs will 284213fdd94Smrgeventually be run) with `--host=TYPE'. 285213fdd94Smrg 286213fdd94SmrgSharing Defaults 287213fdd94Smrg================ 288213fdd94Smrg 289213fdd94Smrg If you want to set default values for `configure' scripts to share, 290213fdd94Smrgyou can create a site shell script called `config.site' that gives 291213fdd94Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 292213fdd94Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293213fdd94Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294213fdd94Smrg`CONFIG_SITE' environment variable to the location of the site script. 295213fdd94SmrgA warning: not all `configure' scripts look for a site script. 296213fdd94Smrg 297213fdd94SmrgDefining Variables 298213fdd94Smrg================== 299213fdd94Smrg 300213fdd94Smrg Variables not defined in a site shell script can be set in the 301213fdd94Smrgenvironment passed to `configure'. However, some packages may run 302213fdd94Smrgconfigure again during the build, and the customized values of these 303213fdd94Smrgvariables may be lost. In order to avoid this problem, you should set 304213fdd94Smrgthem in the `configure' command line, using `VAR=value'. For example: 305213fdd94Smrg 306213fdd94Smrg ./configure CC=/usr/local2/bin/gcc 307213fdd94Smrg 308213fdd94Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 309213fdd94Smrgoverridden in the site shell script). 310213fdd94Smrg 311213fdd94SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312213fdd94Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313213fdd94Smrg 314213fdd94Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315213fdd94Smrg 316213fdd94Smrg`configure' Invocation 317213fdd94Smrg====================== 318213fdd94Smrg 319213fdd94Smrg `configure' recognizes the following options to control how it 320213fdd94Smrgoperates. 321213fdd94Smrg 322213fdd94Smrg`--help' 323213fdd94Smrg`-h' 324213fdd94Smrg Print a summary of all of the options to `configure', and exit. 325213fdd94Smrg 326213fdd94Smrg`--help=short' 327213fdd94Smrg`--help=recursive' 328213fdd94Smrg Print a summary of the options unique to this package's 329213fdd94Smrg `configure', and exit. The `short' variant lists options used 330213fdd94Smrg only in the top level, while the `recursive' variant lists options 331213fdd94Smrg also present in any nested packages. 332213fdd94Smrg 333213fdd94Smrg`--version' 334213fdd94Smrg`-V' 335213fdd94Smrg Print the version of Autoconf used to generate the `configure' 336213fdd94Smrg script, and exit. 337213fdd94Smrg 338213fdd94Smrg`--cache-file=FILE' 339213fdd94Smrg Enable the cache: use and save the results of the tests in FILE, 340213fdd94Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341213fdd94Smrg disable caching. 342213fdd94Smrg 343213fdd94Smrg`--config-cache' 344213fdd94Smrg`-C' 345213fdd94Smrg Alias for `--cache-file=config.cache'. 346213fdd94Smrg 347213fdd94Smrg`--quiet' 348213fdd94Smrg`--silent' 349213fdd94Smrg`-q' 350213fdd94Smrg Do not print messages saying which checks are being made. To 351213fdd94Smrg suppress all normal output, redirect it to `/dev/null' (any error 352213fdd94Smrg messages will still be shown). 353213fdd94Smrg 354213fdd94Smrg`--srcdir=DIR' 355213fdd94Smrg Look for the package's source code in directory DIR. Usually 356213fdd94Smrg `configure' can determine that directory automatically. 357213fdd94Smrg 358213fdd94Smrg`--prefix=DIR' 35918552c8aSmrg Use DIR as the installation prefix. *note Installation Names:: 360213fdd94Smrg for more details, including other options available for fine-tuning 361213fdd94Smrg the installation locations. 362213fdd94Smrg 363213fdd94Smrg`--no-create' 364213fdd94Smrg`-n' 365213fdd94Smrg Run the configure checks, but stop before creating any output 366213fdd94Smrg files. 367213fdd94Smrg 368213fdd94Smrg`configure' also accepts some other, not widely useful, options. Run 369213fdd94Smrg`configure --help' for more details. 370213fdd94Smrg 371