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