Index: Makefile.am =================================================================== RCS file: /cvsroot/mailutils/mailutils/Makefile.am,v retrieving revision 1.36 diff -u -r1.36 Makefile.am --- Makefile.am 12 Sep 2002 11:15:43 -0000 1.36 +++ Makefile.am 16 Oct 2002 16:03:18 -0000 @@ -5,10 +5,21 @@ AUTOMAKE_OPTIONS = gnu 1.6 readme-alpha ACLOCAL_AMFLAGS = -I m4 +# directories depending on the mbox format support +MBOX_DIRS = pop3d imap4d comsat mail.local +MBOX_BUILD_DIRS = @MAILUTILS_MBOX_BUILD_DIRS@ + +# directories depending on the smtp protocol +SMTP_DIRS = mail.remote +SMTP_BUILD_DIRS = @MAILUTILS_SMTP_BUILD_DIRS@ + SUBDIRS = include m4 lib testsuite mailbox examples doc \ - auth frm from pop3d imap4d \ - mail sieve scripts libmu_scm guimb messages comsat readmsg \ - mail.local mail.remote dotlock mh + auth frm from \ + mail sieve scripts libmu_scm guimb messages readmsg \ + dotlock mh \ + $(MBOX_BUILD_DIRS) \ + $(SMTP_BUILD_DIRS) + EXTRA_DIST = mailutils.spec mailutils.spec.in COPYING.FDL Index: configure.ac =================================================================== RCS file: /cvsroot/mailutils/mailutils/configure.ac,v retrieving revision 1.20 diff -u -r1.20 configure.ac --- configure.ac 14 Oct 2002 17:45:24 -0000 1.20 +++ configure.ac 16 Oct 2002 16:03:19 -0000 @@ -330,6 +330,94 @@ fi +dnl check if imap support was removed +AC_SUBST(MAILUTILS_IMAP_BUILD_FILES) +AC_ARG_ENABLE(imap, + [ --disable-imap disable imap support], + [case "${enableval}" in + yes) use_imap=yes ;; + no) use_imap=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-imap) ;; + esac],[use_imap=yes]) +if test x"$use_imap" = x"yes"; then + AC_DEFINE(MAILUTILS_WITH_IMAP,1,[Define this if you enable imap support]) + MAILUTILS_IMAP_BUILD_FILES='$(IMAP_FILES)' +fi + +dnl check if pop support was removed +AC_SUBST(MAILUTILS_POP_BUILD_FILES) +AC_ARG_ENABLE(pop, + [ --disable-pop disable pop support], + [case "${enableval}" in + yes) use_pop=yes ;; + no) use_pop=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-pop) ;; + esac],[use_pop=yes]) +if test x"$use_pop" = x"yes"; then + AC_DEFINE(MAILUTILS_WITH_POP,1,[Define this if you enable pop support]) + MAILUTILS_POP_BUILD_FILES='$(POP_FILES)' +fi + +dnl check if mh support was removed +AC_SUBST(MAILUTILS_MH_BUILD_FILES) +AC_ARG_ENABLE(mh, + [ --disable-mh disable mh support], + [case "${enableval}" in + yes) use_mh=yes ;; + no) use_mh=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-mh) ;; + esac],[use_mh=yes]) +if test x"$use_mh" = x"yes"; then + AC_DEFINE(MAILUTILS_WITH_MH,1,[Define this if you enable mh support]) + MAILUTILS_MH_BUILD_FILES='$(MH_FILES)' +fi + +dnl check if mbox support was removed +AC_SUBST(MAILUTILS_MBOX_BUILD_FILES) +AC_SUBST(MAILUTILS_MBOX_BUILD_DIRS) +AC_ARG_ENABLE(mbox, + [ --disable-mbox disable mbox support], + [case "${enableval}" in + yes) use_mbox=yes ;; + no) use_mbox=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-mbox) ;; + esac],[use_mbox=yes]) +if test x"$use_mbox" = x"yes"; then + AC_DEFINE(MAILUTILS_WITH_MBOX,1,[Define this if you enable mbox support]) + MAILUTILS_MBOX_BUILD_FILES='$(MBOX_FILES)' + MAILUTILS_MBOX_BUILD_DIRS='$(MBOX_DIRS)' +fi + +dnl check if smtp support was removed +AC_SUBST(MAILUTILS_SMTP_BUILD_FILES) +AC_SUBST(MAILUTILS_SMTP_BUILD_DIRS) +AC_ARG_ENABLE(smtp, + [ --disable-smtp disable smtp support], + [case "${enableval}" in + yes) use_smtp=yes ;; + no) use_smtp=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-smtp) ;; + esac],[use_smtp=yes]) +if test x"$use_smtp" = x"yes"; then + AC_DEFINE(MAILUTILS_WITH_SMTP,1,[Define this if you enable smtp support]) + MAILUTILS_SMTP_BUILD_FILES='$(SMTP_FILES)' + MAILUTILS_SMTP_BUILD_DIRS='$(SMTP_DIRS)' +fi + +dnl check if sendmail support was removed +AC_SUBST(MAILUTILS_SENDMAIL_BUILD_FILES) +AC_ARG_ENABLE(sendmail, + [ --disable-sendmail disable sendmail support], + [case "${enableval}" in + yes) use_sendmail=yes ;; + no) use_sendmail=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-sendmail) ;; + esac],[use_sendmail=yes]) +if test x"$use_sendmail" = x"yes"; then + AC_DEFINE(MAILUTILS_WITH_SENDMAIL,1,[Define this if you enable sendmail support]) + MAILUTILS_SENDMAIL_BUILD_FILES='$(SENDMAIL_FILES)' +fi + if test x"$testpam" = x"yes"; then AC_CHECK_HEADERS(security/pam_appl.h) if test x"$ac_cv_header_security_pam_appl_h" = x"yes"; then Index: examples/mimetest.c =================================================================== RCS file: /cvsroot/mailutils/mailutils/examples/mimetest.c,v retrieving revision 1.8 diff -u -r1.8 mimetest.c --- examples/mimetest.c 2 Sep 2002 14:33:29 -0000 1.8 +++ examples/mimetest.c 16 Oct 2002 16:03:19 -0000 @@ -83,11 +83,20 @@ { list_t bookie; registrar_get_list (&bookie); +#ifdef MAILUTILS_WITH_MBOX list_append (bookie, file_record); - list_append (bookie, imap_record); list_append (bookie, mbox_record); list_append (bookie, path_record); +#endif +#ifdef MAILUTILS_WITH_IMAP + list_append (bookie, imap_record); +#endif +#ifdef MAILUTILS_WITH_MH + list_append (bookie, mh_record); +#endif +#ifdef MAILUTILS_WITH_POP list_append (bookie, pop_record); +#endif } if ((ret = mailbox_create_default (&mbox, mailbox_name)) != 0) Index: examples/msg-send.c =================================================================== RCS file: /cvsroot/mailutils/mailutils/examples/msg-send.c,v retrieving revision 1.5 diff -u -r1.5 msg-send.c --- examples/msg-send.c 2 Sep 2002 14:33:29 -0000 1.5 +++ examples/msg-send.c 16 Oct 2002 16:03:20 -0000 @@ -98,8 +98,12 @@ { list_t bookie; registrar_get_list (&bookie); +#ifdef MAILUTILS_WITH_SMTP list_append (bookie, smtp_record); +#endif +#ifdef MAILUTILS_WITH_SENDMAIL list_append (bookie, sendmail_record); +#endif } if (optfrom) Index: examples/sfrom.c =================================================================== RCS file: /cvsroot/mailutils/mailutils/examples/sfrom.c,v retrieving revision 1.2 diff -u -r1.2 sfrom.c --- examples/sfrom.c 2 Sep 2002 14:33:29 -0000 1.2 +++ examples/sfrom.c 16 Oct 2002 16:03:20 -0000 @@ -16,6 +16,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* sfrom, Simple From */ + +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include #include @@ -36,9 +41,15 @@ { list_t registrar; registrar_get_list (®istrar); +#ifdef MAILUTILS_WITH_IMAP list_append (registrar, imap_record); +#endif +#ifdef MAILUTILS_WITH_MBOX list_append (registrar, path_record); +#endif +#ifdef MAILUTILS_WITH_POP list_append (registrar, pop_record); +#endif } status = mailbox_create_default (&mbox, argv[1]); Index: frm/frm.c =================================================================== RCS file: /cvsroot/mailutils/mailutils/frm/frm.c,v retrieving revision 1.22 diff -u -r1.22 frm.c --- frm/frm.c 21 Sep 2002 19:13:54 -0000 1.22 +++ frm/frm.c 16 Oct 2002 16:03:20 -0000 @@ -316,10 +316,19 @@ { list_t bookie; registrar_get_list (&bookie); +#ifdef MAILUTILS_WITH_MH + list_append (bookie, mh_record); +#endif +#ifdef MAILUTILS_WITH_MBOX list_append (bookie, mbox_record); list_append (bookie, path_record); +#endif +#ifdef MAILUTILS_WITH_POP list_append (bookie, pop_record); +#endif +#ifdef MAILUTILS_WITH_IMAP list_append (bookie, imap_record); +#endif } /* Construct the mailbox_t, attach a notification and destroy */ Index: from/from.c =================================================================== RCS file: /cvsroot/mailutils/mailutils/from/from.c,v retrieving revision 1.20 diff -u -r1.20 from.c --- from/from.c 7 Aug 2002 23:05:56 -0000 1.20 +++ from/from.c 16 Oct 2002 16:03:20 -0000 @@ -106,10 +106,19 @@ { list_t bookie; registrar_get_list (&bookie); +#ifdef MAILUTILS_WITH_MH + list_append (bookie, mh_record); +#endif +#ifdef MAILUTILS_WITH_MBOX list_append (bookie, mbox_record); list_append (bookie, path_record); +#endif +#ifdef MAILUTILS_WITH_POP list_append (bookie, pop_record); +#endif +#ifdef MAILUTILS_WITH_IMAP list_append (bookie, imap_record); +#endif } if ((status = mailbox_create_default (&mbox, mailbox_name)) != 0) Index: include/mailutils/registrar.h =================================================================== RCS file: /cvsroot/mailutils/mailutils/include/mailutils/registrar.h,v retrieving revision 1.10 diff -u -r1.10 registrar.h --- include/mailutils/registrar.h 24 May 2002 08:13:41 -0000 1.10 +++ include/mailutils/registrar.h 16 Oct 2002 16:03:20 -0000 @@ -84,24 +84,38 @@ /* Records provided by the library. */ -/* Remote Folder "imap://" */ -extern record_t imap_record; -/* Remote Mailbox POP3, pop:// */ -extern record_t pop_record; +#ifdef MAILUTILS_WITH_IMAP + /* Remote Folder "imap://" */ + extern record_t imap_record; +#endif -/* Local Mailbox Unix Mailbox, "mbox:" */ -extern record_t mbox_record; -/* Local Folder/Mailbox, "file:" */ -extern record_t file_record; -/* Local Folder/Mailbox, / */ -extern record_t path_record; -/* Local MH, "mh:" */ -extern record_t mh_record; - -/* SMTP mailer, "smtp://" */ -extern record_t smtp_record; -/* Sendmail, "sendmail:" */ -extern record_t sendmail_record; +#ifdef MAILUTILS_WITH_POP + /* Remote Mailbox POP3, pop:// */ + extern record_t pop_record; +#endif + +#ifdef MAILUTILS_WITH_MBOX + /* Local Mailbox Unix Mailbox, "mbox:" */ + extern record_t mbox_record; +#endif + +#ifdef MAILUTILS_WITH_MH + /* Local Folder/Mailbox, "file:" */ + extern record_t file_record; + /* Local Folder/Mailbox, / */ + extern record_t path_record; + /* Local MH, "mh:" */ + extern record_t mh_record; +#endif + +#ifdef MAILUTILS_WITH_SMTP + /* SMTP mailer, "smtp://" */ + extern record_t smtp_record; +#endif +#ifdef MAILUTILS_WITH_SENDMAIL + /* Sendmail, "sendmail:" */ + extern record_t sendmail_record; +#endif #ifdef __cplusplus } Index: mail/mail.c =================================================================== RCS file: /cvsroot/mailutils/mailutils/mail/mail.c,v retrieving revision 1.62 diff -u -r1.62 mail.c --- mail/mail.c 24 Sep 2002 14:13:42 -0000 1.62 +++ mail/mail.c 16 Oct 2002 16:03:21 -0000 @@ -225,14 +225,26 @@ { list_t bookie; registrar_get_list (&bookie); +#ifdef MAILUTILS_WITH_MBOX list_append (bookie, mbox_record); list_append (bookie, path_record); +#endif +#ifdef MAILUTILS_WITH_POP list_append (bookie, pop_record); +#endif +#ifdef MAILUTILS_WITH_IMAP list_append (bookie, imap_record); +#endif +#ifdef MAILUTILS_WITH_MH list_append (bookie, mh_record); +#endif /* Possible supported mailers. */ +#ifdef MAILUTILS_WITH_SENDMAIL list_append (bookie, sendmail_record); +#endif +#ifdef MAILUTILS_WITH_SMTP list_append (bookie, smtp_record); +#endif } interactive = isatty (fileno(stdin)); Index: mail.local/main.c =================================================================== RCS file: /cvsroot/mailutils/mailutils/mail.local/main.c,v retrieving revision 1.18 diff -u -r1.18 main.c --- mail.local/main.c 13 Aug 2002 13:24:57 -0000 1.18 +++ mail.local/main.c 16 Oct 2002 16:03:21 -0000 @@ -200,8 +200,12 @@ list_append (bookie, mbox_record); list_append (bookie, path_record); /* Possible supported mailers. */ +#ifdef MAILUTILS_WITH_SENDMAIL list_append (bookie, sendmail_record); +#endif +#ifdef MAILUTILS_WITH_SMTP list_append (bookie, smtp_record); +#endif } fp = make_tmp (from, &tempfile); Index: mailbox/Makefile.am =================================================================== RCS file: /cvsroot/mailutils/mailutils/mailbox/Makefile.am,v retrieving revision 1.44 diff -u -r1.44 Makefile.am --- mailbox/Makefile.am 13 Oct 2002 20:37:58 -0000 1.44 +++ mailbox/Makefile.am 16 Oct 2002 16:03:21 -0000 @@ -32,10 +32,6 @@ filter_rfc822.c \ filter_trans.c \ folder.c \ -folder_imap.c \ -folder_mbox.c \ -folder_mh.c \ -folder_pop.c \ header.c \ iterator.c \ list.c \ @@ -45,10 +41,6 @@ mapfile_stream.c \ mbx_default.c \ mbx_file.c \ -mbx_imap.c \ -mbx_mbox.c \ -mbx_mh.c \ -mbx_pop.c \ md5.c \ message.c \ memory_stream.c \ @@ -63,23 +55,58 @@ parse822.c \ property.c \ registrar.c \ -sendmail.c \ -smtp.c \ stream.c \ system.c \ tcp.c \ ticket.c \ url.c \ url_file.c \ -url_imap.c \ -url_mbox.c \ -url_mh.c \ url_path.c \ -url_pop.c \ -url_sendmail.c \ -url_smtp.c \ wicket.c -libmailbox_la_DEPENDENCIES = @MU_LTLIBOBJS@ -libmailbox_la_LIBADD = @MU_LTLIBOBJS@ +IMAP_FILES = folder_imap.c mbx_imap.c url_imap.c +IMAP_BUILD_FILES= @MAILUTILS_IMAP_BUILD_FILES@ +IMAP_LTLIBOBJS = $(IMAP_BUILD_FILES:%.c=%.lo) + +POP_FILES = folder_pop.c mbx_pop.c url_pop.c +POP_BUILD_FILES = @MAILUTILS_POP_BUILD_FILES@ +POP_LTLIBOBJS = $(POP_BUILD_FILES:%.c=%.lo) + +MH_FILES = folder_mh.c mbx_mh.c url_mh.c +MH_BUILD_FILES = @MAILUTILS_MH_BUILD_FILES@ +MH_LTLIBOBJS = $(MH_BUILD_FILES:%.c=%.lo) + +MBOX_FILES = folder_mbox.c mbx_mbox.c url_mbox.c +MBOX_BUILD_FILES = @MAILUTILS_MBOX_BUILD_FILES@ +MBOX_LTLIBOBJS = $(MBOX_BUILD_FILES:%.c=%.lo) + +SMTP_FILES = smtp.c url_smtp.c +SMTP_BUILD_FILES = @MAILUTILS_SMTP_BUILD_FILES@ +SMTP_LTLIBOBJS = $(SMTP_BUILD_FILES:%.c=%.lo) + +SENDMAIL_FILES = sendmail.c url_sendmail.c +SENDMAIL_BUILD_FILES = @MAILUTILS_SENDMAIL_BUILD_FILES@ +SENDMAIL_LTLIBOBJS = $(SENDMAIL_BUILD_FILES:%.c=%.lo) + +EXTRA_libmailbox_la_SOURCES = $(IMAP_FILES) \ + $(POP_FILES) \ + $(MH_FILES) \ + $(MBOX_FILES) \ + $(SMTP_FILES) \ + $(SENDMAIL_FILES) + +libmailbox_la_DEPENDENCIES = @MU_LTLIBOBJS@ \ + $(IMAP_LTLIBOBJS) \ + $(POP_LTLIBOBJS) \ + $(MH_LTLIBOBJS) \ + $(MBOX_LTLIBOBJS) \ + $(SMTP_LTLIBOBJS) \ + $(SENDMAIL_LTLIBOBJS) +libmailbox_la_LIBADD = @MU_LTLIBOBJS@ \ + $(IMAP_LTLIBOBJS) \ + $(POP_LTLIBOBJS) \ + $(MH_LTLIBOBJS) \ + $(MBOX_LTLIBOBJS) \ + $(SMTP_LTLIBOBJS) \ + $(SENDMAIL_LTLIBOBJS) libmailbox_la_LDFLAGS = -version-info 0:0:0 Index: mailbox/mbx_file.c =================================================================== RCS file: /cvsroot/mailutils/mailutils/mailbox/mbx_file.c,v retrieving revision 1.6 diff -u -r1.6 mbx_file.c --- mailbox/mbx_file.c 25 Mar 2002 03:46:11 -0000 1.6 +++ mailbox/mbx_file.c 16 Oct 2002 16:03:21 -0000 @@ -68,7 +68,7 @@ file does not exist. */ if (stat (path, &st) < 0) { - status = _mailbox_mbox_init (mbox); + // status = _mailbox_mbox_init (mbox); } else if (S_ISDIR (st.st_mode)) { @@ -82,7 +82,7 @@ FIXME: We should do an open() and try to do a better reconnaissance of the type, maybe MMDF. For now assume Unix MBox */ - status = _mailbox_mbox_init (mbox); + // status = _mailbox_mbox_init (mbox); } free (path); Index: messages/messages.c =================================================================== RCS file: /cvsroot/mailutils/mailutils/messages/messages.c,v retrieving revision 1.15 diff -u -r1.15 messages.c --- messages/messages.c 27 Aug 2002 10:49:10 -0000 1.15 +++ messages/messages.c 16 Oct 2002 16:03:22 -0000 @@ -101,9 +101,15 @@ mu_argp_parse (&argp, &argc, &argv, 0, argp_capa, NULL, &args); registrar_get_list (&bookie); +#ifdef MAILUTILS_WITH_MBOX list_append (bookie, path_record); +#endif +#ifdef MAILUTILS_WITH_IMAP list_append (bookie, imap_record); +#endif +#ifdef MAILUTILS_WITH_POP list_append (bookie, pop_record); +#endif if (args.argc < 1 && messages_count (NULL) < 0) err = 1; Index: mh/mh_init.c =================================================================== RCS file: /cvsroot/mailutils/mailutils/mh/mh_init.c,v retrieving revision 1.16 diff -u -r1.16 mh_init.c --- mh/mh_init.c 25 Sep 2002 14:25:50 -0000 1.16 +++ mh/mh_init.c 16 Oct 2002 16:03:22 -0000 @@ -17,7 +17,7 @@ /* Initialize MH applications. */ -#include +#include "mh.h" #include #include #include @@ -39,14 +39,26 @@ /* Register mailbox formats */ registrar_get_list (&bookie); +#ifdef MAILUTILS_WITH_MH list_append (bookie, mh_record); +#endif +#ifdef MAILUTILS_WITH_MBOX list_append (bookie, mbox_record); list_append (bookie, path_record); +#endif +#ifdef MAILUTILS_WITH_POP list_append (bookie, pop_record); +#endif +#ifdef MAILUTILS_WITH_IMAP list_append (bookie, imap_record); +#endif /* Possible supported mailers. */ +#ifdef MAILUTILS_WITH_SENDMAIL list_append (bookie, sendmail_record); +#endif +#ifdef MAILUTILS_WITH_SMTP list_append (bookie, smtp_record); +#endif /* Read user's profile */ mh_read_profile (); Index: readmsg/readmsg.c =================================================================== RCS file: /cvsroot/mailutils/mailutils/readmsg/readmsg.c,v retrieving revision 1.8 diff -u -r1.8 readmsg.c --- readmsg/readmsg.c 27 Aug 2002 10:50:15 -0000 1.8 +++ readmsg/readmsg.c 16 Oct 2002 16:03:22 -0000 @@ -230,10 +230,16 @@ { list_t bookie; registrar_get_list (&bookie); +#ifdef MAILUTILS_WITH_MBOX list_append (bookie, mbox_record); list_append (bookie, path_record); +#endif +#ifdef MAILUTILS_WITH_POP list_append (bookie, pop_record); +#endif +#ifdef MAILUTILS_WITH_IMAP list_append (bookie, imap_record); +#endif } status = mailbox_create_default (&mbox, mailbox_name); Index: sieve/sieve.c =================================================================== RCS file: /cvsroot/mailutils/mailutils/sieve/sieve.c,v retrieving revision 1.23 diff -u -r1.23 sieve.c --- sieve/sieve.c 12 Sep 2002 11:04:54 -0000 1.23 +++ sieve/sieve.c 16 Oct 2002 16:03:22 -0000 @@ -494,13 +494,25 @@ { list_t bookie = 0; registrar_get_list (&bookie); +#ifdef MAILUTILS_WITH_MBOX list_append (bookie, path_record); list_append (bookie, file_record); list_append (bookie, mbox_record); +#endif +#ifdef MAILUTILS_WITH_POP list_append (bookie, pop_record); +#endif +#ifdef MAILUTILS_WITH_IMAP list_append (bookie, imap_record); +#endif +#ifdef MAILUTILS_WITH_MH list_append (bookie, mh_record); +#endif +#ifdef MAILUTILS_WITH_SENDMAIL list_append (bookie, sendmail_record); +#endif +#ifdef MAILUTILS_WITH_SMTP list_append (bookie, smtp_record); +#endif }