SUBDIRS = m4 po intl doc contrib $(IMAP_SUBDIR)
-if NEEDS_PGPEWRAP
-bin_SCRIPTS = pgpewrap muttbug flea
-else
bin_SCRIPTS = muttbug flea
-endif
BUILT_SOURCES = keymap_defs.h
non_us_sources = pgp.c pgpinvoke.c pgpkey.c pgplib.c sha1.c \
pgpmicalg.c gnupgparse.c sha1.h \
doc/language.txt doc/language50.txt OPS.PGP doc/PGP-Notes.txt \
- OPS.MIX remailer.c remailer.h pgpewrap \
+ OPS.MIX remailer.c remailer.h pgpewrap.c \
contrib/pgp2.rc contrib/pgp5.rc contrib/gpg.rc \
mutt_ssl.c mutt_ssl.h README.SSL mutt_ssl_nss.c \
pgppacket.c pgppacket.h
mx.h pager.h pgp.h pop.h protos.h reldate.h rfc1524.h rfc2047.h \
rfc2231.h rfc822.h sha1.h sort.h mime.types VERSION prepare \
_regex.h OPS.MIX README.SECURITY remailer.c remailer.h browser.h \
- mbyte.h lib.h extlib.c pgpewrap pgplib.h Muttrc.head Muttrc \
+ mbyte.h lib.h extlib.c pgpewrap.c pgplib.h Muttrc.head Muttrc \
makedoc.c stamp-doc-rc README.SSL \
muttbug pgppacket.h depcomp ascii.h BEWARE
if test x$HAVE_PGP != xno ; then
AC_DEFINE(HAVE_PGP)
- PGPAUX_TARGET=pgpring
- AM_CONDITIONAL(NEEDS_PGPEWRAP, true)
+ PGPAUX_TARGET="pgpring pgpewrap"
MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pgp.o pgpinvoke.o pgpkey.o pgplib.o gnupgparse.o pgpmicalg.o pgppacket.o"
OPS="$OPS \$(srcdir)/OPS.PGP"
fi
+++ /dev/null
-#!/bin/sh --
-
-cmd=$1
-pfx=""
-
-die() {
- echo "Command line usage: $0 [flags] -- prefix [recipients]" >& 2
- exit 1
-}
-
-while test $# -gt 0 && shift && test -n "$1" ; do
- if test "$1" = "--" ; then
- shift || die
- pfx="$1"
- shift || die
- fi
- cmd="$cmd $pfx $1"
-done
-
-exec $cmd
--- /dev/null
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+
+int main(int argc, char **argv) {
+ char **opts, **opt, *pfx;
+ int i;
+
+ opts = malloc((2 * argc + 1) * sizeof (* opts));
+ if(!opts) {
+ perror(argv[0]);
+ exit(2);
+ }
+
+ opt = opts;
+ *opt++ = argv[1];
+ pfx = NULL;
+
+ for(i = 2; i < argc; ) {
+ if(!strcmp(argv[i], "--")) {
+ i += 2;
+ if(i > argc) {
+ fprintf(stderr, "Command line usage: %s [flags] -- prefix [recipients]\n", argv[0]);
+ return 1;
+ }
+ pfx = argv[i-1];
+ }
+ if(pfx)
+ *opt++ = pfx;
+ *opt++ = argv[i++];
+ }
+ *opt = NULL;
+
+ execvp(opts[0], opts);
+ perror(argv[0]);
+ return 2;
+}