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