README 7.8 KB

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