summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2019-05-30 06:59:45 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2019-05-30 07:09:36 (GMT)
commitc7b2964d7b4a5e3437b1481f6474a38879cd9a8e (patch) (side-by-side diff)
tree2860cc58e3a99f19be5989ec506310ef87516702
parent20daef8388c97873f1d33c749e94ae558403f055 (diff)
downloadmailutils-c7b2964d7b4a5e3437b1481f6474a38879cd9a8e.tar.gz
mailutils-c7b2964d7b4a5e3437b1481f6474a38879cd9a8e.tar.bz2
Fix conditional compilation; add dotmail support to libmu_scm
* configure.ac: Accept dotmail as a value for MU_DEFAULT_SCHEME. Display dotmail support status at the end of the run. * libmailutils/base/nullrec.c: Provide placeholder for disabled dotmail. * libmu_scm/mu_scm.c (format_table): Add dotmail. * libmu_scm/tests/testsuite.at: Don't assume mbox as the default. Load it explicitly.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--configure.ac6
-rw-r--r--libmailutils/base/nullrec.c4
-rw-r--r--libmu_scm/mu_scm.c1
-rw-r--r--libmu_scm/tests/testsuite.at1
4 files changed, 10 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 4980141..d49efad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1271,14 +1271,14 @@ MU_ENABLE_SUPPORT(cxx,
# Note: 1. Support for mbox type is always enabled.
# 2. Only local mailbox types are allowed for MU_DEFAULT_SCHEME
AC_ARG_VAR([MU_DEFAULT_SCHEME],
- [Default mailbox record. Allowed values are: mbox (default), mh, and maildir.])
+ [Default mailbox record. Allowed values are: mbox (default), dotmail, mh, and maildir.])
if test -z "$MU_DEFAULT_SCHEME"; then
MU_DEFAULT_SCHEME=mbox
fi
case $MU_DEFAULT_SCHEME in
mbox)
;;
-mh|maildir)
+mh|maildir|dotmail)
eval testval=\$mu_cv_enable_$MU_DEFAULT_SCHEME
if test "$testval" != yes; then
AC_MSG_ERROR([Cannot set default mailbox record type: support for $MU_DEFAULT_SCHEME is disabled])
@@ -1427,6 +1427,7 @@ IMAP .......................... $status_imap
POP ........................... $status_pop
MH ............................ $status_mh
maildir ....................... $status_maildir
+dotmail ....................... $status_dotmail
Mailers:
@@ -1470,6 +1471,7 @@ status_imap=$mu_cv_enable_imap
status_pop=$mu_cv_enable_pop
status_mh=$mu_cv_enable_mh
status_maildir=$mu_cv_enable_maildir
+status_dotmail=$mu_cv_enable_dotmail
status_smtp=$mu_cv_enable_smtp
status_sendmail=$mu_cv_enable_sendmail
status_ipv6=$status_ipv6
diff --git a/libmailutils/base/nullrec.c b/libmailutils/base/nullrec.c
index d274cb8..a793e15 100644
--- a/libmailutils/base/nullrec.c
+++ b/libmailutils/base/nullrec.c
@@ -46,6 +46,10 @@ mu_record_t mu_mh_record = NULL;
mu_record_t mu_maildir_record = NULL;
#endif
+#ifndef ENABLE_DOTMAIL
+mu_record_t mu_dotmail_record = NULL;
+#endif
+
#ifndef WITH_TLS
mu_record_t mu_smtps_record = NULL;
#endif
diff --git a/libmu_scm/mu_scm.c b/libmu_scm/mu_scm.c
index 21aa14a..f7ca1e7 100644
--- a/libmu_scm/mu_scm.c
+++ b/libmu_scm/mu_scm.c
@@ -49,6 +49,7 @@ static struct format_record format_table[] = {
{ "mbox", &mu_mbox_record },
{ "mh", &mu_mh_record },
{ "maildir", &mu_maildir_record },
+ { "dotmail", &mu_dotmail_record },
{ "pop", &mu_pop_record },
{ "pops", &mu_pops_record },
{ "imap", &mu_imap_record },
diff --git a/libmu_scm/tests/testsuite.at b/libmu_scm/tests/testsuite.at
index 514b727..6bd1947 100644
--- a/libmu_scm/tests/testsuite.at
+++ b/libmu_scm/tests/testsuite.at
@@ -14,6 +14,7 @@ m4_define([MU_GUILE_CHECK],
[AT_DATA([input.scm],[dnl
(use-modules ((mailutils mailutils))
((mailutils ancilla)))
+(mu-register-format "mbox")
[$1]
])
m4_if(MU_TEST_MAILBOX,,,[MUT_MBCOPY($abs_top_srcdir/testsuite/MU_TEST_MAILBOX,mbox)])

Return to:

Send suggestions and report system problems to the System administrator.