7049a4095d71c8b23bb80870290303cf572943aa
[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, and create the 
32    include file config.h, as well as the various 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) Look through the user configuration section at the beginning
41    of the generated include file `config.h'. You may
42    want to customize some #defines for your environment.
43
44 3) make
45
46 4) make install
47
48    Note that if you have [n]mh files in your install directories with
49    the same names as the files being installed, the old ones will get
50    overwritten without any warning.  The only directory this isn't
51    true for, is the `etc' directory -- in that directory, the distributed
52    files are installed with a `.dist' suffix if they differ from the
53    existing file.  Watch for information messages while make is processing
54    that directory to see if you need to merge changes.
55
56 5) Edit the file `mts.conf' (installed in the mmh `etc' directory)
57    and make any necessary changes for the mail transport interface
58    you are using.
59
60    The default `mts.conf' file assumes you retrieve new mail from
61    a local (or NFS mounted) maildrop, and send outgoing mail by
62    injecting the message to a mail transfer agent (such as sendmail)
63    on the local machine.
64
65    Check the `mts.conf(5)' man page for a list of all the available
66    options for this file ("masquerade" may be of particular interest).
67
68 6) Edit the file `mhn.defaults' (installed in the mmh `etc' directory).
69    This file contains the default profile entries for the mmh commands
70    mhlist/mhstore/mhshow and is created by the script `mhn.defaults.sh'.
71    This script will search a generic path (essentially your $PATH) for
72    programs to handle various content types (for example, xv to display
73    images).  You can re-run this script and give it a more tailored
74    path.  You may want to re-run this script later if you install new
75    programs to display content.  An example of this is:
76
77     % cd support/general
78     % ./mhn.defaults.sh /usr/local/bin:/usr/X11/bin:/usr/ucb > mhn.defaults
79
80    and then move `mhn.defaults' into the mmh `etc' directory.
81
82    The `mhn.defaults.sh' script only searches for a simple set of programs.
83    If you have specialized programs to handle various types, you will need
84    to edit the `mhn.defaults' file manually.  The syntax of this file is
85    described in section 9.4 of the book "MH & xmh: Email for Users and
86    Programmers", 3rd edition, by Jerry Peek, on the Internet at
87    <http://www.ics.uci.edu/~mh/book/mh/confmhn.htm>.
88
89 -----------------------------------------------
90 Compiler options, or using a different compiler
91 -----------------------------------------------
92 By default, configure will use the "gcc" compiler if found.  You can use a
93 different compiler, or add unusual options for compiling or linking that
94 the "configure" script does not know about, by either editing the user
95 configuration section of the top level Makefile (after running configure)
96 or giving "configure" initial values for these variables by setting them
97 in the environment.  Using a Bourne-compatible shell (such as sh,ksh,zsh),
98  
99 you can do that on the command line like this:
100     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
101  
102 Or on systems that have the "env" program, you can do it like this:
103     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
104
105 ----------------------------------------
106 Building mmh on additional architectures
107 ----------------------------------------
108 To build mmh on additional architectures, you can do a "make distclean".
109 This should restore the mmh source distribution back to its original
110 state.  You can then configure mmh as above on other architectures in
111 which you wish to build mmh.  Or alternatively, you can use a different
112 build directory for each architecture.
113  
114 ---------------------------------
115 Using a different build directory
116 ---------------------------------
117 You can compile the mmh in a different directory from the one containing
118 the source code.  Doing so allows you to compile it on more than one
119 architecture at the same time.  To do this, you must use a version of
120 "make" that supports the "VPATH" variable, such as GNU "make".  "cd" to
121 the directory where you want the object files and executables to go and
122 run the "configure" script.  "configure" automatically checks for the
123 source code in the directory that "configure" is in.  For example,
124  
125     cd /usr/local/solaris/mmh
126     /usr/local/src/mmh-1.0/configure
127     make
128
129 ---------------------
130 Options for configure
131 ---------------------
132 --prefix=DIR     (DEFAULT is /usr/local/mmh)
133      This will change the base prefix for the installation location
134      for the various parts of mmh.  Unless overridden, mmh is installed
135      in ${prefix}/bin, ${prefix}/etc, ${prefix}/lib, ${prefix}/man.
136
137 --bindir=DIR     (DEFAULT is ${prefix}/bin)
138      mmh's binaries (show, inc, comp, ...) are installed here.
139
140 --libdir=DIR     (DEFAULT is ${prefix}/lib)
141      mmh's support binaries (spost, slocal, mhl, ...) are installed here.
142
143 --sysconfdir=DIR     (DEFAULT is ${prefix}/etc)
144      mmh's config files (mts.conf, mhn.defaults, ...) are installed here.
145
146 --mandir=DIR     (DEFAULT is ${prefix}/man)
147      mmh's man pages are installed here.
148
149 --enable-debug
150      Enable debugging support.
151
152 --enable-masquerade[='draft_from username_extension']    
153      If this option is disabled, the mts.conf file will contain the
154      line "masquerade: " (with no value), which may be manually edited
155      later.  You may find it convenient to specify a value at
156      configure-time, however, so that each time mmh is reinstalled,
157      the right value will be there.  By default, it is enabled.
158
159      The above usage shows the default, with all two masquerade
160      options being specified.  Any subset of the two may be
161      specified.
162
163      See the mh-tailor(5) man page for full documentation of "masquerade:".
164
165 --enable-mhe    (DEFAULT)
166      Add support for the Emacs front-end `mhe'.
167
168 --with-locking=LOCKTYPE    (DEFAULT is dot)
169      Specify the locking mechanism when attempting to "inc" or
170      "msgchk" a local mail spool. Valid options are "dot",
171      "fcntl", "flock", and "lockf". Of the four, dot-locking
172      requires no special kernel or filesystem support, and simply
173      creates a file called "FILE.lock" to indicate that "FILE" is
174      locked.
175
176      In order to be effective, you should contact the site
177      administrator to find out what locking mechanisms other
178      mail delivery and user programs respect. The most common
179      reason not to use dot-locking is if the mail spool directory
180      is not world- or user-writeable, and thus a lock file cannot
181      be created.
182
183 --with-ndbm=LIB    (DEFAULT is to autodetect)
184 --with-ndbmheader=HEADER     (DEFAULT is to autodetect)
185      Specify the header file (eg ndbm.h) and library (eg ndbm) to use
186      to compile against the ndbm database library. By default, configure
187      will try various possibilities until it finds one that works; this
188      option only needs to be specified if the autodetection fails or
189      makes the wrong choice.
190
191      If either of these options is given then the other must also be
192      specified.
193
194 --
195 markus schnalke <meillo@marmaro.de>
196 and the nmh team <nmh-workers@nongnu.org>