README revision 157184
1109412SmdoddIntroduction 2109412Smdodd============ 3109412Smdodd 4109412SmdoddThis is the Gnu Readline library, version 5.1. 5109412Smdodd 6109412SmdoddThe Readline library provides a set of functions for use by applications 7109412Smdoddthat allow users to edit command lines as they are typed in. Both 8109412SmdoddEmacs and vi editing modes are available. The Readline library includes 9109412Smdoddadditional functions to maintain a list of previously-entered command 10109412Smdoddlines, to recall and perhaps reedit those lines, and perform csh-like 11109412Smdoddhistory expansion on previous commands. 12109412Smdodd 13109412SmdoddThe history facilites are also placed into a separate library, the 14109412SmdoddHistory library, as part of the build process. The History library 15109412Smdoddmay be used without Readline in applications which desire its 16109412Smdoddcapabilities. 17109412Smdodd 18109412SmdoddThe Readline library is free software, distributed under the terms of 19109412Smdoddthe [GNU] General Public License, version 2. For more information, see 20109412Smdoddthe file COPYING. 21109412Smdodd 22109412SmdoddTo build the library, try typing `./configure', then `make'. The 23109412Smdoddconfiguration process is automated, so no further intervention should 24109412Smdoddbe necessary. Readline builds with `gcc' by default if it is 25109412Smdoddavailable. If you want to use `cc' instead, type 26109412Smdodd 27109412Smdodd CC=cc ./configure 28109412Smdodd 29109412Smdoddif you are using a Bourne-style shell. If you are not, the following 30109412Smdoddmay work: 31109412Smdodd 32109412Smdodd env CC=cc ./configure 33109412Smdodd 34109412SmdoddRead the file INSTALL in this directory for more information about how 35109412Smdoddto customize and control the build process. 36109412Smdodd 37109412SmdoddThe file rlconf.h contains C preprocessor defines that enable and disable 38109412Smdoddcertain Readline features. 39109412Smdodd 40109412SmdoddThe special make target `everything' will build the static and shared 41109412Smdoddlibraries (if the target platform supports them) and the examples. 42109412Smdodd 43109412SmdoddExamples 44109412Smdodd======== 45109412Smdodd 46109412SmdoddThere are several example programs that use Readline features in the 47109412Smdoddexamples directory. The `rl' program is of particular interest. It 48109412Smdoddis a command-line interface to Readline, suitable for use in shell 49109412Smdoddscripts in place of `read'. 50109412Smdodd 51109412SmdoddShared Libraries 52109412Smdodd================ 53109412Smdodd 54109412SmdoddThere is skeletal support for building shared versions of the 55109412SmdoddReadline and History libraries. The configure script creates 56109412Smdodda Makefile in the `shlib' subdirectory, and typing `make shared' 57109412Smdoddwill cause shared versions of the Readline and History libraries 58109412Smdoddto be built on supported platforms. 59109412Smdodd 60112558SmdoddIf `configure' is given the `--enable-shared' option, it will attempt 61109412Smdoddto build the shared libraries by default on supported platforms. 62109412Smdodd 63109412SmdoddConfigure calls the script support/shobj-conf to test whether or 64109412Smdoddnot shared library creation is supported and to generate the values 65109412Smdoddof variables that are substituted into shlib/Makefile. If you 66109412Smdoddtry to build shared libraries on an unsupported platform, `make' 67109412Smdoddwill display a message asking you to update support/shobj-conf for 68109412Smdoddyour platform. 69109412Smdodd 70109412SmdoddIf you need to update support/shobj-conf, you will need to create 71109412Smdodda `stanza' for your operating system and compiler. The script uses 72109412Smdoddthe value of host_os and ${CC} as determined by configure. For 73109412Smdoddinstance, FreeBSD 4.2 with any version of gcc is identified as 74109412Smdodd`freebsd4.2-gcc*'. 75109412Smdodd 76109412SmdoddIn the stanza for your operating system-compiler pair, you will need to 77109412Smdodddefine several variables. They are: 78109412Smdodd 79109412SmdoddSHOBJ_CC The C compiler used to compile source files into shareable 80109412Smdodd object files. This is normally set to the value of ${CC} 81112558Smdodd by configure, and should not need to be changed. 82109412Smdodd 83109412SmdoddSHOBJ_CFLAGS Flags to pass to the C compiler ($SHOBJ_CC) to create 84109412Smdodd position-independent code. If you are using gcc, this 85109412Smdodd should probably be set to `-fpic'. 86109412Smdodd 87109412SmdoddSHOBJ_LD The link editor to be used to create the shared library from 88109412Smdodd the object files created by $SHOBJ_CC. If you are using 89109412Smdodd gcc, a value of `gcc' will probably work. 90109412Smdodd 91109412SmdoddSHOBJ_LDFLAGS Flags to pass to SHOBJ_LD to enable shared object creation. 92 If you are using gcc, `-shared' may be all that is necessary. 93 These should be the flags needed for generic shared object 94 creation. 95 96SHLIB_XLDFLAGS Additional flags to pass to SHOBJ_LD for shared library 97 creation. Many systems use the -R option to the link 98 editor to embed a path within the library for run-time 99 library searches. A reasonable value for such systems would 100 be `-R$(libdir)'. 101 102SHLIB_LIBS Any additional libraries that shared libraries should be 103 linked against when they are created. 104 105SHLIB_LIBPREF The prefix to use when generating the filename of the shared 106 library. The default is `lib'; Cygwin uses `cyg'. 107 108SHLIB_LIBSUFF The suffix to add to `libreadline' and `libhistory' when 109 generating the filename of the shared library. Many systems 110 use `so'; HP-UX uses `sl'. 111 112SHLIB_LIBVERSION The string to append to the filename to indicate the version 113 of the shared library. It should begin with $(SHLIB_LIBSUFF), 114 and possibly include version information that allows the 115 run-time loader to load the version of the shared library 116 appropriate for a particular program. Systems using shared 117 libraries similar to SunOS 4.x use major and minor library 118 version numbers; for those systems a value of 119 `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' is appropriate. 120 Systems based on System V Release 4 don't use minor version 121 numbers; use `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' on those systems. 122 Other Unix versions use different schemes. 123 124SHLIB_DLLVERSION The version number for shared libraries that determines API 125 compatibility between readline versions and the underlying 126 system. Used only on Cygwin. Defaults to $SHLIB_MAJOR, but 127 can be overridden at configuration time by defining DLLVERSION 128 in the environment. 129 130SHLIB_DOT The character used to separate the name of the shared library 131 from the suffix and version information. The default is `.'; 132 systems like Cygwin which don't separate version information 133 from the library name should set this to the empty string. 134 135SHLIB_STATUS Set this to `supported' when you have defined the other 136 necessary variables. Make uses this to determine whether 137 or not shared library creation should be attempted. 138 139You should look at the existing stanzas in support/shobj-conf for ideas. 140 141Once you have updated support/shobj-conf, re-run configure and type 142`make shared'. The shared libraries will be created in the shlib 143subdirectory. 144 145If shared libraries are created, `make install' will install them. 146You may install only the shared libraries by running `make 147install-shared' from the top-level build directory. Running `make 148install' in the shlib subdirectory will also work. If you don't want 149to install any created shared libraries, run `make install-static'. 150 151Documentation 152============= 153 154The documentation for the Readline and History libraries appears in 155the `doc' subdirectory. There are three texinfo files and a 156Unix-style manual page describing the facilities available in the 157Readline library. The texinfo files include both user and 158programmer's manuals. HTML versions of the manuals appear in the 159`doc' subdirectory as well. 160 161Reporting Bugs 162============== 163 164Bug reports for Readline should be sent to: 165 166 bug-readline@gnu.org 167 168When reporting a bug, please include the following information: 169 170 * the version number and release status of Readline (e.g., 4.2-release) 171 * the machine and OS that it is running on 172 * a list of the compilation flags or the contents of `config.h', if 173 appropriate 174 * a description of the bug 175 * a recipe for recreating the bug reliably 176 * a fix for the bug if you have one! 177 178If you would like to contact the Readline maintainer directly, send mail 179to bash-maintainers@gnu.org. 180 181Since Readline is developed along with bash, the bug-bash@gnu.org mailing 182list (mirrored to the Usenet newsgroup gnu.bash.bug) often contains 183Readline bug reports and fixes. 184 185Chet Ramey 186chet@po.cwru.edu 187