1994689c1SmrgInstallation Instructions 2994689c1Smrg************************* 3994689c1Smrg 4c8571806SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5c8571806SmrgInc. 67a84e134Smrg 7c8571806Smrg Copying and distribution of this file, with or without modification, 8c8571806Smrgare permitted in any medium without royalty provided the copyright 9c8571806Smrgnotice and this notice are preserved. This file is offered as-is, 10c8571806Smrgwithout warranty of any kind. 117a84e134Smrg 127a84e134SmrgBasic Installation 137a84e134Smrg================== 147a84e134Smrg 15994689c1Smrg Briefly, the shell commands `./configure; make; make install' should 16994689c1Smrgconfigure, build, and install this package. The following 17994689c1Smrgmore-detailed instructions are generic; see the `README' file for 18c8571806Smrginstructions specific to this package. Some packages provide this 19c8571806Smrg`INSTALL' file but do not implement all of the features documented 20c8571806Smrgbelow. The lack of an optional feature in a given package is not 21c8571806Smrgnecessarily a bug. More recommendations for GNU packages can be found 22c8571806Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 237a84e134Smrg 247a84e134Smrg The `configure' shell script attempts to guess correct values for 257a84e134Smrgvarious system-dependent variables used during compilation. It uses 267a84e134Smrgthose values to create a `Makefile' in each directory of the package. 277a84e134SmrgIt may also create one or more `.h' files containing system-dependent 287a84e134Smrgdefinitions. Finally, it creates a shell script `config.status' that 297a84e134Smrgyou can run in the future to recreate the current configuration, and a 307a84e134Smrgfile `config.log' containing compiler output (useful mainly for 317a84e134Smrgdebugging `configure'). 327a84e134Smrg 337a84e134Smrg It can also use an optional file (typically called `config.cache' 347a84e134Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35994689c1Smrgthe results of its tests to speed up reconfiguring. Caching is 367a84e134Smrgdisabled by default to prevent problems with accidental use of stale 37994689c1Smrgcache files. 387a84e134Smrg 397a84e134Smrg If you need to do unusual things to compile the package, please try 407a84e134Smrgto figure out how `configure' could check whether to do them, and mail 417a84e134Smrgdiffs or instructions to the address given in the `README' so they can 427a84e134Smrgbe considered for the next release. If you are using the cache, and at 437a84e134Smrgsome point `config.cache' contains results you don't want to keep, you 447a84e134Smrgmay remove or edit it. 457a84e134Smrg 467a84e134Smrg The file `configure.ac' (or `configure.in') is used to create 47994689c1Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 48994689c1Smrgyou want to change it or regenerate `configure' using a newer version 49994689c1Smrgof `autoconf'. 507a84e134Smrg 51c8571806Smrg The simplest way to compile this package is: 527a84e134Smrg 537a84e134Smrg 1. `cd' to the directory containing the package's source code and type 54994689c1Smrg `./configure' to configure the package for your system. 557a84e134Smrg 56994689c1Smrg Running `configure' might take a while. While running, it prints 57994689c1Smrg some messages telling which features it is checking for. 587a84e134Smrg 597a84e134Smrg 2. Type `make' to compile the package. 607a84e134Smrg 617a84e134Smrg 3. Optionally, type `make check' to run any self-tests that come with 62c8571806Smrg the package, generally using the just-built uninstalled binaries. 637a84e134Smrg 647a84e134Smrg 4. Type `make install' to install the programs and any data files and 65c8571806Smrg documentation. When installing into a prefix owned by root, it is 66c8571806Smrg recommended that the package be configured and built as a regular 67c8571806Smrg user, and only the `make install' phase executed with root 68c8571806Smrg privileges. 69c8571806Smrg 70c8571806Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71c8571806Smrg this time using the binaries in their final installed location. 72c8571806Smrg This target does not install anything. Running this target as a 73c8571806Smrg regular user, particularly if the prior `make install' required 74c8571806Smrg root privileges, verifies that the installation completed 75c8571806Smrg correctly. 76c8571806Smrg 77c8571806Smrg 6. You can remove the program binaries and object files from the 787a84e134Smrg source code directory by typing `make clean'. To also remove the 797a84e134Smrg files that `configure' created (so you can compile the package for 807a84e134Smrg a different kind of computer), type `make distclean'. There is 817a84e134Smrg also a `make maintainer-clean' target, but that is intended mainly 827a84e134Smrg for the package's developers. If you use it, you may have to get 837a84e134Smrg all sorts of other programs in order to regenerate files that came 847a84e134Smrg with the distribution. 857a84e134Smrg 86c8571806Smrg 7. Often, you can also type `make uninstall' to remove the installed 87c8571806Smrg files again. In practice, not all packages have tested that 88c8571806Smrg uninstallation works correctly, even though it is required by the 89c8571806Smrg GNU Coding Standards. 90c8571806Smrg 91c8571806Smrg 8. Some packages, particularly those that use Automake, provide `make 92c8571806Smrg distcheck', which can by used by developers to test that all other 93c8571806Smrg targets like `make install' and `make uninstall' work correctly. 94c8571806Smrg This target is generally not run by end users. 95994689c1Smrg 967a84e134SmrgCompilers and Options 977a84e134Smrg===================== 987a84e134Smrg 997a84e134Smrg Some systems require unusual options for compilation or linking that 1007a84e134Smrgthe `configure' script does not know about. Run `./configure --help' 1017a84e134Smrgfor details on some of the pertinent environment variables. 1027a84e134Smrg 1037a84e134Smrg You can give `configure' initial values for configuration parameters 1047a84e134Smrgby setting variables in the command line or in the environment. Here 1057a84e134Smrgis an example: 1067a84e134Smrg 107994689c1Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 1087a84e134Smrg 1097a84e134Smrg *Note Defining Variables::, for more details. 1107a84e134Smrg 1117a84e134SmrgCompiling For Multiple Architectures 1127a84e134Smrg==================================== 1137a84e134Smrg 1147a84e134Smrg You can compile the package for more than one kind of computer at the 1157a84e134Smrgsame time, by placing the object files for each architecture in their 116994689c1Smrgown directory. To do this, you can use GNU `make'. `cd' to the 1177a84e134Smrgdirectory where you want the object files and executables to go and run 1187a84e134Smrgthe `configure' script. `configure' automatically checks for the 119c8571806Smrgsource code in the directory that `configure' is in and in `..'. This 120c8571806Smrgis known as a "VPATH" build. 1217a84e134Smrg 122994689c1Smrg With a non-GNU `make', it is safer to compile the package for one 123994689c1Smrgarchitecture at a time in the source code directory. After you have 124994689c1Smrginstalled the package for one architecture, use `make distclean' before 125994689c1Smrgreconfiguring for another architecture. 126994689c1Smrg 127994689c1Smrg On MacOS X 10.5 and later systems, you can create libraries and 128994689c1Smrgexecutables that work on multiple system types--known as "fat" or 129994689c1Smrg"universal" binaries--by specifying multiple `-arch' options to the 130994689c1Smrgcompiler but only a single `-arch' option to the preprocessor. Like 131994689c1Smrgthis: 132994689c1Smrg 133994689c1Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134994689c1Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135994689c1Smrg CPP="gcc -E" CXXCPP="g++ -E" 136994689c1Smrg 137994689c1Smrg This is not guaranteed to produce working output in all cases, you 138994689c1Smrgmay have to build one architecture at a time and combine the results 139994689c1Smrgusing the `lipo' tool if you have problems. 1407a84e134Smrg 1417a84e134SmrgInstallation Names 1427a84e134Smrg================== 1437a84e134Smrg 144994689c1Smrg By default, `make install' installs the package's commands under 145994689c1Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146994689c1Smrgcan specify an installation prefix other than `/usr/local' by giving 147c8571806Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148c8571806Smrgabsolute file name. 1497a84e134Smrg 1507a84e134Smrg You can specify separate installation prefixes for 1517a84e134Smrgarchitecture-specific files and architecture-independent files. If you 152994689c1Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153994689c1SmrgPREFIX as the prefix for installing programs and libraries. 154994689c1SmrgDocumentation and other data files still use the regular prefix. 1557a84e134Smrg 1567a84e134Smrg In addition, if you use an unusual directory layout you can give 157994689c1Smrgoptions like `--bindir=DIR' to specify different values for particular 1587a84e134Smrgkinds of files. Run `configure --help' for a list of the directories 159c8571806Smrgyou can set and what kinds of files go in them. In general, the 160c8571806Smrgdefault for these options is expressed in terms of `${prefix}', so that 161c8571806Smrgspecifying just `--prefix' will affect all of the other directory 162c8571806Smrgspecifications that were not explicitly provided. 163c8571806Smrg 164c8571806Smrg The most portable way to affect installation locations is to pass the 165c8571806Smrgcorrect locations to `configure'; however, many packages provide one or 166c8571806Smrgboth of the following shortcuts of passing variable assignments to the 167c8571806Smrg`make install' command line to change installation locations without 168c8571806Smrghaving to reconfigure or recompile. 169c8571806Smrg 170c8571806Smrg The first method involves providing an override variable for each 171c8571806Smrgaffected directory. For example, `make install 172c8571806Smrgprefix=/alternate/directory' will choose an alternate location for all 173c8571806Smrgdirectory configuration variables that were expressed in terms of 174c8571806Smrg`${prefix}'. Any directories that were specified during `configure', 175c8571806Smrgbut not in terms of `${prefix}', must each be overridden at install 176c8571806Smrgtime for the entire installation to be relocated. The approach of 177c8571806Smrgmakefile variable overrides for each directory variable is required by 178c8571806Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179c8571806SmrgHowever, some platforms have known limitations with the semantics of 180c8571806Smrgshared libraries that end up requiring recompilation when using this 181c8571806Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182c8571806Smrg 183c8571806Smrg The second method involves providing the `DESTDIR' variable. For 184c8571806Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185c8571806Smrg`/alternate/directory' before all installation names. The approach of 186c8571806Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187c8571806Smrgdoes not work on platforms that have drive letters. On the other hand, 188c8571806Smrgit does better at avoiding recompilation issues, and works well even 189c8571806Smrgwhen some directory options were not specified in terms of `${prefix}' 190c8571806Smrgat `configure' time. 191c8571806Smrg 192c8571806SmrgOptional Features 193c8571806Smrg================= 1947a84e134Smrg 1957a84e134Smrg If the package supports it, you can cause programs to be installed 1967a84e134Smrgwith an extra prefix or suffix on their names by giving `configure' the 1977a84e134Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1987a84e134Smrg 1997a84e134Smrg Some packages pay attention to `--enable-FEATURE' options to 2007a84e134Smrg`configure', where FEATURE indicates an optional part of the package. 2017a84e134SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 2027a84e134Smrgis something like `gnu-as' or `x' (for the X Window System). The 2037a84e134Smrg`README' should mention any `--enable-' and `--with-' options that the 2047a84e134Smrgpackage recognizes. 2057a84e134Smrg 2067a84e134Smrg For packages that use the X Window System, `configure' can usually 2077a84e134Smrgfind the X include and library files automatically, but if it doesn't, 2087a84e134Smrgyou can use the `configure' options `--x-includes=DIR' and 2097a84e134Smrg`--x-libraries=DIR' to specify their locations. 2107a84e134Smrg 211c8571806Smrg Some packages offer the ability to configure how verbose the 212c8571806Smrgexecution of `make' will be. For these packages, running `./configure 213c8571806Smrg--enable-silent-rules' sets the default to minimal output, which can be 214c8571806Smrgoverridden with `make V=1'; while running `./configure 215c8571806Smrg--disable-silent-rules' sets the default to verbose, which can be 216c8571806Smrgoverridden with `make V=0'. 217c8571806Smrg 218994689c1SmrgParticular systems 219994689c1Smrg================== 220994689c1Smrg 221994689c1Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222994689c1SmrgCC is not installed, it is recommended to use the following options in 223994689c1Smrgorder to use an ANSI C compiler: 224994689c1Smrg 225c8571806Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226994689c1Smrg 227994689c1Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228994689c1Smrg 229c8571806Smrg HP-UX `make' updates targets which have the same time stamps as 230c8571806Smrgtheir prerequisites, which makes it generally unusable when shipped 231c8571806Smrggenerated files such as `configure' are involved. Use GNU `make' 232c8571806Smrginstead. 233c8571806Smrg 234994689c1Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235994689c1Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236994689c1Smrga workaround. If GNU CC is not installed, it is therefore recommended 237994689c1Smrgto try 238994689c1Smrg 239994689c1Smrg ./configure CC="cc" 240994689c1Smrg 241994689c1Smrgand if that doesn't work, try 242994689c1Smrg 243994689c1Smrg ./configure CC="cc -nodtk" 244994689c1Smrg 245c8571806Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246c8571806Smrgdirectory contains several dysfunctional programs; working variants of 247c8571806Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248c8571806Smrgin your `PATH', put it _after_ `/usr/bin'. 249c8571806Smrg 250c8571806Smrg On Haiku, software installed for all users goes in `/boot/common', 251c8571806Smrgnot `/usr/local'. It is recommended to use the following options: 252c8571806Smrg 253c8571806Smrg ./configure --prefix=/boot/common 254c8571806Smrg 2557a84e134SmrgSpecifying the System Type 2567a84e134Smrg========================== 2577a84e134Smrg 2587a84e134Smrg There may be some features `configure' cannot figure out 2597a84e134Smrgautomatically, but needs to determine by the type of machine the package 2607a84e134Smrgwill run on. Usually, assuming the package is built to be run on the 2617a84e134Smrg_same_ architectures, `configure' can figure that out, but if it prints 2627a84e134Smrga message saying it cannot guess the machine type, give it the 2637a84e134Smrg`--build=TYPE' option. TYPE can either be a short name for the system 2647a84e134Smrgtype, such as `sun4', or a canonical name which has the form: 2657a84e134Smrg 2667a84e134Smrg CPU-COMPANY-SYSTEM 2677a84e134Smrg 2687a84e134Smrgwhere SYSTEM can have one of these forms: 2697a84e134Smrg 270c8571806Smrg OS 271c8571806Smrg KERNEL-OS 2727a84e134Smrg 2737a84e134Smrg See the file `config.sub' for the possible values of each field. If 2747a84e134Smrg`config.sub' isn't included in this package, then this package doesn't 2757a84e134Smrgneed to know the machine type. 2767a84e134Smrg 2777a84e134Smrg If you are _building_ compiler tools for cross-compiling, you should 278994689c1Smrguse the option `--target=TYPE' to select the type of system they will 2797a84e134Smrgproduce code for. 2807a84e134Smrg 2817a84e134Smrg If you want to _use_ a cross compiler, that generates code for a 2827a84e134Smrgplatform different from the build platform, you should specify the 2837a84e134Smrg"host" platform (i.e., that on which the generated programs will 2847a84e134Smrgeventually be run) with `--host=TYPE'. 2857a84e134Smrg 2867a84e134SmrgSharing Defaults 2877a84e134Smrg================ 2887a84e134Smrg 2897a84e134Smrg If you want to set default values for `configure' scripts to share, 2907a84e134Smrgyou can create a site shell script called `config.site' that gives 2917a84e134Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 2927a84e134Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2937a84e134Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2947a84e134Smrg`CONFIG_SITE' environment variable to the location of the site script. 2957a84e134SmrgA warning: not all `configure' scripts look for a site script. 2967a84e134Smrg 2977a84e134SmrgDefining Variables 2987a84e134Smrg================== 2997a84e134Smrg 3007a84e134Smrg Variables not defined in a site shell script can be set in the 3017a84e134Smrgenvironment passed to `configure'. However, some packages may run 3027a84e134Smrgconfigure again during the build, and the customized values of these 3037a84e134Smrgvariables may be lost. In order to avoid this problem, you should set 3047a84e134Smrgthem in the `configure' command line, using `VAR=value'. For example: 3057a84e134Smrg 3067a84e134Smrg ./configure CC=/usr/local2/bin/gcc 3077a84e134Smrg 308994689c1Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 3097a84e134Smrgoverridden in the site shell script). 3107a84e134Smrg 311994689c1SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312994689c1Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313994689c1Smrg 314994689c1Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315994689c1Smrg 3167a84e134Smrg`configure' Invocation 3177a84e134Smrg====================== 3187a84e134Smrg 3197a84e134Smrg `configure' recognizes the following options to control how it 3207a84e134Smrgoperates. 3217a84e134Smrg 3227a84e134Smrg`--help' 3237a84e134Smrg`-h' 324994689c1Smrg Print a summary of all of the options to `configure', and exit. 325994689c1Smrg 326994689c1Smrg`--help=short' 327994689c1Smrg`--help=recursive' 328994689c1Smrg Print a summary of the options unique to this package's 329994689c1Smrg `configure', and exit. The `short' variant lists options used 330994689c1Smrg only in the top level, while the `recursive' variant lists options 331994689c1Smrg also present in any nested packages. 3327a84e134Smrg 3337a84e134Smrg`--version' 3347a84e134Smrg`-V' 3357a84e134Smrg Print the version of Autoconf used to generate the `configure' 3367a84e134Smrg script, and exit. 3377a84e134Smrg 3387a84e134Smrg`--cache-file=FILE' 3397a84e134Smrg Enable the cache: use and save the results of the tests in FILE, 3407a84e134Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 3417a84e134Smrg disable caching. 3427a84e134Smrg 3437a84e134Smrg`--config-cache' 3447a84e134Smrg`-C' 3457a84e134Smrg Alias for `--cache-file=config.cache'. 3467a84e134Smrg 3477a84e134Smrg`--quiet' 3487a84e134Smrg`--silent' 3497a84e134Smrg`-q' 3507a84e134Smrg Do not print messages saying which checks are being made. To 3517a84e134Smrg suppress all normal output, redirect it to `/dev/null' (any error 3527a84e134Smrg messages will still be shown). 3537a84e134Smrg 3547a84e134Smrg`--srcdir=DIR' 3557a84e134Smrg Look for the package's source code in directory DIR. Usually 3567a84e134Smrg `configure' can determine that directory automatically. 3577a84e134Smrg 358994689c1Smrg`--prefix=DIR' 359c8571806Smrg Use DIR as the installation prefix. *note Installation Names:: 360994689c1Smrg for more details, including other options available for fine-tuning 361994689c1Smrg the installation locations. 362994689c1Smrg 363994689c1Smrg`--no-create' 364994689c1Smrg`-n' 365994689c1Smrg Run the configure checks, but stop before creating any output 366994689c1Smrg files. 367994689c1Smrg 3687a84e134Smrg`configure' also accepts some other, not widely useful, options. Run 3697a84e134Smrg`configure --help' for more details. 3707a84e134Smrg 371