INSTALL 13 KB

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