]> granicus.if.org Git - neomutt/commitdiff
build: only compile hcache on request
authorRichard Russon <rich@flatcap.org>
Fri, 12 May 2017 15:13:37 +0000 (16:13 +0100)
committerRichard Russon <rich@flatcap.org>
Fri, 12 May 2017 15:21:08 +0000 (16:21 +0100)
If none of the header cache backends are requested, don't go into the
hcache dir.

Makefile.am
configure.ac

index b06779c21df53d012666d55c886fdb50ec788b4c..19fe9b3acae1262e042442fa9eaa2f9ef464fe36 100644 (file)
@@ -10,7 +10,11 @@ AM_DISTCHECK_CONFIGURE_FLAGS = --enable-debug --enable-gpgme --enable-notmuch \
        --with-bdb --with-gdbm --with-gnutls --with-gss --with-kyotocabinet \
        --with-lmdb --with-qdbm --with-sasl --with-tokyocabinet
 
-SUBDIRS = m4 contrib hcache imap
+SUBDIRS = m4 contrib imap
+
+if BUILD_HCACHE
+SUBDIRS += hcache
+endif
 
 if BUILD_DOC
 SUBDIRS += doc
@@ -54,7 +58,7 @@ mutt_LDADD = $(MUTT_LIB_OBJECTS) $(LIBOBJS) $(LIBIMAP) $(MUTTLIBS) \
        $(INTLLIBS) $(LIBICONV) $(GPGME_LIBS) $(HCACHE_LIBS)
 
 mutt_DEPENDENCIES = $(MUTT_LIB_OBJECTS) $(LIBOBJS) $(LIBIMAPDEPS) \
-       $(INTLDEPS)
+       $(INTLDEPS) $(HCACHE_DEPS)
 
 DEFS=-DPKGDATADIR=\"$(pkgdatadir)\" -DSYSCONFDIR=\"$(sysconfdir)\" \
        -DBINDIR=\"$(bindir)\" -DMUTTLOCALEDIR=\"$(datadir)/locale\"
index 141580c62ea2309b01663f982b2df9bb07696307..758791bd00236d289e506f6ea408b1d5436270ff 100644 (file)
@@ -884,6 +884,7 @@ AM_CONDITIONAL(BUILD_HCACHE, test -n "$hcache_db_used")
 if test -n "$hcache_db_used"; then
        AC_DEFINE(USE_HCACHE, 1, [Enable header caching])
        HCACHE_LIBS="-Lhcache -lhcache $HCACHE_LIBS"
+       HCACHE_DEPS="hcache/libhcache.a"
 else
        # For outputting in the summary
        hcache_db_used="no"
@@ -903,6 +904,7 @@ AC_SUBST(MUTT_MD5)
 AC_SUBST(MUTTLIBS)
 AC_SUBST(MUTT_LIB_OBJECTS)
 AC_SUBST(HCACHE_LIBS)
+AC_SUBST(HCACHE_DEPS)
 
 dnl -- iconv/gettext --