--- /dev/null
+Return-Path: <too@guru-group.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 0766B6DE01F9\r
+ for <notmuch@notmuchmail.org>; Fri, 6 May 2016 11:11:37 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.272\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.272 tagged_above=-999 required=5 tests=[AWL=0.281, \r
+ HEADER_FROM_DIFFERENT_DOMAINS=0.001, T_RP_MATCHES_RCVD=-0.01]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id 518xNzqwzhAK for <notmuch@notmuchmail.org>;\r
+ Fri, 6 May 2016 11:11:28 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 73F376DE0159\r
+ for <notmuch@notmuchmail.org>; Fri, 6 May 2016 11:11:28 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+ id 62115100063; Fri, 6 May 2016 21:11:27 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: notmuch@notmuchmail.org\r
+Cc: tomi.ollila@iki.fi\r
+Subject: [PATCH] configure: add set -u\r
+Date: Fri, 6 May 2016 21:11:25 +0300\r
+Message-Id: <1462558285-10936-1-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 2.6.4\r
+In-Reply-To: <1462296224-768-1-git-send-email-tomi.ollila@iki.fi>\r
+References: <1462296224-768-1-git-send-email-tomi.ollila@iki.fi>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://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: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 06 May 2016 18:11:37 -0000\r
+\r
+In case of any unset variable, make ./configure exit with nonzero value;\r
+an attempt to expand an unset variable is a bug in the script\r
+(usually a spelling mistake) and those should not pass through\r
+unnoticed.\r
+---\r
+\r
+I was also doing set -e support but that has quite a few nontrivial\r
+things in it. Set -u catches all lagging c++ compilers and so on ;).\r
+Perhaps later.\r
+\r
+This change requires id:1462296224-768-1-git-send-email-tomi.ollila@iki.fi\r
+to be applied first, otherwise ./configure will not pass.\r
+\r
+ configure | 7 +++++--\r
+ 1 file changed, 5 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/configure b/configure\r
+index 6231d2b..3753e7f 100755\r
+--- a/configure\r
++++ b/configure\r
+@@ -1,5 +1,7 @@\r
+ #! /bin/sh\r
+ \r
++set -u\r
++\r
+ # Test whether this shell is capable of parameter substring processing.\r
+ ( option='a/b'; : ${option#*/} ) 2>/dev/null || {\r
+ echo "\r
+@@ -480,6 +482,7 @@ if pkg-config --exists valgrind; then\r
+ else\r
+ printf "No (but that's fine).\n"\r
+ have_valgrind=0\r
++ valgrind_cflags=\r
+ fi\r
+ \r
+ printf "Checking for bash-completion (>= 1.90)... "\r
+@@ -490,11 +493,11 @@ else\r
+ WITH_BASH=0\r
+ fi\r
+ \r
+-if [ -z "${EMACSLISPDIR}" ]; then\r
++if [ -z "${EMACSLISPDIR-}" ]; then\r
+ EMACSLISPDIR="\$(prefix)/share/emacs/site-lisp"\r
+ fi\r
+ \r
+-if [ -z "${EMACSETCDIR}" ]; then\r
++if [ -z "${EMACSETCDIR-}" ]; then\r
+ EMACSETCDIR="\$(prefix)/share/emacs/site-lisp"\r
+ fi\r
+ \r
+-- \r
+2.8.2\r
+\r