--- /dev/null
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 1B230431FC3\r
+ for <notmuch@notmuchmail.org>; Fri, 30 May 2014 00:43:14 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id 86cauR3bVlzZ for <notmuch@notmuchmail.org>;\r
+ Fri, 30 May 2014 00:43:10 -0700 (PDT)\r
+Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com\r
+ [209.85.212.182]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 07426431FAE\r
+ for <notmuch@notmuchmail.org>; Fri, 30 May 2014 00:43:09 -0700 (PDT)\r
+Received: by mail-wi0-f182.google.com with SMTP id r20so595212wiv.9\r
+ for <notmuch@notmuchmail.org>; Fri, 30 May 2014 00:43:08 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=1e100.net; s=20130820;\r
+ h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r
+ :references;\r
+ bh=rxgerB/o0mpK0jUPS5HDCQcvkgT4FjCbXzFmRz89E0Q=;\r
+ b=Hhbmb7KapOfTXDJWiPipqtvLS3BD7imZ8TzJ5EmexkbXTyKMdCjEw18k3+crf+Cgqx\r
+ /n0FdNhsc+4V0TTUAHmsXzUsE3CFwv290xujXxDn7bjxDgpInAV7mkACIdKp7DSsnAEC\r
+ 5L3Ny1odMxzFhqrf1scRfcXgPf4odcwUT0FIKTnhvk9BktxoDpoFmMWn7soWPvZN6cBb\r
+ SAJd+wIBI9LZwDmJiYSnOz9M7OnFl3365ObTAZG7ZhiJt0rfrpZH4FUAMXbbd1fNi5Pj\r
+ p+DVjXC2WX8UUi2S7UICQ3aFFGRj+2JT89ii46B6mRGcWtfG2v0T79cmlDh8I1R68wbk\r
+ 3X2Q==\r
+X-Gm-Message-State:\r
+ ALoCoQmWMA+TwRrIkMiWZaF0zvqPKN3pK3/BqFA66OeIWu9jaNup19EtF8SUSHR5Suiq3xj7a26l\r
+X-Received: by 10.194.62.104 with SMTP id x8mr19044874wjr.15.1401435787588;\r
+ Fri, 30 May 2014 00:43:07 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
+ [88.195.111.91])\r
+ by mx.google.com with ESMTPSA id qq5sm3714495wic.10.2014.05.30.00.43.05\r
+ for <multiple recipients>\r
+ (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Fri, 30 May 2014 00:43:06 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/2] build: generate sh.config for feeding configure results\r
+ to shell scripts\r
+Date: Fri, 30 May 2014 10:43:04 +0300\r
+Message-Id: <1401435785-2894-1-git-send-email-jani@nikula.org>\r
+X-Mailer: git-send-email 2.0.0.rc2\r
+In-Reply-To: <m2lhtphn1b.fsf@guru.guru-group.fi>\r
+References: <m2lhtphn1b.fsf@guru.guru-group.fi>\r
+Cc: Tomi Ollila <tomi.ollila@iki.fi>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 30 May 2014 07:43:14 -0000\r
+\r
+Only include the relevant information.\r
+---\r
+ Makefile.local | 2 +-\r
+ configure | 13 +++++++++++++\r
+ 2 files changed, 14 insertions(+), 1 deletion(-)\r
+\r
+diff --git a/Makefile.local b/Makefile.local\r
+index 3377d55e1d49..31e524070849 100644\r
+--- a/Makefile.local\r
++++ b/Makefile.local\r
+@@ -338,7 +338,7 @@ SRCS := $(SRCS) $(notmuch_client_srcs)\r
+ CLEAN := $(CLEAN) notmuch notmuch-shared $(notmuch_client_modules)\r
+ CLEAN := $(CLEAN) version.stamp notmuch-*.tar.gz.tmp\r
+ \r
+-DISTCLEAN := $(DISTCLEAN) .first-build-message Makefile.config\r
++DISTCLEAN := $(DISTCLEAN) .first-build-message Makefile.config sh.config\r
+ \r
+ DEPS := $(SRCS:%.c=.deps/%.d)\r
+ DEPS := $(DEPS:%.cc=.deps/%.d)\r
+diff --git a/configure b/configure\r
+index 9bde2eb72b0e..4e3d2c4ac0b2 100755\r
+--- a/configure\r
++++ b/configure\r
+@@ -935,3 +935,16 @@ CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\\r
+ \r
+ CONFIGURE_LDFLAGS = \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(ZLIB_LDFLAGS) \$(XAPIAN_LDFLAGS)\r
+ EOF\r
++\r
++# construct the sh.config\r
++cat > sh.config <<EOF\r
++# This sh.config was automatically generated by the ./configure\r
++# script of notmuch.\r
++\r
++# Whether the Xapian version in use supports compaction\r
++_HAVE_XAPIAN_COMPACT=${have_xapian_compact}\r
++\r
++# Whether there's either sphinx or rst2man available for building\r
++# documentation\r
++_HAVE_MAN=$((have_sphinx || have_rst2man))\r
++EOF\r
+-- \r
+2.0.0.rc2\r
+\r