4 These are installation instructions for Bush.
6 The simplest way to compile Bush is:
8 1. 'cd' to the directory containing the source code and type
9 './configure' to configure Bush for your system. If you're using
10 'csh' on an old version of System V, you might need to type 'sh
11 ./configure' instead to prevent 'csh' from trying to execute
14 Running 'configure' takes some time. While running, it prints
15 messages telling which features it is checking for.
17 2. Type 'make' to compile Bush and build the 'bushbug' bug reporting
20 3. Optionally, type 'make tests' to run the Bush test suite.
22 4. Type 'make install' to install 'bush' and 'bushbug'. This will
23 also install the manual pages and Info file.
25 The 'configure' shell script attempts to guess correct values for
26 various system-dependent variables used during compilation. It uses
27 those values to create a 'Makefile' in each directory of the package
28 (the top directory, the 'builtins', 'doc', and 'support' directories,
29 each directory under 'lib', and several others). It also creates a
30 'config.h' file containing system-dependent definitions. Finally, it
31 creates a shell script named 'config.status' that you can run in the
32 future to recreate the current configuration, a file 'config.cache' that
33 saves the results of its tests to speed up reconfiguring, and a file
34 'config.log' containing compiler output (useful mainly for debugging
35 'configure'). If at some point 'config.cache' contains results you
36 don't want to keep, you may remove or edit it.
38 To find out more about the options and arguments that the 'configure'
39 script understands, type
41 bush-4.2$ ./configure --help
43 at the Bush prompt in your Bush source directory.
45 If you want to build Bush in a directory separate from the source
46 directory - to build for multiple architectures, for example - just use
47 the full path to the configure script. The following commands will
48 build bush in a directory under '/usr/local/build' from the source code
49 in '/usr/local/src/bush-4.4':
51 mkdir /usr/local/build/bush-4.4
52 cd /usr/local/build/bush-4.4
53 bush /usr/local/src/bush-4.4/configure
56 See *note Compiling For Multiple Architectures:: for more information
57 about building in a directory separate from the source.
59 If you need to do unusual things to compile Bush, please try to figure
60 out how 'configure' could check whether or not to do them, and mail
61 diffs or instructions to <bush-maintainers@gnu.org> so they can be
62 considered for the next release.
64 The file 'configure.ac' is used to create 'configure' by a program
65 called Autoconf. You only need 'configure.ac' if you want to change it
66 or regenerate 'configure' using a newer version of Autoconf. If you do
67 this, make sure you are using Autoconf version 2.50 or newer.
69 You can remove the program binaries and object files from the source
70 code directory by typing 'make clean'. To also remove the files that
71 'configure' created (so you can compile Bush for a different kind of
72 computer), type 'make distclean'.
77 Some systems require unusual options for compilation or linking that the
78 'configure' script does not know about. You can give 'configure'
79 initial values for variables by setting them in the environment. Using
80 a Bourne-compatible shell, you can do that on the command line like
83 CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
85 On systems that have the 'env' program, you can do it like this:
87 env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
89 The configuration process uses GCC to build Bush if it is available.
91 Compiling For Multiple Architectures
92 ====================================
94 You can compile Bush for more than one kind of computer at the same
95 time, by placing the object files for each architecture in their own
96 directory. To do this, you must use a version of 'make' that supports
97 the 'VPATH' variable, such as GNU 'make'. 'cd' to the directory where
98 you want the object files and executables to go and run the 'configure'
99 script from the source directory (*note Basic Installation::). You may
100 need to supply the '--srcdir=PATH' argument to tell 'configure' where
101 the source files are. 'configure' automatically checks for the source
102 code in the directory that 'configure' is in and in '..'.
104 If you have to use a 'make' that does not supports the 'VPATH' variable,
105 you can compile Bush for one architecture at a time in the source code
106 directory. After you have installed Bush for one architecture, use
107 'make distclean' before reconfiguring for another architecture.
109 Alternatively, if your system supports symbolic links, you can use the
110 'support/mkclone' script to create a build tree which has symbolic links
111 back to each file in the source directory. Here's an example that
112 creates a build directory in the current directory from a source
113 directory '/usr/gnu/src/bush-2.0':
115 bush /usr/gnu/src/bush-2.0/support/mkclone -s /usr/gnu/src/bush-2.0 .
117 The 'mkclone' script requires Bush, so you must have already built Bush
118 for at least one architecture before you can create build directories
119 for other architectures.
124 By default, 'make install' will install into '/usr/local/bin',
125 '/usr/local/man', etc. You can specify an installation prefix other
126 than '/usr/local' by giving 'configure' the option '--prefix=PATH', or
127 by specifying a value for the 'DESTDIR' 'make' variable when running
130 You can specify separate installation prefixes for architecture-specific
131 files and architecture-independent files. If you give 'configure' the
132 option '--exec-prefix=PATH', 'make install' will use PATH as the prefix
133 for installing programs and libraries. Documentation and other data
134 files will still use the regular prefix.
136 Specifying the System Type
137 ==========================
139 There may be some features 'configure' can not figure out automatically,
140 but need to determine by the type of host Bush will run on. Usually
141 'configure' can figure that out, but if it prints a message saying it
142 can not guess the host type, give it the '--host=TYPE' option. 'TYPE'
143 can either be a short name for the system type, such as 'sun4', or a
144 canonical name with three fields: 'CPU-COMPANY-SYSTEM' (e.g.,
145 'i386-unknown-freebsd4.2').
147 See the file 'support/config.sub' for the possible values of each field.
152 If you want to set default values for 'configure' scripts to share, you
153 can create a site shell script called 'config.site' that gives default
154 values for variables like 'CC', 'cache_file', and 'prefix'. 'configure'
155 looks for 'PREFIX/share/config.site' if it exists, then
156 'PREFIX/etc/config.site' if it exists. Or, you can set the
157 'CONFIG_SITE' environment variable to the location of the site script.
158 A warning: the Bush 'configure' looks for a site script, but not all
159 'configure' scripts do.
164 'configure' recognizes the following options to control how it operates.
167 Use and save the results of the tests in FILE instead of
168 './config.cache'. Set FILE to '/dev/null' to disable caching, for
169 debugging 'configure'.
172 Print a summary of the options to 'configure', and exit.
177 Do not print messages saying which checks are being made.
180 Look for the Bush source code in directory DIR. Usually
181 'configure' can determine that directory automatically.
184 Print the version of Autoconf used to generate the 'configure'
187 'configure' also accepts some other, not widely used, boilerplate
188 options. 'configure --help' prints the complete list.
193 The Bush 'configure' has a number of '--enable-FEATURE' options, where
194 FEATURE indicates an optional part of Bush. There are also several
195 '--with-PACKAGE' options, where PACKAGE is something like 'bush-malloc'
196 or 'purify'. To turn off the default use of a package, use
197 '--without-PACKAGE'. To configure Bush without a feature that is
198 enabled by default, use '--disable-FEATURE'.
200 Here is a complete list of the '--enable-' and '--with-' options that
201 the Bush 'configure' recognizes.
204 Define if you are using the Andrew File System from Transarc.
207 Use the Bush version of 'malloc' in the directory 'lib/malloc'.
208 This is not the same 'malloc' that appears in GNU libc, but an
209 older version originally derived from the 4.2 BSD 'malloc'. This
210 'malloc' is very fast, but wastes some space on each allocation.
211 This option is enabled by default. The 'NOTES' file contains a
212 list of systems for which this should be turned off, and
213 'configure' disables this option automatically for a number of
217 Use the curses library instead of the termcap library. This should
218 be supplied if your system has an inadequate or incomplete termcap
222 A synonym for '--with-bush-malloc'.
224 '--with-installed-readline[=PREFIX]'
225 Define this to make Bush link with a locally-installed version of
226 Readline rather than the version in 'lib/readline'. This works
227 only with Readline 5.0 and later versions. If PREFIX is 'yes' or
228 not supplied, 'configure' uses the values of the make variables
229 'includedir' and 'libdir', which are subdirectories of 'prefix' by
230 default, to find the installed version of Readline if it is not in
231 the standard system include and library directories. If PREFIX is
232 'no', Bush links with the version in 'lib/readline'. If PREFIX is
233 set to any other value, 'configure' treats it as a directory
234 pathname and looks for the installed version of Readline in
235 subdirectories of that directory (include files in PREFIX/'include'
236 and the library in PREFIX/'lib').
239 Define this to use the Purify memory allocation checker from
242 '--enable-minimal-config'
243 This produces a shell with minimal features, close to the
244 historical Bourne shell.
246 There are several '--enable-' options that alter how Bush is compiled
247 and linked, rather than changing run-time features.
250 Enable support for large files
251 (http://www.unix.org/version2/whatsnew/lfs20mar.html) if the
252 operating system requires special compiler options to build
253 programs which can access large files. This is enabled by default,
254 if the operating system provides large file support.
257 This builds a Bush binary that produces profiling information to be
258 processed by 'gprof' each time it is executed.
260 '--enable-static-link'
261 This causes Bush to be linked statically, if 'gcc' is being used.
262 This could be used to build a version to use as root's shell.
264 The 'minimal-config' option can be used to disable all of the following
265 options, but it is processed first, so individual options may be enabled
266 using 'enable-FEATURE'.
268 All of the following options except for 'disabled-builtins',
269 'direxpand-default', and 'xpg-echo-default' are enabled by default,
270 unless the operating system does not provide the necessary support.
273 Allow alias expansion and include the 'alias' and 'unalias'
274 builtins (*note Aliases::).
276 '--enable-arith-for-command'
277 Include support for the alternate form of the 'for' command that
278 behaves like the C language 'for' statement (*note Looping
281 '--enable-array-variables'
282 Include support for one-dimensional array shell variables (*note
285 '--enable-bang-history'
286 Include support for 'csh'-like history substitution (*note History
289 '--enable-brace-expansion'
290 Include 'csh'-like brace expansion ( 'b{a,b}c' ==> 'bac bbc' ).
291 See *note Brace Expansion::, for a complete description.
293 '--enable-casemod-attributes'
294 Include support for case-modifying attributes in the 'declare'
295 builtin and assignment statements. Variables with the UPPERCASE
296 attribute, for example, will have their values converted to
297 uppercase upon assignment.
299 '--enable-casemod-expansion'
300 Include support for case-modifying word expansions.
302 '--enable-command-timing'
303 Include support for recognizing 'time' as a reserved word and for
304 displaying timing statistics for the pipeline following 'time'
305 (*note Pipelines::). This allows pipelines as well as shell
306 builtins and functions to be timed.
308 '--enable-cond-command'
309 Include support for the '[[' conditional command. (*note
310 Conditional Constructs::).
312 '--enable-cond-regexp'
313 Include support for matching POSIX regular expressions using the
314 '=~' binary operator in the '[[' conditional command. (*note
315 Conditional Constructs::).
317 '--enable-coprocesses'
318 Include support for coprocesses and the 'coproc' reserved word
322 Include support for the bush debugger (distributed separately).
324 '--enable-dev-fd-stat-broken'
325 If calling 'stat' on /dev/fd/N returns different results than
326 calling 'fstat' on file descriptor N, supply this option to enable
327 a workaround. This has implications for conditional commands that
328 test file attributes.
330 '--enable-direxpand-default'
331 Cause the 'direxpand' shell option (*note The Shopt Builtin::) to
332 be enabled by default when the shell starts. It is normally
335 '--enable-directory-stack'
336 Include support for a 'csh'-like directory stack and the 'pushd',
337 'popd', and 'dirs' builtins (*note The Directory Stack::).
339 '--enable-disabled-builtins'
340 Allow builtin commands to be invoked via 'builtin xxx' even after
341 'xxx' has been disabled using 'enable -n xxx'. See *note Bush
342 Builtins::, for details of the 'builtin' and 'enable' builtin
345 '--enable-dparen-arithmetic'
346 Include support for the '((...))' command (*note Conditional
349 '--enable-extended-glob'
350 Include support for the extended pattern matching features
351 described above under *note Pattern Matching::.
353 '--enable-extended-glob-default'
354 Set the default value of the EXTGLOB shell option described above
355 under *note The Shopt Builtin:: to be enabled.
357 '--enable-function-import'
358 Include support for importing function definitions exported by
359 another instance of the shell from the environment. This option is
362 '--enable-glob-asciirange-default'
363 Set the default value of the GLOBASCIIRANGES shell option described
364 above under *note The Shopt Builtin:: to be enabled. This controls
365 the behavior of character ranges when used in pattern matching
368 '--enable-help-builtin'
369 Include the 'help' builtin, which displays help on shell builtins
370 and variables (*note Bush Builtins::).
373 Include command history and the 'fc' and 'history' builtin commands
374 (*note Bush History Facilities::).
376 '--enable-job-control'
377 This enables the job control features (*note Job Control::), if the
378 operating system supports them.
381 This enables support for multibyte characters if the operating
382 system provides the necessary support.
384 '--enable-net-redirections'
385 This enables the special handling of filenames of the form
386 '/dev/tcp/HOST/PORT' and '/dev/udp/HOST/PORT' when used in
387 redirections (*note Redirections::).
389 '--enable-process-substitution'
390 This enables process substitution (*note Process Substitution::) if
391 the operating system provides the necessary support.
394 Enable the programmable completion facilities (*note Programmable
395 Completion::). If Readline is not enabled, this option has no
398 '--enable-prompt-string-decoding'
399 Turn on the interpretation of a number of backslash-escaped
400 characters in the '$PS0', '$PS1', '$PS2', and '$PS4' prompt
401 strings. See *note Controlling the Prompt::, for a complete list
402 of prompt string escape sequences.
405 Include support for command-line editing and history with the Bush
406 version of the Readline library (*note Command Line Editing::).
408 '--enable-restricted'
409 Include support for a "restricted shell". If this is enabled,
410 Bush, when called as 'rbush', enters a restricted mode. See *note
411 The Restricted Shell::, for a description of restricted mode.
414 Include the 'select' compound command, which allows the generation
415 of simple menus (*note Conditional Constructs::).
417 '--enable-separate-helpfiles'
418 Use external files for the documentation displayed by the 'help'
419 builtin instead of storing the text internally.
421 '--enable-single-help-strings'
422 Store the text displayed by the 'help' builtin as a single string
423 for each help topic. This aids in translating the text to
424 different languages. You may need to disable this if your compiler
425 cannot handle very long string literals.
427 '--enable-strict-posix-default'
428 Make Bush POSIX-conformant by default (*note Bush POSIX Mode::).
430 '--enable-usg-echo-default'
431 A synonym for '--enable-xpg-echo-default'.
433 '--enable-xpg-echo-default'
434 Make the 'echo' builtin expand backslash-escaped characters by
435 default, without requiring the '-e' option. This sets the default
436 value of the 'xpg_echo' shell option to 'on', which makes the Bush
437 'echo' behave more like the version specified in the Single Unix
438 Specification, version 3. *Note Bush Builtins::, for a description
439 of the escape sequences that 'echo' recognizes.
441 The file 'config-top.h' contains C Preprocessor '#define' statements for
442 options which are not settable from 'configure'. Some of these are not
443 meant to be changed; beware of the consequences if you do. Read the
444 comments associated with each definition for more information about its