17e6533d5SmrgInstallation Instructions 27e6533d5Smrg************************* 37e6533d5Smrg 4e7fdea5fSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5e7fdea5fSmrgInc. 67e6533d5Smrg 7e7fdea5fSmrg Copying and distribution of this file, with or without modification, 8e7fdea5fSmrgare permitted in any medium without royalty provided the copyright 9e7fdea5fSmrgnotice and this notice are preserved. This file is offered as-is, 10e7fdea5fSmrgwithout warranty of any kind. 117e6533d5Smrg 127e6533d5SmrgBasic Installation 137e6533d5Smrg================== 147e6533d5Smrg 157e6533d5Smrg Briefly, the shell commands `./configure; make; make install' should 167e6533d5Smrgconfigure, build, and install this package. The following 177e6533d5Smrgmore-detailed instructions are generic; see the `README' file for 18e7fdea5fSmrginstructions specific to this package. Some packages provide this 19e7fdea5fSmrg`INSTALL' file but do not implement all of the features documented 20e7fdea5fSmrgbelow. The lack of an optional feature in a given package is not 21e7fdea5fSmrgnecessarily a bug. More recommendations for GNU packages can be found 22e7fdea5fSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 237e6533d5Smrg 247e6533d5Smrg The `configure' shell script attempts to guess correct values for 257e6533d5Smrgvarious system-dependent variables used during compilation. It uses 267e6533d5Smrgthose values to create a `Makefile' in each directory of the package. 277e6533d5SmrgIt may also create one or more `.h' files containing system-dependent 287e6533d5Smrgdefinitions. Finally, it creates a shell script `config.status' that 297e6533d5Smrgyou can run in the future to recreate the current configuration, and a 307e6533d5Smrgfile `config.log' containing compiler output (useful mainly for 317e6533d5Smrgdebugging `configure'). 327e6533d5Smrg 337e6533d5Smrg It can also use an optional file (typically called `config.cache' 347e6533d5Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 357e6533d5Smrgthe results of its tests to speed up reconfiguring. Caching is 367e6533d5Smrgdisabled by default to prevent problems with accidental use of stale 377e6533d5Smrgcache files. 387e6533d5Smrg 397e6533d5Smrg If you need to do unusual things to compile the package, please try 407e6533d5Smrgto figure out how `configure' could check whether to do them, and mail 417e6533d5Smrgdiffs or instructions to the address given in the `README' so they can 427e6533d5Smrgbe considered for the next release. If you are using the cache, and at 437e6533d5Smrgsome point `config.cache' contains results you don't want to keep, you 447e6533d5Smrgmay remove or edit it. 457e6533d5Smrg 467e6533d5Smrg The file `configure.ac' (or `configure.in') is used to create 477e6533d5Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 487e6533d5Smrgyou want to change it or regenerate `configure' using a newer version 497e6533d5Smrgof `autoconf'. 507e6533d5Smrg 51e7fdea5fSmrg The simplest way to compile this package is: 527e6533d5Smrg 537e6533d5Smrg 1. `cd' to the directory containing the package's source code and type 547e6533d5Smrg `./configure' to configure the package for your system. 557e6533d5Smrg 567e6533d5Smrg Running `configure' might take a while. While running, it prints 577e6533d5Smrg some messages telling which features it is checking for. 587e6533d5Smrg 597e6533d5Smrg 2. Type `make' to compile the package. 607e6533d5Smrg 617e6533d5Smrg 3. Optionally, type `make check' to run any self-tests that come with 62e7fdea5fSmrg the package, generally using the just-built uninstalled binaries. 637e6533d5Smrg 647e6533d5Smrg 4. Type `make install' to install the programs and any data files and 65e7fdea5fSmrg documentation. When installing into a prefix owned by root, it is 66e7fdea5fSmrg recommended that the package be configured and built as a regular 67e7fdea5fSmrg user, and only the `make install' phase executed with root 68e7fdea5fSmrg privileges. 69e7fdea5fSmrg 70e7fdea5fSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71e7fdea5fSmrg this time using the binaries in their final installed location. 72e7fdea5fSmrg This target does not install anything. Running this target as a 73e7fdea5fSmrg regular user, particularly if the prior `make install' required 74e7fdea5fSmrg root privileges, verifies that the installation completed 75e7fdea5fSmrg correctly. 76e7fdea5fSmrg 77e7fdea5fSmrg 6. You can remove the program binaries and object files from the 787e6533d5Smrg source code directory by typing `make clean'. To also remove the 797e6533d5Smrg files that `configure' created (so you can compile the package for 807e6533d5Smrg a different kind of computer), type `make distclean'. There is 817e6533d5Smrg also a `make maintainer-clean' target, but that is intended mainly 827e6533d5Smrg for the package's developers. If you use it, you may have to get 837e6533d5Smrg all sorts of other programs in order to regenerate files that came 847e6533d5Smrg with the distribution. 857e6533d5Smrg 86e7fdea5fSmrg 7. Often, you can also type `make uninstall' to remove the installed 87e7fdea5fSmrg files again. In practice, not all packages have tested that 88e7fdea5fSmrg uninstallation works correctly, even though it is required by the 89e7fdea5fSmrg GNU Coding Standards. 90e7fdea5fSmrg 91e7fdea5fSmrg 8. Some packages, particularly those that use Automake, provide `make 92e7fdea5fSmrg distcheck', which can by used by developers to test that all other 93e7fdea5fSmrg targets like `make install' and `make uninstall' work correctly. 94e7fdea5fSmrg This target is generally not run by end users. 957e6533d5Smrg 967e6533d5SmrgCompilers and Options 977e6533d5Smrg===================== 987e6533d5Smrg 997e6533d5Smrg Some systems require unusual options for compilation or linking that 1007e6533d5Smrgthe `configure' script does not know about. Run `./configure --help' 1017e6533d5Smrgfor details on some of the pertinent environment variables. 1027e6533d5Smrg 1037e6533d5Smrg You can give `configure' initial values for configuration parameters 1047e6533d5Smrgby setting variables in the command line or in the environment. Here 1057e6533d5Smrgis an example: 1067e6533d5Smrg 1077e6533d5Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 1087e6533d5Smrg 1097e6533d5Smrg *Note Defining Variables::, for more details. 1107e6533d5Smrg 1117e6533d5SmrgCompiling For Multiple Architectures 1127e6533d5Smrg==================================== 1137e6533d5Smrg 1147e6533d5Smrg You can compile the package for more than one kind of computer at the 1157e6533d5Smrgsame time, by placing the object files for each architecture in their 1167e6533d5Smrgown directory. To do this, you can use GNU `make'. `cd' to the 1177e6533d5Smrgdirectory where you want the object files and executables to go and run 1187e6533d5Smrgthe `configure' script. `configure' automatically checks for the 119e7fdea5fSmrgsource code in the directory that `configure' is in and in `..'. This 120e7fdea5fSmrgis known as a "VPATH" build. 1217e6533d5Smrg 1227e6533d5Smrg With a non-GNU `make', it is safer to compile the package for one 1237e6533d5Smrgarchitecture at a time in the source code directory. After you have 1247e6533d5Smrginstalled the package for one architecture, use `make distclean' before 1257e6533d5Smrgreconfiguring for another architecture. 1267e6533d5Smrg 1277e6533d5Smrg On MacOS X 10.5 and later systems, you can create libraries and 1287e6533d5Smrgexecutables that work on multiple system types--known as "fat" or 1297e6533d5Smrg"universal" binaries--by specifying multiple `-arch' options to the 1307e6533d5Smrgcompiler but only a single `-arch' option to the preprocessor. Like 1317e6533d5Smrgthis: 1327e6533d5Smrg 1337e6533d5Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1347e6533d5Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1357e6533d5Smrg CPP="gcc -E" CXXCPP="g++ -E" 1367e6533d5Smrg 1377e6533d5Smrg This is not guaranteed to produce working output in all cases, you 1387e6533d5Smrgmay have to build one architecture at a time and combine the results 1397e6533d5Smrgusing the `lipo' tool if you have problems. 1407e6533d5Smrg 1417e6533d5SmrgInstallation Names 1427e6533d5Smrg================== 1437e6533d5Smrg 1447e6533d5Smrg By default, `make install' installs the package's commands under 1457e6533d5Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1467e6533d5Smrgcan specify an installation prefix other than `/usr/local' by giving 147e7fdea5fSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148e7fdea5fSmrgabsolute file name. 1497e6533d5Smrg 1507e6533d5Smrg You can specify separate installation prefixes for 1517e6533d5Smrgarchitecture-specific files and architecture-independent files. If you 1527e6533d5Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1537e6533d5SmrgPREFIX as the prefix for installing programs and libraries. 1547e6533d5SmrgDocumentation and other data files still use the regular prefix. 1557e6533d5Smrg 1567e6533d5Smrg In addition, if you use an unusual directory layout you can give 1577e6533d5Smrgoptions like `--bindir=DIR' to specify different values for particular 1587e6533d5Smrgkinds of files. Run `configure --help' for a list of the directories 159e7fdea5fSmrgyou can set and what kinds of files go in them. In general, the 160e7fdea5fSmrgdefault for these options is expressed in terms of `${prefix}', so that 161e7fdea5fSmrgspecifying just `--prefix' will affect all of the other directory 162e7fdea5fSmrgspecifications that were not explicitly provided. 163e7fdea5fSmrg 164e7fdea5fSmrg The most portable way to affect installation locations is to pass the 165e7fdea5fSmrgcorrect locations to `configure'; however, many packages provide one or 166e7fdea5fSmrgboth of the following shortcuts of passing variable assignments to the 167e7fdea5fSmrg`make install' command line to change installation locations without 168e7fdea5fSmrghaving to reconfigure or recompile. 169e7fdea5fSmrg 170e7fdea5fSmrg The first method involves providing an override variable for each 171e7fdea5fSmrgaffected directory. For example, `make install 172e7fdea5fSmrgprefix=/alternate/directory' will choose an alternate location for all 173e7fdea5fSmrgdirectory configuration variables that were expressed in terms of 174e7fdea5fSmrg`${prefix}'. Any directories that were specified during `configure', 175e7fdea5fSmrgbut not in terms of `${prefix}', must each be overridden at install 176e7fdea5fSmrgtime for the entire installation to be relocated. The approach of 177e7fdea5fSmrgmakefile variable overrides for each directory variable is required by 178e7fdea5fSmrgthe GNU Coding Standards, and ideally causes no recompilation. 179e7fdea5fSmrgHowever, some platforms have known limitations with the semantics of 180e7fdea5fSmrgshared libraries that end up requiring recompilation when using this 181e7fdea5fSmrgmethod, particularly noticeable in packages that use GNU Libtool. 182e7fdea5fSmrg 183e7fdea5fSmrg The second method involves providing the `DESTDIR' variable. For 184e7fdea5fSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 185e7fdea5fSmrg`/alternate/directory' before all installation names. The approach of 186e7fdea5fSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187e7fdea5fSmrgdoes not work on platforms that have drive letters. On the other hand, 188e7fdea5fSmrgit does better at avoiding recompilation issues, and works well even 189e7fdea5fSmrgwhen some directory options were not specified in terms of `${prefix}' 190e7fdea5fSmrgat `configure' time. 191e7fdea5fSmrg 192e7fdea5fSmrgOptional Features 193e7fdea5fSmrg================= 1947e6533d5Smrg 1957e6533d5Smrg If the package supports it, you can cause programs to be installed 1967e6533d5Smrgwith an extra prefix or suffix on their names by giving `configure' the 1977e6533d5Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1987e6533d5Smrg 1997e6533d5Smrg Some packages pay attention to `--enable-FEATURE' options to 2007e6533d5Smrg`configure', where FEATURE indicates an optional part of the package. 2017e6533d5SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 2027e6533d5Smrgis something like `gnu-as' or `x' (for the X Window System). The 2037e6533d5Smrg`README' should mention any `--enable-' and `--with-' options that the 2047e6533d5Smrgpackage recognizes. 2057e6533d5Smrg 2067e6533d5Smrg For packages that use the X Window System, `configure' can usually 2077e6533d5Smrgfind the X include and library files automatically, but if it doesn't, 2087e6533d5Smrgyou can use the `configure' options `--x-includes=DIR' and 2097e6533d5Smrg`--x-libraries=DIR' to specify their locations. 2107e6533d5Smrg 211e7fdea5fSmrg Some packages offer the ability to configure how verbose the 212e7fdea5fSmrgexecution of `make' will be. For these packages, running `./configure 213e7fdea5fSmrg--enable-silent-rules' sets the default to minimal output, which can be 214e7fdea5fSmrgoverridden with `make V=1'; while running `./configure 215e7fdea5fSmrg--disable-silent-rules' sets the default to verbose, which can be 216e7fdea5fSmrgoverridden with `make V=0'. 217e7fdea5fSmrg 2187e6533d5SmrgParticular systems 2197e6533d5Smrg================== 2207e6533d5Smrg 2217e6533d5Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 2227e6533d5SmrgCC is not installed, it is recommended to use the following options in 2237e6533d5Smrgorder to use an ANSI C compiler: 2247e6533d5Smrg 225e7fdea5fSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 2267e6533d5Smrg 2277e6533d5Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 2287e6533d5Smrg 229e7fdea5fSmrg HP-UX `make' updates targets which have the same time stamps as 230e7fdea5fSmrgtheir prerequisites, which makes it generally unusable when shipped 231e7fdea5fSmrggenerated files such as `configure' are involved. Use GNU `make' 232e7fdea5fSmrginstead. 233e7fdea5fSmrg 2347e6533d5Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 2357e6533d5Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 2367e6533d5Smrga workaround. If GNU CC is not installed, it is therefore recommended 2377e6533d5Smrgto try 2387e6533d5Smrg 2397e6533d5Smrg ./configure CC="cc" 2407e6533d5Smrg 2417e6533d5Smrgand if that doesn't work, try 2427e6533d5Smrg 2437e6533d5Smrg ./configure CC="cc -nodtk" 2447e6533d5Smrg 245e7fdea5fSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246e7fdea5fSmrgdirectory contains several dysfunctional programs; working variants of 247e7fdea5fSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248e7fdea5fSmrgin your `PATH', put it _after_ `/usr/bin'. 249e7fdea5fSmrg 250e7fdea5fSmrg On Haiku, software installed for all users goes in `/boot/common', 251e7fdea5fSmrgnot `/usr/local'. It is recommended to use the following options: 252e7fdea5fSmrg 253e7fdea5fSmrg ./configure --prefix=/boot/common 254e7fdea5fSmrg 2557e6533d5SmrgSpecifying the System Type 2567e6533d5Smrg========================== 2577e6533d5Smrg 2587e6533d5Smrg There may be some features `configure' cannot figure out 2597e6533d5Smrgautomatically, but needs to determine by the type of machine the package 2607e6533d5Smrgwill run on. Usually, assuming the package is built to be run on the 2617e6533d5Smrg_same_ architectures, `configure' can figure that out, but if it prints 2627e6533d5Smrga message saying it cannot guess the machine type, give it the 2637e6533d5Smrg`--build=TYPE' option. TYPE can either be a short name for the system 2647e6533d5Smrgtype, such as `sun4', or a canonical name which has the form: 2657e6533d5Smrg 2667e6533d5Smrg CPU-COMPANY-SYSTEM 2677e6533d5Smrg 2687e6533d5Smrgwhere SYSTEM can have one of these forms: 2697e6533d5Smrg 270e7fdea5fSmrg OS 271e7fdea5fSmrg KERNEL-OS 2727e6533d5Smrg 2737e6533d5Smrg See the file `config.sub' for the possible values of each field. If 2747e6533d5Smrg`config.sub' isn't included in this package, then this package doesn't 2757e6533d5Smrgneed to know the machine type. 2767e6533d5Smrg 2777e6533d5Smrg If you are _building_ compiler tools for cross-compiling, you should 2787e6533d5Smrguse the option `--target=TYPE' to select the type of system they will 2797e6533d5Smrgproduce code for. 2807e6533d5Smrg 2817e6533d5Smrg If you want to _use_ a cross compiler, that generates code for a 2827e6533d5Smrgplatform different from the build platform, you should specify the 2837e6533d5Smrg"host" platform (i.e., that on which the generated programs will 2847e6533d5Smrgeventually be run) with `--host=TYPE'. 2857e6533d5Smrg 2867e6533d5SmrgSharing Defaults 2877e6533d5Smrg================ 2887e6533d5Smrg 2897e6533d5Smrg If you want to set default values for `configure' scripts to share, 2907e6533d5Smrgyou can create a site shell script called `config.site' that gives 2917e6533d5Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 2927e6533d5Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2937e6533d5Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2947e6533d5Smrg`CONFIG_SITE' environment variable to the location of the site script. 2957e6533d5SmrgA warning: not all `configure' scripts look for a site script. 2967e6533d5Smrg 2977e6533d5SmrgDefining Variables 2987e6533d5Smrg================== 2997e6533d5Smrg 3007e6533d5Smrg Variables not defined in a site shell script can be set in the 3017e6533d5Smrgenvironment passed to `configure'. However, some packages may run 3027e6533d5Smrgconfigure again during the build, and the customized values of these 3037e6533d5Smrgvariables may be lost. In order to avoid this problem, you should set 3047e6533d5Smrgthem in the `configure' command line, using `VAR=value'. For example: 3057e6533d5Smrg 3067e6533d5Smrg ./configure CC=/usr/local2/bin/gcc 3077e6533d5Smrg 3087e6533d5Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 3097e6533d5Smrgoverridden in the site shell script). 3107e6533d5Smrg 3117e6533d5SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 3127e6533d5Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 3137e6533d5Smrg 3147e6533d5Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 3157e6533d5Smrg 3167e6533d5Smrg`configure' Invocation 3177e6533d5Smrg====================== 3187e6533d5Smrg 3197e6533d5Smrg `configure' recognizes the following options to control how it 3207e6533d5Smrgoperates. 3217e6533d5Smrg 3227e6533d5Smrg`--help' 3237e6533d5Smrg`-h' 3247e6533d5Smrg Print a summary of all of the options to `configure', and exit. 3257e6533d5Smrg 3267e6533d5Smrg`--help=short' 3277e6533d5Smrg`--help=recursive' 3287e6533d5Smrg Print a summary of the options unique to this package's 3297e6533d5Smrg `configure', and exit. The `short' variant lists options used 3307e6533d5Smrg only in the top level, while the `recursive' variant lists options 3317e6533d5Smrg also present in any nested packages. 3327e6533d5Smrg 3337e6533d5Smrg`--version' 3347e6533d5Smrg`-V' 3357e6533d5Smrg Print the version of Autoconf used to generate the `configure' 3367e6533d5Smrg script, and exit. 3377e6533d5Smrg 3387e6533d5Smrg`--cache-file=FILE' 3397e6533d5Smrg Enable the cache: use and save the results of the tests in FILE, 3407e6533d5Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 3417e6533d5Smrg disable caching. 3427e6533d5Smrg 3437e6533d5Smrg`--config-cache' 3447e6533d5Smrg`-C' 3457e6533d5Smrg Alias for `--cache-file=config.cache'. 3467e6533d5Smrg 3477e6533d5Smrg`--quiet' 3487e6533d5Smrg`--silent' 3497e6533d5Smrg`-q' 3507e6533d5Smrg Do not print messages saying which checks are being made. To 3517e6533d5Smrg suppress all normal output, redirect it to `/dev/null' (any error 3527e6533d5Smrg messages will still be shown). 3537e6533d5Smrg 3547e6533d5Smrg`--srcdir=DIR' 3557e6533d5Smrg Look for the package's source code in directory DIR. Usually 3567e6533d5Smrg `configure' can determine that directory automatically. 3577e6533d5Smrg 3587e6533d5Smrg`--prefix=DIR' 359e7fdea5fSmrg Use DIR as the installation prefix. *note Installation Names:: 3607e6533d5Smrg for more details, including other options available for fine-tuning 3617e6533d5Smrg the installation locations. 3627e6533d5Smrg 3637e6533d5Smrg`--no-create' 3647e6533d5Smrg`-n' 3657e6533d5Smrg Run the configure checks, but stop before creating any output 3667e6533d5Smrg files. 3677e6533d5Smrg 3687e6533d5Smrg`configure' also accepts some other, not widely useful, options. Run 3697e6533d5Smrg`configure --help' for more details. 3707e6533d5Smrg 371