16e7d3316SmrgInstallation Instructions 26e7d3316Smrg************************* 36e7d3316Smrg 4edce3322SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5edce3322SmrgInc. 6a966c04fSmrg 7edce3322Smrg Copying and distribution of this file, with or without modification, 8edce3322Smrgare permitted in any medium without royalty provided the copyright 9edce3322Smrgnotice and this notice are preserved. This file is offered as-is, 10edce3322Smrgwithout warranty of any kind. 11a966c04fSmrg 12a966c04fSmrgBasic Installation 13a966c04fSmrg================== 14a966c04fSmrg 156e7d3316Smrg Briefly, the shell commands `./configure; make; make install' should 166e7d3316Smrgconfigure, build, and install this package. The following 176e7d3316Smrgmore-detailed instructions are generic; see the `README' file for 18edce3322Smrginstructions specific to this package. Some packages provide this 19edce3322Smrg`INSTALL' file but do not implement all of the features documented 20edce3322Smrgbelow. The lack of an optional feature in a given package is not 21edce3322Smrgnecessarily a bug. More recommendations for GNU packages can be found 22edce3322Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 23a966c04fSmrg 24a966c04fSmrg The `configure' shell script attempts to guess correct values for 25a966c04fSmrgvarious system-dependent variables used during compilation. It uses 26a966c04fSmrgthose values to create a `Makefile' in each directory of the package. 27a966c04fSmrgIt may also create one or more `.h' files containing system-dependent 28a966c04fSmrgdefinitions. Finally, it creates a shell script `config.status' that 29a966c04fSmrgyou can run in the future to recreate the current configuration, and a 30a966c04fSmrgfile `config.log' containing compiler output (useful mainly for 31a966c04fSmrgdebugging `configure'). 32a966c04fSmrg 33a966c04fSmrg It can also use an optional file (typically called `config.cache' 34a966c04fSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 356e7d3316Smrgthe results of its tests to speed up reconfiguring. Caching is 36a966c04fSmrgdisabled by default to prevent problems with accidental use of stale 376e7d3316Smrgcache files. 38a966c04fSmrg 39a966c04fSmrg If you need to do unusual things to compile the package, please try 40a966c04fSmrgto figure out how `configure' could check whether to do them, and mail 41a966c04fSmrgdiffs or instructions to the address given in the `README' so they can 42a966c04fSmrgbe considered for the next release. If you are using the cache, and at 43a966c04fSmrgsome point `config.cache' contains results you don't want to keep, you 44a966c04fSmrgmay remove or edit it. 45a966c04fSmrg 46a966c04fSmrg The file `configure.ac' (or `configure.in') is used to create 476e7d3316Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 486e7d3316Smrgyou want to change it or regenerate `configure' using a newer version 496e7d3316Smrgof `autoconf'. 50a966c04fSmrg 51edce3322Smrg The simplest way to compile this package is: 52a966c04fSmrg 53a966c04fSmrg 1. `cd' to the directory containing the package's source code and type 546e7d3316Smrg `./configure' to configure the package for your system. 55a966c04fSmrg 566e7d3316Smrg Running `configure' might take a while. While running, it prints 576e7d3316Smrg some messages telling which features it is checking for. 58a966c04fSmrg 59a966c04fSmrg 2. Type `make' to compile the package. 60a966c04fSmrg 61a966c04fSmrg 3. Optionally, type `make check' to run any self-tests that come with 62edce3322Smrg the package, generally using the just-built uninstalled binaries. 63a966c04fSmrg 64a966c04fSmrg 4. Type `make install' to install the programs and any data files and 65edce3322Smrg documentation. When installing into a prefix owned by root, it is 66edce3322Smrg recommended that the package be configured and built as a regular 67edce3322Smrg user, and only the `make install' phase executed with root 68edce3322Smrg privileges. 69edce3322Smrg 70edce3322Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71edce3322Smrg this time using the binaries in their final installed location. 72edce3322Smrg This target does not install anything. Running this target as a 73edce3322Smrg regular user, particularly if the prior `make install' required 74edce3322Smrg root privileges, verifies that the installation completed 75edce3322Smrg correctly. 76edce3322Smrg 77edce3322Smrg 6. You can remove the program binaries and object files from the 78a966c04fSmrg source code directory by typing `make clean'. To also remove the 79a966c04fSmrg files that `configure' created (so you can compile the package for 80a966c04fSmrg a different kind of computer), type `make distclean'. There is 81a966c04fSmrg also a `make maintainer-clean' target, but that is intended mainly 82a966c04fSmrg for the package's developers. If you use it, you may have to get 83a966c04fSmrg all sorts of other programs in order to regenerate files that came 84a966c04fSmrg with the distribution. 85a966c04fSmrg 86edce3322Smrg 7. Often, you can also type `make uninstall' to remove the installed 87edce3322Smrg files again. In practice, not all packages have tested that 88edce3322Smrg uninstallation works correctly, even though it is required by the 89edce3322Smrg GNU Coding Standards. 90edce3322Smrg 91edce3322Smrg 8. Some packages, particularly those that use Automake, provide `make 92edce3322Smrg distcheck', which can by used by developers to test that all other 93edce3322Smrg targets like `make install' and `make uninstall' work correctly. 94edce3322Smrg This target is generally not run by end users. 956e7d3316Smrg 96a966c04fSmrgCompilers and Options 97a966c04fSmrg===================== 98a966c04fSmrg 99a966c04fSmrg Some systems require unusual options for compilation or linking that 100a966c04fSmrgthe `configure' script does not know about. Run `./configure --help' 101a966c04fSmrgfor details on some of the pertinent environment variables. 102a966c04fSmrg 103a966c04fSmrg You can give `configure' initial values for configuration parameters 104a966c04fSmrgby setting variables in the command line or in the environment. Here 105a966c04fSmrgis an example: 106a966c04fSmrg 1076e7d3316Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108a966c04fSmrg 109a966c04fSmrg *Note Defining Variables::, for more details. 110a966c04fSmrg 111a966c04fSmrgCompiling For Multiple Architectures 112a966c04fSmrg==================================== 113a966c04fSmrg 114a966c04fSmrg You can compile the package for more than one kind of computer at the 115a966c04fSmrgsame time, by placing the object files for each architecture in their 1166e7d3316Smrgown directory. To do this, you can use GNU `make'. `cd' to the 117a966c04fSmrgdirectory where you want the object files and executables to go and run 118a966c04fSmrgthe `configure' script. `configure' automatically checks for the 119edce3322Smrgsource code in the directory that `configure' is in and in `..'. This 120edce3322Smrgis known as a "VPATH" build. 121a966c04fSmrg 1226e7d3316Smrg With a non-GNU `make', it is safer to compile the package for one 1236e7d3316Smrgarchitecture at a time in the source code directory. After you have 1246e7d3316Smrginstalled the package for one architecture, use `make distclean' before 1256e7d3316Smrgreconfiguring for another architecture. 1266e7d3316Smrg 1276e7d3316Smrg On MacOS X 10.5 and later systems, you can create libraries and 1286e7d3316Smrgexecutables that work on multiple system types--known as "fat" or 1296e7d3316Smrg"universal" binaries--by specifying multiple `-arch' options to the 1306e7d3316Smrgcompiler but only a single `-arch' option to the preprocessor. Like 1316e7d3316Smrgthis: 1326e7d3316Smrg 1336e7d3316Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1346e7d3316Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1356e7d3316Smrg CPP="gcc -E" CXXCPP="g++ -E" 1366e7d3316Smrg 1376e7d3316Smrg This is not guaranteed to produce working output in all cases, you 1386e7d3316Smrgmay have to build one architecture at a time and combine the results 1396e7d3316Smrgusing the `lipo' tool if you have problems. 140a966c04fSmrg 141a966c04fSmrgInstallation Names 142a966c04fSmrg================== 143a966c04fSmrg 1446e7d3316Smrg By default, `make install' installs the package's commands under 1456e7d3316Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1466e7d3316Smrgcan specify an installation prefix other than `/usr/local' by giving 147edce3322Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148edce3322Smrgabsolute file name. 149a966c04fSmrg 150a966c04fSmrg You can specify separate installation prefixes for 151a966c04fSmrgarchitecture-specific files and architecture-independent files. If you 1526e7d3316Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1536e7d3316SmrgPREFIX as the prefix for installing programs and libraries. 1546e7d3316SmrgDocumentation and other data files still use the regular prefix. 155a966c04fSmrg 156a966c04fSmrg In addition, if you use an unusual directory layout you can give 1576e7d3316Smrgoptions like `--bindir=DIR' to specify different values for particular 158a966c04fSmrgkinds of files. Run `configure --help' for a list of the directories 159edce3322Smrgyou can set and what kinds of files go in them. In general, the 160edce3322Smrgdefault for these options is expressed in terms of `${prefix}', so that 161edce3322Smrgspecifying just `--prefix' will affect all of the other directory 162edce3322Smrgspecifications that were not explicitly provided. 163edce3322Smrg 164edce3322Smrg The most portable way to affect installation locations is to pass the 165edce3322Smrgcorrect locations to `configure'; however, many packages provide one or 166edce3322Smrgboth of the following shortcuts of passing variable assignments to the 167edce3322Smrg`make install' command line to change installation locations without 168edce3322Smrghaving to reconfigure or recompile. 169edce3322Smrg 170edce3322Smrg The first method involves providing an override variable for each 171edce3322Smrgaffected directory. For example, `make install 172edce3322Smrgprefix=/alternate/directory' will choose an alternate location for all 173edce3322Smrgdirectory configuration variables that were expressed in terms of 174edce3322Smrg`${prefix}'. Any directories that were specified during `configure', 175edce3322Smrgbut not in terms of `${prefix}', must each be overridden at install 176edce3322Smrgtime for the entire installation to be relocated. The approach of 177edce3322Smrgmakefile variable overrides for each directory variable is required by 178edce3322Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179edce3322SmrgHowever, some platforms have known limitations with the semantics of 180edce3322Smrgshared libraries that end up requiring recompilation when using this 181edce3322Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182edce3322Smrg 183edce3322Smrg The second method involves providing the `DESTDIR' variable. For 184edce3322Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185edce3322Smrg`/alternate/directory' before all installation names. The approach of 186edce3322Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187edce3322Smrgdoes not work on platforms that have drive letters. On the other hand, 188edce3322Smrgit does better at avoiding recompilation issues, and works well even 189edce3322Smrgwhen some directory options were not specified in terms of `${prefix}' 190edce3322Smrgat `configure' time. 191edce3322Smrg 192edce3322SmrgOptional Features 193edce3322Smrg================= 194a966c04fSmrg 195a966c04fSmrg If the package supports it, you can cause programs to be installed 196a966c04fSmrgwith an extra prefix or suffix on their names by giving `configure' the 197a966c04fSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198a966c04fSmrg 199a966c04fSmrg Some packages pay attention to `--enable-FEATURE' options to 200a966c04fSmrg`configure', where FEATURE indicates an optional part of the package. 201a966c04fSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202a966c04fSmrgis something like `gnu-as' or `x' (for the X Window System). The 203a966c04fSmrg`README' should mention any `--enable-' and `--with-' options that the 204a966c04fSmrgpackage recognizes. 205a966c04fSmrg 206a966c04fSmrg For packages that use the X Window System, `configure' can usually 207a966c04fSmrgfind the X include and library files automatically, but if it doesn't, 208a966c04fSmrgyou can use the `configure' options `--x-includes=DIR' and 209a966c04fSmrg`--x-libraries=DIR' to specify their locations. 210a966c04fSmrg 211edce3322Smrg Some packages offer the ability to configure how verbose the 212edce3322Smrgexecution of `make' will be. For these packages, running `./configure 213edce3322Smrg--enable-silent-rules' sets the default to minimal output, which can be 214edce3322Smrgoverridden with `make V=1'; while running `./configure 215edce3322Smrg--disable-silent-rules' sets the default to verbose, which can be 216edce3322Smrgoverridden with `make V=0'. 217edce3322Smrg 2186e7d3316SmrgParticular systems 2196e7d3316Smrg================== 2206e7d3316Smrg 2216e7d3316Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 2226e7d3316SmrgCC is not installed, it is recommended to use the following options in 2236e7d3316Smrgorder to use an ANSI C compiler: 2246e7d3316Smrg 225edce3322Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 2266e7d3316Smrg 2276e7d3316Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 2286e7d3316Smrg 229edce3322Smrg HP-UX `make' updates targets which have the same time stamps as 230edce3322Smrgtheir prerequisites, which makes it generally unusable when shipped 231edce3322Smrggenerated files such as `configure' are involved. Use GNU `make' 232edce3322Smrginstead. 233edce3322Smrg 2346e7d3316Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 2356e7d3316Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 2366e7d3316Smrga workaround. If GNU CC is not installed, it is therefore recommended 2376e7d3316Smrgto try 2386e7d3316Smrg 2396e7d3316Smrg ./configure CC="cc" 2406e7d3316Smrg 2416e7d3316Smrgand if that doesn't work, try 2426e7d3316Smrg 2436e7d3316Smrg ./configure CC="cc -nodtk" 2446e7d3316Smrg 245edce3322Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246edce3322Smrgdirectory contains several dysfunctional programs; working variants of 247edce3322Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248edce3322Smrgin your `PATH', put it _after_ `/usr/bin'. 249edce3322Smrg 250edce3322Smrg On Haiku, software installed for all users goes in `/boot/common', 251edce3322Smrgnot `/usr/local'. It is recommended to use the following options: 252edce3322Smrg 253edce3322Smrg ./configure --prefix=/boot/common 254edce3322Smrg 255a966c04fSmrgSpecifying the System Type 256a966c04fSmrg========================== 257a966c04fSmrg 258a966c04fSmrg There may be some features `configure' cannot figure out 259a966c04fSmrgautomatically, but needs to determine by the type of machine the package 260a966c04fSmrgwill run on. Usually, assuming the package is built to be run on the 261a966c04fSmrg_same_ architectures, `configure' can figure that out, but if it prints 262a966c04fSmrga message saying it cannot guess the machine type, give it the 263a966c04fSmrg`--build=TYPE' option. TYPE can either be a short name for the system 264a966c04fSmrgtype, such as `sun4', or a canonical name which has the form: 265a966c04fSmrg 266a966c04fSmrg CPU-COMPANY-SYSTEM 267a966c04fSmrg 268a966c04fSmrgwhere SYSTEM can have one of these forms: 269a966c04fSmrg 270edce3322Smrg OS 271edce3322Smrg KERNEL-OS 272a966c04fSmrg 273a966c04fSmrg See the file `config.sub' for the possible values of each field. If 274a966c04fSmrg`config.sub' isn't included in this package, then this package doesn't 275a966c04fSmrgneed to know the machine type. 276a966c04fSmrg 277a966c04fSmrg If you are _building_ compiler tools for cross-compiling, you should 2786e7d3316Smrguse the option `--target=TYPE' to select the type of system they will 279a966c04fSmrgproduce code for. 280a966c04fSmrg 281a966c04fSmrg If you want to _use_ a cross compiler, that generates code for a 282a966c04fSmrgplatform different from the build platform, you should specify the 283a966c04fSmrg"host" platform (i.e., that on which the generated programs will 284a966c04fSmrgeventually be run) with `--host=TYPE'. 285a966c04fSmrg 286a966c04fSmrgSharing Defaults 287a966c04fSmrg================ 288a966c04fSmrg 289a966c04fSmrg If you want to set default values for `configure' scripts to share, 290a966c04fSmrgyou can create a site shell script called `config.site' that gives 291a966c04fSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 292a966c04fSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293a966c04fSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294a966c04fSmrg`CONFIG_SITE' environment variable to the location of the site script. 295a966c04fSmrgA warning: not all `configure' scripts look for a site script. 296a966c04fSmrg 297a966c04fSmrgDefining Variables 298a966c04fSmrg================== 299a966c04fSmrg 300a966c04fSmrg Variables not defined in a site shell script can be set in the 301a966c04fSmrgenvironment passed to `configure'. However, some packages may run 302a966c04fSmrgconfigure again during the build, and the customized values of these 303a966c04fSmrgvariables may be lost. In order to avoid this problem, you should set 304a966c04fSmrgthem in the `configure' command line, using `VAR=value'. For example: 305a966c04fSmrg 306a966c04fSmrg ./configure CC=/usr/local2/bin/gcc 307a966c04fSmrg 3086e7d3316Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 309a966c04fSmrgoverridden in the site shell script). 310a966c04fSmrg 3116e7d3316SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 3126e7d3316Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 3136e7d3316Smrg 3146e7d3316Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 3156e7d3316Smrg 316a966c04fSmrg`configure' Invocation 317a966c04fSmrg====================== 318a966c04fSmrg 319a966c04fSmrg `configure' recognizes the following options to control how it 320a966c04fSmrgoperates. 321a966c04fSmrg 322a966c04fSmrg`--help' 323a966c04fSmrg`-h' 3246e7d3316Smrg Print a summary of all of the options to `configure', and exit. 3256e7d3316Smrg 3266e7d3316Smrg`--help=short' 3276e7d3316Smrg`--help=recursive' 3286e7d3316Smrg Print a summary of the options unique to this package's 3296e7d3316Smrg `configure', and exit. The `short' variant lists options used 3306e7d3316Smrg only in the top level, while the `recursive' variant lists options 3316e7d3316Smrg also present in any nested packages. 332a966c04fSmrg 333a966c04fSmrg`--version' 334a966c04fSmrg`-V' 335a966c04fSmrg Print the version of Autoconf used to generate the `configure' 336a966c04fSmrg script, and exit. 337a966c04fSmrg 338a966c04fSmrg`--cache-file=FILE' 339a966c04fSmrg Enable the cache: use and save the results of the tests in FILE, 340a966c04fSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341a966c04fSmrg disable caching. 342a966c04fSmrg 343a966c04fSmrg`--config-cache' 344a966c04fSmrg`-C' 345a966c04fSmrg Alias for `--cache-file=config.cache'. 346a966c04fSmrg 347a966c04fSmrg`--quiet' 348a966c04fSmrg`--silent' 349a966c04fSmrg`-q' 350a966c04fSmrg Do not print messages saying which checks are being made. To 351a966c04fSmrg suppress all normal output, redirect it to `/dev/null' (any error 352a966c04fSmrg messages will still be shown). 353a966c04fSmrg 354a966c04fSmrg`--srcdir=DIR' 355a966c04fSmrg Look for the package's source code in directory DIR. Usually 356a966c04fSmrg `configure' can determine that directory automatically. 357a966c04fSmrg 3586e7d3316Smrg`--prefix=DIR' 359edce3322Smrg Use DIR as the installation prefix. *note Installation Names:: 3606e7d3316Smrg for more details, including other options available for fine-tuning 3616e7d3316Smrg the installation locations. 3626e7d3316Smrg 3636e7d3316Smrg`--no-create' 3646e7d3316Smrg`-n' 3656e7d3316Smrg Run the configure checks, but stop before creating any output 3666e7d3316Smrg files. 3676e7d3316Smrg 368a966c04fSmrg`configure' also accepts some other, not widely useful, options. Run 369a966c04fSmrg`configure --help' for more details. 370a966c04fSmrg 371