1555991fdSmrgInstallation Instructions 2555991fdSmrg************************* 3555991fdSmrg 4300346aeSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5300346aeSmrgInc. 6126a8a12Smrg 7300346aeSmrg Copying and distribution of this file, with or without modification, 8300346aeSmrgare permitted in any medium without royalty provided the copyright 9300346aeSmrgnotice and this notice are preserved. This file is offered as-is, 10300346aeSmrgwithout warranty of any kind. 11126a8a12Smrg 12126a8a12SmrgBasic Installation 13126a8a12Smrg================== 14126a8a12Smrg 15555991fdSmrg Briefly, the shell commands `./configure; make; make install' should 16555991fdSmrgconfigure, build, and install this package. The following 17555991fdSmrgmore-detailed instructions are generic; see the `README' file for 18300346aeSmrginstructions specific to this package. Some packages provide this 19300346aeSmrg`INSTALL' file but do not implement all of the features documented 20300346aeSmrgbelow. The lack of an optional feature in a given package is not 21300346aeSmrgnecessarily a bug. More recommendations for GNU packages can be found 22300346aeSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 23126a8a12Smrg 24126a8a12Smrg The `configure' shell script attempts to guess correct values for 25126a8a12Smrgvarious system-dependent variables used during compilation. It uses 26126a8a12Smrgthose values to create a `Makefile' in each directory of the package. 27126a8a12SmrgIt may also create one or more `.h' files containing system-dependent 28126a8a12Smrgdefinitions. Finally, it creates a shell script `config.status' that 29126a8a12Smrgyou can run in the future to recreate the current configuration, and a 30126a8a12Smrgfile `config.log' containing compiler output (useful mainly for 31126a8a12Smrgdebugging `configure'). 32126a8a12Smrg 33126a8a12Smrg It can also use an optional file (typically called `config.cache' 34126a8a12Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35555991fdSmrgthe results of its tests to speed up reconfiguring. Caching is 36126a8a12Smrgdisabled by default to prevent problems with accidental use of stale 37555991fdSmrgcache files. 38126a8a12Smrg 39126a8a12Smrg If you need to do unusual things to compile the package, please try 40126a8a12Smrgto figure out how `configure' could check whether to do them, and mail 41126a8a12Smrgdiffs or instructions to the address given in the `README' so they can 42126a8a12Smrgbe considered for the next release. If you are using the cache, and at 43126a8a12Smrgsome point `config.cache' contains results you don't want to keep, you 44126a8a12Smrgmay remove or edit it. 45126a8a12Smrg 46126a8a12Smrg The file `configure.ac' (or `configure.in') is used to create 47555991fdSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 48555991fdSmrgyou want to change it or regenerate `configure' using a newer version 49555991fdSmrgof `autoconf'. 50126a8a12Smrg 51300346aeSmrg The simplest way to compile this package is: 52126a8a12Smrg 53126a8a12Smrg 1. `cd' to the directory containing the package's source code and type 54555991fdSmrg `./configure' to configure the package for your system. 55126a8a12Smrg 56555991fdSmrg Running `configure' might take a while. While running, it prints 57555991fdSmrg some messages telling which features it is checking for. 58126a8a12Smrg 59126a8a12Smrg 2. Type `make' to compile the package. 60126a8a12Smrg 61126a8a12Smrg 3. Optionally, type `make check' to run any self-tests that come with 62300346aeSmrg the package, generally using the just-built uninstalled binaries. 63126a8a12Smrg 64126a8a12Smrg 4. Type `make install' to install the programs and any data files and 65300346aeSmrg documentation. When installing into a prefix owned by root, it is 66300346aeSmrg recommended that the package be configured and built as a regular 67300346aeSmrg user, and only the `make install' phase executed with root 68300346aeSmrg privileges. 69300346aeSmrg 70300346aeSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71300346aeSmrg this time using the binaries in their final installed location. 72300346aeSmrg This target does not install anything. Running this target as a 73300346aeSmrg regular user, particularly if the prior `make install' required 74300346aeSmrg root privileges, verifies that the installation completed 75300346aeSmrg correctly. 76300346aeSmrg 77300346aeSmrg 6. You can remove the program binaries and object files from the 78126a8a12Smrg source code directory by typing `make clean'. To also remove the 79126a8a12Smrg files that `configure' created (so you can compile the package for 80126a8a12Smrg a different kind of computer), type `make distclean'. There is 81126a8a12Smrg also a `make maintainer-clean' target, but that is intended mainly 82126a8a12Smrg for the package's developers. If you use it, you may have to get 83126a8a12Smrg all sorts of other programs in order to regenerate files that came 84126a8a12Smrg with the distribution. 85126a8a12Smrg 86300346aeSmrg 7. Often, you can also type `make uninstall' to remove the installed 87300346aeSmrg files again. In practice, not all packages have tested that 88300346aeSmrg uninstallation works correctly, even though it is required by the 89300346aeSmrg GNU Coding Standards. 90300346aeSmrg 91300346aeSmrg 8. Some packages, particularly those that use Automake, provide `make 92300346aeSmrg distcheck', which can by used by developers to test that all other 93300346aeSmrg targets like `make install' and `make uninstall' work correctly. 94300346aeSmrg This target is generally not run by end users. 95555991fdSmrg 96126a8a12SmrgCompilers and Options 97126a8a12Smrg===================== 98126a8a12Smrg 99126a8a12Smrg Some systems require unusual options for compilation or linking that 100126a8a12Smrgthe `configure' script does not know about. Run `./configure --help' 101126a8a12Smrgfor details on some of the pertinent environment variables. 102126a8a12Smrg 103126a8a12Smrg You can give `configure' initial values for configuration parameters 104126a8a12Smrgby setting variables in the command line or in the environment. Here 105126a8a12Smrgis an example: 106126a8a12Smrg 107555991fdSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108126a8a12Smrg 109126a8a12Smrg *Note Defining Variables::, for more details. 110126a8a12Smrg 111126a8a12SmrgCompiling For Multiple Architectures 112126a8a12Smrg==================================== 113126a8a12Smrg 114126a8a12Smrg You can compile the package for more than one kind of computer at the 115126a8a12Smrgsame time, by placing the object files for each architecture in their 116555991fdSmrgown directory. To do this, you can use GNU `make'. `cd' to the 117126a8a12Smrgdirectory where you want the object files and executables to go and run 118126a8a12Smrgthe `configure' script. `configure' automatically checks for the 119300346aeSmrgsource code in the directory that `configure' is in and in `..'. This 120300346aeSmrgis known as a "VPATH" build. 121126a8a12Smrg 122555991fdSmrg With a non-GNU `make', it is safer to compile the package for one 123555991fdSmrgarchitecture at a time in the source code directory. After you have 124555991fdSmrginstalled the package for one architecture, use `make distclean' before 125555991fdSmrgreconfiguring for another architecture. 126555991fdSmrg 127555991fdSmrg On MacOS X 10.5 and later systems, you can create libraries and 128555991fdSmrgexecutables that work on multiple system types--known as "fat" or 129555991fdSmrg"universal" binaries--by specifying multiple `-arch' options to the 130555991fdSmrgcompiler but only a single `-arch' option to the preprocessor. Like 131555991fdSmrgthis: 132555991fdSmrg 133555991fdSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134555991fdSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135555991fdSmrg CPP="gcc -E" CXXCPP="g++ -E" 136555991fdSmrg 137555991fdSmrg This is not guaranteed to produce working output in all cases, you 138555991fdSmrgmay have to build one architecture at a time and combine the results 139555991fdSmrgusing the `lipo' tool if you have problems. 140126a8a12Smrg 141126a8a12SmrgInstallation Names 142126a8a12Smrg================== 143126a8a12Smrg 144555991fdSmrg By default, `make install' installs the package's commands under 145555991fdSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146555991fdSmrgcan specify an installation prefix other than `/usr/local' by giving 147300346aeSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148300346aeSmrgabsolute file name. 149126a8a12Smrg 150126a8a12Smrg You can specify separate installation prefixes for 151126a8a12Smrgarchitecture-specific files and architecture-independent files. If you 152555991fdSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153555991fdSmrgPREFIX as the prefix for installing programs and libraries. 154555991fdSmrgDocumentation and other data files still use the regular prefix. 155126a8a12Smrg 156126a8a12Smrg In addition, if you use an unusual directory layout you can give 157555991fdSmrgoptions like `--bindir=DIR' to specify different values for particular 158126a8a12Smrgkinds of files. Run `configure --help' for a list of the directories 159300346aeSmrgyou can set and what kinds of files go in them. In general, the 160300346aeSmrgdefault for these options is expressed in terms of `${prefix}', so that 161300346aeSmrgspecifying just `--prefix' will affect all of the other directory 162300346aeSmrgspecifications that were not explicitly provided. 163300346aeSmrg 164300346aeSmrg The most portable way to affect installation locations is to pass the 165300346aeSmrgcorrect locations to `configure'; however, many packages provide one or 166300346aeSmrgboth of the following shortcuts of passing variable assignments to the 167300346aeSmrg`make install' command line to change installation locations without 168300346aeSmrghaving to reconfigure or recompile. 169300346aeSmrg 170300346aeSmrg The first method involves providing an override variable for each 171300346aeSmrgaffected directory. For example, `make install 172300346aeSmrgprefix=/alternate/directory' will choose an alternate location for all 173300346aeSmrgdirectory configuration variables that were expressed in terms of 174300346aeSmrg`${prefix}'. Any directories that were specified during `configure', 175300346aeSmrgbut not in terms of `${prefix}', must each be overridden at install 176300346aeSmrgtime for the entire installation to be relocated. The approach of 177300346aeSmrgmakefile variable overrides for each directory variable is required by 178300346aeSmrgthe GNU Coding Standards, and ideally causes no recompilation. 179300346aeSmrgHowever, some platforms have known limitations with the semantics of 180300346aeSmrgshared libraries that end up requiring recompilation when using this 181300346aeSmrgmethod, particularly noticeable in packages that use GNU Libtool. 182300346aeSmrg 183300346aeSmrg The second method involves providing the `DESTDIR' variable. For 184300346aeSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 185300346aeSmrg`/alternate/directory' before all installation names. The approach of 186300346aeSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187300346aeSmrgdoes not work on platforms that have drive letters. On the other hand, 188300346aeSmrgit does better at avoiding recompilation issues, and works well even 189300346aeSmrgwhen some directory options were not specified in terms of `${prefix}' 190300346aeSmrgat `configure' time. 191300346aeSmrg 192300346aeSmrgOptional Features 193300346aeSmrg================= 194126a8a12Smrg 195126a8a12Smrg If the package supports it, you can cause programs to be installed 196126a8a12Smrgwith an extra prefix or suffix on their names by giving `configure' the 197126a8a12Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198126a8a12Smrg 199126a8a12Smrg Some packages pay attention to `--enable-FEATURE' options to 200126a8a12Smrg`configure', where FEATURE indicates an optional part of the package. 201126a8a12SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202126a8a12Smrgis something like `gnu-as' or `x' (for the X Window System). The 203126a8a12Smrg`README' should mention any `--enable-' and `--with-' options that the 204126a8a12Smrgpackage recognizes. 205126a8a12Smrg 206126a8a12Smrg For packages that use the X Window System, `configure' can usually 207126a8a12Smrgfind the X include and library files automatically, but if it doesn't, 208126a8a12Smrgyou can use the `configure' options `--x-includes=DIR' and 209126a8a12Smrg`--x-libraries=DIR' to specify their locations. 210126a8a12Smrg 211300346aeSmrg Some packages offer the ability to configure how verbose the 212300346aeSmrgexecution of `make' will be. For these packages, running `./configure 213300346aeSmrg--enable-silent-rules' sets the default to minimal output, which can be 214300346aeSmrgoverridden with `make V=1'; while running `./configure 215300346aeSmrg--disable-silent-rules' sets the default to verbose, which can be 216300346aeSmrgoverridden with `make V=0'. 217300346aeSmrg 218555991fdSmrgParticular systems 219555991fdSmrg================== 220555991fdSmrg 221555991fdSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222555991fdSmrgCC is not installed, it is recommended to use the following options in 223555991fdSmrgorder to use an ANSI C compiler: 224555991fdSmrg 225300346aeSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226555991fdSmrg 227555991fdSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228555991fdSmrg 229300346aeSmrg HP-UX `make' updates targets which have the same time stamps as 230300346aeSmrgtheir prerequisites, which makes it generally unusable when shipped 231300346aeSmrggenerated files such as `configure' are involved. Use GNU `make' 232300346aeSmrginstead. 233300346aeSmrg 234555991fdSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235555991fdSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236555991fdSmrga workaround. If GNU CC is not installed, it is therefore recommended 237555991fdSmrgto try 238555991fdSmrg 239555991fdSmrg ./configure CC="cc" 240555991fdSmrg 241555991fdSmrgand if that doesn't work, try 242555991fdSmrg 243555991fdSmrg ./configure CC="cc -nodtk" 244555991fdSmrg 245300346aeSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246300346aeSmrgdirectory contains several dysfunctional programs; working variants of 247300346aeSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248300346aeSmrgin your `PATH', put it _after_ `/usr/bin'. 249300346aeSmrg 250300346aeSmrg On Haiku, software installed for all users goes in `/boot/common', 251300346aeSmrgnot `/usr/local'. It is recommended to use the following options: 252300346aeSmrg 253300346aeSmrg ./configure --prefix=/boot/common 254300346aeSmrg 255126a8a12SmrgSpecifying the System Type 256126a8a12Smrg========================== 257126a8a12Smrg 258126a8a12Smrg There may be some features `configure' cannot figure out 259126a8a12Smrgautomatically, but needs to determine by the type of machine the package 260126a8a12Smrgwill run on. Usually, assuming the package is built to be run on the 261126a8a12Smrg_same_ architectures, `configure' can figure that out, but if it prints 262126a8a12Smrga message saying it cannot guess the machine type, give it the 263126a8a12Smrg`--build=TYPE' option. TYPE can either be a short name for the system 264126a8a12Smrgtype, such as `sun4', or a canonical name which has the form: 265126a8a12Smrg 266126a8a12Smrg CPU-COMPANY-SYSTEM 267126a8a12Smrg 268126a8a12Smrgwhere SYSTEM can have one of these forms: 269126a8a12Smrg 270300346aeSmrg OS 271300346aeSmrg KERNEL-OS 272126a8a12Smrg 273126a8a12Smrg See the file `config.sub' for the possible values of each field. If 274126a8a12Smrg`config.sub' isn't included in this package, then this package doesn't 275126a8a12Smrgneed to know the machine type. 276126a8a12Smrg 277126a8a12Smrg If you are _building_ compiler tools for cross-compiling, you should 278555991fdSmrguse the option `--target=TYPE' to select the type of system they will 279126a8a12Smrgproduce code for. 280126a8a12Smrg 281126a8a12Smrg If you want to _use_ a cross compiler, that generates code for a 282126a8a12Smrgplatform different from the build platform, you should specify the 283126a8a12Smrg"host" platform (i.e., that on which the generated programs will 284126a8a12Smrgeventually be run) with `--host=TYPE'. 285126a8a12Smrg 286126a8a12SmrgSharing Defaults 287126a8a12Smrg================ 288126a8a12Smrg 289126a8a12Smrg If you want to set default values for `configure' scripts to share, 290126a8a12Smrgyou can create a site shell script called `config.site' that gives 291126a8a12Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 292126a8a12Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293126a8a12Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294126a8a12Smrg`CONFIG_SITE' environment variable to the location of the site script. 295126a8a12SmrgA warning: not all `configure' scripts look for a site script. 296126a8a12Smrg 297126a8a12SmrgDefining Variables 298126a8a12Smrg================== 299126a8a12Smrg 300126a8a12Smrg Variables not defined in a site shell script can be set in the 301126a8a12Smrgenvironment passed to `configure'. However, some packages may run 302126a8a12Smrgconfigure again during the build, and the customized values of these 303126a8a12Smrgvariables may be lost. In order to avoid this problem, you should set 304126a8a12Smrgthem in the `configure' command line, using `VAR=value'. For example: 305126a8a12Smrg 306126a8a12Smrg ./configure CC=/usr/local2/bin/gcc 307126a8a12Smrg 308555991fdSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 309126a8a12Smrgoverridden in the site shell script). 310126a8a12Smrg 311555991fdSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312555991fdSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313555991fdSmrg 314555991fdSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315555991fdSmrg 316126a8a12Smrg`configure' Invocation 317126a8a12Smrg====================== 318126a8a12Smrg 319126a8a12Smrg `configure' recognizes the following options to control how it 320126a8a12Smrgoperates. 321126a8a12Smrg 322126a8a12Smrg`--help' 323126a8a12Smrg`-h' 324555991fdSmrg Print a summary of all of the options to `configure', and exit. 325555991fdSmrg 326555991fdSmrg`--help=short' 327555991fdSmrg`--help=recursive' 328555991fdSmrg Print a summary of the options unique to this package's 329555991fdSmrg `configure', and exit. The `short' variant lists options used 330555991fdSmrg only in the top level, while the `recursive' variant lists options 331555991fdSmrg also present in any nested packages. 332126a8a12Smrg 333126a8a12Smrg`--version' 334126a8a12Smrg`-V' 335126a8a12Smrg Print the version of Autoconf used to generate the `configure' 336126a8a12Smrg script, and exit. 337126a8a12Smrg 338126a8a12Smrg`--cache-file=FILE' 339126a8a12Smrg Enable the cache: use and save the results of the tests in FILE, 340126a8a12Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341126a8a12Smrg disable caching. 342126a8a12Smrg 343126a8a12Smrg`--config-cache' 344126a8a12Smrg`-C' 345126a8a12Smrg Alias for `--cache-file=config.cache'. 346126a8a12Smrg 347126a8a12Smrg`--quiet' 348126a8a12Smrg`--silent' 349126a8a12Smrg`-q' 350126a8a12Smrg Do not print messages saying which checks are being made. To 351126a8a12Smrg suppress all normal output, redirect it to `/dev/null' (any error 352126a8a12Smrg messages will still be shown). 353126a8a12Smrg 354126a8a12Smrg`--srcdir=DIR' 355126a8a12Smrg Look for the package's source code in directory DIR. Usually 356126a8a12Smrg `configure' can determine that directory automatically. 357126a8a12Smrg 358555991fdSmrg`--prefix=DIR' 359300346aeSmrg Use DIR as the installation prefix. *note Installation Names:: 360555991fdSmrg for more details, including other options available for fine-tuning 361555991fdSmrg the installation locations. 362555991fdSmrg 363555991fdSmrg`--no-create' 364555991fdSmrg`-n' 365555991fdSmrg Run the configure checks, but stop before creating any output 366555991fdSmrg files. 367555991fdSmrg 368126a8a12Smrg`configure' also accepts some other, not widely useful, options. Run 369126a8a12Smrg`configure --help' for more details. 370126a8a12Smrg 371