1c3f70f0aSmrgInstallation Instructions 2c3f70f0aSmrg************************* 3c3f70f0aSmrg 4219ffec0SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5219ffec0SmrgInc. 6c3f70f0aSmrg 7219ffec0Smrg Copying and distribution of this file, with or without modification, 8219ffec0Smrgare permitted in any medium without royalty provided the copyright 9219ffec0Smrgnotice and this notice are preserved. This file is offered as-is, 10219ffec0Smrgwithout warranty of any kind. 11c3f70f0aSmrg 12c3f70f0aSmrgBasic Installation 13c3f70f0aSmrg================== 14c3f70f0aSmrg 15c3f70f0aSmrg Briefly, the shell commands `./configure; make; make install' should 16c3f70f0aSmrgconfigure, build, and install this package. The following 17c3f70f0aSmrgmore-detailed instructions are generic; see the `README' file for 18219ffec0Smrginstructions specific to this package. Some packages provide this 19219ffec0Smrg`INSTALL' file but do not implement all of the features documented 20219ffec0Smrgbelow. The lack of an optional feature in a given package is not 21219ffec0Smrgnecessarily a bug. More recommendations for GNU packages can be found 22219ffec0Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 23c3f70f0aSmrg 24c3f70f0aSmrg The `configure' shell script attempts to guess correct values for 25c3f70f0aSmrgvarious system-dependent variables used during compilation. It uses 26c3f70f0aSmrgthose values to create a `Makefile' in each directory of the package. 27c3f70f0aSmrgIt may also create one or more `.h' files containing system-dependent 28c3f70f0aSmrgdefinitions. Finally, it creates a shell script `config.status' that 29c3f70f0aSmrgyou can run in the future to recreate the current configuration, and a 30c3f70f0aSmrgfile `config.log' containing compiler output (useful mainly for 31c3f70f0aSmrgdebugging `configure'). 32c3f70f0aSmrg 33c3f70f0aSmrg It can also use an optional file (typically called `config.cache' 34c3f70f0aSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35c3f70f0aSmrgthe results of its tests to speed up reconfiguring. Caching is 36c3f70f0aSmrgdisabled by default to prevent problems with accidental use of stale 37c3f70f0aSmrgcache files. 38c3f70f0aSmrg 39c3f70f0aSmrg If you need to do unusual things to compile the package, please try 40c3f70f0aSmrgto figure out how `configure' could check whether to do them, and mail 41c3f70f0aSmrgdiffs or instructions to the address given in the `README' so they can 42c3f70f0aSmrgbe considered for the next release. If you are using the cache, and at 43c3f70f0aSmrgsome point `config.cache' contains results you don't want to keep, you 44c3f70f0aSmrgmay remove or edit it. 45c3f70f0aSmrg 46c3f70f0aSmrg The file `configure.ac' (or `configure.in') is used to create 47c3f70f0aSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 48c3f70f0aSmrgyou want to change it or regenerate `configure' using a newer version 49c3f70f0aSmrgof `autoconf'. 50c3f70f0aSmrg 51219ffec0Smrg The simplest way to compile this package is: 52c3f70f0aSmrg 53c3f70f0aSmrg 1. `cd' to the directory containing the package's source code and type 54c3f70f0aSmrg `./configure' to configure the package for your system. 55c3f70f0aSmrg 56c3f70f0aSmrg Running `configure' might take a while. While running, it prints 57c3f70f0aSmrg some messages telling which features it is checking for. 58c3f70f0aSmrg 59c3f70f0aSmrg 2. Type `make' to compile the package. 60c3f70f0aSmrg 61c3f70f0aSmrg 3. Optionally, type `make check' to run any self-tests that come with 62219ffec0Smrg the package, generally using the just-built uninstalled binaries. 63c3f70f0aSmrg 64c3f70f0aSmrg 4. Type `make install' to install the programs and any data files and 65219ffec0Smrg documentation. When installing into a prefix owned by root, it is 66219ffec0Smrg recommended that the package be configured and built as a regular 67219ffec0Smrg user, and only the `make install' phase executed with root 68219ffec0Smrg privileges. 69219ffec0Smrg 70219ffec0Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71219ffec0Smrg this time using the binaries in their final installed location. 72219ffec0Smrg This target does not install anything. Running this target as a 73219ffec0Smrg regular user, particularly if the prior `make install' required 74219ffec0Smrg root privileges, verifies that the installation completed 75219ffec0Smrg correctly. 76219ffec0Smrg 77219ffec0Smrg 6. You can remove the program binaries and object files from the 78c3f70f0aSmrg source code directory by typing `make clean'. To also remove the 79c3f70f0aSmrg files that `configure' created (so you can compile the package for 80c3f70f0aSmrg a different kind of computer), type `make distclean'. There is 81c3f70f0aSmrg also a `make maintainer-clean' target, but that is intended mainly 82c3f70f0aSmrg for the package's developers. If you use it, you may have to get 83c3f70f0aSmrg all sorts of other programs in order to regenerate files that came 84c3f70f0aSmrg with the distribution. 85c3f70f0aSmrg 86219ffec0Smrg 7. Often, you can also type `make uninstall' to remove the installed 87219ffec0Smrg files again. In practice, not all packages have tested that 88219ffec0Smrg uninstallation works correctly, even though it is required by the 89219ffec0Smrg GNU Coding Standards. 90219ffec0Smrg 91219ffec0Smrg 8. Some packages, particularly those that use Automake, provide `make 92219ffec0Smrg distcheck', which can by used by developers to test that all other 93219ffec0Smrg targets like `make install' and `make uninstall' work correctly. 94219ffec0Smrg This target is generally not run by end users. 95c3f70f0aSmrg 96c3f70f0aSmrgCompilers and Options 97c3f70f0aSmrg===================== 98c3f70f0aSmrg 99c3f70f0aSmrg Some systems require unusual options for compilation or linking that 100c3f70f0aSmrgthe `configure' script does not know about. Run `./configure --help' 101c3f70f0aSmrgfor details on some of the pertinent environment variables. 102c3f70f0aSmrg 103c3f70f0aSmrg You can give `configure' initial values for configuration parameters 104c3f70f0aSmrgby setting variables in the command line or in the environment. Here 105c3f70f0aSmrgis an example: 106c3f70f0aSmrg 107c3f70f0aSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108c3f70f0aSmrg 109c3f70f0aSmrg *Note Defining Variables::, for more details. 110c3f70f0aSmrg 111c3f70f0aSmrgCompiling For Multiple Architectures 112c3f70f0aSmrg==================================== 113c3f70f0aSmrg 114c3f70f0aSmrg You can compile the package for more than one kind of computer at the 115c3f70f0aSmrgsame time, by placing the object files for each architecture in their 116c3f70f0aSmrgown directory. To do this, you can use GNU `make'. `cd' to the 117c3f70f0aSmrgdirectory where you want the object files and executables to go and run 118c3f70f0aSmrgthe `configure' script. `configure' automatically checks for the 119219ffec0Smrgsource code in the directory that `configure' is in and in `..'. This 120219ffec0Smrgis known as a "VPATH" build. 121c3f70f0aSmrg 122c3f70f0aSmrg With a non-GNU `make', it is safer to compile the package for one 123c3f70f0aSmrgarchitecture at a time in the source code directory. After you have 124c3f70f0aSmrginstalled the package for one architecture, use `make distclean' before 125c3f70f0aSmrgreconfiguring for another architecture. 126c3f70f0aSmrg 127c3f70f0aSmrg On MacOS X 10.5 and later systems, you can create libraries and 128c3f70f0aSmrgexecutables that work on multiple system types--known as "fat" or 129c3f70f0aSmrg"universal" binaries--by specifying multiple `-arch' options to the 130c3f70f0aSmrgcompiler but only a single `-arch' option to the preprocessor. Like 131c3f70f0aSmrgthis: 132c3f70f0aSmrg 133c3f70f0aSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134c3f70f0aSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135c3f70f0aSmrg CPP="gcc -E" CXXCPP="g++ -E" 136c3f70f0aSmrg 137c3f70f0aSmrg This is not guaranteed to produce working output in all cases, you 138c3f70f0aSmrgmay have to build one architecture at a time and combine the results 139c3f70f0aSmrgusing the `lipo' tool if you have problems. 140c3f70f0aSmrg 141c3f70f0aSmrgInstallation Names 142c3f70f0aSmrg================== 143c3f70f0aSmrg 144c3f70f0aSmrg By default, `make install' installs the package's commands under 145c3f70f0aSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146c3f70f0aSmrgcan specify an installation prefix other than `/usr/local' by giving 147219ffec0Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148219ffec0Smrgabsolute file name. 149c3f70f0aSmrg 150c3f70f0aSmrg You can specify separate installation prefixes for 151c3f70f0aSmrgarchitecture-specific files and architecture-independent files. If you 152c3f70f0aSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153c3f70f0aSmrgPREFIX as the prefix for installing programs and libraries. 154c3f70f0aSmrgDocumentation and other data files still use the regular prefix. 155c3f70f0aSmrg 156c3f70f0aSmrg In addition, if you use an unusual directory layout you can give 157c3f70f0aSmrgoptions like `--bindir=DIR' to specify different values for particular 158c3f70f0aSmrgkinds of files. Run `configure --help' for a list of the directories 159219ffec0Smrgyou can set and what kinds of files go in them. In general, the 160219ffec0Smrgdefault for these options is expressed in terms of `${prefix}', so that 161219ffec0Smrgspecifying just `--prefix' will affect all of the other directory 162219ffec0Smrgspecifications that were not explicitly provided. 163219ffec0Smrg 164219ffec0Smrg The most portable way to affect installation locations is to pass the 165219ffec0Smrgcorrect locations to `configure'; however, many packages provide one or 166219ffec0Smrgboth of the following shortcuts of passing variable assignments to the 167219ffec0Smrg`make install' command line to change installation locations without 168219ffec0Smrghaving to reconfigure or recompile. 169219ffec0Smrg 170219ffec0Smrg The first method involves providing an override variable for each 171219ffec0Smrgaffected directory. For example, `make install 172219ffec0Smrgprefix=/alternate/directory' will choose an alternate location for all 173219ffec0Smrgdirectory configuration variables that were expressed in terms of 174219ffec0Smrg`${prefix}'. Any directories that were specified during `configure', 175219ffec0Smrgbut not in terms of `${prefix}', must each be overridden at install 176219ffec0Smrgtime for the entire installation to be relocated. The approach of 177219ffec0Smrgmakefile variable overrides for each directory variable is required by 178219ffec0Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179219ffec0SmrgHowever, some platforms have known limitations with the semantics of 180219ffec0Smrgshared libraries that end up requiring recompilation when using this 181219ffec0Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182219ffec0Smrg 183219ffec0Smrg The second method involves providing the `DESTDIR' variable. For 184219ffec0Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185219ffec0Smrg`/alternate/directory' before all installation names. The approach of 186219ffec0Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187219ffec0Smrgdoes not work on platforms that have drive letters. On the other hand, 188219ffec0Smrgit does better at avoiding recompilation issues, and works well even 189219ffec0Smrgwhen some directory options were not specified in terms of `${prefix}' 190219ffec0Smrgat `configure' time. 191219ffec0Smrg 192219ffec0SmrgOptional Features 193219ffec0Smrg================= 194c3f70f0aSmrg 195c3f70f0aSmrg If the package supports it, you can cause programs to be installed 196c3f70f0aSmrgwith an extra prefix or suffix on their names by giving `configure' the 197c3f70f0aSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198c3f70f0aSmrg 199c3f70f0aSmrg Some packages pay attention to `--enable-FEATURE' options to 200c3f70f0aSmrg`configure', where FEATURE indicates an optional part of the package. 201c3f70f0aSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202c3f70f0aSmrgis something like `gnu-as' or `x' (for the X Window System). The 203c3f70f0aSmrg`README' should mention any `--enable-' and `--with-' options that the 204c3f70f0aSmrgpackage recognizes. 205c3f70f0aSmrg 206c3f70f0aSmrg For packages that use the X Window System, `configure' can usually 207c3f70f0aSmrgfind the X include and library files automatically, but if it doesn't, 208c3f70f0aSmrgyou can use the `configure' options `--x-includes=DIR' and 209c3f70f0aSmrg`--x-libraries=DIR' to specify their locations. 210c3f70f0aSmrg 211219ffec0Smrg Some packages offer the ability to configure how verbose the 212219ffec0Smrgexecution of `make' will be. For these packages, running `./configure 213219ffec0Smrg--enable-silent-rules' sets the default to minimal output, which can be 214219ffec0Smrgoverridden with `make V=1'; while running `./configure 215219ffec0Smrg--disable-silent-rules' sets the default to verbose, which can be 216219ffec0Smrgoverridden with `make V=0'. 217219ffec0Smrg 218c3f70f0aSmrgParticular systems 219c3f70f0aSmrg================== 220c3f70f0aSmrg 221c3f70f0aSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222c3f70f0aSmrgCC is not installed, it is recommended to use the following options in 223c3f70f0aSmrgorder to use an ANSI C compiler: 224c3f70f0aSmrg 225219ffec0Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226c3f70f0aSmrg 227c3f70f0aSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228c3f70f0aSmrg 229219ffec0Smrg HP-UX `make' updates targets which have the same time stamps as 230219ffec0Smrgtheir prerequisites, which makes it generally unusable when shipped 231219ffec0Smrggenerated files such as `configure' are involved. Use GNU `make' 232219ffec0Smrginstead. 233219ffec0Smrg 234c3f70f0aSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235c3f70f0aSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236c3f70f0aSmrga workaround. If GNU CC is not installed, it is therefore recommended 237c3f70f0aSmrgto try 238c3f70f0aSmrg 239c3f70f0aSmrg ./configure CC="cc" 240c3f70f0aSmrg 241c3f70f0aSmrgand if that doesn't work, try 242c3f70f0aSmrg 243c3f70f0aSmrg ./configure CC="cc -nodtk" 244c3f70f0aSmrg 245219ffec0Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246219ffec0Smrgdirectory contains several dysfunctional programs; working variants of 247219ffec0Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248219ffec0Smrgin your `PATH', put it _after_ `/usr/bin'. 249219ffec0Smrg 250219ffec0Smrg On Haiku, software installed for all users goes in `/boot/common', 251219ffec0Smrgnot `/usr/local'. It is recommended to use the following options: 252219ffec0Smrg 253219ffec0Smrg ./configure --prefix=/boot/common 254219ffec0Smrg 255c3f70f0aSmrgSpecifying the System Type 256c3f70f0aSmrg========================== 257c3f70f0aSmrg 258c3f70f0aSmrg There may be some features `configure' cannot figure out 259c3f70f0aSmrgautomatically, but needs to determine by the type of machine the package 260c3f70f0aSmrgwill run on. Usually, assuming the package is built to be run on the 261c3f70f0aSmrg_same_ architectures, `configure' can figure that out, but if it prints 262c3f70f0aSmrga message saying it cannot guess the machine type, give it the 263c3f70f0aSmrg`--build=TYPE' option. TYPE can either be a short name for the system 264c3f70f0aSmrgtype, such as `sun4', or a canonical name which has the form: 265c3f70f0aSmrg 266c3f70f0aSmrg CPU-COMPANY-SYSTEM 267c3f70f0aSmrg 268c3f70f0aSmrgwhere SYSTEM can have one of these forms: 269c3f70f0aSmrg 270219ffec0Smrg OS 271219ffec0Smrg KERNEL-OS 272c3f70f0aSmrg 273c3f70f0aSmrg See the file `config.sub' for the possible values of each field. If 274c3f70f0aSmrg`config.sub' isn't included in this package, then this package doesn't 275c3f70f0aSmrgneed to know the machine type. 276c3f70f0aSmrg 277c3f70f0aSmrg If you are _building_ compiler tools for cross-compiling, you should 278c3f70f0aSmrguse the option `--target=TYPE' to select the type of system they will 279c3f70f0aSmrgproduce code for. 280c3f70f0aSmrg 281c3f70f0aSmrg If you want to _use_ a cross compiler, that generates code for a 282c3f70f0aSmrgplatform different from the build platform, you should specify the 283c3f70f0aSmrg"host" platform (i.e., that on which the generated programs will 284c3f70f0aSmrgeventually be run) with `--host=TYPE'. 285c3f70f0aSmrg 286c3f70f0aSmrgSharing Defaults 287c3f70f0aSmrg================ 288c3f70f0aSmrg 289c3f70f0aSmrg If you want to set default values for `configure' scripts to share, 290c3f70f0aSmrgyou can create a site shell script called `config.site' that gives 291c3f70f0aSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 292c3f70f0aSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293c3f70f0aSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294c3f70f0aSmrg`CONFIG_SITE' environment variable to the location of the site script. 295c3f70f0aSmrgA warning: not all `configure' scripts look for a site script. 296c3f70f0aSmrg 297c3f70f0aSmrgDefining Variables 298c3f70f0aSmrg================== 299c3f70f0aSmrg 300c3f70f0aSmrg Variables not defined in a site shell script can be set in the 301c3f70f0aSmrgenvironment passed to `configure'. However, some packages may run 302c3f70f0aSmrgconfigure again during the build, and the customized values of these 303c3f70f0aSmrgvariables may be lost. In order to avoid this problem, you should set 304c3f70f0aSmrgthem in the `configure' command line, using `VAR=value'. For example: 305c3f70f0aSmrg 306c3f70f0aSmrg ./configure CC=/usr/local2/bin/gcc 307c3f70f0aSmrg 308c3f70f0aSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 309c3f70f0aSmrgoverridden in the site shell script). 310c3f70f0aSmrg 311c3f70f0aSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312c3f70f0aSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313c3f70f0aSmrg 314c3f70f0aSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315c3f70f0aSmrg 316c3f70f0aSmrg`configure' Invocation 317c3f70f0aSmrg====================== 318c3f70f0aSmrg 319c3f70f0aSmrg `configure' recognizes the following options to control how it 320c3f70f0aSmrgoperates. 321c3f70f0aSmrg 322c3f70f0aSmrg`--help' 323c3f70f0aSmrg`-h' 324c3f70f0aSmrg Print a summary of all of the options to `configure', and exit. 325c3f70f0aSmrg 326c3f70f0aSmrg`--help=short' 327c3f70f0aSmrg`--help=recursive' 328c3f70f0aSmrg Print a summary of the options unique to this package's 329c3f70f0aSmrg `configure', and exit. The `short' variant lists options used 330c3f70f0aSmrg only in the top level, while the `recursive' variant lists options 331c3f70f0aSmrg also present in any nested packages. 332c3f70f0aSmrg 333c3f70f0aSmrg`--version' 334c3f70f0aSmrg`-V' 335c3f70f0aSmrg Print the version of Autoconf used to generate the `configure' 336c3f70f0aSmrg script, and exit. 337c3f70f0aSmrg 338c3f70f0aSmrg`--cache-file=FILE' 339c3f70f0aSmrg Enable the cache: use and save the results of the tests in FILE, 340c3f70f0aSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341c3f70f0aSmrg disable caching. 342c3f70f0aSmrg 343c3f70f0aSmrg`--config-cache' 344c3f70f0aSmrg`-C' 345c3f70f0aSmrg Alias for `--cache-file=config.cache'. 346c3f70f0aSmrg 347c3f70f0aSmrg`--quiet' 348c3f70f0aSmrg`--silent' 349c3f70f0aSmrg`-q' 350c3f70f0aSmrg Do not print messages saying which checks are being made. To 351c3f70f0aSmrg suppress all normal output, redirect it to `/dev/null' (any error 352c3f70f0aSmrg messages will still be shown). 353c3f70f0aSmrg 354c3f70f0aSmrg`--srcdir=DIR' 355c3f70f0aSmrg Look for the package's source code in directory DIR. Usually 356c3f70f0aSmrg `configure' can determine that directory automatically. 357c3f70f0aSmrg 358c3f70f0aSmrg`--prefix=DIR' 359219ffec0Smrg Use DIR as the installation prefix. *note Installation Names:: 360c3f70f0aSmrg for more details, including other options available for fine-tuning 361c3f70f0aSmrg the installation locations. 362c3f70f0aSmrg 363c3f70f0aSmrg`--no-create' 364c3f70f0aSmrg`-n' 365c3f70f0aSmrg Run the configure checks, but stop before creating any output 366c3f70f0aSmrg files. 367c3f70f0aSmrg 368c3f70f0aSmrg`configure' also accepts some other, not widely useful, options. Run 369c3f70f0aSmrg`configure --help' for more details. 370c3f70f0aSmrg 371