README revision 47558
1Introduction 2============ 3 4This is the Gnu Readline library, version 4.0. 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 19the GNU Public License, version 2. For more information, see the file 20COPYING. 21 22To build the library, try typing `./configure', then `make'. The 23configuration process is automated, so no further intervention should 24be necessary. Readline builds with `gcc' by default if it is 25available. If you want to use `cc' instead, type 26 27 CC=cc ./configure 28 29if you are using a Bourne-style shell. If you are not, the following 30may work: 31 32 env CC=cc ./configure 33 34Read the file INSTALL in this directory for more information about how 35to customize and control the build process. 36 37The file rlconf.h contains C preprocessor defines that enable and disable 38certain Readline features. 39 40Examples 41======== 42 43There are several example programs that use Readline features in the 44examples directory. The `rl' program is of particular interest. It 45is a command-line interface to Readline, suitable for use in shell 46scripts in place of `read'. 47 48Shared Libraries 49================ 50 51There is skeletal support for building shared versions of the 52Readline and History libraries. The configure script creates 53a Makefile in the `shlib' subdirectory, and typing `make shared' 54will cause shared versions of the Readline and History libraries 55to be built on supported platforms. 56 57Configure calls the script support/shobj-conf to test whether or 58not shared library creation is supported and to generate the values 59of variables that are substituted into shlib/Makefile. If you 60try to build shared libraries on an unsupported platform, `make' 61will display a message asking you to update support/shobj-conf for 62your platform. 63 64If you need to update support/shobj-conf, you will need to create 65a `stanza' for your operating system and compiler. The script uses 66the value of host_os and ${CC} as determined by configure. For 67instance, FreeBSD 2.2.5 with any version of gcc is identified as 68`freebsd2.2.5-gcc*'. 69 70In the stanza for your operating system-compiler pair, you will need to 71define several variables. They are: 72 73SHOBJ_CC The C compiler used to compile source files into shareable 74 object files. This is normally set to the value of ${CC} 75 by configure, and should not need to be changed. 76 77SHOBJ_CFLAGS Flags to pass to the C compiler ($SHOBJ_CC) to create 78 position-independent code. If you are using gcc, this 79 should probably be set to `-fpic'. 80 81SHOBJ_LD The link editor to be used to create the shared library from 82 the object files created by $SHOBJ_CC. If you are using 83 gcc, a value of `gcc' will probably work. 84 85SHOBJ_LDFLAGS Flags to pass to SHOBJ_LD to enable shared object creation. 86 If you are using gcc, `-shared' may be all that is necessary. 87 These should be the flags needed for generic shared object 88 creation. 89 90SHLIB_XLDFLAGS Additional flags to pass to SHOBJ_LD for shared library 91 creation. Many systems use the -R option to the link 92 editor to embed a path within the library for run-time 93 library searches. A reasonable value for such systems would 94 be `-R$(libdir)'. 95 96SHLIB_LIBS Any additional libraries that shared libraries should be 97 linked against when they are created. 98 99SHLIB_LIBSUFF The suffix to add to `libreadline' and `libhistory' when 100 generating the filename of the shared library. Many systems 101 use `so'; HP-UX uses `sl'. 102 103SHLIB_LIBVERSION The string to append to the filename to indicate the version 104 of the shared library. It should begin with $(SHLIB_LIBSUFF), 105 and possibly include version information that allows the 106 run-time loader to load the version of the shared library 107 appropriate for a particular program. Systems using shared 108 libraries similar to SunOS 4.x use major and minor library 109 version numbers; for those systems a value of 110 `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' is appropriate. 111 Systems based on System V Release 4 don't use minor version 112 numbers; use `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' on those systems. 113 Other Unix versions use different schemes. 114 115SHLIB_STATUS Set this to `supported' when you have defined the other 116 necessary variables. Make uses this to determine whether 117 or not shared library creation should be attempted. 118 119You should look at the existing stanzas in support/shobj-conf for ideas. 120 121Once you have updated support/shobj-conf, re-run configure and type 122`make shared'. The shared libraries will be created in the shlib 123subdirectory. 124 125Since shared libraries are not created on all platforms, `make install' 126will not automatically install the shared libraries. To install them, 127change the current directory to shlib and type `make install'. Running 128`make install-shared' from the top-level build directory will also work. 129 130Documentation 131============= 132 133The documentation for the Readline and History libraries appears in the 134`doc' subdirectory. There are two texinfo files and a Unix-style manual 135page describing the programming facilities available in the Readline 136library. The texinfo files include both user and programmer's manuals. 137 138Reporting Bugs 139============== 140 141Bug reports for Readline should be sent to: 142 143 bug-readline@gnu.org 144 145When reporting a bug, please include the following information: 146 147 * the version number and release status of Readline (e.g., 4.0-release) 148 * the machine and OS that it is running on 149 * a list of the compilation flags or the contents of `config.h', if 150 appropriate 151 * a description of the bug 152 * a recipe for recreating the bug reliably 153 * a fix for the bug if you have one! 154 155If you would like to contact the Readline maintainer directly, send mail 156to bash-maintainers@gnu.org. 157 158Since Readline is developed along with bash, the bug-bash@gnu.org mailing 159list (mirrored to the Usenet newsgroup gnu.bash.bug) often contains 160Readline bug reports and fixes. 161 162Chet Ramey 163chet@po.cwru.edu 164