jpayne@68: Introduction jpayne@68: ============ jpayne@68: jpayne@68: This is the Gnu Readline library, version 8.2. jpayne@68: jpayne@68: The Readline library provides a set of functions for use by applications jpayne@68: that allow users to edit command lines as they are typed in. Both jpayne@68: Emacs and vi editing modes are available. The Readline library includes jpayne@68: additional functions to maintain a list of previously-entered command jpayne@68: lines, to recall and perhaps reedit those lines, and perform csh-like jpayne@68: history expansion on previous commands. jpayne@68: jpayne@68: The history facilities are also placed into a separate library, the jpayne@68: History library, as part of the build process. The History library jpayne@68: may be used without Readline in applications which desire its jpayne@68: capabilities. jpayne@68: jpayne@68: The Readline library is free software, distributed under the terms of jpayne@68: the [GNU] General Public License as published by the Free Software jpayne@68: Foundation, version 3 of the License. For more information, see the jpayne@68: file COPYING. jpayne@68: jpayne@68: To build the library, try typing `./configure', then `make'. The jpayne@68: configuration process is automated, so no further intervention should jpayne@68: be necessary. Readline builds with `gcc' by default if it is jpayne@68: available. If you want to use `cc' instead, type jpayne@68: jpayne@68: CC=cc ./configure jpayne@68: jpayne@68: if you are using a Bourne-style shell. If you are not, the following jpayne@68: may work: jpayne@68: jpayne@68: env CC=cc ./configure jpayne@68: jpayne@68: Read the file INSTALL in this directory for more information about how jpayne@68: to customize and control the build process. jpayne@68: jpayne@68: The file rlconf.h contains C preprocessor defines that enable and disable jpayne@68: certain Readline features. jpayne@68: jpayne@68: The special make target `everything' will build the static and shared jpayne@68: libraries (if the target platform supports them) and the examples. jpayne@68: jpayne@68: Examples jpayne@68: ======== jpayne@68: jpayne@68: There are several example programs that use Readline features in the jpayne@68: examples directory. The `rl' program is of particular interest. It jpayne@68: is a command-line interface to Readline, suitable for use in shell jpayne@68: scripts in place of `read'. jpayne@68: jpayne@68: Shared Libraries jpayne@68: ================ jpayne@68: jpayne@68: There is skeletal support for building shared versions of the jpayne@68: Readline and History libraries. The configure script creates jpayne@68: a Makefile in the `shlib' subdirectory, and typing `make shared' jpayne@68: will cause shared versions of the Readline and History libraries jpayne@68: to be built on supported platforms. jpayne@68: jpayne@68: If `configure' is given the `--enable-shared' option, it will attempt jpayne@68: to build the shared libraries by default on supported platforms. jpayne@68: jpayne@68: Configure calls the script support/shobj-conf to test whether or jpayne@68: not shared library creation is supported and to generate the values jpayne@68: of variables that are substituted into shlib/Makefile. If you jpayne@68: try to build shared libraries on an unsupported platform, `make' jpayne@68: will display a message asking you to update support/shobj-conf for jpayne@68: your platform. jpayne@68: jpayne@68: If you need to update support/shobj-conf, you will need to create jpayne@68: a `stanza' for your operating system and compiler. The script uses jpayne@68: the value of host_os and ${CC} as determined by configure. For jpayne@68: instance, FreeBSD 4.2 with any version of gcc is identified as jpayne@68: `freebsd4.2-gcc*'. jpayne@68: jpayne@68: In the stanza for your operating system-compiler pair, you will need to jpayne@68: define several variables. They are: jpayne@68: jpayne@68: SHOBJ_CC The C compiler used to compile source files into shareable jpayne@68: object files. This is normally set to the value of ${CC} jpayne@68: by configure, and should not need to be changed. jpayne@68: jpayne@68: SHOBJ_CFLAGS Flags to pass to the C compiler ($SHOBJ_CC) to create jpayne@68: position-independent code. If you are using gcc, this jpayne@68: should probably be set to `-fpic'. jpayne@68: jpayne@68: SHOBJ_LD The link editor to be used to create the shared library from jpayne@68: the object files created by $SHOBJ_CC. If you are using jpayne@68: gcc, a value of `gcc' will probably work. jpayne@68: jpayne@68: SHOBJ_LDFLAGS Flags to pass to SHOBJ_LD to enable shared object creation. jpayne@68: If you are using gcc, `-shared' may be all that is necessary. jpayne@68: These should be the flags needed for generic shared object jpayne@68: creation. jpayne@68: jpayne@68: SHLIB_XLDFLAGS Additional flags to pass to SHOBJ_LD for shared library jpayne@68: creation. Many systems use the -R option to the link jpayne@68: editor to embed a path within the library for run-time jpayne@68: library searches. A reasonable value for such systems would jpayne@68: be `-R$(libdir)'. jpayne@68: jpayne@68: SHLIB_LIBS Any additional libraries that shared libraries should be jpayne@68: linked against when they are created. jpayne@68: jpayne@68: SHLIB_LIBPREF The prefix to use when generating the filename of the shared jpayne@68: library. The default is `lib'; Cygwin uses `cyg'. jpayne@68: jpayne@68: SHLIB_LIBSUFF The suffix to add to `libreadline' and `libhistory' when jpayne@68: generating the filename of the shared library. Many systems jpayne@68: use `so'; HP-UX uses `sl'. jpayne@68: jpayne@68: SHLIB_LIBVERSION The string to append to the filename to indicate the version jpayne@68: of the shared library. It should begin with $(SHLIB_LIBSUFF), jpayne@68: and possibly include version information that allows the jpayne@68: run-time loader to load the version of the shared library jpayne@68: appropriate for a particular program. Systems using shared jpayne@68: libraries similar to SunOS 4.x use major and minor library jpayne@68: version numbers; for those systems a value of jpayne@68: `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' is appropriate. jpayne@68: Systems based on System V Release 4 don't use minor version jpayne@68: numbers; use `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' on those systems. jpayne@68: Other Unix versions use different schemes. jpayne@68: jpayne@68: SHLIB_DLLVERSION The version number for shared libraries that determines API jpayne@68: compatibility between readline versions and the underlying jpayne@68: system. Used only on Cygwin. Defaults to $SHLIB_MAJOR, but jpayne@68: can be overridden at configuration time by defining DLLVERSION jpayne@68: in the environment. jpayne@68: jpayne@68: SHLIB_DOT The character used to separate the name of the shared library jpayne@68: from the suffix and version information. The default is `.'; jpayne@68: systems like Cygwin which don't separate version information jpayne@68: from the library name should set this to the empty string. jpayne@68: jpayne@68: SHLIB_STATUS Set this to `supported' when you have defined the other jpayne@68: necessary variables. Make uses this to determine whether jpayne@68: or not shared library creation should be attempted. jpayne@68: jpayne@68: You should look at the existing stanzas in support/shobj-conf for ideas. jpayne@68: jpayne@68: Once you have updated support/shobj-conf, re-run configure and type jpayne@68: `make shared'. The shared libraries will be created in the shlib jpayne@68: subdirectory. jpayne@68: jpayne@68: If shared libraries are created, `make install' will install them. jpayne@68: You may install only the shared libraries by running `make jpayne@68: install-shared' from the top-level build directory. Running `make jpayne@68: install' in the shlib subdirectory will also work. If you don't want jpayne@68: to install any created shared libraries, run `make install-static'. jpayne@68: jpayne@68: Documentation jpayne@68: ============= jpayne@68: jpayne@68: The documentation for the Readline and History libraries appears in jpayne@68: the `doc' subdirectory. There are three texinfo files and a jpayne@68: Unix-style manual page describing the facilities available in the jpayne@68: Readline library. The texinfo files include both user and jpayne@68: programmer's manuals. HTML versions of the manuals appear in the jpayne@68: `doc' subdirectory as well. jpayne@68: jpayne@68: Usage jpayne@68: ===== jpayne@68: jpayne@68: Our position on the use of Readline through a shared-library linking jpayne@68: mechanism is that there is no legal difference between shared-library jpayne@68: linking and static linking--either kind of linking combines various jpayne@68: modules into a single larger work. The conditions for using Readline jpayne@68: in a larger work are stated in section 3 of the GNU GPL. jpayne@68: jpayne@68: Reporting Bugs jpayne@68: ============== jpayne@68: jpayne@68: Bug reports for Readline should be sent to: jpayne@68: jpayne@68: bug-readline@gnu.org jpayne@68: jpayne@68: When reporting a bug, please include the following information: jpayne@68: jpayne@68: * the version number and release status of Readline (e.g., 4.2-release) jpayne@68: * the machine and OS that it is running on jpayne@68: * a list of the compilation flags or the contents of `config.h', if jpayne@68: appropriate jpayne@68: * a description of the bug jpayne@68: * a recipe for recreating the bug reliably jpayne@68: * a fix for the bug if you have one! jpayne@68: jpayne@68: If you would like to contact the Readline maintainer directly, send mail jpayne@68: to bash-maintainers@gnu.org. jpayne@68: jpayne@68: Since Readline is developed along with bash, the bug-bash@gnu.org mailing jpayne@68: list (mirrored to the Usenet newsgroup gnu.bash.bug) often contains jpayne@68: Readline bug reports and fixes. jpayne@68: jpayne@68: Chet Ramey jpayne@68: chet.ramey@case.edu