Commit 24333ac9 24333ac926f4412737d618dbff6d3ca0c70809ec by Sergey Poznyakoff

Don't use disabled features in mailutils.scm

* libmu_scm/mailutils/Makefile.am (DISTCLEANFILES): Rename to
CLEANFILES: mailutils.scm should be cleaned as a usual object file.
(MU_FEATURES): New variable, constructed depending on MU_COND_
variables.
(mailutils.scm goal): Use the value of MU_FEATURES as m4 command
line.
* libmu_scm/mailutils/mailutils.scm.in: Include only supported libraries.
1 parent 7dd17568
......@@ -17,15 +17,38 @@
EXTRA_DIST=mailutils.scm.in
DISTCLEANFILES=\
CLEANFILES=\
mailutils.scm
sitedir = @GUILE_SITE@/$(PACKAGE)
site_DATA = mailutils.scm
MU_FEATURES=\
-DVERSION=$(VERSION)\
-DLIBDIR=$(libdir)\
-DSITEDIR=$(sitedir)\
-DBUILDDIR=$(top_builddir)/libmu_scm
if MU_COND_SUPPORT_POP
MU_FEATURES += -DMU_SUPPORT_POP
endif
if MU_COND_SUPPORT_IMAP
MU_FEATURES += -DMU_SUPPORT_IMAP
endif
if MU_COND_SUPPORT_NNTP
MU_FEATURES += -DMU_SUPPORT_NNTP
endif
if MU_COND_SUPPORT_MH
MU_FEATURES += -DMU_SUPPORT_MH
endif
if MU_COND_SUPPORT_MAILDIR
MU_FEATURES += -DMU_SUPPORT_MAILDIR
endif
mailutils.scm: mailutils.scm.in
$(AM_V_GEN)m4 -DVERSION=$(VERSION) -DLIBDIR=$(libdir) \
-DSITEDIR=$(sitedir) \
-DBUILDDIR=$(top_builddir)/libmu_scm \
$(srcdir)/mailutils.scm.in > $@
$(AM_V_GEN)m4 $(MU_FEATURES) $(srcdir)/mailutils.scm.in > $@
......
......@@ -27,10 +27,14 @@ changequote([,])dnl
(define mu-libs (list (cons "libmailutils" "libmailutils")
(cons "libmu_auth" "libmu_auth")
(cons "libproto/mbox" "libmu_mbox")
(cons "libproto/mh" "libmu_mh")
(cons "libproto/maildir" "libmu_maildir")
(cons "libproto/pop" "libmu_pop")
(cons "libproto/imap" "libmu_imap")))
ifdef([MU_SUPPORT_MH],dnl
[(cons "libproto/mh" "libmu_mh")])
ifdef([MU_SUPPORT_MAILDIR],dnl
[(cons "libproto/maildir" "libmu_maildir")])
ifdef([MU_SUPPORT_POP],dnl
[(cons "libproto/pop" "libmu_pop")])
ifdef([MU_SUPPORT_IMAP],dnl
[(cons "libproto/imap" "libmu_imap")])))
(cond
((getenv "MAILUTILS_SCM_LIBRARY_ROOT") =>
......