Merge branch '4479_console_players'
[midnight-commander.git] / doc / INSTALL
blob32b72f0e7a3431fb90f9cdc98c662bbd8a4d5902
1 Build requirements for GNU Midnight Commander
2 ---------------------------------------------
4 - glibc
5 - gcc
6 - make
7 - autoconf >= 2.64
8 - automake >= 1.12
9 - libtool
10 - glib2 >= 2.32
11 - slang2 or ncurses
12 - gettext >= 0.18.2
13 - libssh2 >= 1.2.8 is required only for sftp vfs
14 - libaspell to support spell checking in the internal editor
15 - ext2fs >= 1.42.4 to support ext{2,3,4}fs extended attributes
18 Installation instructions for GNU Midnight Commander
19 ----------------------------------------------------
21 Midnight Commander is written in a portable manner and uses GNU Autoconf
22 for configuration, so it is expected to compile without changes on many
23 other operating systems.
25 If you are installing from an official tarball, it already contains
26 pre-bootstrapped autotools build system (specifically the `configure'
27 script). In the case that you are installing from a version control
28 checkout, you need to bootstrap the build system yourself first using
29 the `autogen.sh' script. Note that to do this you would need to install
30 the autotools suite first and not only direct mc build dependencies.
32 The `configure' shell script attempts to guess correct values for
33 various system-dependent variables used during compilation, and creates
34 the makefiles.  It also creates a file `config.status' that you can run
35 in the future to recreate the current configuration.
37 To compile this package:
39 1.  Configure the package for your system.
41 Normally, you just `cd' to the directory containing the package's source
42 code and type `./configure'.
44 To compile the package in a different directory than the one containing
45 the source code, you must use a version of `make' supporting the `VPATH'
46 variable, such as GNU `make'.  Change to the directory where you want
47 the object files and executables to go and run the `configure' script
48 with the full path.  If for some reason `configure' cannot find the
49 source code directory, run `configure' with the option `--srcdir=DIR',
50 where DIR is the directory that contains the source code.
52 By default, `make install' will install the package's files in
53 `/usr/local/bin', `/usr/local/man', etc.  You can specify an
54 installation prefix other than `/usr/local' by giving `configure' the
55 option `--prefix=PATH'.
57 If compiled on GNU/Linux, Midnight Commander detects if you have the gpm
58 library installed.  If you installed the gpm mouse library in a
59 non-standard place, you will need to use the --with-gpm-mouse flag with
60 the directory base where you installed the gpm package.
62 `configure' recognizes the following options (the list may be
63 incomplete, use `configure --help' to get the full list):
65 `--help'
66      Print a summary of the options to `configure' and exit.
68 `--quiet'
69 `--silent'
70      Do not print messages saying which checks are being made.
72 `--version'
73      Print the version of Autoconf used to generate the `configure'
74      script, and exit.
76 `--without-edit'
77      Configure GNU Midnight Commander to be compiled without the
78      built-in file editor.  The built-in editor is compiled in by
79      default.
81 `--enable-aspell[=prefix]'
82      This option adds spell check support to the internal editor using
83      libaspell and optionally sets path to libaspell installation prefix
84      [default=/usr]. Disabled by default.
86 `--without-gpm-mouse'
87      Use this flag to disable gpm mouse support (e.g. if you want to
88      use mouse only on X terminals).
90 `--with-glib-static'
91      Force linking against glib statically.  This option is intended for
92      building binaries for distribution purposes and may not work on
93      some operating systems.
95 `--with-subshell[=optional]', `--without-subshell' 
96      The subshell support is by default turned on, you can disable
97      this by using the --without-subshell option.  If you pass the
98      =optional parameter, then the subshell support is turned off by
99      default.  To turn it on, specify the `-U' option to the program.
101 `--without-x'
102      By default, the Midnight Commander tries to connect to the X Window
103      System events to query the status of the keyboard modifiers, such
104      as Control, Shift and Alt, when invoked in a terminal emulator
105      under X11.  This is necessary (but not always sufficient) to
106      recognize some optional but handy key combinations like Ctrl-Home
107      and Shift-Cursor keys.  Use `--without-x' if the dependency on
108      X11 libraries is not desired.
110 `--disable-largefile'
111      This option disables support for large files (2 gigabytes and more)
112      on the systems where file operations use 32-bit offsets by default,
113      but support for 64-bit offsets is available.  May be useful for
114      slow processors and embedded systems.
116 `--enable-charset'
117      This option adds support for selecting character set of the text in
118      the internal viewer and editor and converting it on the fly.  The
119      implementation of this option is currently incomplete.
121 `--disable-background'
122      This option disables support for background operations.  Background
123      operations allow to perform some tasks such as copying files in a
124      separate background process.  Any messages from the background
125      process are forwarded to the foreground process.  More advanced
126      dialogs cannot be forwarded yet, so the background process uses the
127      default.  Background code is known to be less stable than the rest
128      of the code, so you may want to disable it at the compile time.
130 `--with-homedir'
131      This option allow users  to place user config directories in any
132      place. By default value is 'XDG', this mean, mc will respect XDG
133      standards. If other value is specified, this will used as directory
134      name (relative to $HOME if path is relative, or as is if path is
135      absolute).
137 VFS options:
138 - - - - - -
140 `--disable-vfs'
141      This option disables the Virtual File System switch code in the
142      Midnight Commander and uses the standard file system calls for
143      file access.  If you specify this option, you won't get the
144      transparent access to archives and remote directories.
146 `--enable-vfs-cpio'
147      (on by default)
148      Support for cpio filesystem
150 `--enable-vfs-tar'
151      (on by default)
152      Support for tar filesystem
154 `--enable-vfs-ftp'
155      (on by default)
156      Support for FTP vfs
158 `--enable-vfs-shell'
159      (on by default)
160      Support for SHELL vfs
162 `--enable-vfs-sftp'
163      (auto)
164      Support for SFTP vfs
166 `--enable-vfs-extfs'
167      (on by default)
168      Support for extfs
170 `--enable-vfs-sfs`
171      (on by default)
172      Support for sfs
174 `--enable-vfs-undelfs'
175      (off by default)
176      Support for ext2 undelete filesystem.
177      On systems that use the ext2 or ext3 file system and have the
178      libext2fs library available, this option adds support for
179      recovering deleted files (the undel virtual file system).
181 Screen library:
182 - - - - - - - -
184 You may also tell configure which screen library you want to use with
185 the Midnight Commander.  The configure script will use S-Lang as
186 default, and prefers an already installed S-Lang library over the
187 included one, but you can override this by using the following flag
188 (please note that since S-Lang is default, it is tested better than
189 ncurses):
191 `--with-screen={slang|ncurses}'
192      Choose the library used to manage interaction with the terminal.
193      `slang' means S-Lang library already installed on the system,
194      `ncurses' means ncurses library already installed on the system.
195      The S-Lang library is used by default if found.
197 `--with-ncurses-includes=[DIR]'
198      Set path to ncurses includes [default=/usr/include]; make
199      sense only if --with-screen=ncurses is used;
200      for /usr/local/include/ncurses specify /usr/local/include.
202 `--with-ncurses-libs=[DIR]'
203      Set path to ncurses library [default=/usr/lib]; make sense
204      only if --with-screen=ncurses is used.
206 On systems that require unusual options for compilation or linking that
207 the package's `configure' script does not know about, you can give
208 `configure' initial values for variables by placing them in the command
209 line:
211 ./configure CC='gcc -traditional' LIBS=-lposix
213 2.  Type `make' to compile the package.
215 3.  Type `make install' to install programs, data files, and the
216 documentation.
218 If you're on a GNU/Linux system, this will install the `cons.saver'
219 utility, which allows the Midnight Commander to save and restore the
220 console contents.  This utility can be installed setuid root, but it's
221 only needed on systems where users cannot access /dev/vcsaN, where N is
222 the virtual console number, on which the uses is logged on.
225 Obtaining related software
226 --------------------------
228 glib
229 ----
231 The only "hard" dependency of GNU Midnight Commander is glib.  You can
232 get glib from
234 * https://download.gnome.org/sources/glib/
236 Minimal version of glib: 2.32.0
237 Recommended version: 2.32.x and higher.
239 Newer versions may work, but haven't been tested.
241 PCRE
242 ----
244 Both PCRE and PCRE2 libraries are supported. You can get PCRE from
246 * https://www.pcre.org
248 Terminal database
249 -----------------
251 There are many incomplete terminal databases out there, however, a
252 complete terminfo is bundled with ncurses.  (It is simple to generate
253 the termcap database using the infocmp utility in ncurses).
255 Some terminfo data are included with the mc distribution (lib/*.ti).
256 Particularly linux, xterm and vt100. Use e.g. ''tic linux.ti'' to use
257 them.
259 If you want to run mc on xterm/color_xterm/ansi_xterm (not rxvt), then
260 you might read lib/README.xterm for further information.
262 Screen libraries
263 ----------------
265 GNU Midnight Commander can use the included version of S-Lang, but you
266 can get the latest version here:
268 * https://www.jedsoft.org/slang/
270 Alternatively, you can use ncurses:
272 * https://invisible-island.net/ncurses/announce.html
274 Mouse support
275 -------------
277 The general purpose mouse (gpm) daemon is available from
279 * https://www.nico.schottelius.org/software/gpm/
281 Porting
282 -------
284 Some less widespread UNIX systems like AIX or Solaris often come with their own
285 implementations of make and relevant parts of the toolchain necessary to build
286 mc. While autotools abstract a lot of platform specific issues, you might
287 encounter unresolved problems while using the native toolchain.
289 Often, GNU tools are shipped as a part of an additional software collection
290 (/opt/freeware on AIX, or OpenCSW on Solaris). These tools are usually prefixed
291 with the letter `g', e.g. `gmake' instead of `make'. If you are not really
292 interested in building with the native toolchain, try to override tools causing
293 problems like this:
295 ./configure MAKE=gmake AR=gar
296 gmake