1b534f209SmrgInstallation Instructions 2b534f209Smrg************************* 3b534f209Smrg 4cf503b78SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5cf503b78SmrgInc. 6b534f209Smrg 7cf503b78Smrg Copying and distribution of this file, with or without modification, 8cf503b78Smrgare permitted in any medium without royalty provided the copyright 9cf503b78Smrgnotice and this notice are preserved. This file is offered as-is, 10cf503b78Smrgwithout warranty of any kind. 11b534f209Smrg 12b534f209SmrgBasic Installation 13b534f209Smrg================== 14b534f209Smrg 15b534f209Smrg Briefly, the shell commands `./configure; make; make install' should 16b534f209Smrgconfigure, build, and install this package. The following 17b534f209Smrgmore-detailed instructions are generic; see the `README' file for 18cf503b78Smrginstructions specific to this package. Some packages provide this 19cf503b78Smrg`INSTALL' file but do not implement all of the features documented 20cf503b78Smrgbelow. The lack of an optional feature in a given package is not 21cf503b78Smrgnecessarily a bug. More recommendations for GNU packages can be found 22cf503b78Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 23b534f209Smrg 24b534f209Smrg The `configure' shell script attempts to guess correct values for 25b534f209Smrgvarious system-dependent variables used during compilation. It uses 26b534f209Smrgthose values to create a `Makefile' in each directory of the package. 27b534f209SmrgIt may also create one or more `.h' files containing system-dependent 28b534f209Smrgdefinitions. Finally, it creates a shell script `config.status' that 29b534f209Smrgyou can run in the future to recreate the current configuration, and a 30b534f209Smrgfile `config.log' containing compiler output (useful mainly for 31b534f209Smrgdebugging `configure'). 32b534f209Smrg 33b534f209Smrg It can also use an optional file (typically called `config.cache' 34b534f209Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35b534f209Smrgthe results of its tests to speed up reconfiguring. Caching is 36b534f209Smrgdisabled by default to prevent problems with accidental use of stale 37b534f209Smrgcache files. 38b534f209Smrg 39b534f209Smrg If you need to do unusual things to compile the package, please try 40b534f209Smrgto figure out how `configure' could check whether to do them, and mail 41b534f209Smrgdiffs or instructions to the address given in the `README' so they can 42b534f209Smrgbe considered for the next release. If you are using the cache, and at 43b534f209Smrgsome point `config.cache' contains results you don't want to keep, you 44b534f209Smrgmay remove or edit it. 45b534f209Smrg 46b534f209Smrg The file `configure.ac' (or `configure.in') is used to create 47b534f209Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 48b534f209Smrgyou want to change it or regenerate `configure' using a newer version 49b534f209Smrgof `autoconf'. 50b534f209Smrg 51cf503b78Smrg The simplest way to compile this package is: 52b534f209Smrg 53b534f209Smrg 1. `cd' to the directory containing the package's source code and type 54b534f209Smrg `./configure' to configure the package for your system. 55b534f209Smrg 56b534f209Smrg Running `configure' might take a while. While running, it prints 57b534f209Smrg some messages telling which features it is checking for. 58b534f209Smrg 59b534f209Smrg 2. Type `make' to compile the package. 60b534f209Smrg 61b534f209Smrg 3. Optionally, type `make check' to run any self-tests that come with 62cf503b78Smrg the package, generally using the just-built uninstalled binaries. 63b534f209Smrg 64b534f209Smrg 4. Type `make install' to install the programs and any data files and 65cf503b78Smrg documentation. When installing into a prefix owned by root, it is 66cf503b78Smrg recommended that the package be configured and built as a regular 67cf503b78Smrg user, and only the `make install' phase executed with root 68cf503b78Smrg privileges. 69cf503b78Smrg 70cf503b78Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71cf503b78Smrg this time using the binaries in their final installed location. 72cf503b78Smrg This target does not install anything. Running this target as a 73cf503b78Smrg regular user, particularly if the prior `make install' required 74cf503b78Smrg root privileges, verifies that the installation completed 75cf503b78Smrg correctly. 76cf503b78Smrg 77cf503b78Smrg 6. You can remove the program binaries and object files from the 78b534f209Smrg source code directory by typing `make clean'. To also remove the 79b534f209Smrg files that `configure' created (so you can compile the package for 80b534f209Smrg a different kind of computer), type `make distclean'. There is 81b534f209Smrg also a `make maintainer-clean' target, but that is intended mainly 82b534f209Smrg for the package's developers. If you use it, you may have to get 83b534f209Smrg all sorts of other programs in order to regenerate files that came 84b534f209Smrg with the distribution. 85b534f209Smrg 86cf503b78Smrg 7. Often, you can also type `make uninstall' to remove the installed 87cf503b78Smrg files again. In practice, not all packages have tested that 88cf503b78Smrg uninstallation works correctly, even though it is required by the 89cf503b78Smrg GNU Coding Standards. 90cf503b78Smrg 91cf503b78Smrg 8. Some packages, particularly those that use Automake, provide `make 92cf503b78Smrg distcheck', which can by used by developers to test that all other 93cf503b78Smrg targets like `make install' and `make uninstall' work correctly. 94cf503b78Smrg This target is generally not run by end users. 95b534f209Smrg 96b534f209SmrgCompilers and Options 97b534f209Smrg===================== 98b534f209Smrg 99b534f209Smrg Some systems require unusual options for compilation or linking that 100b534f209Smrgthe `configure' script does not know about. Run `./configure --help' 101b534f209Smrgfor details on some of the pertinent environment variables. 102b534f209Smrg 103b534f209Smrg You can give `configure' initial values for configuration parameters 104b534f209Smrgby setting variables in the command line or in the environment. Here 105b534f209Smrgis an example: 106b534f209Smrg 107b534f209Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108b534f209Smrg 109b534f209Smrg *Note Defining Variables::, for more details. 110b534f209Smrg 111b534f209SmrgCompiling For Multiple Architectures 112b534f209Smrg==================================== 113b534f209Smrg 114b534f209Smrg You can compile the package for more than one kind of computer at the 115b534f209Smrgsame time, by placing the object files for each architecture in their 116b534f209Smrgown directory. To do this, you can use GNU `make'. `cd' to the 117b534f209Smrgdirectory where you want the object files and executables to go and run 118b534f209Smrgthe `configure' script. `configure' automatically checks for the 119cf503b78Smrgsource code in the directory that `configure' is in and in `..'. This 120cf503b78Smrgis known as a "VPATH" build. 121b534f209Smrg 122b534f209Smrg With a non-GNU `make', it is safer to compile the package for one 123b534f209Smrgarchitecture at a time in the source code directory. After you have 124b534f209Smrginstalled the package for one architecture, use `make distclean' before 125b534f209Smrgreconfiguring for another architecture. 126b534f209Smrg 127b534f209Smrg On MacOS X 10.5 and later systems, you can create libraries and 128b534f209Smrgexecutables that work on multiple system types--known as "fat" or 129b534f209Smrg"universal" binaries--by specifying multiple `-arch' options to the 130b534f209Smrgcompiler but only a single `-arch' option to the preprocessor. Like 131b534f209Smrgthis: 132b534f209Smrg 133b534f209Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134b534f209Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135b534f209Smrg CPP="gcc -E" CXXCPP="g++ -E" 136b534f209Smrg 137b534f209Smrg This is not guaranteed to produce working output in all cases, you 138b534f209Smrgmay have to build one architecture at a time and combine the results 139b534f209Smrgusing the `lipo' tool if you have problems. 140b534f209Smrg 141b534f209SmrgInstallation Names 142b534f209Smrg================== 143b534f209Smrg 144b534f209Smrg By default, `make install' installs the package's commands under 145b534f209Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146b534f209Smrgcan specify an installation prefix other than `/usr/local' by giving 147cf503b78Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148cf503b78Smrgabsolute file name. 149b534f209Smrg 150b534f209Smrg You can specify separate installation prefixes for 151b534f209Smrgarchitecture-specific files and architecture-independent files. If you 152b534f209Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153b534f209SmrgPREFIX as the prefix for installing programs and libraries. 154b534f209SmrgDocumentation and other data files still use the regular prefix. 155b534f209Smrg 156b534f209Smrg In addition, if you use an unusual directory layout you can give 157b534f209Smrgoptions like `--bindir=DIR' to specify different values for particular 158b534f209Smrgkinds of files. Run `configure --help' for a list of the directories 159cf503b78Smrgyou can set and what kinds of files go in them. In general, the 160cf503b78Smrgdefault for these options is expressed in terms of `${prefix}', so that 161cf503b78Smrgspecifying just `--prefix' will affect all of the other directory 162cf503b78Smrgspecifications that were not explicitly provided. 163cf503b78Smrg 164cf503b78Smrg The most portable way to affect installation locations is to pass the 165cf503b78Smrgcorrect locations to `configure'; however, many packages provide one or 166cf503b78Smrgboth of the following shortcuts of passing variable assignments to the 167cf503b78Smrg`make install' command line to change installation locations without 168cf503b78Smrghaving to reconfigure or recompile. 169cf503b78Smrg 170cf503b78Smrg The first method involves providing an override variable for each 171cf503b78Smrgaffected directory. For example, `make install 172cf503b78Smrgprefix=/alternate/directory' will choose an alternate location for all 173cf503b78Smrgdirectory configuration variables that were expressed in terms of 174cf503b78Smrg`${prefix}'. Any directories that were specified during `configure', 175cf503b78Smrgbut not in terms of `${prefix}', must each be overridden at install 176cf503b78Smrgtime for the entire installation to be relocated. The approach of 177cf503b78Smrgmakefile variable overrides for each directory variable is required by 178cf503b78Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179cf503b78SmrgHowever, some platforms have known limitations with the semantics of 180cf503b78Smrgshared libraries that end up requiring recompilation when using this 181cf503b78Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182cf503b78Smrg 183cf503b78Smrg The second method involves providing the `DESTDIR' variable. For 184cf503b78Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185cf503b78Smrg`/alternate/directory' before all installation names. The approach of 186cf503b78Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187cf503b78Smrgdoes not work on platforms that have drive letters. On the other hand, 188cf503b78Smrgit does better at avoiding recompilation issues, and works well even 189cf503b78Smrgwhen some directory options were not specified in terms of `${prefix}' 190cf503b78Smrgat `configure' time. 191cf503b78Smrg 192cf503b78SmrgOptional Features 193cf503b78Smrg================= 194b534f209Smrg 195b534f209Smrg If the package supports it, you can cause programs to be installed 196b534f209Smrgwith an extra prefix or suffix on their names by giving `configure' the 197b534f209Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198b534f209Smrg 199b534f209Smrg Some packages pay attention to `--enable-FEATURE' options to 200b534f209Smrg`configure', where FEATURE indicates an optional part of the package. 201b534f209SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202b534f209Smrgis something like `gnu-as' or `x' (for the X Window System). The 203b534f209Smrg`README' should mention any `--enable-' and `--with-' options that the 204b534f209Smrgpackage recognizes. 205b534f209Smrg 206b534f209Smrg For packages that use the X Window System, `configure' can usually 207b534f209Smrgfind the X include and library files automatically, but if it doesn't, 208b534f209Smrgyou can use the `configure' options `--x-includes=DIR' and 209b534f209Smrg`--x-libraries=DIR' to specify their locations. 210b534f209Smrg 211cf503b78Smrg Some packages offer the ability to configure how verbose the 212cf503b78Smrgexecution of `make' will be. For these packages, running `./configure 213cf503b78Smrg--enable-silent-rules' sets the default to minimal output, which can be 214cf503b78Smrgoverridden with `make V=1'; while running `./configure 215cf503b78Smrg--disable-silent-rules' sets the default to verbose, which can be 216cf503b78Smrgoverridden with `make V=0'. 217cf503b78Smrg 218b534f209SmrgParticular systems 219b534f209Smrg================== 220b534f209Smrg 221b534f209Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222b534f209SmrgCC is not installed, it is recommended to use the following options in 223b534f209Smrgorder to use an ANSI C compiler: 224b534f209Smrg 225cf503b78Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226b534f209Smrg 227b534f209Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228b534f209Smrg 229cf503b78Smrg HP-UX `make' updates targets which have the same time stamps as 230cf503b78Smrgtheir prerequisites, which makes it generally unusable when shipped 231cf503b78Smrggenerated files such as `configure' are involved. Use GNU `make' 232cf503b78Smrginstead. 233cf503b78Smrg 234b534f209Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235b534f209Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236b534f209Smrga workaround. If GNU CC is not installed, it is therefore recommended 237b534f209Smrgto try 238b534f209Smrg 239b534f209Smrg ./configure CC="cc" 240b534f209Smrg 241b534f209Smrgand if that doesn't work, try 242b534f209Smrg 243b534f209Smrg ./configure CC="cc -nodtk" 244b534f209Smrg 245cf503b78Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246cf503b78Smrgdirectory contains several dysfunctional programs; working variants of 247cf503b78Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248cf503b78Smrgin your `PATH', put it _after_ `/usr/bin'. 249cf503b78Smrg 250cf503b78Smrg On Haiku, software installed for all users goes in `/boot/common', 251cf503b78Smrgnot `/usr/local'. It is recommended to use the following options: 252cf503b78Smrg 253cf503b78Smrg ./configure --prefix=/boot/common 254cf503b78Smrg 255b534f209SmrgSpecifying the System Type 256b534f209Smrg========================== 257b534f209Smrg 258b534f209Smrg There may be some features `configure' cannot figure out 259b534f209Smrgautomatically, but needs to determine by the type of machine the package 260b534f209Smrgwill run on. Usually, assuming the package is built to be run on the 261b534f209Smrg_same_ architectures, `configure' can figure that out, but if it prints 262b534f209Smrga message saying it cannot guess the machine type, give it the 263b534f209Smrg`--build=TYPE' option. TYPE can either be a short name for the system 264b534f209Smrgtype, such as `sun4', or a canonical name which has the form: 265b534f209Smrg 266b534f209Smrg CPU-COMPANY-SYSTEM 267b534f209Smrg 268b534f209Smrgwhere SYSTEM can have one of these forms: 269b534f209Smrg 270cf503b78Smrg OS 271cf503b78Smrg KERNEL-OS 272b534f209Smrg 273b534f209Smrg See the file `config.sub' for the possible values of each field. If 274b534f209Smrg`config.sub' isn't included in this package, then this package doesn't 275b534f209Smrgneed to know the machine type. 276b534f209Smrg 277b534f209Smrg If you are _building_ compiler tools for cross-compiling, you should 278b534f209Smrguse the option `--target=TYPE' to select the type of system they will 279b534f209Smrgproduce code for. 280b534f209Smrg 281b534f209Smrg If you want to _use_ a cross compiler, that generates code for a 282b534f209Smrgplatform different from the build platform, you should specify the 283b534f209Smrg"host" platform (i.e., that on which the generated programs will 284b534f209Smrgeventually be run) with `--host=TYPE'. 285b534f209Smrg 286b534f209SmrgSharing Defaults 287b534f209Smrg================ 288b534f209Smrg 289b534f209Smrg If you want to set default values for `configure' scripts to share, 290b534f209Smrgyou can create a site shell script called `config.site' that gives 291b534f209Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 292b534f209Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293b534f209Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294b534f209Smrg`CONFIG_SITE' environment variable to the location of the site script. 295b534f209SmrgA warning: not all `configure' scripts look for a site script. 296b534f209Smrg 297b534f209SmrgDefining Variables 298b534f209Smrg================== 299b534f209Smrg 300b534f209Smrg Variables not defined in a site shell script can be set in the 301b534f209Smrgenvironment passed to `configure'. However, some packages may run 302b534f209Smrgconfigure again during the build, and the customized values of these 303b534f209Smrgvariables may be lost. In order to avoid this problem, you should set 304b534f209Smrgthem in the `configure' command line, using `VAR=value'. For example: 305b534f209Smrg 306b534f209Smrg ./configure CC=/usr/local2/bin/gcc 307b534f209Smrg 308b534f209Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 309b534f209Smrgoverridden in the site shell script). 310b534f209Smrg 311b534f209SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312b534f209Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313b534f209Smrg 314b534f209Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315b534f209Smrg 316b534f209Smrg`configure' Invocation 317b534f209Smrg====================== 318b534f209Smrg 319b534f209Smrg `configure' recognizes the following options to control how it 320b534f209Smrgoperates. 321b534f209Smrg 322b534f209Smrg`--help' 323b534f209Smrg`-h' 324b534f209Smrg Print a summary of all of the options to `configure', and exit. 325b534f209Smrg 326b534f209Smrg`--help=short' 327b534f209Smrg`--help=recursive' 328b534f209Smrg Print a summary of the options unique to this package's 329b534f209Smrg `configure', and exit. The `short' variant lists options used 330b534f209Smrg only in the top level, while the `recursive' variant lists options 331b534f209Smrg also present in any nested packages. 332b534f209Smrg 333b534f209Smrg`--version' 334b534f209Smrg`-V' 335b534f209Smrg Print the version of Autoconf used to generate the `configure' 336b534f209Smrg script, and exit. 337b534f209Smrg 338b534f209Smrg`--cache-file=FILE' 339b534f209Smrg Enable the cache: use and save the results of the tests in FILE, 340b534f209Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341b534f209Smrg disable caching. 342b534f209Smrg 343b534f209Smrg`--config-cache' 344b534f209Smrg`-C' 345b534f209Smrg Alias for `--cache-file=config.cache'. 346b534f209Smrg 347b534f209Smrg`--quiet' 348b534f209Smrg`--silent' 349b534f209Smrg`-q' 350b534f209Smrg Do not print messages saying which checks are being made. To 351b534f209Smrg suppress all normal output, redirect it to `/dev/null' (any error 352b534f209Smrg messages will still be shown). 353b534f209Smrg 354b534f209Smrg`--srcdir=DIR' 355b534f209Smrg Look for the package's source code in directory DIR. Usually 356b534f209Smrg `configure' can determine that directory automatically. 357b534f209Smrg 358b534f209Smrg`--prefix=DIR' 359cf503b78Smrg Use DIR as the installation prefix. *note Installation Names:: 360b534f209Smrg for more details, including other options available for fine-tuning 361b534f209Smrg the installation locations. 362b534f209Smrg 363b534f209Smrg`--no-create' 364b534f209Smrg`-n' 365b534f209Smrg Run the configure checks, but stop before creating any output 366b534f209Smrg files. 367b534f209Smrg 368b534f209Smrg`configure' also accepts some other, not widely useful, options. Run 369b534f209Smrg`configure --help' for more details. 370b534f209Smrg 371