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