Updated message, as `install-mh' had been replaced by `mmh'.
[mmh] / INSTALL
1 #
2 # INSTALL -- installation instructions
3 #
4
5 --------------
6 Installing mmh
7 --------------
8 Please read all of the following instructions before you begin
9 building mmh.
10
11 You should check the MACHINES file to see if there are any specific
12 build instructions for your operating system.  To build mmh, you will
13 need an ANSI C compiler such as gcc.
14
15 0) If you have obtained mmh by checking it out of git, you will
16    need to run the GNU autotools to regenerate some files.
17    (If your directory already contains a file 'config.h.in'
18    then this has already been done and you do not need to do it.)
19    You can regenerate the files by running the command
20
21    ./autogen.sh
22
23    (Note that if you're doing mmh development, you should look at
24    docs/README.developers, since there is other developer-friendly
25    advice there as well.)
26
27 1) From the top-level source directory, run the command:
28
29        ./configure [options]
30
31    This will check the configuration of your OS, as well as the various
32    Makefiles.
33
34    The configure script accepts various options.  The options of 
35    most interest are listed in a section below.  To see the list 
36    of all available options, you can run:
37
38        ./configure --help
39
40 2) make
41
42 3) make install
43
44    Note that if you have mmh files in your install directories with
45    the same names as the files being installed, the old ones will get
46    overwritten without any warning.  The only directory this isn't
47    true for, is the `etc' directory -- in that directory, the distributed
48    files are installed with a `.dist' suffix if they differ from the
49    existing file.  Watch for information messages while make is processing
50    that directory to see if you need to merge changes.
51
52 4) Edit the file `mhn.defaults' (installed in the mmh `etc' directory).
53    This file contains the default profile entries for the mmh commands
54    mhlist/mhstore/mhshow and is created by the script `mhn.defaults.sh'.
55    This script will search a generic path (essentially your $PATH) for
56    programs to handle various content types (for example, xv to display
57    images).  You can re-run this script and give it a more tailored
58    path.  You may want to re-run this script later if you install new
59    programs to display content.  An example of this is:
60
61        % cd support/general
62        % ./mhn.defaults.sh /usr/local/bin:/usr/ucb > mhn.defaults
63
64    and then move `mhn.defaults' into the mmh `etc' directory.
65
66    The `mhn.defaults.sh' script only searches for a simple set of programs.
67    If you have specialized programs to handle various types, you will need
68    to edit the `mhn.defaults' file manually.  The syntax of this file is
69    described in section 9.4 of the book "MH & xmh: Email for Users and
70    Programmers", 3rd edition, by Jerry Peek, on the Internet at
71    <http://www.ics.uci.edu/~mh/book/mh/confmhn.htm>.
72
73 5) Add the bindir to your PATH variable.
74
75    If you haven't change any paths, then the bindir is `/usr/local/mmh/bin'.
76    Likely, your PATH is set in ~/.profile, ~/.kshrc, ~/.bashrc, or a similar
77    file.
78
79
80 -----------------------------------------------
81 Compiler options, or using a different compiler
82 -----------------------------------------------
83 By default, configure will use the "gcc" compiler if found.  You can use a
84 different compiler, or add unusual options for compiling or linking that
85 the "configure" script does not know about, by either editing the user
86 configuration section of the top level Makefile (after running configure)
87 or giving "configure" initial values for these variables by setting them
88 in the environment.  Using a Bourne-compatible shell (such as sh,ksh,zsh),
89  
90 you can do that on the command line like this:
91     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
92  
93 Or on systems that have the "env" program, you can do it like this:
94     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
95
96 ----------------------------------------
97 Building mmh on additional architectures
98 ----------------------------------------
99 To build mmh on additional architectures, you can do a "make distclean".
100 This should restore the mmh source distribution back to its original
101 state.  You can then configure mmh as above on other architectures in
102 which you wish to build mmh.  Or alternatively, you can use a different
103 build directory for each architecture.
104  
105 ---------------------------------
106 Using a different build directory
107 ---------------------------------
108 You can compile the mmh in a different directory from the one containing
109 the source code.  Doing so allows you to compile it on more than one
110 architecture at the same time.  To do this, you must use a version of
111 "make" that supports the "VPATH" variable, such as GNU "make".  "cd" to
112 the directory where you want the object files and executables to go and
113 run the "configure" script.  "configure" automatically checks for the
114 source code in the directory that "configure" is in.  For example,
115  
116     cd /usr/local/solaris/mmh
117     /usr/local/src/mmh-1.0/configure
118     make
119
120 ---------------------
121 Options for configure
122 ---------------------
123 --prefix=DIR     (DEFAULT is /usr/local/mmh)
124      This will change the base prefix for the installation location
125      for the various parts of mmh.  Unless overridden, mmh is installed
126      in ${prefix}/bin, ${prefix}/etc, ${prefix}/lib, ${prefix}/man.
127
128 --bindir=DIR     (DEFAULT is ${prefix}/bin)
129      mmh's binaries (show, inc, comp, ...) are installed here.
130      You need to have this directory in your PATH variable.
131
132 --libdir=DIR     (DEFAULT is ${prefix}/lib)
133      mmh's test tools (ap, dp, mhtest, ...) are installed here.
134      They are seldom useful to normal users.
135
136 --sysconfdir=DIR     (DEFAULT is ${prefix}/etc)
137      mmh's config files (mhn.defaults, ...) are installed here.
138
139 --mandir=DIR     (DEFAULT is ${prefix}/man)
140      mmh's man pages are installed here.
141
142 --enable-debug
143      Enable debugging support.
144
145 --enable-mhe    (DEFAULT)
146      Add support for the Emacs front-end `mhe'.
147
148 --with-locking=LOCKTYPE    (DEFAULT is dot)
149      Specify the locking mechanism when attempting to "inc" or
150      "msgchk" a local mail spool. Valid options are "dot",
151      "fcntl", "flock", and "lockf". Of the four, dot-locking
152      requires no special kernel or filesystem support, and simply
153      creates a file called "FILE.lock" to indicate that "FILE" is
154      locked.
155
156      In order to be effective, you should contact the site
157      administrator to find out what locking mechanisms other
158      mail delivery and user programs respect. The most common
159      reason not to use dot-locking is if the mail spool directory
160      is not world- or user-writeable, and thus a lock file cannot
161      be created.
162
163
164 --
165 markus schnalke <meillo@marmaro.de>
166 and the nmh team <nmh-workers@nongnu.org>