summaryrefslogtreecommitdiff
path: root/devdocs/bash/optional-features.html
blob: 5a03e3abb68286b173101f1446fa2519428c8787 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<h1 class="section">Optional Features</h1> <p>The Bash <code>configure</code> has a number of <samp>--enable-<var>feature</var></samp> options, where <var>feature</var> indicates an optional part of Bash. There are also several <samp>--with-<var>package</var></samp> options, where <var>package</var> is something like ‘<samp>bash-malloc</samp>’ or ‘<samp>purify</samp>’. To turn off the default use of a package, use <samp>--without-<var>package</var></samp>. To configure Bash without a feature that is enabled by default, use <samp>--disable-<var>feature</var></samp>. </p> <p>Here is a complete list of the <samp>--enable-</samp> and <samp>--with-</samp> options that the Bash <code>configure</code> recognizes. </p> <dl compact> <dt><span><code>--with-afs</code></span></dt> <dd>
<p>Define if you are using the Andrew File System from Transarc. </p> </dd> <dt><span><code>--with-bash-malloc</code></span></dt> <dd>
<p>Use the Bash version of <code>malloc</code> in the directory <samp>lib/malloc</samp>. This is not the same <code>malloc</code> that appears in <small>GNU</small> libc, but an older version originally derived from the 4.2 <small>BSD</small> <code>malloc</code>. This <code>malloc</code> is very fast, but wastes some space on each allocation. This option is enabled by default. The <samp>NOTES</samp> file contains a list of systems for which this should be turned off, and <code>configure</code> disables this option automatically for a number of systems. </p> </dd> <dt><span><code>--with-curses</code></span></dt> <dd>
<p>Use the curses library instead of the termcap library. This should be supplied if your system has an inadequate or incomplete termcap database. </p> </dd> <dt><span><code>--with-gnu-malloc</code></span></dt> <dd>
<p>A synonym for <code>--with-bash-malloc</code>. </p> </dd> <dt><span><code>--with-installed-readline[=<var>PREFIX</var>]</code></span></dt> <dd>
<p>Define this to make Bash link with a locally-installed version of Readline rather than the version in <samp>lib/readline</samp>. This works only with Readline 5.0 and later versions. If <var>PREFIX</var> is <code>yes</code> or not supplied, <code>configure</code> uses the values of the make variables <code>includedir</code> and <code>libdir</code>, which are subdirectories of <code>prefix</code> by default, to find the installed version of Readline if it is not in the standard system include and library directories. If <var>PREFIX</var> is <code>no</code>, Bash links with the version in <samp>lib/readline</samp>. If <var>PREFIX</var> is set to any other value, <code>configure</code> treats it as a directory pathname and looks for the installed version of Readline in subdirectories of that directory (include files in <var>PREFIX</var>/<code>include</code> and the library in <var>PREFIX</var>/<code>lib</code>). </p> </dd> <dt><span><code>--with-libintl-prefix[=<var>PREFIX</var>]</code></span></dt> <dd>
<p>Define this to make Bash link with a locally-installed version of the libintl library instead of the version in <samp>lib/intl</samp>. </p> </dd> <dt><span><code>--with-libiconv-prefix[=<var>PREFIX</var>]</code></span></dt> <dd>
<p>Define this to make Bash look for libiconv in <var>PREFIX</var> instead of the standard system locations. There is no version included with Bash. </p> </dd> <dt><span><code>--enable-minimal-config</code></span></dt> <dd><p>This produces a shell with minimal features, close to the historical Bourne shell. </p></dd> </dl> <p>There are several <samp>--enable-</samp> options that alter how Bash is compiled, linked, and installed, rather than changing run-time features. </p> <dl compact> <dt><span><code>--enable-largefile</code></span></dt> <dd>
<p>Enable support for <a href="http://www.unix.org/version2/whatsnew/lfs20mar.html">large files</a> if the operating system requires special compiler options to build programs which can access large files. This is enabled by default, if the operating system provides large file support. </p> </dd> <dt><span><code>--enable-profiling</code></span></dt> <dd>
<p>This builds a Bash binary that produces profiling information to be processed by <code>gprof</code> each time it is executed. </p> </dd> <dt><span><code>--enable-separate-helpfiles</code></span></dt> <dd>
<p>Use external files for the documentation displayed by the <code>help</code> builtin instead of storing the text internally. </p> </dd> <dt><span><code>--enable-static-link</code></span></dt> <dd>
<p>This causes Bash to be linked statically, if <code>gcc</code> is being used. This could be used to build a version to use as root’s shell. </p> </dd> </dl> <p>The ‘<samp>minimal-config</samp>’ option can be used to disable all of the following options, but it is processed first, so individual options may be enabled using ‘<samp>enable-<var>feature</var></samp>’. </p> <p>All of the following options except for ‘<samp>alt-array-implementation</samp>’, ‘<samp>disabled-builtins</samp>’, ‘<samp>direxpand-default</samp>’, ‘<samp>strict-posix-default</samp>’, and ‘<samp>xpg-echo-default</samp>’ are enabled by default, unless the operating system does not provide the necessary support. </p> <dl compact> <dt><span><code>--enable-alias</code></span></dt> <dd>
<p>Allow alias expansion and include the <code>alias</code> and <code>unalias</code> builtins (see <a href="aliases">Aliases</a>). </p> </dd> <dt><span><code>--enable-alt-array-implementation</code></span></dt> <dd>
<p>This builds bash using an alternate implementation of arrays (see <a href="arrays">Arrays</a>) that provides faster access at the expense of using more memory (sometimes many times more, depending on how sparse an array is). </p> </dd> <dt><span><code>--enable-arith-for-command</code></span></dt> <dd>
<p>Include support for the alternate form of the <code>for</code> command that behaves like the C language <code>for</code> statement (see <a href="looping-constructs">Looping Constructs</a>). </p> </dd> <dt><span><code>--enable-array-variables</code></span></dt> <dd>
<p>Include support for one-dimensional array shell variables (see <a href="arrays">Arrays</a>). </p> </dd> <dt><span><code>--enable-bang-history</code></span></dt> <dd>
<p>Include support for <code>csh</code>-like history substitution (see <a href="history-interaction">History Expansion</a>). </p> </dd> <dt><span><code>--enable-brace-expansion</code></span></dt> <dd>
<p>Include <code>csh</code>-like brace expansion ( <code>b{a,b}c</code> → <code>bac bbc</code> ). See <a href="brace-expansion">Brace Expansion</a>, for a complete description. </p> </dd> <dt><span><code>--enable-casemod-attributes</code></span></dt> <dd>
<p>Include support for case-modifying attributes in the <code>declare</code> builtin and assignment statements. Variables with the <code>uppercase</code> attribute, for example, will have their values converted to uppercase upon assignment. </p> </dd> <dt><span><code>--enable-casemod-expansion</code></span></dt> <dd>
<p>Include support for case-modifying word expansions. </p> </dd> <dt><span><code>--enable-command-timing</code></span></dt> <dd>
<p>Include support for recognizing <code>time</code> as a reserved word and for displaying timing statistics for the pipeline following <code>time</code> (see <a href="pipelines">Pipelines</a>). This allows pipelines as well as shell builtins and functions to be timed. </p> </dd> <dt><span><code>--enable-cond-command</code></span></dt> <dd>
<p>Include support for the <code>[[</code> conditional command. (see <a href="conditional-constructs">Conditional Constructs</a>). </p> </dd> <dt><span><code>--enable-cond-regexp</code></span></dt> <dd>
<p>Include support for matching <small>POSIX</small> regular expressions using the ‘<samp>=~</samp>’ binary operator in the <code>[[</code> conditional command. (see <a href="conditional-constructs">Conditional Constructs</a>). </p> </dd> <dt><span><code>--enable-coprocesses</code></span></dt> <dd>
<p>Include support for coprocesses and the <code>coproc</code> reserved word (see <a href="pipelines">Pipelines</a>). </p> </dd> <dt><span><code>--enable-debugger</code></span></dt> <dd>
<p>Include support for the bash debugger (distributed separately). </p> </dd> <dt><span><code>--enable-dev-fd-stat-broken</code></span></dt> <dd>
<p>If calling <code>stat</code> on /dev/fd/<var>N</var> returns different results than calling <code>fstat</code> on file descriptor <var>N</var>, supply this option to enable a workaround. This has implications for conditional commands that test file attributes. </p> </dd> <dt><span><code>--enable-direxpand-default</code></span></dt> <dd>
<p>Cause the <code>direxpand</code> shell option (see <a href="the-shopt-builtin">The Shopt Builtin</a>) to be enabled by default when the shell starts. It is normally disabled by default. </p> </dd> <dt><span><code>--enable-directory-stack</code></span></dt> <dd>
<p>Include support for a <code>csh</code>-like directory stack and the <code>pushd</code>, <code>popd</code>, and <code>dirs</code> builtins (see <a href="the-directory-stack">The Directory Stack</a>). </p> </dd> <dt><span><code>--enable-disabled-builtins</code></span></dt> <dd>
<p>Allow builtin commands to be invoked via ‘<samp>builtin xxx</samp>’ even after <code>xxx</code> has been disabled using ‘<samp>enable -n xxx</samp>’. See <a href="bash-builtins">Bash Builtin Commands</a>, for details of the <code>builtin</code> and <code>enable</code> builtin commands. </p> </dd> <dt><span><code>--enable-dparen-arithmetic</code></span></dt> <dd>
<p>Include support for the <code>((…))</code> command (see <a href="conditional-constructs">Conditional Constructs</a>). </p> </dd> <dt><span><code>--enable-extended-glob</code></span></dt> <dd>
<p>Include support for the extended pattern matching features described above under <a href="pattern-matching">Pattern Matching</a>. </p> </dd> <dt><span><code>--enable-extended-glob-default</code></span></dt> <dd>
<p>Set the default value of the <code>extglob</code> shell option described above under <a href="the-shopt-builtin">The Shopt Builtin</a> to be enabled. </p> </dd> <dt><span><code>--enable-function-import</code></span></dt> <dd>
<p>Include support for importing function definitions exported by another instance of the shell from the environment. This option is enabled by default. </p> </dd> <dt><span><code>--enable-glob-asciirange-default</code></span></dt> <dd>
<p>Set the default value of the <code>globasciiranges</code> shell option described above under <a href="the-shopt-builtin">The Shopt Builtin</a> to be enabled. This controls the behavior of character ranges when used in pattern matching bracket expressions. </p> </dd> <dt><span><code>--enable-help-builtin</code></span></dt> <dd>
<p>Include the <code>help</code> builtin, which displays help on shell builtins and variables (see <a href="bash-builtins">Bash Builtin Commands</a>). </p> </dd> <dt><span><code>--enable-history</code></span></dt> <dd>
<p>Include command history and the <code>fc</code> and <code>history</code> builtin commands (see <a href="bash-history-facilities">Bash History Facilities</a>). </p> </dd> <dt><span><code>--enable-job-control</code></span></dt> <dd>
<p>This enables the job control features (see <a href="job-control">Job Control</a>), if the operating system supports them. </p> </dd> <dt><span><code>--enable-multibyte</code></span></dt> <dd>
<p>This enables support for multibyte characters if the operating system provides the necessary support. </p> </dd> <dt><span><code>--enable-net-redirections</code></span></dt> <dd>
<p>This enables the special handling of filenames of the form <code>/dev/tcp/<var>host</var>/<var>port</var></code> and <code>/dev/udp/<var>host</var>/<var>port</var></code> when used in redirections (see <a href="redirections">Redirections</a>). </p> </dd> <dt><span><code>--enable-process-substitution</code></span></dt> <dd>
<p>This enables process substitution (see <a href="process-substitution">Process Substitution</a>) if the operating system provides the necessary support. </p> </dd> <dt><span><code>--enable-progcomp</code></span></dt> <dd>
<p>Enable the programmable completion facilities (see <a href="programmable-completion">Programmable Completion</a>). If Readline is not enabled, this option has no effect. </p> </dd> <dt><span><code>--enable-prompt-string-decoding</code></span></dt> <dd>
<p>Turn on the interpretation of a number of backslash-escaped characters in the <code>$PS0</code>, <code>$PS1</code>, <code>$PS2</code>, and <code>$PS4</code> prompt strings. See <a href="controlling-the-prompt">Controlling the Prompt</a>, for a complete list of prompt string escape sequences. </p> </dd> <dt><span><code>--enable-readline</code></span></dt> <dd>
<p>Include support for command-line editing and history with the Bash version of the Readline library (see <a href="command-line-editing">Command Line Editing</a>). </p> </dd> <dt><span><code>--enable-restricted</code></span></dt> <dd>
<p>Include support for a <em>restricted shell</em>. If this is enabled, Bash, when called as <code>rbash</code>, enters a restricted mode. See <a href="the-restricted-shell">The Restricted Shell</a>, for a description of restricted mode. </p> </dd> <dt><span><code>--enable-select</code></span></dt> <dd>
<p>Include the <code>select</code> compound command, which allows the generation of simple menus (see <a href="conditional-constructs">Conditional Constructs</a>). </p> </dd> <dt><span><code>--enable-single-help-strings</code></span></dt> <dd>
<p>Store the text displayed by the <code>help</code> builtin as a single string for each help topic. This aids in translating the text to different languages. You may need to disable this if your compiler cannot handle very long string literals. </p> </dd> <dt><span><code>--enable-strict-posix-default</code></span></dt> <dd>
<p>Make Bash <small>POSIX</small>-conformant by default (see <a href="bash-posix-mode">Bash POSIX Mode</a>). </p> </dd> <dt><span><code>--enable-translatable-strings</code></span></dt> <dd>
<p>Enable support for <code>$"<var>string</var>"</code> translatable strings (see <a href="locale-translation">Locale-Specific Translation</a>). </p> </dd> <dt><span><code>--enable-usg-echo-default</code></span></dt> <dd>
<p>A synonym for <code>--enable-xpg-echo-default</code>. </p> </dd> <dt><span><code>--enable-xpg-echo-default</code></span></dt> <dd><p>Make the <code>echo</code> builtin expand backslash-escaped characters by default, without requiring the <samp>-e</samp> option. This sets the default value of the <code>xpg_echo</code> shell option to <code>on</code>, which makes the Bash <code>echo</code> behave more like the version specified in the Single Unix Specification, version 3. See <a href="bash-builtins">Bash Builtin Commands</a>, for a description of the escape sequences that <code>echo</code> recognizes. </p></dd> </dl> <p>The file <samp>config-top.h</samp> contains C Preprocessor ‘<samp>#define</samp>’ statements for options which are not settable from <code>configure</code>. Some of these are not meant to be changed; beware of the consequences if you do. Read the comments associated with each definition for more information about its effect. </p><div class="_attribution">
  <p class="_attribution-p">
    Copyright &copy; 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.<br>Licensed under the GNU Free Documentation License.<br>
    <a href="https://www.gnu.org/software/bash/manual/html_node/Optional-Features.html" class="_attribution-link">https://www.gnu.org/software/bash/manual/html_node/Optional-Features.html</a>
  </p>
</div>