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.
Showing
13 changed files
with
367 additions
and
27 deletions
... | @@ -54,7 +54,9 @@ SUBDIRS = \ | ... | @@ -54,7 +54,9 @@ SUBDIRS = \ |
54 | movemail\ | 54 | movemail\ |
55 | mimeview | 55 | mimeview |
56 | 56 | ||
57 | EXTRA_DIST = COPYING.LESSER | 57 | EXTRA_DIST = COPYING.LESSER paths |
58 | |||
59 | DISTCLEANFILES = pathdefs.h | ||
58 | 60 | ||
59 | gen_start_date = | 61 | gen_start_date = |
60 | prev_change_log = | 62 | prev_change_log = | ... | ... |
am/config_paths.m4
0 → 100644
1 | #serial 1 | ||
2 | dnl Copyright (C) 1996, 1997, 1998, 2002, 2004, 2005, 2007, | ||
3 | dnl 2009 Free Software Foundation, Inc. | ||
4 | dnl | ||
5 | dnl Written by Miles Bader <miles@gnu.ai.mit.edu> and | ||
6 | dnl Sergey Poznyakoff <gray@gnu.org> | ||
7 | dnl | ||
8 | dnl This program is free software; you can redistribute it and/or modify | ||
9 | dnl it under the terms of the GNU General Public License as published by | ||
10 | dnl the Free Software Foundation; either version 3, or (at your option) | ||
11 | dnl any later version. | ||
12 | dnl | ||
13 | dnl This program is distributed in the hope that it will be useful, | ||
14 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | dnl GNU General Public License for more details. | ||
17 | dnl | ||
18 | dnl You should have received a copy of the GNU General Public License | ||
19 | dnl along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
20 | dnl | ||
21 | |||
22 | dnl MU_CONFIG_PATHS -- Configure system paths for use by programs | ||
23 | dnl $1 - PATHS -- The file to read containing the paths | ||
24 | dnl $2 - HDRDEFS -- The file to put the generated C defines into | ||
25 | dnl $3 - MAKEDEFS -- [OPTIONAL] The file to put the generated | ||
26 | dnl make `PATHDEF_' vars | ||
27 | dnl | ||
28 | dnl From the paths listed in the file PATHS, generate a C header file | ||
29 | dnl HDRDEFS, containing the necessary #define statements. | ||
30 | dnl | ||
31 | dnl Additionally, if MAKEDEFS is supplied, populate this file with | ||
32 | dnl make variables. A variable for each PATH_FOO will be called | ||
33 | dnl PATHDEF_FOO and will be set to a cpp option to define that path, | ||
34 | dnl unless it is to be defined using a system define. | ||
35 | dnl | ||
36 | dnl Use of MAKEDEFS is recommended if any of the settings from PATHS refer | ||
37 | dnl to environment or make variables. | ||
38 | dnl | ||
39 | |||
40 | AC_DEFUN([MU_CONFIG_PATHS], [ | ||
41 | dnl We need to know if we're cross compiling. | ||
42 | AC_REQUIRE([AC_PROG_CC]) | ||
43 | |||
44 | AC_CHECK_HEADER(paths.h, AC_DEFINE(HAVE_PATHS_H, 1, | ||
45 | [Define if you have the <paths.h> header file]) mu_paths_h="<paths.h>") | ||
46 | |||
47 | dnl A slightly bogus use of AC_ARG_WITH; we never actually use | ||
48 | dnl $with_PATHVAR, we just want to get this entry put into the help list. | ||
49 | dnl We actually look for `with_' variables corresponding to each path | ||
50 | dnl configured. | ||
51 | AC_ARG_WITH([PATHVAR], | ||
52 | AC_HELP_STRING([--with-PATHVAR=PATH], | ||
53 | [Set the value of PATHVAR to PATH | ||
54 | PATHVAR is the name of a \`PATH_FOO' variable, | ||
55 | downcased, with \`_' changed to \`-'])) | ||
56 | |||
57 | # For case-conversion with sed | ||
58 | MU_UCASE=ABCDEFGHIJKLMNOPQRSTUVWXYZ | ||
59 | mu_lcase=abcdefghijklmnopqrstuvwxyz | ||
60 | |||
61 | tmpdir="$TMPDIR" | ||
62 | test x"$tmpdir" = x && tmpdir="/tmp" | ||
63 | mu_cache_file="$tmpdir/,mu-path-cache.$$" | ||
64 | mu_tmp_file="$tmpdir/,mu-tmp.$$" | ||
65 | ac_clean_files="$ac_clean_files $mu_cache_file $mu_tmp_file" | ||
66 | while read mu_path mu_search; do | ||
67 | test "$mu_path" = "#" -o -z "$mu_path" && continue | ||
68 | |||
69 | mu_pathvar="`echo $mu_path | sed y/${MU_UCASE}/${mu_lcase}/`" | ||
70 | AC_MSG_CHECKING(for value of $mu_path) | ||
71 | |||
72 | mu_val='' mu_hdr='' mu_sym='' | ||
73 | mu_cached='' mu_defaulted='' | ||
74 | mu_cross_conflict='' | ||
75 | if test "`eval echo '$'{with_$mu_pathvar+set}`" = set; then | ||
76 | # User-supplied value | ||
77 | eval mu_val=\"'$'with_$mu_pathvar\" | ||
78 | elif test "`eval echo '$'{mailutils_cv_$mu_pathvar+set}`" = set; then | ||
79 | # Cached value | ||
80 | eval mu_val=\"'$'mailutils_cv_$mu_pathvar\" | ||
81 | # invert escaped $(...) notation used in autoconf cache | ||
82 | eval mu_val=\"\`echo \'"$mu_val"\' \| sed \''s/@(/$\(/g'\'\`\" | ||
83 | mu_cached="(cached) " | ||
84 | elif test "`eval echo '$'{mailutils_cv_hdr_$mu_pathvar+set}`" = set; then | ||
85 | # Cached non-value | ||
86 | eval mu_hdr=\"'$'mailutils_cv_hdr_$mu_pathvar\" | ||
87 | eval mu_sym=\"'$'mailutils_cv_hdr_sym_$mu_pathvar\" | ||
88 | mu_cached="(cached) " | ||
89 | else | ||
90 | # search for a reasonable value | ||
91 | |||
92 | mu_test_type=r # `exists' | ||
93 | mu_default='' mu_prev_cross_test='' | ||
94 | for mu_try in $mu_paths_h $mu_search; do | ||
95 | mu_cross_test='' | ||
96 | case "$mu_try" in | ||
97 | "<"*">"*) | ||
98 | # <HEADER.h> and <HEADER.h>:SYMBOL -- look for SYMBOL in <HEADER.h> | ||
99 | # SYMBOL defaults to _$mu_path (e.g., _PATH_FOO) | ||
100 | changequote(,) dnl Avoid problems with [ ] in regexps | ||
101 | eval mu_hdr=\'`echo "$mu_try" |sed 's/:.*$//'`\' | ||
102 | eval mu_sym=\'`echo "$mu_try" |sed -n 's/^<[^>]*>:\(.*\)$/\1/p'`\' | ||
103 | changequote([,]) | ||
104 | test "$mu_sym" || mu_sym="_$mu_path" | ||
105 | AC_EGREP_CPP(HAVE_$mu_sym, | ||
106 | [#include ]$mu_hdr[ | ||
107 | #ifdef $mu_sym | ||
108 | HAVE_$mu_sym | ||
109 | #endif], | ||
110 | :, mu_hdr='' mu_sym='') | ||
111 | ;; | ||
112 | |||
113 | search:*) | ||
114 | # Do a path search. The syntax here is: search:NAME[:PATH]... | ||
115 | |||
116 | # Path searches always generate potential conflicts | ||
117 | test "$cross_compiling" = yes && { mu_cross_conflict=yes; continue; } | ||
118 | |||
119 | changequote(,) dnl Avoid problems with [ ] in regexps | ||
120 | mu_name="`echo $mu_try | sed 's/^search:\([^:]*\).*$/\1/'`" | ||
121 | mu_spath="`echo $mu_try | sed 's/^search:\([^:]*\)//'`" | ||
122 | changequote([,]) | ||
123 | |||
124 | test "$mu_spath" || mu_spath="$PATH" | ||
125 | |||
126 | for mu_dir in `echo "$mu_spath" | sed 'y/:/ /'`; do | ||
127 | test -z "$mu_dir" && mu_dir=. | ||
128 | if test -$mu_test_type "$mu_dir/$mu_name"; then | ||
129 | mu_val="$mu_dir/$mu_name" | ||
130 | break | ||
131 | fi | ||
132 | done | ||
133 | ;; | ||
134 | |||
135 | no) mu_default=no;; | ||
136 | x|d|f|c|b) mu_test_type=$mu_try;; | ||
137 | |||
138 | *) | ||
139 | # Just try the given name, with make-var substitution. Besides | ||
140 | # yielding a value if found, this also sets the default. | ||
141 | |||
142 | case "$mu_try" in "\""*"\"") | ||
143 | # strip off quotes | ||
144 | mu_try="`echo $mu_try | sed -e 's/^.//' -e 's/.$//'`" | ||
145 | esac | ||
146 | |||
147 | test -z "$mu_default" && mu_default="$mu_try" | ||
148 | test "$cross_compiling" = yes && { mu_cross_test=yes; continue; } | ||
149 | |||
150 | # See if the value begins with a $(FOO)/${FOO} make variable | ||
151 | # corresponding to a shell variable, and if so set try_exp to the | ||
152 | # value thereof. Recurse. | ||
153 | mu_try_exp="$mu_try" | ||
154 | changequote(,) | ||
155 | mu_try_var="`echo "$mu_try_exp" |sed -n 's;^\$[({]\([-_a-zA-Z]*\)[)}].*;\1;p'`" | ||
156 | while eval test \"$mu_try_var\" && eval test '${'$mu_try_var'+set}'; do | ||
157 | # yes, and there's a corresponding shell variable, which substitute | ||
158 | if eval test \"'$'"$mu_try_var"\" = NONE; then | ||
159 | # Not filled in by configure yet | ||
160 | case "$mu_try_var" in | ||
161 | prefix | exec_prefix) | ||
162 | mu_try_exp="$ac_default_prefix`echo "$mu_try_exp" |sed 's;^\$[({][-_a-zA-Z]*[)}];;'`";; | ||
163 | esac | ||
164 | mu_try_var='' # Stop expansion here | ||
165 | else | ||
166 | # Use the actual value of the shell variable | ||
167 | eval mu_try_exp=\"`echo "$mu_try_exp" |sed 's;^\$[({]\([-_a-zA-Z]*\)[)}];\$\1;'`\" | ||
168 | mu_try_var="`echo "$mu_try_exp" |sed -n 's;^\$[({]\([-_a-zA-Z]*\)[)}].*;\1;p'`" | ||
169 | fi | ||
170 | done | ||
171 | changequote([,]) | ||
172 | |||
173 | test -$mu_test_type "$mu_try_exp" && mu_val="$mu_try" | ||
174 | ;; | ||
175 | |||
176 | esac | ||
177 | |||
178 | test "$mu_val" -o "$mu_hdr" && break | ||
179 | test "$mu_cross_test" -a "$mu_prev_cross_test" && mu_cross_conflict=yes | ||
180 | mu_prev_cross_test=$mu_cross_test | ||
181 | done | ||
182 | |||
183 | if test -z "$mu_val" -a -z "$mu_hdr"; then | ||
184 | if test -z "$mu_default"; then | ||
185 | mu_val=no | ||
186 | else | ||
187 | mu_val="$mu_default" | ||
188 | mu_defaulted="(default) " | ||
189 | fi | ||
190 | fi | ||
191 | fi | ||
192 | |||
193 | if test "$mu_val"; then | ||
194 | AC_MSG_RESULT(${mu_cached}${mu_defaulted}$mu_val) | ||
195 | test "$mu_cross_conflict" -a "$mu_defaulted" \ | ||
196 | && AC_MSG_WARN(may be incorrect because of cross-compilation) | ||
197 | # Put the value in the autoconf cache. We replace $( with @( to avoid | ||
198 | # variable evaluation problems when autoconf reads the cache later. | ||
199 | echo mailutils_cv_$mu_pathvar=\'"`echo "$mu_val" | sed 's/\$(/@(/g'`"\' | ||
200 | elif test "$mu_hdr"; then | ||
201 | AC_MSG_RESULT(${mu_cached}from $mu_sym in $mu_hdr) | ||
202 | echo mailutils_cv_hdr_$mu_pathvar=\'"$mu_hdr"\' | ||
203 | echo mailutils_cv_hdr_sym_$mu_pathvar=\'"$mu_sym"\' | ||
204 | fi | ||
205 | done <[$1] >$mu_cache_file | ||
206 | |||
207 | # Read the cache values constructed by the previous loop, | ||
208 | . $mu_cache_file | ||
209 | |||
210 | # Generate a file of #ifdefs that defaults PATH_FOO macros to _PATH_FOO (or | ||
211 | # some other symbol) (excluding any who's value is set to `no'). | ||
212 | while read mu_cache_set; do | ||
213 | mu_sym_var="`echo "$mu_cache_set" | sed 's/=.*$//'`" | ||
214 | eval mu_sym_value=\"'$'"$mu_sym_var"\" | ||
215 | case $mu_sym_var in | ||
216 | mailutils_cv_hdr_sym_*) | ||
217 | mu_path="`echo $mu_sym_var | sed -e 's/^mailutils_cv_hdr_sym_//' -e y/${mu_lcase}/${MU_UCASE}/`" | ||
218 | ;; | ||
219 | mailutils_cv_path_*) | ||
220 | mu_path="PATH_`echo $mu_sym_var | sed -e 's/^mailutils_cv_path_//' -e y/${mu_lcase}/${MU_UCASE}/`" | ||
221 | s=`echo "$mu_sym_value" | sed 's/[[^@\$]]//g'` | ||
222 | if test -n "$s"; then | ||
223 | continue | ||
224 | fi | ||
225 | mu_sym_value="\"$mu_sym_value\"" | ||
226 | ;; | ||
227 | *) | ||
228 | continue;; | ||
229 | esac | ||
230 | cat <<EOF | ||
231 | #ifndef $mu_path | ||
232 | #define $mu_path $mu_sym_value | ||
233 | #endif | ||
234 | EOF | ||
235 | done < $mu_cache_file >$[$2] | ||
236 | AC_SUBST_FILE([$2]) | ||
237 | |||
238 | m4_if([$3],[],[],[ | ||
239 | # Construct the pathdefs file -- a file of make variable definitions, of | ||
240 | # the form PATHDEF_FOO, that contain cc -D switches to define the cpp macro | ||
241 | # PATH_FOO. | ||
242 | grep -v '^mailutils_cv_hdr_' < $mu_cache_file | \ | ||
243 | while read mu_cache_set; do | ||
244 | mu_var="`echo $mu_cache_set | sed 's/=.*$//'`" | ||
245 | eval mu_val=\"'$'"$mu_var"\" | ||
246 | # invert escaped $(...) notation used in autoconf cache | ||
247 | eval mu_val=\"\`echo \'"$mu_val"\' \| sed \''s/@(/$\(/g'\'\`\" | ||
248 | if test "$mu_val" != no; then | ||
249 | mu_path="`echo $mu_var | sed -e 's/^mailutils_cv_//' -e y/${mu_lcase}/${MU_UCASE}/`" | ||
250 | mu_pathdef="`echo $mu_path | sed 's/^PATH_/PATHDEF_/'`" | ||
251 | echo $mu_pathdef = -D$mu_path='\"'"$mu_val"'\"' | ||
252 | fi | ||
253 | done >$[$3] | ||
254 | AC_SUBST_FILE([$3]) | ||
255 | ]) ]) |
... | @@ -324,17 +324,14 @@ if test "x$MU_CONF_MAILDIR" != x; then | ... | @@ -324,17 +324,14 @@ if test "x$MU_CONF_MAILDIR" != x; then |
324 | AC_DEFINE_UNQUOTED(MU_CONF_MAILDIR,$MU_CONF_MAILDIR, | 324 | AC_DEFINE_UNQUOTED(MU_CONF_MAILDIR,$MU_CONF_MAILDIR, |
325 | [Pathname of the mail spool directory]) | 325 | [Pathname of the mail spool directory]) |
326 | fi | 326 | fi |
327 | AH_BOTTOM([ | 327 | |
328 | #ifdef HAVE_PATHS_H | 328 | PATHDEFS_H=pathdefs.h |
329 | # include <paths.h> | 329 | MU_CONFIG_PATHS($srcdir/paths,PATHDEFS_H) |
330 | #endif | 330 | |
331 | #ifndef _PATH_MAILDIR | 331 | AH_BOTTOM( |
332 | # if (defined(sun) && defined(__svr4__)) || defined(__SVR4) | 332 | [/* Defaults for PATH_ variables. */ |
333 | # define _PATH_MAILDIR "/var/mail" | 333 | #include <confpaths.h> |
334 | # else | 334 | |
335 | # define _PATH_MAILDIR "/usr/spool/mail" | ||
336 | # endif | ||
337 | #endif | ||
338 | #ifdef MU_CONF_MAILDIR | 335 | #ifdef MU_CONF_MAILDIR |
339 | # define MU_PATH_MAILDIR MU_CONF_MAILDIR | 336 | # define MU_PATH_MAILDIR MU_CONF_MAILDIR |
340 | #else | 337 | #else |
... | @@ -1291,7 +1288,9 @@ status_sendmail=$mu_cv_enable_sendmail | ... | @@ -1291,7 +1288,9 @@ status_sendmail=$mu_cv_enable_sendmail |
1291 | ]) | 1288 | ]) |
1292 | 1289 | ||
1293 | dnl Output Makefiles | 1290 | dnl Output Makefiles |
1294 | AC_CONFIG_FILES([Makefile | 1291 | AC_CONFIG_FILES([ |
1292 | include/confpaths.h | ||
1293 | Makefile | ||
1295 | sql/Makefile | 1294 | sql/Makefile |
1296 | comsat/Makefile | 1295 | comsat/Makefile |
1297 | config/Makefile | 1296 | config/Makefile | ... | ... |
include/confpaths.h.in
0 → 100644
1 | /* utmp.c -- Replacements for {set,get,end}utmp functions | 1 | /* utmp.c -- Replacements for {set,get,end}utmp functions |
2 | 2 | ||
3 | Copyright (C) 2002 Free Software Foundation, Inc. | 3 | Copyright (C) 2002, 2009 Free Software Foundation, Inc. |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or | 5 | This program is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU General Public License as | 6 | modify it under the terms of the GNU General Public License as |
... | @@ -28,7 +28,7 @@ MA 02110-1301 USA. */ | ... | @@ -28,7 +28,7 @@ MA 02110-1301 USA. */ |
28 | #include <string.h> | 28 | #include <string.h> |
29 | #include <stdio.h> | 29 | #include <stdio.h> |
30 | 30 | ||
31 | static char *utmp_name = _PATH_UTMP; | 31 | static char *utmp_name = PATH_UTMP; |
32 | static int fd = -1; | 32 | static int fd = -1; |
33 | static struct utmp ut; | 33 | static struct utmp ut; |
34 | 34 | ... | ... |
1 | /* GNU Mailutils -- a suite of utilities for electronic mail | 1 | /* GNU Mailutils -- a suite of utilities for electronic mail |
2 | Copyright (C) 1999, 2000, 2001, 2005, 2006, 2007 Free Software Foundation, Inc. | 2 | Copyright (C) 1999, 2000, 2001, 2005, 2006, 2007, |
3 | 2009 Free Software Foundation, Inc. | ||
3 | 4 | ||
4 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
5 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
... | @@ -18,8 +19,8 @@ | ... | @@ -18,8 +19,8 @@ |
18 | 19 | ||
19 | #include "mu_scm.h" | 20 | #include "mu_scm.h" |
20 | 21 | ||
21 | #ifndef _PATH_SENDMAIL | 22 | #ifndef PATH_SENDMAIL |
22 | # define _PATH_SENDMAIL "/usr/lib/sendmail" | 23 | # define PATH_SENDMAIL "/usr/lib/sendmail" |
23 | #endif | 24 | #endif |
24 | 25 | ||
25 | void | 26 | void |
... | @@ -190,7 +191,7 @@ mu_scm_init () | ... | @@ -190,7 +191,7 @@ mu_scm_init () |
190 | { | 191 | { |
191 | int i; | 192 | int i; |
192 | 193 | ||
193 | _mu_scm_mailer = scm_makfrom0str ("sendmail:" _PATH_SENDMAIL); | 194 | _mu_scm_mailer = scm_makfrom0str ("sendmail:" PATH_SENDMAIL); |
194 | mu_set_variable ("mu-mailer", _mu_scm_mailer); | 195 | mu_set_variable ("mu-mailer", _mu_scm_mailer); |
195 | 196 | ||
196 | _mu_scm_debug = mu_scm_makenum(0); | 197 | _mu_scm_debug = mu_scm_makenum(0); | ... | ... |
... | @@ -58,7 +58,7 @@ _url_sendmail_init (mu_url_t url) | ... | @@ -58,7 +58,7 @@ _url_sendmail_init (mu_url_t url) |
58 | return EINVAL; | 58 | return EINVAL; |
59 | 59 | ||
60 | if (url->path == 0) | 60 | if (url->path == 0) |
61 | if ((url->path = strdup (_PATH_SENDMAIL)) == 0) | 61 | if ((url->path = strdup (PATH_SENDMAIL)) == 0) |
62 | return ENOMEM; | 62 | return ENOMEM; |
63 | 63 | ||
64 | return 0; | 64 | return 0; | ... | ... |
1 | /* GNU Mailutils -- a suite of utilities for electronic mail | 1 | /* GNU Mailutils -- a suite of utilities for electronic mail |
2 | Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, | 2 | Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, |
3 | 2005, 2006, 2007 Free Software Foundation, Inc. | 3 | 2005, 2006, 2007, 2009 Free Software Foundation, Inc. |
4 | 4 | ||
5 | GNU Mailutils is free software; you can redistribute it and/or modify | 5 | GNU Mailutils is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
... | @@ -341,8 +341,8 @@ main (int argc, char **argv) | ... | @@ -341,8 +341,8 @@ main (int argc, char **argv) |
341 | /* Set the default mailer to sendmail. */ | 341 | /* Set the default mailer to sendmail. */ |
342 | { | 342 | { |
343 | char *mailer_name = alloca (strlen ("sendmail:") | 343 | char *mailer_name = alloca (strlen ("sendmail:") |
344 | + strlen (_PATH_SENDMAIL) + 1); | 344 | + strlen (PATH_SENDMAIL) + 1); |
345 | sprintf (mailer_name, "sendmail:%s", _PATH_SENDMAIL); | 345 | sprintf (mailer_name, "sendmail:%s", PATH_SENDMAIL); |
346 | util_setenv ("sendmail", mailer_name, Mail_env_string, 1); | 346 | util_setenv ("sendmail", mailer_name, Mail_env_string, 1); |
347 | } | 347 | } |
348 | 348 | ... | ... |
... | @@ -416,10 +416,6 @@ void compose_destroy (compose_env_t *env); | ... | @@ -416,10 +416,6 @@ void compose_destroy (compose_env_t *env); |
416 | extern char *readline (char *prompt); | 416 | extern char *readline (char *prompt); |
417 | #endif | 417 | #endif |
418 | 418 | ||
419 | #ifndef _PATH_SENDMAIL | ||
420 | #define _PATH_SENDMAIL "/usr/lib/sendmail" | ||
421 | #endif | ||
422 | |||
423 | /* Flags for util_get_message */ | 419 | /* Flags for util_get_message */ |
424 | #define MSG_ALL 0 | 420 | #define MSG_ALL 0 |
425 | #define MSG_NODELETED 0x0001 | 421 | #define MSG_NODELETED 0x0001 | ... | ... |
paths
0 → 100644
1 | # Paths for GNU Mailutils | ||
2 | # | ||
3 | # Copyright (C) 2009 Free Software Foundation, Inc. | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 3, or (at your option) | ||
8 | # any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | # GNU General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | |||
18 | # | ||
19 | # This file describes how to set various paths used by libraries and | ||
20 | # programs in GNU Mailutils. | ||
21 | # | ||
22 | # The rules that determine what a given PATH_FOO define expands to are: | ||
23 | # (1) If the user specifies --with-path-foo, that value is used. | ||
24 | # (2) If _PATH_FOO is defined in <paths.h>, that value is used. | ||
25 | # (3) The lines below are consulted. They are whitespace-separated | ||
26 | # lists of things to try, in order. The various sorts of entries are: | ||
27 | # | ||
28 | # "value" -- If a file VALUE exists, use VALUE; if no default yet, set | ||
29 | # it to VALUE. If VALUE begins with a make-variable of the | ||
30 | # form `$(NAME)' and a corresponding shell-variable $NAME | ||
31 | # exists at configure time, the value of $NAME is substituted | ||
32 | # for the $(NAME) for testing (but not subsitution) purposes. | ||
33 | # test:T -- Use `test -T' to test for file existance | ||
34 | # x -- The same as test:x | ||
35 | # d -- The same as test:d | ||
36 | # c -- The same as test:c | ||
37 | # b -- The same as test:b | ||
38 | # <ach.h>:SYMBOL | ||
39 | # -- If SYMBOL is defined in <ack.h>, use SYM | ||
40 | # <ack.h> -- The same as <ack.h>:_PATH_FOO | ||
41 | # search:NAME:PATH | ||
42 | # -- Search for NAME in the colon-separated path PATH, and use | ||
43 | # the first thing found; if the `:PATH' is omitted, it | ||
44 | # uses the environment variable $PATH | ||
45 | # no -- Set the default to `no' (even if there's already a default). | ||
46 | # FILE -- The same as "FILE" (the quoted syntax only need be used if | ||
47 | # the contents could match one of the special syntaxes) | ||
48 | # | ||
49 | # If cross-compiling then every file-existence test is made to fail | ||
50 | # (regardless of what exists on the compilation system), forcing | ||
51 | # defaults to be used for paths not defined in any header file. A | ||
52 | # warning message is printed by configure in this case, as the user may | ||
53 | # have to define many paths by hand. | ||
54 | # | ||
55 | # If none of the things in the list matches a real file, the default is | ||
56 | # used, or `no' if there is none (this means that no path may ever have | ||
57 | # the value `no', but that's probably not a severe problem). | ||
58 | # | ||
59 | # (4) If the resulting value is the string `no', then PATH_FOO is never | ||
60 | # defined by any method (programs that use it should check that it's | ||
61 | # defined before using it). | ||
62 | # | ||
63 | # Programs wanting to use a particular path PATH_FOO should include the | ||
64 | # file <confpaths.h> (located in include/). | ||
65 | # | ||
66 | |||
67 | PATH_SENDMAIL search:sendmail:/usr/sbin:/usr/lib:/etc /usr/sbin/sendmail | ||
68 | PATH_MAILDIR d /var/mail /var/spool/mail | ||
69 | PATH_DEV d /dev/ | ||
70 | # PATH_TTY_PFX is a prefix that's removed to get a tty device's name | ||
71 | PATH_TTY_PFX <paths.h>:_PATH_DEV d /dev/ | ||
72 | PATH_DEVNULL c /dev/null | ||
73 | PATH_UTMP <utmp.h> <utmp.h>:UTMP_FILE $(localstatedir)/run/utmp search:utmp:/var/run:/var/adm:/etc | ||
74 | PATH_UTMPX <utmpx.h> <utmpx.h>:UTMPX_FILE $(localstatedir)/run/utmpx search:utmpx:/var/run:/var/adm:/etc | ||
75 | PATH_WTMP <utmp.h> <utmp.h>:WTMP_FILE $(localstatedir)/log/wtmp search:wtmp:/var/log:/var/adm:/etc | ||
76 | PATH_TTY c /dev/tty |
-
Please register or sign in to post a comment