summaryrefslogtreecommitdiff
path: root/paths
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-07-06 14:20:28 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2009-07-06 14:20:28 +0300
commit56d50498700d28bb7bf3bab5e23973d29669e101 (patch)
treed38bb904f5891de23c4dd5a024319f8c3f3b1281 /paths
parentaee26e5868f31b5e6c5e3f9008da89df1253ecff (diff)
downloadmailutils-56d50498700d28bb7bf3bab5e23973d29669e101.tar.gz
mailutils-56d50498700d28bb7bf3bab5e23973d29669e101.tar.bz2
Define the necessary PATH_ constants.
* paths: New file. * am/config_paths.m4: New file. * include/confpaths.h.in: New file. * Makefile.am (EXTRA_DIST): Add paths. (DISTCLEANFILES): Add pathdefs.h * configure.ac: Invoke MU_CONFIG_PATHS (AC_CONFIG_FILES): Add include/confpaths.h * include/Makefile.am (EXTRA_DIST): Add confpaths.h.in * lib/utmp.c, libmu_scm/mu_scm.c, libproto/mailer/sendmail.c, mail/mail.c: Use PATH_* constants. * mail/mail.h: Remove definition of _PATH_SENDMAIL. * .gitignore, include/.gitignore: Update.
Diffstat (limited to 'paths')
-rw-r--r--paths76
1 files changed, 76 insertions, 0 deletions
diff --git a/paths b/paths
new file mode 100644
index 000000000..957eaeb84
--- /dev/null
+++ b/paths
@@ -0,0 +1,76 @@
+# Paths for GNU Mailutils
+#
+# Copyright (C) 2009 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+#
+# This file describes how to set various paths used by libraries and
+# programs in GNU Mailutils.
+#
+# The rules that determine what a given PATH_FOO define expands to are:
+# (1) If the user specifies --with-path-foo, that value is used.
+# (2) If _PATH_FOO is defined in <paths.h>, that value is used.
+# (3) The lines below are consulted. They are whitespace-separated
+# lists of things to try, in order. The various sorts of entries are:
+#
+# "value" -- If a file VALUE exists, use VALUE; if no default yet, set
+# it to VALUE. If VALUE begins with a make-variable of the
+# form `$(NAME)' and a corresponding shell-variable $NAME
+# exists at configure time, the value of $NAME is substituted
+# for the $(NAME) for testing (but not subsitution) purposes.
+# test:T -- Use `test -T' to test for file existance
+# x -- The same as test:x
+# d -- The same as test:d
+# c -- The same as test:c
+# b -- The same as test:b
+# <ach.h>:SYMBOL
+# -- If SYMBOL is defined in <ack.h>, use SYM
+# <ack.h> -- The same as <ack.h>:_PATH_FOO
+# search:NAME:PATH
+# -- Search for NAME in the colon-separated path PATH, and use
+# the first thing found; if the `:PATH' is omitted, it
+# uses the environment variable $PATH
+# no -- Set the default to `no' (even if there's already a default).
+# FILE -- The same as "FILE" (the quoted syntax only need be used if
+# the contents could match one of the special syntaxes)
+#
+# If cross-compiling then every file-existence test is made to fail
+# (regardless of what exists on the compilation system), forcing
+# defaults to be used for paths not defined in any header file. A
+# warning message is printed by configure in this case, as the user may
+# have to define many paths by hand.
+#
+# If none of the things in the list matches a real file, the default is
+# used, or `no' if there is none (this means that no path may ever have
+# the value `no', but that's probably not a severe problem).
+#
+# (4) If the resulting value is the string `no', then PATH_FOO is never
+# defined by any method (programs that use it should check that it's
+# defined before using it).
+#
+# Programs wanting to use a particular path PATH_FOO should include the
+# file <confpaths.h> (located in include/).
+#
+
+PATH_SENDMAIL search:sendmail:/usr/sbin:/usr/lib:/etc /usr/sbin/sendmail
+PATH_MAILDIR d /var/mail /var/spool/mail
+PATH_DEV d /dev/
+# PATH_TTY_PFX is a prefix that's removed to get a tty device's name
+PATH_TTY_PFX <paths.h>:_PATH_DEV d /dev/
+PATH_DEVNULL c /dev/null
+PATH_UTMP <utmp.h> <utmp.h>:UTMP_FILE $(localstatedir)/run/utmp search:utmp:/var/run:/var/adm:/etc
+PATH_UTMPX <utmpx.h> <utmpx.h>:UTMPX_FILE $(localstatedir)/run/utmpx search:utmpx:/var/run:/var/adm:/etc
+PATH_WTMP <utmp.h> <utmp.h>:WTMP_FILE $(localstatedir)/log/wtmp search:wtmp:/var/log:/var/adm:/etc
+PATH_TTY c /dev/tty

Return to:

Send suggestions and report system problems to the System administrator.