4 This is the Gnu Readline library, version 4.2.
6 The Readline library provides a set of functions for use by applications
7 that allow users to edit command lines as they are typed in. Both
8 Emacs and vi editing modes are available. The Readline library includes
9 additional functions to maintain a list of previously-entered command
10 lines, to recall and perhaps reedit those lines, and perform csh-like
11 history expansion on previous commands.
13 The history facilites are also placed into a separate library, the
14 History library, as part of the build process. The History library
15 may be used without Readline in applications which desire its
18 The Readline library is free software, distributed under the terms of
19 the GNU Public License, version 2. For more information, see the file
22 To build the library, try typing `./configure', then `make'. The
23 configuration process is automated, so no further intervention should
24 be necessary. Readline builds with `gcc' by default if it is
25 available. If you want to use `cc' instead, type
29 if you are using a Bourne-style shell. If you are not, the following
34 Read the file INSTALL in this directory for more information about how
35 to customize and control the build process.
37 The file rlconf.h contains C preprocessor defines that enable and disable
38 certain Readline features.
40 The special make target `everything' will build the static and shared
41 libraries (if the target platform supports them) and the examples.
46 There are several example programs that use Readline features in the
47 examples directory. The `rl' program is of particular interest. It
48 is a command-line interface to Readline, suitable for use in shell
49 scripts in place of `read'.
54 There is skeletal support for building shared versions of the
55 Readline and History libraries. The configure script creates
56 a Makefile in the `shlib' subdirectory, and typing `make shared'
57 will cause shared versions of the Readline and History libraries
58 to be built on supported platforms.
60 Configure calls the script support/shobj-conf to test whether or
61 not shared library creation is supported and to generate the values
62 of variables that are substituted into shlib/Makefile. If you
63 try to build shared libraries on an unsupported platform, `make'
64 will display a message asking you to update support/shobj-conf for
67 If you need to update support/shobj-conf, you will need to create
68 a `stanza' for your operating system and compiler. The script uses
69 the value of host_os and ${CC} as determined by configure. For
70 instance, FreeBSD 4.2 using the ELF object file format with any
71 version of gcc is identified as `freebsdelf4.2-gcc*'.
73 In the stanza for your operating system-compiler pair, you will need to
74 define several variables. They are:
76 SHOBJ_CC The C compiler used to compile source files into shareable
77 object files. This is normally set to the value of ${CC}
78 by configure, and should not need to be changed.
80 SHOBJ_CFLAGS Flags to pass to the C compiler ($SHOBJ_CC) to create
81 position-independent code. If you are using gcc, this
82 should probably be set to `-fpic'.
84 SHOBJ_LD The link editor to be used to create the shared library from
85 the object files created by $SHOBJ_CC. If you are using
86 gcc, a value of `gcc' will probably work.
88 SHOBJ_LDFLAGS Flags to pass to SHOBJ_LD to enable shared object creation.
89 If you are using gcc, `-shared' may be all that is necessary.
90 These should be the flags needed for generic shared object
93 SHLIB_XLDFLAGS Additional flags to pass to SHOBJ_LD for shared library
94 creation. Many systems use the -R option to the link
95 editor to embed a path within the library for run-time
96 library searches. A reasonable value for such systems would
99 SHLIB_LIBS Any additional libraries that shared libraries should be
100 linked against when they are created.
102 SHLIB_LIBSUFF The suffix to add to `libreadline' and `libhistory' when
103 generating the filename of the shared library. Many systems
104 use `so'; HP-UX uses `sl'.
106 SHLIB_LIBVERSION The string to append to the filename to indicate the version
107 of the shared library. It should begin with $(SHLIB_LIBSUFF),
108 and possibly include version information that allows the
109 run-time loader to load the version of the shared library
110 appropriate for a particular program. Systems using shared
111 libraries similar to SunOS 4.x use major and minor library
112 version numbers; for those systems a value of
113 `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' is appropriate.
114 Systems based on System V Release 4 don't use minor version
115 numbers; use `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' on those systems.
116 Other Unix versions use different schemes.
118 SHLIB_STATUS Set this to `supported' when you have defined the other
119 necessary variables. Make uses this to determine whether
120 or not shared library creation should be attempted.
122 You should look at the existing stanzas in support/shobj-conf for ideas.
124 Once you have updated support/shobj-conf, re-run configure and type
125 `make shared'. The shared libraries will be created in the shlib
128 Since shared libraries are not created on all platforms, `make install'
129 will not automatically install the shared libraries. To install them,
130 change the current directory to shlib and type `make install'. Running
131 `make install-shared' from the top-level build directory will also work.
136 The documentation for the Readline and History libraries appears in the
137 `doc' subdirectory. There are two texinfo files and a Unix-style manual
138 page describing the programming facilities available in the Readline
139 library. The texinfo files include both user and programmer's manuals.
144 Bug reports for Readline should be sent to:
148 When reporting a bug, please include the following information:
150 * the version number and release status of Readline (e.g., 4.2-release)
151 * the machine and OS that it is running on
152 * a list of the compilation flags or the contents of `config.h', if
154 * a description of the bug
155 * a recipe for recreating the bug reliably
156 * a fix for the bug if you have one!
158 If you would like to contact the Readline maintainer directly, send mail
159 to bash-maintainers@gnu.org.
161 Since Readline is developed along with bash, the bug-bash@gnu.org mailing
162 list (mirrored to the Usenet newsgroup gnu.bash.bug) often contains
163 Readline bug reports and fixes.