Automatic date update in version.in
[deliverable/binutils-gdb.git] / readline / README
CommitLineData
d60d9f65
SS
1Introduction
2============
3
5836a818 4This is the Gnu Readline library, version 6.2.
d60d9f65
SS
5
6The Readline library provides a set of functions for use by applications
7that allow users to edit command lines as they are typed in. Both
8Emacs and vi editing modes are available. The Readline library includes
9additional functions to maintain a list of previously-entered command
10lines, to recall and perhaps reedit those lines, and perform csh-like
11history expansion on previous commands.
12
13The history facilites are also placed into a separate library, the
14History library, as part of the build process. The History library
15may be used without Readline in applications which desire its
16capabilities.
17
18The Readline library is free software, distributed under the terms of
cc88a640
JK
19the [GNU] General Public License as published by the Free Software
20Foundation, version 3 of the License. For more information, see the
21file COPYING.
d60d9f65
SS
22
23To build the library, try typing `./configure', then `make'. The
24configuration process is automated, so no further intervention should
25be necessary. Readline builds with `gcc' by default if it is
26available. If you want to use `cc' instead, type
27
28 CC=cc ./configure
29
30if you are using a Bourne-style shell. If you are not, the following
31may work:
32
33 env CC=cc ./configure
34
35Read the file INSTALL in this directory for more information about how
36to customize and control the build process.
37
c862e87b
JM
38The file rlconf.h contains C preprocessor defines that enable and disable
39certain Readline features.
d60d9f65 40
9255ee31
EZ
41The special make target `everything' will build the static and shared
42libraries (if the target platform supports them) and the examples.
43
d60d9f65
SS
44Examples
45========
46
47There are several example programs that use Readline features in the
48examples directory. The `rl' program is of particular interest. It
49is a command-line interface to Readline, suitable for use in shell
50scripts in place of `read'.
51
52Shared Libraries
53================
54
55There is skeletal support for building shared versions of the
c862e87b
JM
56Readline and History libraries. The configure script creates
57a Makefile in the `shlib' subdirectory, and typing `make shared'
58will cause shared versions of the Readline and History libraries
59to be built on supported platforms.
60
9255ee31
EZ
61If `configure' is given the `--enable-shared' option, it will attempt
62to build the shared libraries by default on supported platforms.
63
c862e87b
JM
64Configure calls the script support/shobj-conf to test whether or
65not shared library creation is supported and to generate the values
66of variables that are substituted into shlib/Makefile. If you
67try to build shared libraries on an unsupported platform, `make'
68will display a message asking you to update support/shobj-conf for
69your platform.
70
71If you need to update support/shobj-conf, you will need to create
72a `stanza' for your operating system and compiler. The script uses
73the value of host_os and ${CC} as determined by configure. For
9255ee31
EZ
74instance, FreeBSD 4.2 with any version of gcc is identified as
75`freebsd4.2-gcc*'.
c862e87b
JM
76
77In the stanza for your operating system-compiler pair, you will need to
78define several variables. They are:
79
80SHOBJ_CC The C compiler used to compile source files into shareable
81 object files. This is normally set to the value of ${CC}
82 by configure, and should not need to be changed.
83
84SHOBJ_CFLAGS Flags to pass to the C compiler ($SHOBJ_CC) to create
85 position-independent code. If you are using gcc, this
86 should probably be set to `-fpic'.
87
88SHOBJ_LD The link editor to be used to create the shared library from
89 the object files created by $SHOBJ_CC. If you are using
90 gcc, a value of `gcc' will probably work.
91
92SHOBJ_LDFLAGS Flags to pass to SHOBJ_LD to enable shared object creation.
93 If you are using gcc, `-shared' may be all that is necessary.
94 These should be the flags needed for generic shared object
95 creation.
96
97SHLIB_XLDFLAGS Additional flags to pass to SHOBJ_LD for shared library
98 creation. Many systems use the -R option to the link
99 editor to embed a path within the library for run-time
100 library searches. A reasonable value for such systems would
101 be `-R$(libdir)'.
102
103SHLIB_LIBS Any additional libraries that shared libraries should be
104 linked against when they are created.
105
5bdf8622
DJ
106SHLIB_LIBPREF The prefix to use when generating the filename of the shared
107 library. The default is `lib'; Cygwin uses `cyg'.
108
c862e87b
JM
109SHLIB_LIBSUFF The suffix to add to `libreadline' and `libhistory' when
110 generating the filename of the shared library. Many systems
111 use `so'; HP-UX uses `sl'.
112
113SHLIB_LIBVERSION The string to append to the filename to indicate the version
114 of the shared library. It should begin with $(SHLIB_LIBSUFF),
115 and possibly include version information that allows the
116 run-time loader to load the version of the shared library
117 appropriate for a particular program. Systems using shared
118 libraries similar to SunOS 4.x use major and minor library
119 version numbers; for those systems a value of
120 `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' is appropriate.
121 Systems based on System V Release 4 don't use minor version
122 numbers; use `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' on those systems.
123 Other Unix versions use different schemes.
124
5bdf8622
DJ
125SHLIB_DLLVERSION The version number for shared libraries that determines API
126 compatibility between readline versions and the underlying
127 system. Used only on Cygwin. Defaults to $SHLIB_MAJOR, but
128 can be overridden at configuration time by defining DLLVERSION
129 in the environment.
130
131SHLIB_DOT The character used to separate the name of the shared library
132 from the suffix and version information. The default is `.';
133 systems like Cygwin which don't separate version information
134 from the library name should set this to the empty string.
135
c862e87b
JM
136SHLIB_STATUS Set this to `supported' when you have defined the other
137 necessary variables. Make uses this to determine whether
138 or not shared library creation should be attempted.
139
140You should look at the existing stanzas in support/shobj-conf for ideas.
141
142Once you have updated support/shobj-conf, re-run configure and type
143`make shared'. The shared libraries will be created in the shlib
144subdirectory.
145
9255ee31
EZ
146If shared libraries are created, `make install' will install them.
147You may install only the shared libraries by running `make
148install-shared' from the top-level build directory. Running `make
149install' in the shlib subdirectory will also work. If you don't want
150to install any created shared libraries, run `make install-static'.
d60d9f65
SS
151
152Documentation
153=============
154
9255ee31
EZ
155The documentation for the Readline and History libraries appears in
156the `doc' subdirectory. There are three texinfo files and a
157Unix-style manual page describing the facilities available in the
158Readline library. The texinfo files include both user and
159programmer's manuals. HTML versions of the manuals appear in the
160`doc' subdirectory as well.
d60d9f65
SS
161
162Reporting Bugs
163==============
164
165Bug reports for Readline should be sent to:
166
167 bug-readline@gnu.org
168
169When reporting a bug, please include the following information:
170
9255ee31 171 * the version number and release status of Readline (e.g., 4.2-release)
d60d9f65
SS
172 * the machine and OS that it is running on
173 * a list of the compilation flags or the contents of `config.h', if
174 appropriate
175 * a description of the bug
176 * a recipe for recreating the bug reliably
177 * a fix for the bug if you have one!
178
179If you would like to contact the Readline maintainer directly, send mail
180to bash-maintainers@gnu.org.
181
182Since Readline is developed along with bash, the bug-bash@gnu.org mailing
183list (mirrored to the Usenet newsgroup gnu.bash.bug) often contains
184Readline bug reports and fixes.
185
186Chet Ramey
cc88a640 187chet.ramey@case.edu
This page took 0.679842 seconds and 4 git commands to generate.