1f1e20f77SmrgInstallation Instructions 2f1e20f77Smrg************************* 3f1e20f77Smrg 415adf0bfSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 515adf0bfSmrgInc. 6f1e20f77Smrg 715adf0bfSmrg Copying and distribution of this file, with or without modification, 815adf0bfSmrgare permitted in any medium without royalty provided the copyright 915adf0bfSmrgnotice and this notice are preserved. This file is offered as-is, 1015adf0bfSmrgwithout warranty of any kind. 11f1e20f77Smrg 12f1e20f77SmrgBasic Installation 13f1e20f77Smrg================== 14f1e20f77Smrg 15f1e20f77Smrg Briefly, the shell commands `./configure; make; make install' should 16f1e20f77Smrgconfigure, build, and install this package. The following 17f1e20f77Smrgmore-detailed instructions are generic; see the `README' file for 1815adf0bfSmrginstructions specific to this package. Some packages provide this 1915adf0bfSmrg`INSTALL' file but do not implement all of the features documented 2015adf0bfSmrgbelow. The lack of an optional feature in a given package is not 2115adf0bfSmrgnecessarily a bug. More recommendations for GNU packages can be found 2215adf0bfSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 23f1e20f77Smrg 24f1e20f77Smrg The `configure' shell script attempts to guess correct values for 25f1e20f77Smrgvarious system-dependent variables used during compilation. It uses 26f1e20f77Smrgthose values to create a `Makefile' in each directory of the package. 27f1e20f77SmrgIt may also create one or more `.h' files containing system-dependent 28f1e20f77Smrgdefinitions. Finally, it creates a shell script `config.status' that 29f1e20f77Smrgyou can run in the future to recreate the current configuration, and a 30f1e20f77Smrgfile `config.log' containing compiler output (useful mainly for 31f1e20f77Smrgdebugging `configure'). 32f1e20f77Smrg 33f1e20f77Smrg It can also use an optional file (typically called `config.cache' 34f1e20f77Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35f1e20f77Smrgthe results of its tests to speed up reconfiguring. Caching is 36f1e20f77Smrgdisabled by default to prevent problems with accidental use of stale 37f1e20f77Smrgcache files. 38f1e20f77Smrg 39f1e20f77Smrg If you need to do unusual things to compile the package, please try 40f1e20f77Smrgto figure out how `configure' could check whether to do them, and mail 41f1e20f77Smrgdiffs or instructions to the address given in the `README' so they can 42f1e20f77Smrgbe considered for the next release. If you are using the cache, and at 43f1e20f77Smrgsome point `config.cache' contains results you don't want to keep, you 44f1e20f77Smrgmay remove or edit it. 45f1e20f77Smrg 46f1e20f77Smrg The file `configure.ac' (or `configure.in') is used to create 47f1e20f77Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 48f1e20f77Smrgyou want to change it or regenerate `configure' using a newer version 49f1e20f77Smrgof `autoconf'. 50f1e20f77Smrg 5115adf0bfSmrg The simplest way to compile this package is: 52f1e20f77Smrg 53f1e20f77Smrg 1. `cd' to the directory containing the package's source code and type 54f1e20f77Smrg `./configure' to configure the package for your system. 55f1e20f77Smrg 56f1e20f77Smrg Running `configure' might take a while. While running, it prints 57f1e20f77Smrg some messages telling which features it is checking for. 58f1e20f77Smrg 59f1e20f77Smrg 2. Type `make' to compile the package. 60f1e20f77Smrg 61f1e20f77Smrg 3. Optionally, type `make check' to run any self-tests that come with 6215adf0bfSmrg the package, generally using the just-built uninstalled binaries. 63f1e20f77Smrg 64f1e20f77Smrg 4. Type `make install' to install the programs and any data files and 6515adf0bfSmrg documentation. When installing into a prefix owned by root, it is 6615adf0bfSmrg recommended that the package be configured and built as a regular 6715adf0bfSmrg user, and only the `make install' phase executed with root 6815adf0bfSmrg privileges. 6915adf0bfSmrg 7015adf0bfSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 7115adf0bfSmrg this time using the binaries in their final installed location. 7215adf0bfSmrg This target does not install anything. Running this target as a 7315adf0bfSmrg regular user, particularly if the prior `make install' required 7415adf0bfSmrg root privileges, verifies that the installation completed 7515adf0bfSmrg correctly. 7615adf0bfSmrg 7715adf0bfSmrg 6. You can remove the program binaries and object files from the 78f1e20f77Smrg source code directory by typing `make clean'. To also remove the 79f1e20f77Smrg files that `configure' created (so you can compile the package for 80f1e20f77Smrg a different kind of computer), type `make distclean'. There is 81f1e20f77Smrg also a `make maintainer-clean' target, but that is intended mainly 82f1e20f77Smrg for the package's developers. If you use it, you may have to get 83f1e20f77Smrg all sorts of other programs in order to regenerate files that came 84f1e20f77Smrg with the distribution. 85f1e20f77Smrg 8615adf0bfSmrg 7. Often, you can also type `make uninstall' to remove the installed 8715adf0bfSmrg files again. In practice, not all packages have tested that 8815adf0bfSmrg uninstallation works correctly, even though it is required by the 8915adf0bfSmrg GNU Coding Standards. 9015adf0bfSmrg 9115adf0bfSmrg 8. Some packages, particularly those that use Automake, provide `make 9215adf0bfSmrg distcheck', which can by used by developers to test that all other 9315adf0bfSmrg targets like `make install' and `make uninstall' work correctly. 9415adf0bfSmrg This target is generally not run by end users. 95f1e20f77Smrg 96f1e20f77SmrgCompilers and Options 97f1e20f77Smrg===================== 98f1e20f77Smrg 99f1e20f77Smrg Some systems require unusual options for compilation or linking that 100f1e20f77Smrgthe `configure' script does not know about. Run `./configure --help' 101f1e20f77Smrgfor details on some of the pertinent environment variables. 102f1e20f77Smrg 103f1e20f77Smrg You can give `configure' initial values for configuration parameters 104f1e20f77Smrgby setting variables in the command line or in the environment. Here 105f1e20f77Smrgis an example: 106f1e20f77Smrg 107f1e20f77Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108f1e20f77Smrg 109f1e20f77Smrg *Note Defining Variables::, for more details. 110f1e20f77Smrg 111f1e20f77SmrgCompiling For Multiple Architectures 112f1e20f77Smrg==================================== 113f1e20f77Smrg 114f1e20f77Smrg You can compile the package for more than one kind of computer at the 115f1e20f77Smrgsame time, by placing the object files for each architecture in their 116f1e20f77Smrgown directory. To do this, you can use GNU `make'. `cd' to the 117f1e20f77Smrgdirectory where you want the object files and executables to go and run 118f1e20f77Smrgthe `configure' script. `configure' automatically checks for the 11915adf0bfSmrgsource code in the directory that `configure' is in and in `..'. This 12015adf0bfSmrgis known as a "VPATH" build. 121f1e20f77Smrg 122f1e20f77Smrg With a non-GNU `make', it is safer to compile the package for one 123f1e20f77Smrgarchitecture at a time in the source code directory. After you have 124f1e20f77Smrginstalled the package for one architecture, use `make distclean' before 125f1e20f77Smrgreconfiguring for another architecture. 126f1e20f77Smrg 127f1e20f77Smrg On MacOS X 10.5 and later systems, you can create libraries and 128f1e20f77Smrgexecutables that work on multiple system types--known as "fat" or 129f1e20f77Smrg"universal" binaries--by specifying multiple `-arch' options to the 130f1e20f77Smrgcompiler but only a single `-arch' option to the preprocessor. Like 131f1e20f77Smrgthis: 132f1e20f77Smrg 133f1e20f77Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134f1e20f77Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135f1e20f77Smrg CPP="gcc -E" CXXCPP="g++ -E" 136f1e20f77Smrg 137f1e20f77Smrg This is not guaranteed to produce working output in all cases, you 138f1e20f77Smrgmay have to build one architecture at a time and combine the results 139f1e20f77Smrgusing the `lipo' tool if you have problems. 140f1e20f77Smrg 141f1e20f77SmrgInstallation Names 142f1e20f77Smrg================== 143f1e20f77Smrg 144f1e20f77Smrg By default, `make install' installs the package's commands under 145f1e20f77Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146f1e20f77Smrgcan specify an installation prefix other than `/usr/local' by giving 14715adf0bfSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 14815adf0bfSmrgabsolute file name. 149f1e20f77Smrg 150f1e20f77Smrg You can specify separate installation prefixes for 151f1e20f77Smrgarchitecture-specific files and architecture-independent files. If you 152f1e20f77Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153f1e20f77SmrgPREFIX as the prefix for installing programs and libraries. 154f1e20f77SmrgDocumentation and other data files still use the regular prefix. 155f1e20f77Smrg 156f1e20f77Smrg In addition, if you use an unusual directory layout you can give 157f1e20f77Smrgoptions like `--bindir=DIR' to specify different values for particular 158f1e20f77Smrgkinds of files. Run `configure --help' for a list of the directories 15915adf0bfSmrgyou can set and what kinds of files go in them. In general, the 16015adf0bfSmrgdefault for these options is expressed in terms of `${prefix}', so that 16115adf0bfSmrgspecifying just `--prefix' will affect all of the other directory 16215adf0bfSmrgspecifications that were not explicitly provided. 16315adf0bfSmrg 16415adf0bfSmrg The most portable way to affect installation locations is to pass the 16515adf0bfSmrgcorrect locations to `configure'; however, many packages provide one or 16615adf0bfSmrgboth of the following shortcuts of passing variable assignments to the 16715adf0bfSmrg`make install' command line to change installation locations without 16815adf0bfSmrghaving to reconfigure or recompile. 16915adf0bfSmrg 17015adf0bfSmrg The first method involves providing an override variable for each 17115adf0bfSmrgaffected directory. For example, `make install 17215adf0bfSmrgprefix=/alternate/directory' will choose an alternate location for all 17315adf0bfSmrgdirectory configuration variables that were expressed in terms of 17415adf0bfSmrg`${prefix}'. Any directories that were specified during `configure', 17515adf0bfSmrgbut not in terms of `${prefix}', must each be overridden at install 17615adf0bfSmrgtime for the entire installation to be relocated. The approach of 17715adf0bfSmrgmakefile variable overrides for each directory variable is required by 17815adf0bfSmrgthe GNU Coding Standards, and ideally causes no recompilation. 17915adf0bfSmrgHowever, some platforms have known limitations with the semantics of 18015adf0bfSmrgshared libraries that end up requiring recompilation when using this 18115adf0bfSmrgmethod, particularly noticeable in packages that use GNU Libtool. 18215adf0bfSmrg 18315adf0bfSmrg The second method involves providing the `DESTDIR' variable. For 18415adf0bfSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 18515adf0bfSmrg`/alternate/directory' before all installation names. The approach of 18615adf0bfSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 18715adf0bfSmrgdoes not work on platforms that have drive letters. On the other hand, 18815adf0bfSmrgit does better at avoiding recompilation issues, and works well even 18915adf0bfSmrgwhen some directory options were not specified in terms of `${prefix}' 19015adf0bfSmrgat `configure' time. 19115adf0bfSmrg 19215adf0bfSmrgOptional Features 19315adf0bfSmrg================= 194f1e20f77Smrg 195f1e20f77Smrg If the package supports it, you can cause programs to be installed 196f1e20f77Smrgwith an extra prefix or suffix on their names by giving `configure' the 197f1e20f77Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198f1e20f77Smrg 199f1e20f77Smrg Some packages pay attention to `--enable-FEATURE' options to 200f1e20f77Smrg`configure', where FEATURE indicates an optional part of the package. 201f1e20f77SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202f1e20f77Smrgis something like `gnu-as' or `x' (for the X Window System). The 203f1e20f77Smrg`README' should mention any `--enable-' and `--with-' options that the 204f1e20f77Smrgpackage recognizes. 205f1e20f77Smrg 206f1e20f77Smrg For packages that use the X Window System, `configure' can usually 207f1e20f77Smrgfind the X include and library files automatically, but if it doesn't, 208f1e20f77Smrgyou can use the `configure' options `--x-includes=DIR' and 209f1e20f77Smrg`--x-libraries=DIR' to specify their locations. 210f1e20f77Smrg 21115adf0bfSmrg Some packages offer the ability to configure how verbose the 21215adf0bfSmrgexecution of `make' will be. For these packages, running `./configure 21315adf0bfSmrg--enable-silent-rules' sets the default to minimal output, which can be 21415adf0bfSmrgoverridden with `make V=1'; while running `./configure 21515adf0bfSmrg--disable-silent-rules' sets the default to verbose, which can be 21615adf0bfSmrgoverridden with `make V=0'. 21715adf0bfSmrg 218f1e20f77SmrgParticular systems 219f1e20f77Smrg================== 220f1e20f77Smrg 221f1e20f77Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222f1e20f77SmrgCC is not installed, it is recommended to use the following options in 223f1e20f77Smrgorder to use an ANSI C compiler: 224f1e20f77Smrg 22515adf0bfSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226f1e20f77Smrg 227f1e20f77Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228f1e20f77Smrg 22915adf0bfSmrg HP-UX `make' updates targets which have the same time stamps as 23015adf0bfSmrgtheir prerequisites, which makes it generally unusable when shipped 23115adf0bfSmrggenerated files such as `configure' are involved. Use GNU `make' 23215adf0bfSmrginstead. 23315adf0bfSmrg 234f1e20f77Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235f1e20f77Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236f1e20f77Smrga workaround. If GNU CC is not installed, it is therefore recommended 237f1e20f77Smrgto try 238f1e20f77Smrg 239f1e20f77Smrg ./configure CC="cc" 240f1e20f77Smrg 241f1e20f77Smrgand if that doesn't work, try 242f1e20f77Smrg 243f1e20f77Smrg ./configure CC="cc -nodtk" 244f1e20f77Smrg 24515adf0bfSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 24615adf0bfSmrgdirectory contains several dysfunctional programs; working variants of 24715adf0bfSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 24815adf0bfSmrgin your `PATH', put it _after_ `/usr/bin'. 24915adf0bfSmrg 25015adf0bfSmrg On Haiku, software installed for all users goes in `/boot/common', 25115adf0bfSmrgnot `/usr/local'. It is recommended to use the following options: 25215adf0bfSmrg 25315adf0bfSmrg ./configure --prefix=/boot/common 25415adf0bfSmrg 255f1e20f77SmrgSpecifying the System Type 256f1e20f77Smrg========================== 257f1e20f77Smrg 258f1e20f77Smrg There may be some features `configure' cannot figure out 259f1e20f77Smrgautomatically, but needs to determine by the type of machine the package 260f1e20f77Smrgwill run on. Usually, assuming the package is built to be run on the 261f1e20f77Smrg_same_ architectures, `configure' can figure that out, but if it prints 262f1e20f77Smrga message saying it cannot guess the machine type, give it the 263f1e20f77Smrg`--build=TYPE' option. TYPE can either be a short name for the system 264f1e20f77Smrgtype, such as `sun4', or a canonical name which has the form: 265f1e20f77Smrg 266f1e20f77Smrg CPU-COMPANY-SYSTEM 267f1e20f77Smrg 268f1e20f77Smrgwhere SYSTEM can have one of these forms: 269f1e20f77Smrg 27015adf0bfSmrg OS 27115adf0bfSmrg KERNEL-OS 272f1e20f77Smrg 273f1e20f77Smrg See the file `config.sub' for the possible values of each field. If 274f1e20f77Smrg`config.sub' isn't included in this package, then this package doesn't 275f1e20f77Smrgneed to know the machine type. 276f1e20f77Smrg 277f1e20f77Smrg If you are _building_ compiler tools for cross-compiling, you should 278f1e20f77Smrguse the option `--target=TYPE' to select the type of system they will 279f1e20f77Smrgproduce code for. 280f1e20f77Smrg 281f1e20f77Smrg If you want to _use_ a cross compiler, that generates code for a 282f1e20f77Smrgplatform different from the build platform, you should specify the 283f1e20f77Smrg"host" platform (i.e., that on which the generated programs will 284f1e20f77Smrgeventually be run) with `--host=TYPE'. 285f1e20f77Smrg 286f1e20f77SmrgSharing Defaults 287f1e20f77Smrg================ 288f1e20f77Smrg 289f1e20f77Smrg If you want to set default values for `configure' scripts to share, 290f1e20f77Smrgyou can create a site shell script called `config.site' that gives 291f1e20f77Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 292f1e20f77Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293f1e20f77Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294f1e20f77Smrg`CONFIG_SITE' environment variable to the location of the site script. 295f1e20f77SmrgA warning: not all `configure' scripts look for a site script. 296f1e20f77Smrg 297f1e20f77SmrgDefining Variables 298f1e20f77Smrg================== 299f1e20f77Smrg 300f1e20f77Smrg Variables not defined in a site shell script can be set in the 301f1e20f77Smrgenvironment passed to `configure'. However, some packages may run 302f1e20f77Smrgconfigure again during the build, and the customized values of these 303f1e20f77Smrgvariables may be lost. In order to avoid this problem, you should set 304f1e20f77Smrgthem in the `configure' command line, using `VAR=value'. For example: 305f1e20f77Smrg 306f1e20f77Smrg ./configure CC=/usr/local2/bin/gcc 307f1e20f77Smrg 308f1e20f77Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 309f1e20f77Smrgoverridden in the site shell script). 310f1e20f77Smrg 311f1e20f77SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312f1e20f77Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313f1e20f77Smrg 314f1e20f77Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315f1e20f77Smrg 316f1e20f77Smrg`configure' Invocation 317f1e20f77Smrg====================== 318f1e20f77Smrg 319f1e20f77Smrg `configure' recognizes the following options to control how it 320f1e20f77Smrgoperates. 321f1e20f77Smrg 322f1e20f77Smrg`--help' 323f1e20f77Smrg`-h' 324f1e20f77Smrg Print a summary of all of the options to `configure', and exit. 325f1e20f77Smrg 326f1e20f77Smrg`--help=short' 327f1e20f77Smrg`--help=recursive' 328f1e20f77Smrg Print a summary of the options unique to this package's 329f1e20f77Smrg `configure', and exit. The `short' variant lists options used 330f1e20f77Smrg only in the top level, while the `recursive' variant lists options 331f1e20f77Smrg also present in any nested packages. 332f1e20f77Smrg 333f1e20f77Smrg`--version' 334f1e20f77Smrg`-V' 335f1e20f77Smrg Print the version of Autoconf used to generate the `configure' 336f1e20f77Smrg script, and exit. 337f1e20f77Smrg 338f1e20f77Smrg`--cache-file=FILE' 339f1e20f77Smrg Enable the cache: use and save the results of the tests in FILE, 340f1e20f77Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341f1e20f77Smrg disable caching. 342f1e20f77Smrg 343f1e20f77Smrg`--config-cache' 344f1e20f77Smrg`-C' 345f1e20f77Smrg Alias for `--cache-file=config.cache'. 346f1e20f77Smrg 347f1e20f77Smrg`--quiet' 348f1e20f77Smrg`--silent' 349f1e20f77Smrg`-q' 350f1e20f77Smrg Do not print messages saying which checks are being made. To 351f1e20f77Smrg suppress all normal output, redirect it to `/dev/null' (any error 352f1e20f77Smrg messages will still be shown). 353f1e20f77Smrg 354f1e20f77Smrg`--srcdir=DIR' 355f1e20f77Smrg Look for the package's source code in directory DIR. Usually 356f1e20f77Smrg `configure' can determine that directory automatically. 357f1e20f77Smrg 358f1e20f77Smrg`--prefix=DIR' 35915adf0bfSmrg Use DIR as the installation prefix. *note Installation Names:: 360f1e20f77Smrg for more details, including other options available for fine-tuning 361f1e20f77Smrg the installation locations. 362f1e20f77Smrg 363f1e20f77Smrg`--no-create' 364f1e20f77Smrg`-n' 365f1e20f77Smrg Run the configure checks, but stop before creating any output 366f1e20f77Smrg files. 367f1e20f77Smrg 368f1e20f77Smrg`configure' also accepts some other, not widely useful, options. Run 369f1e20f77Smrg`configure --help' for more details. 370f1e20f77Smrg 371