1493f84f4SmrgInstallation Instructions 2493f84f4Smrg************************* 3493f84f4Smrg 4ee82cb62SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5ee82cb62SmrgInc. 6493f84f4Smrg 7ee82cb62Smrg Copying and distribution of this file, with or without modification, 8ee82cb62Smrgare permitted in any medium without royalty provided the copyright 9ee82cb62Smrgnotice and this notice are preserved. This file is offered as-is, 10ee82cb62Smrgwithout warranty of any kind. 11493f84f4Smrg 12493f84f4SmrgBasic Installation 13493f84f4Smrg================== 14493f84f4Smrg 15493f84f4Smrg Briefly, the shell commands `./configure; make; make install' should 16493f84f4Smrgconfigure, build, and install this package. The following 17493f84f4Smrgmore-detailed instructions are generic; see the `README' file for 18ee82cb62Smrginstructions specific to this package. Some packages provide this 19ee82cb62Smrg`INSTALL' file but do not implement all of the features documented 20ee82cb62Smrgbelow. The lack of an optional feature in a given package is not 21ee82cb62Smrgnecessarily a bug. More recommendations for GNU packages can be found 22ee82cb62Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 23493f84f4Smrg 24493f84f4Smrg The `configure' shell script attempts to guess correct values for 25493f84f4Smrgvarious system-dependent variables used during compilation. It uses 26493f84f4Smrgthose values to create a `Makefile' in each directory of the package. 27493f84f4SmrgIt may also create one or more `.h' files containing system-dependent 28493f84f4Smrgdefinitions. Finally, it creates a shell script `config.status' that 29493f84f4Smrgyou can run in the future to recreate the current configuration, and a 30493f84f4Smrgfile `config.log' containing compiler output (useful mainly for 31493f84f4Smrgdebugging `configure'). 32493f84f4Smrg 33493f84f4Smrg It can also use an optional file (typically called `config.cache' 34493f84f4Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35493f84f4Smrgthe results of its tests to speed up reconfiguring. Caching is 36493f84f4Smrgdisabled by default to prevent problems with accidental use of stale 37493f84f4Smrgcache files. 38493f84f4Smrg 39493f84f4Smrg If you need to do unusual things to compile the package, please try 40493f84f4Smrgto figure out how `configure' could check whether to do them, and mail 41493f84f4Smrgdiffs or instructions to the address given in the `README' so they can 42493f84f4Smrgbe considered for the next release. If you are using the cache, and at 43493f84f4Smrgsome point `config.cache' contains results you don't want to keep, you 44493f84f4Smrgmay remove or edit it. 45493f84f4Smrg 46493f84f4Smrg The file `configure.ac' (or `configure.in') is used to create 47493f84f4Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 48493f84f4Smrgyou want to change it or regenerate `configure' using a newer version 49493f84f4Smrgof `autoconf'. 50493f84f4Smrg 51ee82cb62Smrg The simplest way to compile this package is: 52493f84f4Smrg 53493f84f4Smrg 1. `cd' to the directory containing the package's source code and type 54493f84f4Smrg `./configure' to configure the package for your system. 55493f84f4Smrg 56493f84f4Smrg Running `configure' might take a while. While running, it prints 57493f84f4Smrg some messages telling which features it is checking for. 58493f84f4Smrg 59493f84f4Smrg 2. Type `make' to compile the package. 60493f84f4Smrg 61493f84f4Smrg 3. Optionally, type `make check' to run any self-tests that come with 62ee82cb62Smrg the package, generally using the just-built uninstalled binaries. 63493f84f4Smrg 64493f84f4Smrg 4. Type `make install' to install the programs and any data files and 65ee82cb62Smrg documentation. When installing into a prefix owned by root, it is 66ee82cb62Smrg recommended that the package be configured and built as a regular 67ee82cb62Smrg user, and only the `make install' phase executed with root 68ee82cb62Smrg privileges. 69ee82cb62Smrg 70ee82cb62Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71ee82cb62Smrg this time using the binaries in their final installed location. 72ee82cb62Smrg This target does not install anything. Running this target as a 73ee82cb62Smrg regular user, particularly if the prior `make install' required 74ee82cb62Smrg root privileges, verifies that the installation completed 75ee82cb62Smrg correctly. 76ee82cb62Smrg 77ee82cb62Smrg 6. You can remove the program binaries and object files from the 78493f84f4Smrg source code directory by typing `make clean'. To also remove the 79493f84f4Smrg files that `configure' created (so you can compile the package for 80493f84f4Smrg a different kind of computer), type `make distclean'. There is 81493f84f4Smrg also a `make maintainer-clean' target, but that is intended mainly 82493f84f4Smrg for the package's developers. If you use it, you may have to get 83493f84f4Smrg all sorts of other programs in order to regenerate files that came 84493f84f4Smrg with the distribution. 85493f84f4Smrg 86ee82cb62Smrg 7. Often, you can also type `make uninstall' to remove the installed 87ee82cb62Smrg files again. In practice, not all packages have tested that 88ee82cb62Smrg uninstallation works correctly, even though it is required by the 89ee82cb62Smrg GNU Coding Standards. 90ee82cb62Smrg 91ee82cb62Smrg 8. Some packages, particularly those that use Automake, provide `make 92ee82cb62Smrg distcheck', which can by used by developers to test that all other 93ee82cb62Smrg targets like `make install' and `make uninstall' work correctly. 94ee82cb62Smrg This target is generally not run by end users. 95493f84f4Smrg 96493f84f4SmrgCompilers and Options 97493f84f4Smrg===================== 98493f84f4Smrg 99493f84f4Smrg Some systems require unusual options for compilation or linking that 100493f84f4Smrgthe `configure' script does not know about. Run `./configure --help' 101493f84f4Smrgfor details on some of the pertinent environment variables. 102493f84f4Smrg 103493f84f4Smrg You can give `configure' initial values for configuration parameters 104493f84f4Smrgby setting variables in the command line or in the environment. Here 105493f84f4Smrgis an example: 106493f84f4Smrg 107493f84f4Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108493f84f4Smrg 109493f84f4Smrg *Note Defining Variables::, for more details. 110493f84f4Smrg 111493f84f4SmrgCompiling For Multiple Architectures 112493f84f4Smrg==================================== 113493f84f4Smrg 114493f84f4Smrg You can compile the package for more than one kind of computer at the 115493f84f4Smrgsame time, by placing the object files for each architecture in their 116493f84f4Smrgown directory. To do this, you can use GNU `make'. `cd' to the 117493f84f4Smrgdirectory where you want the object files and executables to go and run 118493f84f4Smrgthe `configure' script. `configure' automatically checks for the 119ee82cb62Smrgsource code in the directory that `configure' is in and in `..'. This 120ee82cb62Smrgis known as a "VPATH" build. 121493f84f4Smrg 122493f84f4Smrg With a non-GNU `make', it is safer to compile the package for one 123493f84f4Smrgarchitecture at a time in the source code directory. After you have 124493f84f4Smrginstalled the package for one architecture, use `make distclean' before 125493f84f4Smrgreconfiguring for another architecture. 126493f84f4Smrg 127493f84f4Smrg On MacOS X 10.5 and later systems, you can create libraries and 128493f84f4Smrgexecutables that work on multiple system types--known as "fat" or 129493f84f4Smrg"universal" binaries--by specifying multiple `-arch' options to the 130493f84f4Smrgcompiler but only a single `-arch' option to the preprocessor. Like 131493f84f4Smrgthis: 132493f84f4Smrg 133493f84f4Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134493f84f4Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135493f84f4Smrg CPP="gcc -E" CXXCPP="g++ -E" 136493f84f4Smrg 137493f84f4Smrg This is not guaranteed to produce working output in all cases, you 138493f84f4Smrgmay have to build one architecture at a time and combine the results 139493f84f4Smrgusing the `lipo' tool if you have problems. 140493f84f4Smrg 141493f84f4SmrgInstallation Names 142493f84f4Smrg================== 143493f84f4Smrg 144493f84f4Smrg By default, `make install' installs the package's commands under 145493f84f4Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146493f84f4Smrgcan specify an installation prefix other than `/usr/local' by giving 147ee82cb62Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148ee82cb62Smrgabsolute file name. 149493f84f4Smrg 150493f84f4Smrg You can specify separate installation prefixes for 151493f84f4Smrgarchitecture-specific files and architecture-independent files. If you 152493f84f4Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153493f84f4SmrgPREFIX as the prefix for installing programs and libraries. 154493f84f4SmrgDocumentation and other data files still use the regular prefix. 155493f84f4Smrg 156493f84f4Smrg In addition, if you use an unusual directory layout you can give 157493f84f4Smrgoptions like `--bindir=DIR' to specify different values for particular 158493f84f4Smrgkinds of files. Run `configure --help' for a list of the directories 159ee82cb62Smrgyou can set and what kinds of files go in them. In general, the 160ee82cb62Smrgdefault for these options is expressed in terms of `${prefix}', so that 161ee82cb62Smrgspecifying just `--prefix' will affect all of the other directory 162ee82cb62Smrgspecifications that were not explicitly provided. 163ee82cb62Smrg 164ee82cb62Smrg The most portable way to affect installation locations is to pass the 165ee82cb62Smrgcorrect locations to `configure'; however, many packages provide one or 166ee82cb62Smrgboth of the following shortcuts of passing variable assignments to the 167ee82cb62Smrg`make install' command line to change installation locations without 168ee82cb62Smrghaving to reconfigure or recompile. 169ee82cb62Smrg 170ee82cb62Smrg The first method involves providing an override variable for each 171ee82cb62Smrgaffected directory. For example, `make install 172ee82cb62Smrgprefix=/alternate/directory' will choose an alternate location for all 173ee82cb62Smrgdirectory configuration variables that were expressed in terms of 174ee82cb62Smrg`${prefix}'. Any directories that were specified during `configure', 175ee82cb62Smrgbut not in terms of `${prefix}', must each be overridden at install 176ee82cb62Smrgtime for the entire installation to be relocated. The approach of 177ee82cb62Smrgmakefile variable overrides for each directory variable is required by 178ee82cb62Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179ee82cb62SmrgHowever, some platforms have known limitations with the semantics of 180ee82cb62Smrgshared libraries that end up requiring recompilation when using this 181ee82cb62Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182ee82cb62Smrg 183ee82cb62Smrg The second method involves providing the `DESTDIR' variable. For 184ee82cb62Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185ee82cb62Smrg`/alternate/directory' before all installation names. The approach of 186ee82cb62Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187ee82cb62Smrgdoes not work on platforms that have drive letters. On the other hand, 188ee82cb62Smrgit does better at avoiding recompilation issues, and works well even 189ee82cb62Smrgwhen some directory options were not specified in terms of `${prefix}' 190ee82cb62Smrgat `configure' time. 191ee82cb62Smrg 192ee82cb62SmrgOptional Features 193ee82cb62Smrg================= 194493f84f4Smrg 195493f84f4Smrg If the package supports it, you can cause programs to be installed 196493f84f4Smrgwith an extra prefix or suffix on their names by giving `configure' the 197493f84f4Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198493f84f4Smrg 199493f84f4Smrg Some packages pay attention to `--enable-FEATURE' options to 200493f84f4Smrg`configure', where FEATURE indicates an optional part of the package. 201493f84f4SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202493f84f4Smrgis something like `gnu-as' or `x' (for the X Window System). The 203493f84f4Smrg`README' should mention any `--enable-' and `--with-' options that the 204493f84f4Smrgpackage recognizes. 205493f84f4Smrg 206493f84f4Smrg For packages that use the X Window System, `configure' can usually 207493f84f4Smrgfind the X include and library files automatically, but if it doesn't, 208493f84f4Smrgyou can use the `configure' options `--x-includes=DIR' and 209493f84f4Smrg`--x-libraries=DIR' to specify their locations. 210493f84f4Smrg 211ee82cb62Smrg Some packages offer the ability to configure how verbose the 212ee82cb62Smrgexecution of `make' will be. For these packages, running `./configure 213ee82cb62Smrg--enable-silent-rules' sets the default to minimal output, which can be 214ee82cb62Smrgoverridden with `make V=1'; while running `./configure 215ee82cb62Smrg--disable-silent-rules' sets the default to verbose, which can be 216ee82cb62Smrgoverridden with `make V=0'. 217ee82cb62Smrg 218493f84f4SmrgParticular systems 219493f84f4Smrg================== 220493f84f4Smrg 221493f84f4Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222493f84f4SmrgCC is not installed, it is recommended to use the following options in 223493f84f4Smrgorder to use an ANSI C compiler: 224493f84f4Smrg 225ee82cb62Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226493f84f4Smrg 227493f84f4Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228493f84f4Smrg 229ee82cb62Smrg HP-UX `make' updates targets which have the same time stamps as 230ee82cb62Smrgtheir prerequisites, which makes it generally unusable when shipped 231ee82cb62Smrggenerated files such as `configure' are involved. Use GNU `make' 232ee82cb62Smrginstead. 233ee82cb62Smrg 234493f84f4Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235493f84f4Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236493f84f4Smrga workaround. If GNU CC is not installed, it is therefore recommended 237493f84f4Smrgto try 238493f84f4Smrg 239493f84f4Smrg ./configure CC="cc" 240493f84f4Smrg 241493f84f4Smrgand if that doesn't work, try 242493f84f4Smrg 243493f84f4Smrg ./configure CC="cc -nodtk" 244493f84f4Smrg 245ee82cb62Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246ee82cb62Smrgdirectory contains several dysfunctional programs; working variants of 247ee82cb62Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248ee82cb62Smrgin your `PATH', put it _after_ `/usr/bin'. 249ee82cb62Smrg 250ee82cb62Smrg On Haiku, software installed for all users goes in `/boot/common', 251ee82cb62Smrgnot `/usr/local'. It is recommended to use the following options: 252ee82cb62Smrg 253ee82cb62Smrg ./configure --prefix=/boot/common 254ee82cb62Smrg 255493f84f4SmrgSpecifying the System Type 256493f84f4Smrg========================== 257493f84f4Smrg 258493f84f4Smrg There may be some features `configure' cannot figure out 259493f84f4Smrgautomatically, but needs to determine by the type of machine the package 260493f84f4Smrgwill run on. Usually, assuming the package is built to be run on the 261493f84f4Smrg_same_ architectures, `configure' can figure that out, but if it prints 262493f84f4Smrga message saying it cannot guess the machine type, give it the 263493f84f4Smrg`--build=TYPE' option. TYPE can either be a short name for the system 264493f84f4Smrgtype, such as `sun4', or a canonical name which has the form: 265493f84f4Smrg 266493f84f4Smrg CPU-COMPANY-SYSTEM 267493f84f4Smrg 268493f84f4Smrgwhere SYSTEM can have one of these forms: 269493f84f4Smrg 270ee82cb62Smrg OS 271ee82cb62Smrg KERNEL-OS 272493f84f4Smrg 273493f84f4Smrg See the file `config.sub' for the possible values of each field. If 274493f84f4Smrg`config.sub' isn't included in this package, then this package doesn't 275493f84f4Smrgneed to know the machine type. 276493f84f4Smrg 277493f84f4Smrg If you are _building_ compiler tools for cross-compiling, you should 278493f84f4Smrguse the option `--target=TYPE' to select the type of system they will 279493f84f4Smrgproduce code for. 280493f84f4Smrg 281493f84f4Smrg If you want to _use_ a cross compiler, that generates code for a 282493f84f4Smrgplatform different from the build platform, you should specify the 283493f84f4Smrg"host" platform (i.e., that on which the generated programs will 284493f84f4Smrgeventually be run) with `--host=TYPE'. 285493f84f4Smrg 286493f84f4SmrgSharing Defaults 287493f84f4Smrg================ 288493f84f4Smrg 289493f84f4Smrg If you want to set default values for `configure' scripts to share, 290493f84f4Smrgyou can create a site shell script called `config.site' that gives 291493f84f4Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 292493f84f4Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293493f84f4Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294493f84f4Smrg`CONFIG_SITE' environment variable to the location of the site script. 295493f84f4SmrgA warning: not all `configure' scripts look for a site script. 296493f84f4Smrg 297493f84f4SmrgDefining Variables 298493f84f4Smrg================== 299493f84f4Smrg 300493f84f4Smrg Variables not defined in a site shell script can be set in the 301493f84f4Smrgenvironment passed to `configure'. However, some packages may run 302493f84f4Smrgconfigure again during the build, and the customized values of these 303493f84f4Smrgvariables may be lost. In order to avoid this problem, you should set 304493f84f4Smrgthem in the `configure' command line, using `VAR=value'. For example: 305493f84f4Smrg 306493f84f4Smrg ./configure CC=/usr/local2/bin/gcc 307493f84f4Smrg 308493f84f4Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 309493f84f4Smrgoverridden in the site shell script). 310493f84f4Smrg 311493f84f4SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312493f84f4Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313493f84f4Smrg 314493f84f4Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315493f84f4Smrg 316493f84f4Smrg`configure' Invocation 317493f84f4Smrg====================== 318493f84f4Smrg 319493f84f4Smrg `configure' recognizes the following options to control how it 320493f84f4Smrgoperates. 321493f84f4Smrg 322493f84f4Smrg`--help' 323493f84f4Smrg`-h' 324493f84f4Smrg Print a summary of all of the options to `configure', and exit. 325493f84f4Smrg 326493f84f4Smrg`--help=short' 327493f84f4Smrg`--help=recursive' 328493f84f4Smrg Print a summary of the options unique to this package's 329493f84f4Smrg `configure', and exit. The `short' variant lists options used 330493f84f4Smrg only in the top level, while the `recursive' variant lists options 331493f84f4Smrg also present in any nested packages. 332493f84f4Smrg 333493f84f4Smrg`--version' 334493f84f4Smrg`-V' 335493f84f4Smrg Print the version of Autoconf used to generate the `configure' 336493f84f4Smrg script, and exit. 337493f84f4Smrg 338493f84f4Smrg`--cache-file=FILE' 339493f84f4Smrg Enable the cache: use and save the results of the tests in FILE, 340493f84f4Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341493f84f4Smrg disable caching. 342493f84f4Smrg 343493f84f4Smrg`--config-cache' 344493f84f4Smrg`-C' 345493f84f4Smrg Alias for `--cache-file=config.cache'. 346493f84f4Smrg 347493f84f4Smrg`--quiet' 348493f84f4Smrg`--silent' 349493f84f4Smrg`-q' 350493f84f4Smrg Do not print messages saying which checks are being made. To 351493f84f4Smrg suppress all normal output, redirect it to `/dev/null' (any error 352493f84f4Smrg messages will still be shown). 353493f84f4Smrg 354493f84f4Smrg`--srcdir=DIR' 355493f84f4Smrg Look for the package's source code in directory DIR. Usually 356493f84f4Smrg `configure' can determine that directory automatically. 357493f84f4Smrg 358493f84f4Smrg`--prefix=DIR' 359ee82cb62Smrg Use DIR as the installation prefix. *note Installation Names:: 360493f84f4Smrg for more details, including other options available for fine-tuning 361493f84f4Smrg the installation locations. 362493f84f4Smrg 363493f84f4Smrg`--no-create' 364493f84f4Smrg`-n' 365493f84f4Smrg Run the configure checks, but stop before creating any output 366493f84f4Smrg files. 367493f84f4Smrg 368493f84f4Smrg`configure' also accepts some other, not widely useful, options. Run 369493f84f4Smrg`configure --help' for more details. 370493f84f4Smrg 371