]> git.notmuchmail.org Git - notmuch/commitdiff
build: generate sh.config for feeding configure results to shell scripts
authorJani Nikula <jani@nikula.org>
Fri, 30 May 2014 07:43:04 +0000 (10:43 +0300)
committerDavid Bremner <david@tethera.net>
Sun, 13 Jul 2014 15:15:47 +0000 (12:15 -0300)
Only include the relevant information.

Amended by David Bremner:

Use a prefix NOTMUCH_ to minimize collisions with other
variables.

Makefile.local
configure

index d5ee85ce9bc82fe01124e456d69da309115b55ff..81ee34774386dd8e4de2b6b472896056b434ee83 100644 (file)
@@ -338,7 +338,7 @@ SRCS  := $(SRCS) $(notmuch_client_srcs)
 CLEAN := $(CLEAN) notmuch notmuch-shared $(notmuch_client_modules)
 CLEAN := $(CLEAN) version.stamp notmuch-*.tar.gz.tmp
 
-DISTCLEAN := $(DISTCLEAN) .first-build-message Makefile.config
+DISTCLEAN := $(DISTCLEAN) .first-build-message Makefile.config sh.config
 
 DEPS := $(SRCS:%.c=.deps/%.d)
 DEPS := $(DEPS:%.cc=.deps/%.d)
index 3f0c8d5215e85b6eb30f533e323e94898ab020d3..86ba2f7c66ead7c11c8738aaa3c40f8a1009249b 100755 (executable)
--- a/configure
+++ b/configure
@@ -956,3 +956,16 @@ CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS)    \\
 
 CONFIGURE_LDFLAGS =  \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(ZLIB_LDFLAGS) \$(XAPIAN_LDFLAGS)
 EOF
+
+# construct the sh.config
+cat > sh.config <<EOF
+# This sh.config was automatically generated by the ./configure
+# script of notmuch.
+
+# Whether the Xapian version in use supports compaction
+NOTMUCH_HAVE_XAPIAN_COMPACT=${have_xapian_compact}
+
+# Whether there's either sphinx or rst2man available for building
+# documentation
+NOTMUCH_HAVE_MAN=$((have_sphinx || have_rst2man))
+EOF