Annotation of embedaddon/readline/INSTALL, revision 1.1.1.1

1.1       misho       1: Basic Installation
                      2: ==================
                      3: 
                      4: These are installation instructions for Readline-6.3.
                      5: 
                      6: The simplest way to compile readline is:
                      7: 
                      8:   1. `cd' to the directory containing the readline source code and type
                      9:      `./configure' to configure readline for your system.  If you're
                     10:      using `csh' on an old version of System V, you might need to type
                     11:      `sh ./configure' instead to prevent `csh' from trying to execute
                     12:      `configure' itself.
                     13: 
                     14:      Running `configure' takes some time.  While running, it prints some
                     15:      messages telling which features it is checking for.
                     16: 
                     17:   2. Type `make' to compile readline and build the static readline
                     18:      and history libraries.  If supported, the shared readline and history
                     19:      libraries will be built also.  See below for instructions on compiling
                     20:      the other parts of the distribution.  Typing `make everything' will
                     21:      cause the static and shared libraries (if supported) and the example
                     22:      programs to be built.
                     23: 
                     24:   3. Type `make install' to install the static readline and history
                     25:      libraries, the readline include files, the documentation, and, if
                     26:      supported, the shared readline and history libraries.
                     27: 
                     28:   4. You can remove the created libraries and object files from the
                     29:      build directory by typing `make clean'.  To also remove the
                     30:      files that `configure' created (so you can compile readline for
                     31:      a different kind of computer), type `make distclean'.  There is
                     32:      also a `make maintainer-clean' target, but that is intended mainly
                     33:      for the readline developers, and should be used with care.
                     34: 
                     35: The `configure' shell script attempts to guess correct values for
                     36: various system-dependent variables used during compilation.  It
                     37: uses those values to create a `Makefile' in the build directory,
                     38: and Makefiles in the `doc', `shlib', and `examples'
                     39: subdirectories.  It also creates a `config.h' file containing
                     40: system-dependent definitions.  Finally, it creates a shell script
                     41: `config.status' that you can run in the future to recreate the
                     42: current configuration, a file `config.cache' that saves the
                     43: results of its tests to speed up reconfiguring, and a file
                     44: `config.log' containing compiler output (useful mainly for
                     45: debugging `configure'). 
                     46: 
                     47: If you need to do unusual things to compile readline, please try
                     48: to figure out how `configure' could check whether to do them, and
                     49: mail diffs or instructions to <bug-readline@gnu.org> so they can
                     50: be considered for the next release.  If at some point
                     51: `config.cache' contains results you don't want to keep, you may
                     52: remove or edit it. 
                     53: 
                     54: The file `configure.in' is used to create `configure' by a
                     55: program called `autoconf'.  You only need `configure.in' if you
                     56: want to change it or regenerate `configure' using a newer version
                     57: of `autoconf'.  The readline `configure.in' requires autoconf
                     58: version 2.50 or newer. 
                     59: 
                     60: Compilers and Options
                     61: =====================
                     62: 
                     63: Some systems require unusual options for compilation or linking that
                     64: the `configure' script does not know about.  You can give `configure'
                     65: initial values for variables by setting them in the environment.  Using
                     66: a Bourne-compatible shell, you can do that on the command line like
                     67: this:
                     68: 
                     69:      CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
                     70: 
                     71: Or on systems that have the `env' program, you can do it like this:
                     72: 
                     73:      env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
                     74: 
                     75: Compiling For Multiple Architectures
                     76: ====================================
                     77: 
                     78: You can compile readline for more than one kind of computer at the
                     79: same time, by placing the object files for each architecture in their
                     80: own directory.  To do this, you must use a version of `make' that
                     81: supports the `VPATH' variable, such as GNU `make'.  `cd' to the
                     82: directory where you want the object files and executables to go and run
                     83: the `configure' script.  `configure' automatically checks for the
                     84: source code in the directory that `configure' is in and in `..'.
                     85: 
                     86: If you have to use a `make' that does not supports the `VPATH'
                     87: variable, you have to compile readline for one architecture at a
                     88: time in the source code directory.  After you have installed
                     89: readline for one architecture, use `make distclean' before
                     90: reconfiguring for another architecture. 
                     91: 
                     92: Installation Names
                     93: ==================
                     94: 
                     95: By default, `make install' will install the readline libraries in
                     96: `/usr/local/lib', the include files in
                     97: `/usr/local/include/readline', the man pages in `/usr/local/man',
                     98: and the info files in `/usr/local/info'.  You can specify an
                     99: installation prefix other than `/usr/local' by giving `configure'
                    100: the option `--prefix=PATH' or by supplying a value for the
                    101: DESTDIR variable when running `make install'. 
                    102: 
                    103: You can specify separate installation prefixes for
                    104: architecture-specific files and architecture-independent files. 
                    105: If you give `configure' the option `--exec-prefix=PATH', the
                    106: readline Makefiles will use PATH as the prefix for installing the
                    107: libraries.  Documentation and other data files will still use the
                    108: regular prefix. 
                    109: 
                    110: Specifying the System Type
                    111: ==========================
                    112: 
                    113: There may be some features `configure' can not figure out
                    114: automatically, but need to determine by the type of host readline
                    115: will run on.  Usually `configure' can figure that out, but if it
                    116: prints a message saying it can not guess the host type, give it
                    117: the `--host=TYPE' option.  TYPE can either be a short name for
                    118: the system type, such as `sun4', or a canonical name with three
                    119: fields: CPU-COMPANY-SYSTEM (e.g., i386-unknown-freebsd4.2). 
                    120: 
                    121: See the file `config.sub' for the possible values of each field.
                    122: 
                    123: Sharing Defaults
                    124: ================
                    125: 
                    126: If you want to set default values for `configure' scripts to share,
                    127: you can create a site shell script called `config.site' that gives
                    128: default values for variables like `CC', `cache_file', and `prefix'.
                    129: `configure' looks for `PREFIX/share/config.site' if it exists, then
                    130: `PREFIX/etc/config.site' if it exists.  Or, you can set the
                    131: `CONFIG_SITE' environment variable to the location of the site script.
                    132: A warning: the readline `configure' looks for a site script, but not
                    133: all `configure' scripts do.
                    134: 
                    135: Operation Controls
                    136: ==================
                    137: 
                    138: `configure' recognizes the following options to control how it
                    139: operates.
                    140: 
                    141: `--cache-file=FILE'
                    142:      Use and save the results of the tests in FILE instead of
                    143:      `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
                    144:      debugging `configure'.
                    145: 
                    146: `--help'
                    147:      Print a summary of the options to `configure', and exit.
                    148: 
                    149: `--quiet'
                    150: `--silent'
                    151: `-q'
                    152:      Do not print messages saying which checks are being made.
                    153: 
                    154: `--srcdir=DIR'
                    155:      Look for the package's source code in directory DIR.  Usually
                    156:      `configure' can determine that directory automatically.
                    157: 
                    158: `--version'
                    159:      Print the version of Autoconf used to generate the `configure'
                    160:      script, and exit.
                    161: 
                    162: `configure' also accepts some other, not widely useful, options.
                    163: 
                    164: Optional Features
                    165: =================
                    166: 
                    167: The readline `configure' recognizes a single `--with-PACKAGE' option:
                    168: 
                    169: `--with-curses'
                    170:     This tells readline that it can find the termcap library functions
                    171:     (tgetent, et al.) in the curses library, rather than a separate
                    172:     termcap library.  Readline uses the termcap functions, but does not
                    173:     link with the termcap or curses library itself, allowing applications
                    174:     which link with readline the to choose an appropriate library.
                    175:     This option tells readline to link the example programs with the
                    176:     curses library rather than libtermcap.
                    177: 
                    178: `configure' also recognizes two `--enable-FEATURE' options:
                    179: 
                    180: `--enable-shared'
                    181:     Build the shared libraries by default on supported platforms.  The
                    182:     default is `yes'.
                    183: 
                    184: `--enable-static'
                    185:     Build the static libraries by default.  The default is `yes'.
                    186:  
                    187: Shared Libraries
                    188: ================
                    189: 
                    190: There is support for building shared versions of the readline and
                    191: history libraries.  The configure script creates a Makefile in
                    192: the `shlib' subdirectory, and typing `make shared' will cause
                    193: shared versions of the readline and history libraries to be built
                    194: on supported platforms.
                    195: 
                    196: If `configure' is given the `--enable-shared' option, it will attempt
                    197: to build the shared libraries by default on supported platforms.
                    198: 
                    199: Configure calls the script support/shobj-conf to test whether or
                    200: not shared library creation is supported and to generate the values
                    201: of variables that are substituted into shlib/Makefile.  If you
                    202: try to build shared libraries on an unsupported platform, `make'
                    203: will display a message asking you to update support/shobj-conf for
                    204: your platform.
                    205: 
                    206: If you need to update support/shobj-conf, you will need to create
                    207: a `stanza' for your operating system and compiler.  The script uses
                    208: the value of host_os and ${CC} as determined by configure.  For
                    209: instance, FreeBSD 4.2 with any version of gcc is identified as
                    210: `freebsd4.2-gcc*'.
                    211: 
                    212: In the stanza for your operating system-compiler pair, you will need to
                    213: define several variables.  They are:
                    214: 
                    215: SHOBJ_CC       The C compiler used to compile source files into shareable
                    216:                object files.  This is normally set to the value of ${CC}
                    217:                by configure, and should not need to be changed.
                    218: 
                    219: SHOBJ_CFLAGS   Flags to pass to the C compiler ($SHOBJ_CC) to create
                    220:                position-independent code.  If you are using gcc, this
                    221:                should probably be set to `-fpic'.
                    222: 
                    223: SHOBJ_LD       The link editor to be used to create the shared library from
                    224:                the object files created by $SHOBJ_CC.  If you are using
                    225:                gcc, a value of `gcc' will probably work.
                    226: 
                    227: SHOBJ_LDFLAGS  Flags to pass to SHOBJ_LD to enable shared object creation.
                    228:                If you are using gcc, `-shared' may be all that is necessary.
                    229:                These should be the flags needed for generic shared object
                    230:                creation.
                    231: 
                    232: SHLIB_XLDFLAGS Additional flags to pass to SHOBJ_LD for shared library
                    233:                creation.  Many systems use the -R option to the link
                    234:                editor to embed a path within the library for run-time
                    235:                library searches.  A reasonable value for such systems would
                    236:                be `-R$(libdir)'.
                    237: 
                    238: SHLIB_LIBS     Any additional libraries that shared libraries should be
                    239:                linked against when they are created.
                    240: 
                    241: SHLIB_LIBPREF  The prefix to use when generating the filename of the shared
                    242:                library.  The default is `lib'; Cygwin uses `cyg'.
                    243: 
                    244: SHLIB_LIBSUFF  The suffix to add to `libreadline' and `libhistory' when
                    245:                generating the filename of the shared library.  Many systems
                    246:                use `so'; HP-UX uses `sl'.
                    247: 
                    248: SHLIB_LIBVERSION The string to append to the filename to indicate the version
                    249:                of the shared library.  It should begin with $(SHLIB_LIBSUFF),
                    250:                and possibly include version information that allows the
                    251:                run-time loader to load the version of the shared library
                    252:                appropriate for a particular program.  Systems using shared
                    253:                libraries similar to SunOS 4.x use major and minor library
                    254:                version numbers; for those systems a value of
                    255:                `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' is appropriate.
                    256:                Systems based on System V Release 4 don't use minor version
                    257:                numbers; use `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' on those systems.
                    258:                Other Unix versions use different schemes.
                    259: 
                    260: SHLIB_DLLVERSION The version number for shared libraries that determines API
                    261:                compatibility between readline versions and the underlying
                    262:                system.  Used only on Cygwin.  Defaults to $SHLIB_MAJOR, but
                    263:                can be overridden at configuration time by defining DLLVERSION
                    264:                in the environment.
                    265: 
                    266: SHLIB_DOT      The character used to separate the name of the shared library
                    267:                from the suffix and version information.  The default is `.';
                    268:                systems like Cygwin which don't separate version information
                    269:                from the library name should set this to the empty string.
                    270: 
                    271: SHLIB_STATUS   Set this to `supported' when you have defined the other
                    272:                necessary variables.  Make uses this to determine whether
                    273:                or not shared library creation should be attempted.  If
                    274:                shared libraries are not supported, this will be set to
                    275:                `unsupported'.
                    276: 
                    277: You should look at the existing stanzas in support/shobj-conf for ideas.
                    278: 
                    279: Once you have updated support/shobj-conf, re-run configure and type
                    280: `make shared' or `make'.  The shared libraries will be created in the
                    281: shlib subdirectory.
                    282: 
                    283: If shared libraries are created, `make install' will install them. 
                    284: You may install only the shared libraries by running `make
                    285: install-shared' from the top-level build directory.  Running `make
                    286: install' in the shlib subdirectory will also work.  If you don't want
                    287: to install any created shared libraries, run `make install-static'. 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>