imap_path_decode(): err: do not "savestrbuf(,buflen * 2)"
[s-mailx.git] / make.rc
blobd774ee747e36b9b38b194e5b4737f60aafb39825
1 #@ make.rc can be used adjust the set of features, paths, etc.
2 #@ You should have read "INSTALL" first.
3 #@ Notes:
4 #@ . Specifying settings on the command line will take precedence over
5 #@   the variables in here (correctly triggering build updates as
6 #@   necessary, too).
7 #@ . Choosing one of the predefined CONFIG= sets overwrites a lot of
8 #@   items that can be set in here / from the command line.
9 #@ . This file is parsed by the shell: it is in sh(1), not in make(1)
10 #@   syntax.  Evaluation occurs *after* it has been read, so command
11 #@   line overwrites take effect.  To use multiline values, escape the
12 #@   newlines on any but the last line with a backslash, as in "LINE \".
13 #@   The parsing is sequential top-to-bottom (nonetheless) so that shell
14 #@   snippets in a value can refer only to stuff yet defined.
15 #@ . Boolean values can be set via 1/0, true/false, yes/no and on/off
16 #@   (case doesn't matter), other values result in an error.
17 #@ . However, the value "require" is also a true boolean, but will in
18 #@   addition cause configuration to fail if the requested feature is
19 #@   missing.  This special behaviour is only tested by a logical subset
20 #@   of feature tests.
21 #@ . You may NOT comment out anything in here -- if you want to disable
22 #@   a feature, set it to a false boolean.
24 ## PATHS AND PROGRAMS ##
26 # General prefix where S-nail should be installed.
27 PREFIX=/usr/local
29 # Fine tune individual locations, normally under $PREFIX.
30 # . the place of the S-nail program.
31 BINDIR="${PREFIX}/bin"
32 # Only if WANT_DOTLOCK is enabled:
33 # . the place of the privilege-separated helper program.
34 LIBEXECDIR="${PREFIX}/libexec"
35 # . of the manual.
36 MANDIR="${PREFIX}/share/man"
37 # . of the exemplary resource file.
38 SYSCONFDIR="${PREFIX}/etc"
40 # This variable is prepended to all the paths from above at installation
41 # time; this feature can be used for, e.g., package building: if $PREFIX
42 # is "/usr/local", but $DESTDIR is set to "here", then S-nail will still
43 # think its $PREFIX is "/usr/local" whereis the build system will
44 # instead use "here/usr/local".
45 DESTDIR=
47 # Where the local mail system stores user mail (mbox) files.
48 MAILSPOOL=`\
49    if [ -d /var/spool/mail ]; then \
50       echo /var/spool/mail;\
51    else \
52       echo /var/mail;\
53    fi`
55 # Path to the local MTA (Mail Transport Agent).
56 SENDMAIL=`\
57    if [ -x /usr/bin/sendmail ]; then \
58       echo /usr/bin/sendmail;\
59    elif [ -x /usr/lib/sendmail ]; then \
60       echo /usr/lib/sendmail;\
61    else \
62       echo /usr/sbin/sendmail;\
63    fi`
65 # Today a lot of systems no longer use sendmail(1), but a different MTA.
66 # To ensure compatibility with sendmail(1), a system called
67 # mailwrapper(8) is often used, which selects the required service by
68 # looking at the name by which the program actually has been invoked.
69 # This variable can be used to adjust this name as necessary.
70 SENDMAIL_PROGNAME=sendmail
72 # Default *SHELL* (sh(1) path).
73 # Sometimes we simply invoke a command directly via execlp(2) instead of
74 # indirectly through *SHELL* -- in these cases execlp(2) may fallback to
75 # it's own builtin sh(1) path (most likely `bin/sh'), effectively
76 # bypassing *XSHELL*.
77 XSHELL=/bin/sh
79 # The default *LISTER* (in the $PATH).
80 XLISTER=ls
82 # The default *PAGER* (in the $PATH).
83 XPAGER=more
85 # The following tools may be provided a.k.a. overwritten,
86 # `command -v NAME` is used to query the utility otherwise:
87 #  MAKE=, STRIP=, awk=, cat=, chmod=, cp=, cmp=, cksum=,
88 #     grep=, mkdir=, mv=, rm=, sed=, sort=, tee=, tr=
89 # Usually in administrator paths:
90 #  chown= [WANT_DOTLOCK]
91 # Note that awk(1), rm(1) and tr(1) are needed before this file is read,
92 # all other utilities will be checked afterwards only.  For
93 # cross-compilation setting MAKE= and STRIP= may be necessary.  Due to
94 # the evaluation order of the build system all those programs are
95 # usually needed, but by setting any of the variables to true(1), as in
96 # chown=/usr/bin/true, availability of unneeded programs can be faked.
97 # We require uname(1) -s, command(1) -v, echo(1), etc.
98 # uname(1) can be circumvented by setting $OS.
100 ## FEATURE SET ##
102 # Shall S-nail try to automatically detect a compiler and provide a set
103 # of known-good compiler flags?  If so additions may still be provided
104 # by setting $ADDCFLAGS and $ADDLDFLAGS to whatever is desired.
105 # Thus: set this to false and use your normal $CC / $CFLAGS / $LDFLAGS,
106 # set this to true and pass additional flags via ADDCFLAGS / ADDLDFLAGS:
107 #     $ make ADDCFLAGS=-std=c99 install
108 # Whatever you do, the configuration is fixated and updates will force
109 # rebuilds.  And far below in this file there is WANT_FORCED_STACKPROT,
110 # too, which can be used to cause injection of stack protectors.
111 WANT_AUTOCC=yes
113 # It is possible to compile S-nail as a "single-source", meaning that
114 # all source files are injected into a single compilation unit, which is
115 # then compiled.  This allows the compiler to perform much more
116 # optimizations, and also reduces the management overhead that is used
117 # for / needed by the linker.
118 WANT_AMALGAMATION=no
120 # Character set conversion enables reading and sending of mails in
121 # multiple character sets through usage of the iconv(3) library.  Please
122 # read the manual section "Character sets" for the complete picture.
123 # This should usually be enabled; it can be "require"d.
124 WANT_ICONV=yes
126 # Major switch to toggle *all* network related protocols
127 # (IMAP,POP3,SMTP) and related/dependent stuff (GSS-API,SSL);
128 # can be "require"d.
129 WANT_SOCKETS=yes
131 # If $WANT_SOCKETS: support for Secure Socket Layer (Transport Layer
132 # Security, TLS), i.e., encrypted socket connections; can be "require"d.
133 # This needs the OpenSSL libraries (<http://www.openssl.org>).
134 WANT_SSL=yes
136 # If $WANT_SSL: shall S-nail (try to) use mechanisms to support more
137 # digest and cipher algorithms than the few that are documented?  For
138 # S/MIME *smime-cipher* for example this will cause
139 # EVP_get_cipherbyname(3) to be tried shall the (S-nail-) builtin
140 # knowledge not suffice to understand the user request.  Will create
141 # a large statically linked binary; dynamically linked the costs only
142 # arise once the extended lookup is actually needed (the first time).
143 # This can be "require"d.
144 WANT_SSL_ALL_ALGORITHMS=yes
146 # If $WANT_SOCKETS: support for SMTP protocol?
147 # (Directly sending mails over the network)  Can be "require"d.
148 WANT_SMTP=yes
150 # If $WANT_SOCKETS: support for POP3 protocol?
151 # (Download of mails via POP protocol)  Can be "require"d.
152 WANT_POP3=yes
154 # If $WANT_SOCKETS: support for IMAP protocol?
155 # (Reading of mails directly on the server)  Can be "require"d.
156 WANT_IMAP=yes
158 # If $WANT_SOCKETS: support for GSS-API (Generic Security Services
159 # Application Programming Interface) based authentication, e.g.,
160 # Kerberos v5?  Available for IMAP and SMTP; can be "require"d.
161 WANT_GSSAPI=yes
163 # Enabling the MD5 message digest adds support for several
164 # authentication possibilities: POP3 (APOP), IMAP/SMTP (CRAM-MD5).
165 # If you don't need those, you may turn them off by excluding MD5.
166 WANT_MD5=yes
168 # If $WANT_SOCKETS: support for parsing of user and password credentials
169 # from the ~/.netrc file ($NETRC; see *netrc-lookup* manual entry).
170 WANT_NETRC=yes
172 # If $WANT_SOCKETS: passwords can also be looked up through an external
173 # "agent" in order to allow for encrypted password storage (see
174 # *agent-shell-lookup*).
175 WANT_AGENT=yes
177 # IDNA (internationalized domain names for applications) offers users
178 # the possibility to use domain names in their native language, i.e., to
179 # use non-US-ASCII content, as in, e.g., <www.räksmörgåsa.example>,
180 # which the IDNA algorithm would convert to
181 # <www.xn--rksmrgsa-0zap8p.example>.  :)  This either needs idnkit
182 # (<https://www.nic.ad.jp/ja/idn/idnkit/download/>) or the GNU Libidn
183 # library (<https://www.gnu.org/software/libidn/>).  It can be
184 # "require"d.
185 WANT_IDNA=yes
187 # IMAP-style SEARCH expressions can be supported.  This addressing mode
188 # is available with all types of folders; for folders not located on
189 # IMAP servers, or for servers unable to execute the SEARCH command, the
190 # search is performed locally.
191 WANT_IMAP_SEARCH=yes
193 # Regular expression (re_format(7)) support for searches, conditional
194 # expressions etc.; can be "require"d.
195 WANT_REGEX=yes
197 # Command line editing and -history.
198 # S-nail actually supports three different command line editors, one
199 # builtin and two fully fledged external libraries which may offer
200 # a slightly better user experience at the cost of more memory usage and
201 # CPU time; also the interactive behaviour may not be one-to-one to what
202 # is documented.  Note that these are tested in shown order, and each
203 # desired one must be enabled by itself!
204 # . WANT_READLINE
205 #   The GNU readline(3) compatible interface; can be "require"d.
206 # . WANT_EDITLINE
207 #   Command line editing via BSD editline(3); can be "require"d.
208 # . WANT_NCL
209 #   If ISO C (ISO/IEC 9899:1990/Amendment 1:1995) is supported on the
210 #   system then our builtin NCL (Nail Command Line editor) version can
211 #   be used.  It is documented in the manual section "Command line
212 #   editor" and can be "require"d.
213 WANT_READLINE=no
214 WANT_EDITLINE=no
215 WANT_NCL=yes
216 # All command line editors optionally support history management.
217 WANT_HISTORY=yes
218 # For the NCL command line editor we optionally support
219 # "expand-on-tabulator".  Turning it off shrinks the binary.
220 # Please see the respective manual entry.
221 WANT_TABEXPAND=yes
223 # Use termcap(3) for terminal control; can be "require"d.
224 # - When *term-ca-mode* is set:
225 #   . On startup emit "ti" (smcup / enter_ca_mode)
226 #   . On exit emit "te" (rmcup / exit_ca_mode)
227 # NOTE: requires $PAGER etc. to also support and use ca-mode, otherwise
228 # the screen looks really, really ugly.
229 WANT_TERMCAP=no
231 # Enable the `errors' command; S-nail is a console-based application and
232 # thus errors may fly by pretty fast as other operations are in
233 # progress; or $PAGERs are started and clear errors off the screen.  If
234 # enabled errors are duplicated as they happen and the `errors' command
235 # will show them when asked to.
236 WANT_ERRORS=yes
238 # Interaction with a spam email filter is possible.
239 # Refer to all commands and variables with a "spam" prefix, and
240 # see the manual example section "Handling spam".
241 # . WANT_SPAM_SPAMC:
242 #   Support for interaction with spamassassin(1)s spamc(1).
243 # . WANT_SPAM_SPAMD:
244 #   Direct communication with spamassassin(1)s spamd(1).
245 #   Needs unix(4) domain sockets (checked).  Can be "require"d.
246 # . WANT_SPAM_FILTER:
247 #   Generic filter hook which can be used with e.g. bogofilter(1)
248 #   and sylfilter(1): see documentation for the *spam-filter-**
249 #   variables for expected application behaviour.
250 WANT_SPAM_SPAMC=no
251 WANT_SPAM_SPAMD=no
252 WANT_SPAM_FILTER=yes
254 # If given an optional argument the `help' command will print a help
255 # string only for the mentioned command; those strings take up space and
256 # so one may disable this feature.
257 WANT_DOCSTRINGS=yes
259 # A simple line-based quoting mechanism can be made available via the
260 # *quote-fold* mechanism.  This will be turned off automatically if the
261 # required character classification is not available on the host.
262 # TODO shouldn't wrap lines when only WS or a NL-escaping \ follows
263 WANT_QUOTE_FOLD=yes
265 # We do have a very primitive HTML tagsoup filter which can be used to
266 # convert HTML to plain text for display purposes.  If enabled it'll be
267 # used for all MIME types which have the @h@ or @H@ type markers (more
268 # on this in the manual section "THE mime.types FILES").  And which
269 # don't have any user defined MIME type handler, of course.
270 WANT_FILTER_HTML_TAGSOUP=yes
272 # A simple form of coloured output can optionally be produced.
273 WANT_COLOUR=yes
275 # File dotlocking is performed for "system mailbox" (%[USER] and
276 # %:ANYFILE) MBOX files: when synchronizing any such FILE a FILE.lock
277 # file will be created in the directory of FILE, for the duration of the
278 # synchronization.
279 # Set WANT_DOTLOCK to support this traditional mail spool file locking.
280 # MAILSPOOL(s) where normal system mailboxes reside are usually not
281 # writable by normal users, except that a user may read and write his
282 # own mailbox.  But this means that a program run by the user cannot
283 # create a .lock file!  The solution is to install a privilege-separated
284 # mini-program that has the sole purpose and functionality of managing
285 # the dotlock file in such situations -- and only then, as a last
286 # ressort.  Our small helper will be installed in LIBEXECDIR, SETUID to
287 # the PRIVSEP_USER (usually root).  With it dotlock files can be created
288 # for any mailbox for which the invoking user has read (or read-write)
289 # permissions, and under the UID and GID of the mailbox itself!
290 # The actual installation make targets will require the chown(1) program
291 # (as above) and require sufficient privileges to SETUID to PRIVSEP_USER.
292 # WANT_DOTLOCK can be "require"d.
293 WANT_DOTLOCK=yes
294 PRIVSEP_USER=root
296 ##  --  >8  --  8<  --  ##
297 ## Normal users should not need to read any further
299 ## PATHS AND PROGRAMS, DEVELOPMENT ##
301 # To ease the life of forkers and packagers "our" name can be changed.
302 # The name is build by concatenating $SID and $NAIL, i.e.,
303 # $(SID)$(NAIL).  Note that the final string must be longer than two
304 # characters and may not contain any whitespace.
305 SID=s-
306 NAIL=nail
308 # The name of the exemplary resource template.
309 # Note 1: it's not overwritten by "make install" if it yet exists!
310 SYSCONFRC="${SID}${NAIL}.rc"
312 ## FEATURE SET, DEVELOPMENT ##
314 # Use debug compiler flags, enable some additional commands (like
315 # `sstats', `smemtrace') and some code assertions.  Note that setting
316 # this also enables our own memory canaries, which require a rather
317 # large amount of runtime memory, and forcefully disables alloca(3)
318 # stack memory usage (see WANT_NOALLOCA below), so as to be able to
319 # track usage of "stack memory" via our memory canaries.
320 WANT_DEBUG=no
322 # We use the crypto libraries' MD5 implementation if possible, unless..
323 WANT_NOEXTMD5=no
325 # The codebase makes a lot of use of alloca(3), and this will remain
326 # since S-nail will continue to be compliant to ISO C89, which has no
327 # variable arrays, etc.  For testing purposes it is however nice to use
328 # the much slower normal S-nail heap memory allocator instead.  Note:
329 # this will be forcefully set (again) if WANT_DEBUG=yes.
330 WANT_NOALLOCA="${WANT_DEBUG}"
332 # Experimental code etc.
333 # Note: this forcefully enables WANT_DEBUG.
334 WANT_DEVEL=no
336 # Our functions are instrumented with Not-Yet-Dead chirps, which print
337 # a function call trace when the program crashes.  Whereas NYD will be
338 # used automatically when either of WANT_DEBUG and WANT_DEVEL is
339 # defined, an extended level of NYD is compiled in only on explicit
340 # request.
341 # TODO Separation in between NYD and NYD2 not yet fully done.
342 WANT_NYD2=no
344 # With $WANT_AUTOCC we will use stack protector guards shall the
345 # detected compiler support them; this goes in line with our own (heap)
346 # memory canaries and will detect buffer overflows.  It is usually only
347 # useful during development, i.e., in a debug environment that tests all
348 # aspects of a program.
349 WANT_FORCED_STACKPROT=`\
350    if feat_yes DEVEL || feat_yes DEBUG; then \
351       echo yes;\
352    else \
353       echo no;\
354    fi`
356 # vim:set tw=72: s-it-mode