summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--acconfig.h25
-rw-r--r--attach.c6
-rw-r--r--commands.c28
-rw-r--r--compose.c16
-rw-r--r--configure.in34
-rw-r--r--copy.c6
-rw-r--r--copy.h2
-rw-r--r--curs_main.c18
-rw-r--r--functions.h12
-rw-r--r--globals.h2
-rw-r--r--handler.c18
-rw-r--r--hdrline.c4
-rw-r--r--headers.c4
-rw-r--r--hook.c10
-rw-r--r--imap/message.c6
-rw-r--r--init.c6
-rw-r--r--init.h18
-rw-r--r--keymap.c6
-rw-r--r--keymap.h6
-rw-r--r--main.c38
-rw-r--r--mutt.h16
-rw-r--r--muttlib.c10
-rw-r--r--mx.c6
-rw-r--r--pager.c16
-rw-r--r--parse.c8
-rw-r--r--pattern.c10
-rw-r--r--pgp.c4
-rw-r--r--pgp.h4
-rw-r--r--pgpkey.c4
-rw-r--r--pgplib.h4
-rw-r--r--postpone.c14
-rw-r--r--protos.h4
-rw-r--r--recvattach.c20
-rw-r--r--send.c58
-rw-r--r--sendlib.c30
-rw-r--r--sort.h2
37 files changed, 205 insertions, 272 deletions
diff --git a/Makefile.am b/Makefile.am
index b2789f1c..f4ef76f7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -152,7 +152,7 @@ us-distdir: distdir dist-hook
us-dist: us-distdir
for file in $(distdir)-us/*.c $(distdir)-us/*.h ; do \
- $(srcdir)/reap.pl _PGPPATH < $$file | $(srcdir)/reap.pl MIXMASTER | $(srcdir)/reap.pl USE_SSL > $$file.n && rm $$file && mv $$file.n $$file ; \
+ $(srcdir)/reap.pl HAVE_PGP < $$file | $(srcdir)/reap.pl MIXMASTER | $(srcdir)/reap.pl USE_SSL > $$file.n && rm $$file && mv $$file.n $$file ; \
done
for file in $(non_us_sources) ; do \
echo "/* This file is only available in the international mutt version */" \
diff --git a/acconfig.h b/acconfig.h
index 0b19d122..963f0880 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -14,9 +14,6 @@
/* Enable debugging info */
#define DEBUG
-/* Does your version of PGP support the PGPPASSFD environment variable? */
-#define HAVE_PGPPASSFD
-
/* What is your domain name? */
#undef DOMAIN
@@ -71,26 +68,8 @@
/* Where to find sendmail on your system */
#undef SENDMAIL
-/* Where is PGP located on your system? */
-#undef _PGPPATH
-
-/* Where is PGP 2.* located on your system? */
-#undef _PGPV2PATH
-
-/* Where is PGP 5 located on your system? */
-#undef _PGPV3PATH
-
-/* Where is GNU Privacy Guard located on your system? */
-#undef _PGPGPGPATH
-
-/* Do we have PGP 2.*? */
-#undef HAVE_PGP2
-
-/* Do we have PGP 5.0 or up? */
-#undef HAVE_PGP5
-
-/* Do we have GPG? */
-#undef HAVE_GPG
+/* Do you want PGP support (--enable-pgp)? */
+#undef HAVE_PGP
/* Where to find ispell on your system? */
#undef ISPELL
diff --git a/attach.c b/attach.c
index 2e095729..fff84944 100644
--- a/attach.c
+++ b/attach.c
@@ -28,7 +28,7 @@
#include "copy.h"
#include "mx.h"
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
@@ -377,10 +377,10 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag, HEADER *hdr,
int unlink_tempfile = 0;
is_message = mutt_is_message_type(a->type, a->subtype);
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (is_message && a->hdr && (a->hdr->pgp & PGPENCRYPT) && !pgp_valid_passphrase())
return (rc);
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
use_mailcap = (flag == M_MAILCAP ||
(flag == M_REGULAR && mutt_needs_mailcap (a)));
snprintf (type, sizeof (type), "%s/%s", TYPE (a), a->subtype);
diff --git a/commands.c b/commands.c
index 481ae2ce..86eb5191 100644
--- a/commands.c
+++ b/commands.c
@@ -36,7 +36,7 @@
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
@@ -77,7 +77,7 @@ int mutt_display_message (HEADER *cur)
mutt_parse_mime_message (Context, cur);
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
/* see if PGP is needed for this message. if so, we should exit curses */
if (cur->pgp)
{
@@ -139,7 +139,7 @@ int mutt_display_message (HEADER *cur)
return (0);
}
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
/* update PGP information for this message */
cur->pgp |= pgp_query (cur->content);
#endif
@@ -148,7 +148,7 @@ int mutt_display_message (HEADER *cur)
{
pager_t info;
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (cur->pgp & PGPGOODSIGN)
mutt_message _("PGP signature successfully verified.");
#endif
@@ -277,7 +277,7 @@ int mutt_pipe_message (HEADER *h)
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (option (OPTPIPEDECODE))
{
mutt_parse_mime_message (Context, h);
@@ -299,7 +299,7 @@ int mutt_pipe_message (HEADER *h)
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if(option(OPTPIPEDECODE))
{
@@ -486,7 +486,7 @@ static void set_copy_flags (HEADER *hdr, int decode, int decrypt, int *cmflags,
*cmflags = 0;
*chflags = CH_UPDATE_LEN;
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (!decode && decrypt && (hdr->pgp & PGPENCRYPT))
{
if (mutt_is_multipart_encrypted(hdr->content))
@@ -538,7 +538,7 @@ int mutt_save_message (HEADER *h, int delete,
int decode, int decrypt, int *redraw)
{
int i, need_buffy_cleanup;
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
int need_passphrase = 0;
#endif
char prompt[SHORT_STRING], buf[_POSIX_PATH_MAX];
@@ -559,7 +559,7 @@ int mutt_save_message (HEADER *h, int delete,
if (h)
{
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
need_passphrase = h->pgp & PGPENCRYPT;
#endif
mutt_default_save (buf, sizeof (buf), h);
@@ -580,7 +580,7 @@ int mutt_save_message (HEADER *h, int delete,
if (h)
{
mutt_default_save (buf, sizeof (buf), h);
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
need_passphrase |= h->pgp & PGPENCRYPT;
#endif
h = NULL;
@@ -619,7 +619,7 @@ int mutt_save_message (HEADER *h, int delete,
return (-1);
}
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if(need_passphrase && (decode || decrypt) && !pgp_valid_passphrase())
return -1;
#endif
@@ -697,7 +697,7 @@ static void print_msg (FILE *fp, CONTEXT *ctx, HEADER *h)
chflags |= CH_WEED;
}
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (h->pgp & PGPENCRYPT)
{
if (!pgp_valid_passphrase ())
@@ -793,13 +793,13 @@ void mutt_edit_content_type (HEADER *h, BODY *b)
mutt_free_header (&b->hdr);
}
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (h)
{
if (h->content == b)
h->pgp = 0;
h->pgp |= pgp_query (b);
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
}
diff --git a/compose.c b/compose.c
index 73fe6338..bfe15027 100644
--- a/compose.c
+++ b/compose.c
@@ -57,7 +57,7 @@ enum
HDR_MIX,
#endif
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
HDR_PGP,
HDR_PGPSIGINFO,
#endif
@@ -102,7 +102,7 @@ static void snd_entry (char *b, size_t blen, MUTTMENU *menu, int num)
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
static void redraw_pgp_lines (int pgp)
@@ -201,7 +201,7 @@ static int pgp_send_menu (int bits, int *redraw)
redraw_pgp_lines (bits);
return (bits);
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
#ifdef MIXMASTER
@@ -293,9 +293,9 @@ static void draw_envelope (HEADER *msg, char *fcc)
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
redraw_pgp_lines (msg->pgp);
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
#ifdef MIXMASTER
redraw_mix_line (msg->chain);
@@ -547,7 +547,7 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
case OP_COMPOSE_ATTACH_KEY:
if (idxlen == idxmax)
@@ -1157,7 +1157,7 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
case OP_COMPOSE_PGP_MENU:
msg->pgp = pgp_send_menu (msg->pgp, &menu->redraw);
@@ -1168,7 +1168,7 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */
mutt_forget_passphrase ();
break;
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
#ifdef MIXMASTER
diff --git a/configure.in b/configure.in
index 97a62b75..eef1e1dd 100644
--- a/configure.in
+++ b/configure.in
@@ -64,35 +64,15 @@ if test -f $srcdir/EXPORTABLE ; then
SUBVERSION="us"
else
SUBVERSION="i"
- PGPPATH=no
- AC_PATH_PROG(GPG, gpg, no)
- if test $GPG != no ; then
- AC_DEFINE_UNQUOTED(_PGPGPGPATH, "$GPG")
- PGPPATH="$GPG"
- AC_DEFINE(HAVE_GPG)
- fi
-
- AC_PATH_PROG(PGPK, pgpk, no)
- if test $PGPK != no ; then
- PGPK=`echo $PGPK | sed 's,.$,,'`
- AC_DEFINE_UNQUOTED(_PGPV3PATH, "$PGPK")
- PGPPATH="$PGPK"
- AC_DEFINE(HAVE_PGP5)
- fi
-
- AC_PATH_PROG(PGP, pgp, no)
- if test $PGP != no ; then
- AC_DEFINE_UNQUOTED(_PGPV2PATH, "$PGP")
- PGPPATH="$PGP"
- AC_DEFINE(HAVE_PGP2)
- fi
-
- if test $PGPPATH != no ; then
- AC_DEFINE_UNQUOTED(_PGPPATH, "$PGPPATH")
- fi
+ AC_ARG_ENABLE(pgp, [ --disable-pgp Disable PGP support],
+ [ if test x$enableval = xno ; then
+ HAVE_PGP=no
+ fi
+ ])
- if test $PGP != no || test $PGPK != no || test $GPG != no ; then
+ if test x$HAVE_PGP != xno ; then
+ AC_DEFINE(HAVE_PGP)
PGPAUX_TARGET=pgpring
AM_CONDITIONAL(NEEDS_PGPEWRAP, true)
MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pgp.o pgpinvoke.o pgpkey.o pgplib.o gnupgparse.o"
diff --git a/copy.c b/copy.c
index 83dd543b..775ec004 100644
--- a/copy.c
+++ b/copy.c
@@ -24,7 +24,7 @@
#include "parse.h"
#include "mime.h"
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
@@ -510,14 +510,14 @@ _mutt_copy_message (FILE *fpout, FILE *fpin, HEADER *hdr, BODY *body,
if (flags & M_CM_CHARCONV)
s.flags |= M_CHARCONV;
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (flags & M_CM_VERIFY)
s.flags |= M_VERIFY;
#endif
mutt_body_handler (body, &s);
}
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
else if ((flags & M_CM_DECODE_PGP) && (hdr->pgp & PGPENCRYPT) &&
hdr->content->type == TYPEMULTIPART)
{
diff --git a/copy.h b/copy.h
index a9e2af5b..45038f52 100644
--- a/copy.h
+++ b/copy.h
@@ -26,7 +26,7 @@
#define M_CM_CHARCONV (1<<6) /* perform character set conversions */
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#define M_CM_DECODE_PGP (1<<7) /* used for decoding PGP messages */
#define M_CM_VERIFY (1<<8) /* do signature verification */
#endif
diff --git a/curs_main.c b/curs_main.c
index f8e2b537..e2fea866 100644
--- a/curs_main.c
+++ b/curs_main.c
@@ -31,7 +31,7 @@
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
@@ -1108,24 +1108,24 @@ int mutt_index_menu (void)
case OP_SAVE:
case OP_DECODE_COPY:
case OP_DECODE_SAVE:
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
case OP_DECRYPT_COPY:
case OP_DECRYPT_SAVE:
#endif
CHECK_MSGCOUNT;
if (mutt_save_message (tag ? NULL : CURHDR,
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
(op == OP_DECRYPT_SAVE) ||
#endif
(op == OP_SAVE) || (op == OP_DECODE_SAVE),
(op == OP_DECODE_SAVE) || (op == OP_DECODE_COPY),
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
(op == OP_DECRYPT_SAVE) || (op == OP_DECRYPT_COPY) ||
#endif
0,
&menu->redraw) == 0 &&
(op == OP_SAVE || op == OP_DECODE_SAVE
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
|| op == OP_DECRYPT_SAVE
#endif
))
@@ -1576,12 +1576,12 @@ int mutt_index_menu (void)
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
case OP_FORGET_PASSPHRASE:
mutt_forget_passphrase ();
break;
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
@@ -1614,7 +1614,7 @@ int mutt_index_menu (void)
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
case OP_MAIL_KEY:
CHECK_ATTACH;
@@ -1629,7 +1629,7 @@ int mutt_index_menu (void)
menu->redraw = REDRAW_FULL;
break;
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
diff --git a/functions.h b/functions.h
index df62df78..7384930c 100644
--- a/functions.h
+++ b/functions.h
@@ -132,7 +132,7 @@ struct binding_t OpMain[] = {
{ "parent-message", OP_MAIN_PARENT_MESSAGE, "P" },
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
{ "extract-keys", OP_EXTRACT_KEYS, "\013" },
{ "forget-passphrase", OP_FORGET_PASSPHRASE, "\006" },
{ "mail-key", OP_MAIL_KEY, "\033k" },
@@ -219,7 +219,7 @@ struct binding_t OpPager[] = {
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
{ "extract-keys", OP_EXTRACT_KEYS, "\013" },
{ "forget-passphrase",OP_FORGET_PASSPHRASE, "\006" },
{ "mail-key", OP_MAIL_KEY, "\033k" },
@@ -253,7 +253,7 @@ struct binding_t OpAttach[] = {
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
{ "extract-keys", OP_EXTRACT_KEYS, "\013" },
#endif
@@ -300,7 +300,7 @@ struct binding_t OpCompose[] = {
{ "send-message", OP_COMPOSE_SEND_MESSAGE, "y" },
{ "pipe-entry", OP_PIPE, "|" },
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
{ "attach-key", OP_COMPOSE_ATTACH_KEY, "\033k" },
{ "forget-passphrase",OP_FORGET_PASSPHRASE, "\006" },
{ "pgp-menu", OP_COMPOSE_PGP_MENU, "p" },
@@ -370,13 +370,13 @@ struct binding_t OpEditor[] = {
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
struct binding_t OpPgp[] = {
{ "verify-key", OP_VERIFY_KEY, "c" },
{ "view-name", OP_VIEW_ID, "%" },
{ NULL, 0, NULL }
};
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
#ifdef MIXMASTER
diff --git a/globals.h b/globals.h
index 4366f11c..81308c40 100644
--- a/globals.h
+++ b/globals.h
@@ -166,7 +166,7 @@ extern const char *Months[];
#include "mutt_regex.h"
#include "buffy.h"
#include "sort.h"
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
#endif /* MAIN_C */
diff --git a/handler.c b/handler.c
index 345020c6..91cc23d9 100644
--- a/handler.c
+++ b/handler.c
@@ -33,7 +33,7 @@
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
@@ -1011,7 +1011,7 @@ int mutt_can_decode (BODY *a)
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (mutt_strcasecmp (a->subtype, "signed") == 0 ||
mutt_strcasecmp (a->subtype, "encrypted") == 0)
return (1);
@@ -1033,7 +1033,7 @@ int mutt_can_decode (BODY *a)
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
else if (a->type == TYPEAPPLICATION)
{
if (mutt_is_application_pgp(a))
@@ -1372,9 +1372,9 @@ void mutt_body_handler (BODY *b, STATE *s)
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
char *p;
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
@@ -1383,7 +1383,7 @@ void mutt_body_handler (BODY *b, STATE *s)
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
else if (mutt_strcasecmp ("signed", b->subtype) == 0)
{
p = mutt_get_parameter ("protocol", b->parameter);
@@ -1406,7 +1406,7 @@ void mutt_body_handler (BODY *b, STATE *s)
else if (mutt_strcasecmp ("application/pgp-encrypted", p) == 0)
handler = pgp_encrypted_handler;
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
@@ -1416,13 +1416,13 @@ void mutt_body_handler (BODY *b, STATE *s)
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
else if (b->type == TYPEAPPLICATION)
{
if (mutt_is_application_pgp(b))
handler = pgp_application_pgp_handler;
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
diff --git a/hdrline.c b/hdrline.c
index 16eee14f..7e4213b4 100644
--- a/hdrline.c
+++ b/hdrline.c
@@ -21,7 +21,7 @@
#include "sort.h"
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
@@ -613,7 +613,7 @@ hdr_format_str (char *dest,
ch = ' ';
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (hdr->pgp & PGPGOODSIGN)
ch = 'S';
else if (hdr->pgp & PGPENCRYPT)
diff --git a/headers.c b/headers.c
index 524f7315..5e50922c 100644
--- a/headers.c
+++ b/headers.c
@@ -18,7 +18,7 @@
#include "mutt.h"
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
@@ -169,7 +169,7 @@ void mutt_edit_headers (const char *editor,
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
else if (mutt_strncasecmp ("pgp:", cur->data, 4) == 0)
{
msg->pgp = mutt_parse_pgp_hdr (cur->data + 4, 0);
diff --git a/hook.c b/hook.c
index 2710576f..e9be2850 100644
--- a/hook.c
+++ b/hook.c
@@ -85,9 +85,9 @@ int mutt_parse_hook (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
pattern.data = safe_strdup (path);
}
else if (DefaultHook && !(data & M_CHARSETHOOK)
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
&& !(data & M_PGPHOOK)
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
)
{
char tmp[HUGE_STRING];
@@ -156,7 +156,7 @@ int mutt_parse_hook (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
if ((rc = REGCOMP (rx, pattern.data, ((data & (M_PGPHOOK|M_CHARSETHOOK)) ? REG_ICASE : 0))) != 0)
#else
if ((rc = REGCOMP (rx, pattern.data, (data & M_CHARSETHOOK) ? REG_ICASE : 0)) != 0)
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
{
regerror (rc, rx, err->data, err->dsize);
regfree (rx);
@@ -348,9 +348,9 @@ char *mutt_charset_hook (const char *chs)
return _mutt_string_hook (chs, M_CHARSETHOOK);
}
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
char *mutt_pgp_hook (ADDRESS *adr)
{
return _mutt_string_hook (adr->mailbox, M_PGPHOOK);
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
diff --git a/imap/message.c b/imap/message.c
index ea6cc23e..9ab29f48 100644
--- a/imap/message.c
+++ b/imap/message.c
@@ -27,7 +27,7 @@
#include "message.h"
#include "mx.h"
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
@@ -387,9 +387,9 @@ int imap_fetch_message (MESSAGE *msg, CONTEXT *ctx, int msgno)
ctx->hdrs[msgno]->content->offset;
/* This needs to be done in case this is a multipart message */
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
ctx->hdrs[msgno]->pgp = pgp_query (ctx->hdrs[msgno]->content);
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
mutt_clear_error();
rewind (msg->fp);
diff --git a/init.c b/init.c
index 33d59cbd..8cfc5bc8 100644
--- a/init.c
+++ b/init.c
@@ -24,7 +24,7 @@
#include "keymap.h"
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
@@ -1129,7 +1129,7 @@ static int parse_set (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err)
case DT_SORT_BROWSER:
map = SortBrowserMethods;
break;
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
case DT_SORT_KEYS:
map = SortKeyMethods;
break;
@@ -1535,7 +1535,7 @@ int mutt_var_value_complete (char *buffer, size_t len, int pos)
case DT_SORT_BROWSER:
map = SortBrowserMethods;
break;
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
case DT_SORT_KEYS:
map = SortKeyMethods;
break;
diff --git a/init.h b/init.h
index 8238d541..d9770adf 100644
--- a/init.h
+++ b/init.h
@@ -85,8 +85,8 @@ struct option_t
# ifndef MIXMASTER
# define MIXMASTER "mixmaster"
# endif
-# ifndef _PGPPATH
-# define _PGPPATH
+# ifndef HAVE_PGP
+# define HAVE_PGP
# endif
# ifndef USE_POP
# define USE_POP
@@ -442,7 +442,7 @@ struct option_t MuttVars[] = {
** This variable controls whether or not attachments on outgoing messages
** are saved along with the main body of your message.
*/
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
{ "fcc_clear", DT_BOOL, R_NONE, OPTFCCCLEAR, 0 },
/*
** .pp
@@ -1041,7 +1041,7 @@ struct option_t MuttVars[] = {
*/
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
{ "pgp_autosign", DT_BOOL, R_NONE, OPTPGPAUTOSIGN, 0 },
/*
@@ -1313,7 +1313,7 @@ struct option_t MuttVars[] = {
{ "forw_decrypt", DT_SYN, R_NONE, UL "forward_decrypt", 0 },
/*
*/
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
#ifdef USE_SSL
{ "certificate_file", DT_PATH, R_NONE, UL &SslCertFile, 0 },
@@ -2095,7 +2095,7 @@ const struct mapping_t SortAliasMethods[] = {
{ NULL }
};
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
const struct mapping_t SortKeyMethods[] = {
{ "address", SORT_ADDRESS },
{ "date", SORT_DATE },
@@ -2103,7 +2103,7 @@ const struct mapping_t SortKeyMethods[] = {
{ "trust", SORT_TRUST },
{ NULL }
};
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
/* functions used to parse commands in a rc file */
@@ -2150,9 +2150,9 @@ struct command_t Commands[] = {
{ "mbox-hook", mutt_parse_hook, M_MBOXHOOK },
{ "mono", mutt_parse_mono, 0 },
{ "my_hdr", parse_my_hdr, 0 },
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
{ "pgp-hook", mutt_parse_hook, M_PGPHOOK },
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
{ "push", mutt_parse_push, 0 },
{ "reset", parse_set, M_SET_RESET },
{ "save-hook", mutt_parse_hook, M_SAVEHOOK },
diff --git a/keymap.c b/keymap.c
index 96ff7873..397e5fc6 100644
--- a/keymap.c
+++ b/keymap.c
@@ -39,7 +39,7 @@ struct mapping_t Menus[] = {
{ "postpone", MENU_POST },
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
{ "pgp", MENU_PGP },
#endif
@@ -529,7 +529,7 @@ void km_init (void)
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
create_bindings (OpPgp, MENU_PGP);
#endif
@@ -739,7 +739,7 @@ struct binding_t *km_get_table (int menu)
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
case MENU_PGP:
return OpPgp;
#endif
diff --git a/keymap.h b/keymap.h
index 34c1b5d7..7ec89973 100644
--- a/keymap.h
+++ b/keymap.h
@@ -61,7 +61,7 @@ enum
MENU_QUERY,
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
MENU_PGP,
#endif
@@ -101,9 +101,9 @@ extern struct binding_t OpBrowser[];
extern struct binding_t OpEditor[];
extern struct binding_t OpQuery[];
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
extern struct binding_t OpPgp[];
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
#ifdef MIXMASTER
extern struct binding_t OpMix[];
diff --git a/main.c b/main.c
index 1a9b03d5..cf1f97bf 100644
--- a/main.c
+++ b/main.c
@@ -72,7 +72,7 @@ fixes, and suggestions.\n\
along with this program; if not, write to the Free Software\n\
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\
");
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
const char* ShaCopyright = N_("\n\
SHA1 implementation Copyright (C) 1995-1997 Eric A. Young <eay@cryptsoft.com>\n\
@@ -237,22 +237,12 @@ static void show_version (void)
"-HAVE_COLOR "
#endif
-#ifdef _PGPPATH
-
-#ifdef HAVE_PGP5
- "+HAVE_PGP5 "
-#endif
-#ifdef HAVE_PGP2
- "+HAVE_PGP2 "
-#endif
-#ifdef HAVE_GPG
- "+HAVE_GPG "
-#endif
- "\n"
+#ifdef HAVE_PGP
+ "+HAVE_PGP "
+#else
+ "-HAVE_PGP "
#endif
-
-
#ifdef BUFFY_SIZE
"+BUFFY_SIZE "
#else
@@ -285,22 +275,6 @@ static void show_version (void)
puts ("-ISPELL");
#endif
-
-
-#ifdef _PGPPATH
- printf ("_PGPPATH=\"%s\"\n", _PGPPATH);
-# ifdef _PGPV2PATH
- printf ("_PGPV2PATH=\"%s\"\n", _PGPV2PATH);
-# endif
-# ifdef _PGPV3PATH
- printf ("_PGPV3PATH=\"%s\"\n", _PGPV3PATH);
-# endif
-# ifdef _PGPGPGPATH
- printf ("_PGPGPGPATH=\"%s\"\n", _PGPGPGPATH);
-# endif
-#endif
-
-
puts(_(ReachingUs));
exit (0);
@@ -492,7 +466,7 @@ int main (int argc, char **argv)
default:
printf ("Mutt %s (%s)\n", MUTT_VERSION, ReleaseDate);
puts (_(Copyright));
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
puts(_(ShaCopyright));
#endif
puts (_(ReachingUs));
diff --git a/mutt.h b/mutt.h
index abf1ccf4..c04a7452 100644
--- a/mutt.h
+++ b/mutt.h
@@ -123,7 +123,7 @@ typedef enum
#define M_FCCHOOK (1<<3)
#define M_SAVEHOOK (1<<4)
#define M_CHARSETHOOK (1<<5)
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#define M_PGPHOOK (1<<6)
#endif
@@ -194,7 +194,7 @@ enum
M_PERSONAL_RECIP,
M_PERSONAL_FROM,
M_ADDRESS,
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
M_PGP_SIGN,
M_PGP_ENCRYPT,
M_PGP_KEY,
@@ -230,7 +230,7 @@ enum
enum
{
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
OPT_VERIFYSIG, /* verify PGP signatures */
OPT_PGPTRADITIONAL, /* create old-style PGP messages */
#endif
@@ -351,7 +351,7 @@ enum
/* PGP options */
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
OPTPGPAUTOSIGN,
OPTPGPAUTOENCRYPT,
OPTPGPLONGIDS,
@@ -391,7 +391,7 @@ enum
* external program.
*/
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
OPTPGPCHECKTRUST, /* (pseudo) used by pgp_select_key () */
OPTDONTHANDLEPGPKEYS, /* (pseudo) used to extract PGP keys */
#endif
@@ -528,7 +528,7 @@ typedef struct body
unsigned int deleted : 1; /* attachment marked for deletion */
unsigned int noconv : 1; /* don't do character set conversion */
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
unsigned int goodsig : 1; /* good PGP signature */
#endif
@@ -536,7 +536,7 @@ typedef struct body
typedef struct hea