]>
Commit | Line | Data |
---|---|---|
1bd25f33 | 1 | diff -Nru mutt-1.4.1.orig/doc/mutt.man mutt-1.4.1/doc/mutt.man |
2 | --- mutt-1.4.1.orig/doc/mutt.man Wed Jul 24 10:41:31 2002 | |
3 | +++ mutt-1.4.1/doc/mutt.man Wed Oct 8 20:11:11 2003 | |
4 | @@ -122,13 +122,13 @@ | |
5 | Specifies the editor to use when composing messages. | |
6 | .SH FILES | |
7 | .PP | |
8 | -.IP "~/.muttrc or ~/.mutt/muttrc" | |
9 | +.IP "$HOME_ETC/.muttrc" or "$HOME_ETC/.mutt/muttrc" or "~/.muttrc" or "~/.mutt/muttrc" | |
10 | User configuration file. | |
11 | .IP "/etc/Muttrc" | |
12 | System-wide configuration file. | |
13 | .IP "/tmp/muttXXXXXX" | |
14 | Temporary files created by Mutt. | |
15 | -.IP "~/.mailcap" | |
16 | +.IP "$HOME_ETC/.mailcap" or "~/.mailcap" | |
17 | User definition for handling non-text MIME types. | |
18 | .IP "/etc/mailcap" | |
19 | System definition for handling non-text MIME types. | |
20 | diff -Nur mutt-1.4.1.orig/init.c mutt-1.4.1/init.c | |
21 | --- mutt-1.4.1.orig/init.c Sun Dec 7 14:34:23 2003 | |
22 | +++ mutt-1.4.1/init.c Sun Dec 7 15:08:22 2003 | |
23 | @@ -25,6 +25,7 @@ | |
24 | #include "mbyte.h" | |
25 | #include "charset.h" | |
26 | ||
27 | +#include <home_etc.h> | |
28 | ||
29 | #ifdef HAVE_PGP | |
30 | #include "pgp.h" | |
31 | @@ -1892,13 +1893,13 @@ | |
cdf1731c TO |
32 | |
33 | if (!Muttrc) | |
34 | { | |
35 | - snprintf (buffer, sizeof(buffer), "%s/.muttrc-%s", NONULL(Homedir), MUTT_VERSION); | |
1bd25f33 | 36 | + snprintf (buffer, sizeof(buffer), "%s/.muttrc-%s", NONULL(_HEdir), MUTT_VERSION); |
cdf1731c | 37 | if (access(buffer, F_OK) == -1) |
1bd25f33 | 38 | - snprintf (buffer, sizeof(buffer), "%s/.muttrc", NONULL(Homedir)); |
39 | + snprintf (buffer, sizeof(buffer), "%s/.muttrc", NONULL(_HEdir)); | |
cdf1731c | 40 | if (access(buffer, F_OK) == -1) |
1bd25f33 | 41 | - snprintf (buffer, sizeof (buffer), "%s/.mutt/muttrc-%s", NONULL(Homedir), MUTT_VERSION); |
42 | + snprintf (buffer, sizeof (buffer), "%s/.mutt/muttrc-%s", NONULL(_HEdir), MUTT_VERSION); | |
43 | if (access(buffer, F_OK) == -1) | |
44 | - snprintf (buffer, sizeof (buffer), "%s/.mutt/muttrc", NONULL(Homedir)); | |
45 | + snprintf (buffer, sizeof (buffer), "%s/.mutt/muttrc", NONULL(_HEdir)); | |
46 | ||
47 | default_rc = 1; | |
48 | Muttrc = safe_strdup (buffer); | |
49 | diff -Nru mutt-1.4.1.orig/muttbug.sh.in mutt-1.4.1/muttbug.sh.in | |
50 | --- mutt-1.4.1.orig/muttbug.sh.in Wed Oct 8 19:33:11 2003 | |
51 | +++ mutt-1.4.1/muttbug.sh.in Wed Oct 8 20:19:05 2003 | |
52 | @@ -244,13 +244,21 @@ | |
53 | if test "$personal" = "yes" ; then | |
54 | CANDIDATES=".muttrc-${MUTTVERSION} .muttrc .mutt/muttrc-${MUTTVERSION} .mutt/muttrc" | |
55 | MATCHED="none" | |
56 | + if test -n "$HOME_ETC" ; then | |
57 | + for f in $CANDIDATES; do | |
58 | + if test -f "${HOME_ETC}/$f" ; then | |
59 | + MATCHED="${HOME_ETC}/$f" | |
60 | + break | |
61 | + fi | |
62 | + done | |
63 | + else | |
64 | for f in $CANDIDATES; do | |
65 | if test -f "${HOME}/$f" ; then | |
66 | MATCHED="${HOME}/$f" | |
67 | break | |
68 | fi | |
69 | done | |
70 | - | |
71 | + fi | |
72 | if test "$MATCHED" = "none" ; then | |
73 | echo "Warning: Can't find your personal .muttrc." >&2 | |
74 | else | |
75 | diff -Nur mutt-1.4.1.orig/sendlib.c mutt-1.4.1/sendlib.c | |
76 | --- mutt-1.4.1.orig/sendlib.c Sun Dec 7 14:34:23 2003 | |
77 | +++ mutt-1.4.1/sendlib.c Sun Dec 7 15:18:25 2003 | |
78 | @@ -40,6 +40,8 @@ | |
79 | #include <sys/wait.h> | |
80 | #include <fcntl.h> | |
81 | ||
82 | +#include <home_etc.h> | |
83 | + | |
84 | #ifdef HAVE_SYSEXITS_H | |
85 | #include <sysexits.h> | |
86 | #else /* Make sure EX_OK is defined <philiph@pobox.com> */ | |
87 | @@ -958,9 +960,9 @@ | |
88 | ||
89 | /* Given a file with path ``s'', see if there is a registered MIME type. | |
90 | * returns the major MIME type, and copies the subtype to ``d''. First look | |
91 | - * for ~/.mime.types, then look in a system mime.types if we can find one. | |
92 | - * The longest match is used so that we can match `ps.gz' when `gz' also | |
93 | - * exists. | |
94 | + * for either $HOME_ETC/.mime.types or ~/.mime.types, then look in a system | |
95 | + * mime.types if we can find one. The longest match is used so that we can | |
96 | + * match `ps.gz' when `gz' also exists. | |
97 | */ | |
98 | ||
99 | static int lookup_mime_type (BODY *att, const char *path) | |
100 | @@ -989,7 +991,7 @@ | |
101 | switch (count) | |
102 | { | |
103 | case 0: | |
104 | - snprintf (buf, sizeof (buf), "%s/.mime.types", NONULL(Homedir)); | |
105 | + snprintf (buf, sizeof (buf), "%s/.mime.types", NONULL(_HEdir)); | |
106 | break; | |
107 | case 1: | |
108 | strfcpy (buf, SYSCONFDIR"/mime.types", sizeof(buf)); | |
109 | diff -Nur mutt-1.4.1.orig/configure.in mutt-1.4.1/configure.in | |
110 | --- mutt-1.4.1.orig/configure.in Sun Dec 7 14:34:23 2003 | |
111 | +++ mutt-1.4.1/configure.in Sun Dec 7 18:38:04 2003 | |
112 | @@ -592,6 +592,29 @@ | |
113 | ]) | |
114 | AM_CONDITIONAL(USE_SASL, test x$need_sasl = xyes) | |
115 | ||
116 | +AC_ARG_WITH(home-etc, [ --with-home-etc[=PFX] Use HOME-ETC library to allow user keeping it's configuration files in a non-standard place ], | |
117 | + [ | |
118 | + if test "$with_home_etc" != "no" | |
119 | + then | |
120 | + if test "$with_home_etc" != "yes" | |
121 | + then | |
122 | + LDFLAGS="$LDFLAGS -L$with_home_etc/lib" | |
123 | + fi | |
124 | + | |
125 | + saved_LIBS="$LIBS" | |
126 | + | |
127 | + AC_CHECK_LIB(home_etc, get_home_etc_static,, | |
128 | + AC_MSG_ERROR([could not find libhome_etc]),) | |
129 | + | |
130 | + MUTTLIBS="$MUTTLIBS -lhome_etc" | |
131 | + LIBS="$saved_LIBS" | |
132 | + AC_DEFINE(USE_SASL,1, | |
133 | + [ Define if want to use the HOME-ETC library. ]) | |
134 | + need_home_etc=yes | |
135 | + fi | |
136 | + ]) | |
137 | +AM_CONDITIONAL(USE_HOME_ETC, test x$need_home_etc = xyes) | |
138 | + | |
139 | if test "$need_md5" = "yes" | |
140 | then | |
141 | MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS md5c.o" |