2 # INSTALL -- installation instructions
8 Please read all of the following instructions before you begin
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.
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
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.)
27 1) From the top-level source directory, run the command:
31 This will check the configuration of your OS, as well as the various
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:
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.
52 4) Edit the file `mhn.defaults' (installed in the mmh `etc' directory).
54 This file contains the default profile entries for the mmh commands
55 mhlist/mhstore/show. The syntax of this file is described in section
56 9.4 of the book "MH & xmh: Email for Users and Programmers", 3rd edition,
57 by Jerry Peek, on the Internet at
58 <http://rand-mh.sourceforge.net/book/mh/confmhn.html>.
60 5) Add the bindir to your PATH variable.
62 If you haven't change any paths, then the bindir is `/usr/local/mmh/bin'.
63 Likely, your PATH is set in ~/.profile, ~/.kshrc, ~/.bashrc, or a similar
67 -----------------------------------------------
68 Compiler options, or using a different compiler
69 -----------------------------------------------
70 By default, configure will use the "gcc" compiler if found. You can use a
71 different compiler, or add unusual options for compiling or linking that
72 the "configure" script does not know about, by either editing the user
73 configuration section of the top level Makefile (after running configure)
74 or giving "configure" initial values for these in its command line or in
75 its environment. For example:
77 ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
79 Or on systems that have the "env" program, you can do it like this:
80 env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
82 If you want to add to, not replace, compile flags, you can use OURDEFS:
83 ./configure OURDEFS='-Wextra -Wno-sign-compare'
85 ----------------------------------------
86 Building mmh on additional architectures
87 ----------------------------------------
88 To build mmh on additional architectures, you can do a "make distclean".
89 This should restore the mmh source distribution back to its original
90 state. You can then configure mmh as above on other architectures in
91 which you wish to build mmh. Or alternatively, you can use a different
92 build directory for each architecture.
94 ---------------------------------
95 Using a different build directory
96 ---------------------------------
97 You can compile the mmh in a different directory from the one containing
98 the source code. Doing so allows you to compile it on more than one
99 architecture at the same time. To do this, you must use a version of
100 "make" that supports the "VPATH" variable, such as GNU "make". "cd" to
101 the directory where you want the object files and executables to go and
102 run the "configure" script. "configure" automatically checks for the
103 source code in the directory that "configure" is in. For example,
105 cd /usr/local/solaris/mmh
106 /usr/local/src/mmh-1.0/configure
109 ---------------------
110 Options for configure
111 ---------------------
112 --prefix=DIR (DEFAULT is /usr/local/mmh)
113 This will change the base prefix for the installation location
114 for the various parts of mmh. Unless overridden, mmh is installed
115 in ${prefix}/bin, ${prefix}/etc, ${prefix}/lib, ${prefix}/man.
117 --bindir=DIR (DEFAULT is ${prefix}/bin)
118 mmh's binaries (show, inc, comp, ...) are installed here.
119 You need to have this directory in your PATH variable.
121 --libdir=DIR (DEFAULT is ${prefix}/lib)
122 mmh's test tools (ap, dp, mhtest, ...) are installed here.
123 They are seldom useful to normal users.
125 --sysconfdir=DIR (DEFAULT is ${prefix}/etc)
126 mmh's config files (mhn.defaults, ...) are installed here.
128 --mandir=DIR (DEFAULT is ${prefix}/man)
129 mmh's man pages are installed here.
132 Enable debugging support.
134 --with-locking=LOCKTYPE (DEFAULT is dot)
135 Specify the locking mechanism when attempting to "inc"
136 a local mail spool. Valid options are "dot", "fcntl", "flock",
137 and "lockf". Of the four, dot-locking requires no special kernel
138 or filesystem support, and simply creates a file called
139 "FILE.lock" to indicate that "FILE" is locked.
141 In order to be effective, you should contact the site
142 administrator to find out what locking mechanisms other
143 mail delivery and user programs respect. The most common
144 reason not to use dot-locking is if the mail spool directory
145 is not world- or user-writeable, and thus a lock file cannot
150 markus schnalke <meillo@marmaro.de>
151 and the nmh team <nmh-workers@nongnu.org>