1 #@ make.rc can be used adjust the set of features, paths, etc.
2 #@ You should have read INSTALL first.
4 #@ . Choosing a predefined CONFIG= disallows further option fine-tuning.
5 #@ . Features / options have an OPT_ prefix and need to be assigned
6 #@ a boolean value, as in OPT_SSL=yes. Booleans are 1/0, y/n,
7 #@ true/false, yes/no and on/off (case doesn't matter).
8 #@ The value "require" is also a true boolean, but will in addition
9 #@ cause configuration to fail if the requested condition cannot be
10 #@ satisfied. This value is only available for a subset of options.
11 #@ . Values use VAL_ instead, and are assigned strings.
12 #@ E.g., VAL_PREFIX=/usr/local.
13 #@ Variables which are only used during configuration, building,
14 #@ and / or installation have no prefix, e.g., DESTDIR, VERBOSE, awk.
15 #@ . Specifying settings on the command line will take precedence over
16 #@ the variables in here (correctly triggering build updates as
18 #@ . This file is parsed by the shell: it is in sh(1), not in make(1)
19 #@ syntax. Evaluation occurs *after* it has been read, so command
20 #@ line overwrites take effect. To use multiline values, escape the
21 #@ newlines on all lines but the last with a reverse solidus (back-
22 #@ slash), as in "LINE \".
23 #@ To embed a shell variable unexpanded, use two: "XY=\\${HOME}".
24 #@ The parsing is sequential top-to-bottom (nonetheless), so that
25 #@ shell snippets in a value can refer only to stuff yet defined.
26 #@ . You may NOT comment out anything in here -- if you want to disable
27 #@ a feature, set it to a false boolean.
29 ## IDENTITIES, PATHS AND PROGRAMS ##
31 # The user ID our small privilege-separated helper program will be
32 # SETUID to, shall it be included ($OPT_DOTLOCK).
33 # Installation will then require the chown(1) program (as below) and
34 # sufficient privileges to perform a SETUID to this user ID.
37 # General prefix where S-nail should be installed.
40 # Fine tune individual locations, normally under $VAL_PREFIX.
41 # . the place of the S-nail program.
42 VAL_BINDIR="${VAL_PREFIX}/bin"
43 # . the place of the privilege-separated helper program, the name
44 # of which is [$VAL_SID$VAL_NAIL]-privsep (see below for $VAL_SID &
46 # (Only with $OPT_DOTLOCK.)
47 VAL_LIBEXECDIR="${VAL_PREFIX}/libexec"
49 VAL_MANDIR="${VAL_PREFIX}/share/man"
50 # . of the exemplary resource file.
51 VAL_SYSCONFDIR="${VAL_PREFIX}/etc"
53 # The variable $DESTDIR is prepended to all the paths from above at
54 # installation time; this feature can be used for, e.g., package
55 # building: if $VAL_PREFIX is "/usr/local", but $DESTDIR is set to "here",
56 # then S-nail will still think its $VAL_PREFIX is "/usr/local" whereis the
57 # build system will instead use "here/usr/local".
58 # NOTE: it cannot be set in here, but must be given on the command line
59 # when invoking the "install" make(1) (directly or indirectly).
60 # (That is, if you uncomment it, it'll be update-tracked...)
63 # Where the local mail system stores user $MAIL files.
65 if [ -d /var/spool/mail ]; then \
66 echo /var/spool/mail;\
71 # Path to the local MTA (Mail-Transfer-Agent).
73 if [ -x /usr/bin/sendmail ]; then \
74 echo /usr/bin/sendmail;\
75 elif [ -x /usr/lib/sendmail ]; then \
76 echo /usr/lib/sendmail;\
78 echo /usr/sbin/sendmail;\
81 # Today a lot of systems no longer use sendmail(1), but a different MTA.
82 # To ensure compatibility with sendmail(1), a system called
83 # mailwrapper(8) is often used, which selects the required service by
84 # looking at the name by which the program actually has been invoked.
85 # This variable can be used to adjust this name as necessary.
86 VAL_MTA_ARGV0=sendmail
88 # Default *SHELL* (sh(1) path).
89 # Sometimes we simply invoke a command directly via execlp(2) instead of
90 # indirectly through *SHELL* -- in these cases execlp(2) may fallback to
91 # it's own builtin sh(1) path
94 # Some more default fallback values, some of which are standardized
95 # and (thus)/or documented in the manual (changes not reflected there!)
96 VAL_DEAD=~/dead.letter
106 # The following tools may be provided a.k.a. overwritten,
107 # `command -v NAME` is used to query the utility otherwise:
108 # MAKE=, STRIP=, awk=, cat=, chmod=, cp=, cmp=, cksum=,
109 # grep=, mkdir=, mv=, rm=, sed=, sort=, tee=, tr=
110 # Usually in administrator paths:
111 # chown= [$OPT_DOTLOCK]
112 # Note that awk(1), rm(1) and tr(1) are needed before this file is read,
113 # all other utilities will be checked afterwards only. For
114 # cross-compilation setting $MAKE and $STRIP may be necessary. Due to
115 # the evaluation order of the build system all those programs are
116 # usually needed, but by setting any of the variables to true(1), as in
117 # chown=/usr/bin/true, availability of unneeded programs can be faked.
118 # We require uname(1) -s, command(1) -v, echo(1), etc.
119 # uname(1) can be circumvented by setting $OS.
123 # For cross-compilation purposes it may be useful to not actually run
124 # systemcall etc. tests (link and run the executable) but only to
125 # perform the link tests necessary to detect host environment.
128 # Shall S-nail try to automatically detect a compiler and provide a set
129 # of known-good compiler flags? If so additions may still be provided
130 # by setting $EXTRA_CFLAGS and $EXTRA_LDFLAGS to whatever is desired.
131 # Thus: set this to false and use your normal $CC / $CFLAGS / $LDFLAGS,
132 # otherwise pass additional flags via $EXTRA_CFLAGS / $EXTRA_LDFLAGS:
133 # $ make EXTRA_CFLAGS=-std=c99 tangerine
134 # Whatever you do, the configuration is fixated and updates will force
135 # rebuilds. And far below in this file there is $OPT_FORCED_STACKPROT,
136 # too, which can be used to cause injection of stack protectors.
139 # It is possible to compile S-nail as a "single-source", meaning that
140 # all source files are injected into a single compilation unit, which is
141 # then compiled. This allows the compiler to perform much more
142 # optimizations, and also reduces the management overhead that is used
143 # for / needed by the linker.
146 # Character set conversion enables reading and sending of mails in
147 # multiple character sets through usage of the iconv(3) library. Please
148 # read the manual section "Character sets" for the complete picture.
149 # This should usually be enabled; it can be "require"d.
152 # Major switch to toggle *all* network related protocols
153 # (POP3,SMTP) and related/dependent stuff (GSS-API,SSL);
157 # If $OPT_SOCKETS: support for Secure Socket Layer (Transport Layer
158 # Security, TLS), i.e., encrypted socket connections; can be "require"d.
159 # This needs the OpenSSL libraries (<http://www.openssl.org>).
162 # If $OPT_SSL: shall S-nail (try to) use mechanisms to support more
163 # digest and cipher algorithms than the few that are documented? For
164 # S/MIME *smime-cipher* for example this will cause
165 # EVP_get_cipherbyname(3) to be tried shall the (S-nail-) builtin
166 # knowledge not suffice to understand the user request. Will create
167 # a large statically linked binary; dynamically linked the costs only
168 # arise once the extended lookup is actually needed (the first time).
169 # This can be "require"d.
170 OPT_SSL_ALL_ALGORITHMS=yes
172 # If $OPT_SOCKETS: support for SMTP protocol?
173 # (Directly sending mails over the network) Can be "require"d.
176 # If $OPT_SOCKETS: support for POP3 protocol?
177 # (Download of mails via POP protocol) Can be "require"d.
180 # If $OPT_SOCKETS: support for GSS-API (Generic Security Services
181 # Application Programming Interface) based authentication, e.g.,
182 # Kerberos v5? Available for SMTP; can be "require"d.
185 # Enabling the MD5 message digest adds support for several
186 # authentication possibilities: POP3 (APOP), SMTP (CRAM-MD5).
187 # If you don't need those, you may turn them off by excluding MD5.
190 # If $OPT_SOCKETS: support for parsing of user and password credentials
191 # from the ~/.netrc file ($NETRC; see *netrc-lookup* manual entry).
194 # If $OPT_SOCKETS: passwords can also be looked up through an external
195 # "agent" in order to allow for encrypted password storage (see
196 # *agent-shell-lookup*).
197 # [Obsolete] Even though marked *v15-compat* this feature has been
198 # obsoleted; please use an encrypted .netrc file (via *netrc-pipe*) or
199 # encrypt a complete resource file and load this like, e.g.,
200 # source "gpg -qd ~/.mailprivate.gpg | "
203 # IDNA (internationalized domain names for applications) offers users
204 # the possibility to use domain names in their native language, i.e., to
205 # use non-US-ASCII content, as in, e.g., <www.räksmörgåsa.example>,
206 # which the IDNA algorithm would convert to
207 # <www.xn--rksmrgsa-0zap8p.example>. :) This either needs idnkit
208 # (<https://www.nic.ad.jp/ja/idn/idnkit/download/>) or the GNU Libidn
209 # library (<https://www.gnu.org/software/libidn/>). It can be
213 # IMAP-style SEARCH expressions can be supported. This addressing mode
214 # is available with all types of folders; for folders not located on
215 # IMAP servers, or for servers unable to execute the SEARCH command, the
216 # search is performed locally.
219 # Regular expression (re_format(7)) support for searches, conditional
220 # expressions etc., we use the extended ones, then; can be "require"d.
223 # Line editing and -history (manual "On terminal and line editor").
224 # One may choose in between different line editors. Note that (1) only
225 # the builtin MLE (may) map(s) 1:1 to the behaviour as is documented in
226 # the manual and (2) these are tested in the shown order:
228 # The GNU readline(3) compatible interface; can be "require"d.
230 # If ISO C (ISO/IEC 9899:1990/Amendment 1:1995) is supported on the
231 # system then our builtin MLE (Mailx-Line-Editor) version can be used.
232 # An enabled & available OPT_TERMCAP may affect and improve the MLE.
236 # All line editors optionally support history management.
238 # The MLE optionally supports `(un)?bind'ing of key sequences
241 # Use termcap(5) for terminal control; can be "require"d.
242 # Today most environments ship a termcap(5) that in fact is part of
243 # terminfo(5), and acts as a converting wrapper for this library.
244 # To avoid this redundancy we also support terminfo(5), and use it
245 # instead if we find it (assuming that termcap(5) is a stub, then).
246 # Note that terminfo(5) offers access to more key sequences, e.g.,
247 # kLFT5, for which no termcap(5) entry exists.
248 # terminfo(5) support can (thus) be "require"d.
250 OPT_TERMCAP_PREFER_TERMINFO=yes
252 # Enable the `errors' command; S-nail is a console-based application and
253 # thus errors may fly by pretty fast as other operations are in
254 # progress; or $PAGERs are started and clear errors off the screen. If
255 # enabled errors are duplicated as they happen and the `errors' command
256 # will show them when asked to.
259 # Interaction with a spam email filter is possible.
260 # Refer to all commands and variables with a "spam" prefix, and
261 # see the manual example section "Handling spam".
263 # Support for interaction with spamassassin(1)s spamc(1).
264 # . [Obsolete] OPT_SPAM_SPAMD:
265 # Direct communication with spamassassin(1)s spamd(1).
266 # Needs unix(4) domain sockets (checked). Can be "require"d.
268 # Generic filter hook which can be used with e.g. bogofilter(1)
269 # and sylfilter(1): see documentation for the *spam-filter-**
270 # variables for expected application behaviour.
275 # If given an optional argument the `help' command will print a help
276 # string only for the mentioned command; those strings take up space and
277 # so one may disable this feature.
280 # A simple line-based quoting mechanism can be made available via the
281 # *quote-fold* mechanism. This will be turned off automatically if the
282 # required character classification is not available on the host.
284 # TODO shouldn't wrap lines when only WS or a NL-escaping \ follows
287 # We do have a very primitive HTML tagsoup filter which can be used to
288 # convert HTML to plain text for display purposes. If enabled it'll be
289 # used for all MIME types which have the @h@ or @H@ type markers (more
290 # on this in the manual section "The mime.types FILES"). And which
291 # don't have any user defined MIME type handler, of course.
292 OPT_FILTER_HTML_TAGSOUP=yes
294 # A simple form of coloured output can optionally be produced.
297 # File dotlocking is performed for "system mailbox" (%[USER] and
298 # %:ANYFILE) MBOX files: when synchronizing any such FILE a FILE.lock
299 # file will be created in the directory of FILE, for the duration of the
301 # Set $OPT_DOTLOCK to support this traditional mail spool file locking.
302 # $VAL_MAIL(s) where normal system mailboxes reside are usually not
303 # writable by normal users, except that a user may read and write his
304 # own mailbox. But this means that a program run by the user cannot
305 # create a .lock file! The solution is to install a privilege-separated
306 # mini-program that has the sole purpose and functionality of managing
307 # the dotlock file in such situations -- and only then, as a last
308 # ressort. With it dotlock files can be created for any mailbox for
309 # which the invoking user has read (or read-write) permissions, and
310 # under the UID and GID of the mailbox itself! We call it -privsep.
311 # $OPT_DOTLOCK can be "require"d.
315 ## Normal users should not need to read any further
317 ## PATHS AND PROGRAMS, DEVELOPMENT ##
319 # To ease the life of forkers and packagers "our" name can be changed.
320 # The name is build by concatenating $VAL_SID and $VAL_NAIL, i.e.,
321 # $(VAL_SID)$(VAL_NAIL). Note that the final string must be longer than
322 # tww characters and may not contain any whitespace.
326 # The name of the exemplary resource template.
327 # Note 1: not overwritten by "make install" if yet existent!
328 VAL_SYSCONFRC="${VAL_SID}${VAL_NAIL}.rc"
330 ## FEATURE SET, DEVELOPMENT ##
332 # Use debug compiler flags, enable some additional commands and code
333 # assertions. Note that setting this also enables our own memory
334 # canaries, which require a rather large amount of runtime memory, and
335 # forcefully disables alloca(3) stack memory usage (see $OPT_NOALLOCA
336 # below), so as to be able to track usage of "stack memory" via our
340 # Experimental code etc.
341 # Note: this will be forcefully set (again) if $OPT_DEBUG=yes.
344 # We use the crypto libraries' MD5 implementation if possible, unless..
347 # The codebase makes a lot of use of alloca(3), and this will remain
348 # since S-nail will continue to be compliant to ISO C89, which has no
349 # variable ("flexible", sigh) arrays, etc. For testing purposes it is
350 # however nice to use the much slower normal S-nail heap memory
352 # Note: this will be forcefully set (again) if $OPT_DEBUG=yes.
353 OPT_NOALLOCA="${OPT_DEBUG}"
355 # If $OPT_DEBUG is true we'll use a simple memory wrapper with
356 # canaries. This interferes with memory debuggers like valgrind(1) or
357 # the LLVM -fsanitize stuff. Enable this to not use our wrapper.
360 # Our functions are instrumented with Not-Yet-Dead chirps, which print
361 # a function call trace when the program crashes. Whereas NYD will be
362 # used automatically when either of $OPT_DEBUG and $OPT_DEVEL is
363 # defined, an extended level of NYD is compiled in only on explicit
365 # TODO Separation in between NYD and NYD2 not yet fully done.
368 # With $OPT_AUTOCC we will use stack protector guards shall the
369 # detected compiler support them; this goes in line with our own (heap)
370 # memory canaries and will detect buffer overflows. It is usually only
371 # useful during development, i.e., in a debug environment that tests all
372 # aspects of a program.
373 OPT_FORCED_STACKPROT=`\
374 if feat_yes DEVEL || feat_yes DEBUG; then \
380 # vim:set tw=72: s-it-mode