annotate src/opus-1.3/INSTALL @ 83:ae30d91d2ffe

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