--- /dev/null
+Return-Path: <bremner@tesseract.cs.unb.ca>\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 77955431FBC\r
+ for <notmuch@notmuchmail.org>; Sat, 3 Jan 2015 04:58:49 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ 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 yYshOHJCJB3n for <notmuch@notmuchmail.org>;\r
+ Sat, 3 Jan 2015 04:58:45 -0800 (PST)\r
+Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
+ (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id CFC6A431FB6\r
+ for <notmuch@notmuchmail.org>; Sat, 3 Jan 2015 04:58:45 -0800 (PST)\r
+Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
+ (envelope-from <bremner@tesseract.cs.unb.ca>)\r
+ id 1Y7OI0-0006EP-MZ; Sat, 03 Jan 2015 08:58:44 -0400\r
+Received: (nullmailer pid 29779 invoked by uid 1000); Sat, 03 Jan 2015\r
+ 12:58:38 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/2] configure: add check for python interepreter name\r
+Date: Sat, 3 Jan 2015 13:58:19 +0100\r
+Message-Id: <1420289900-29717-1-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 2.1.3\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: Sat, 03 Jan 2015 12:58:49 -0000\r
+\r
+Currently we hardcode "python" in several places. This makes things\r
+hard for people who have only commands called python3 and/or\r
+python2. We also add the name to sh.config to eventually replace the\r
+current workaround in the test suite.\r
+---\r
+ configure | 26 ++++++++++++++++++++++++++\r
+ 1 file changed, 26 insertions(+)\r
+\r
+diff --git a/configure b/configure\r
+index d14e7d1..5a02de4 100755\r
+--- a/configure\r
++++ b/configure\r
+@@ -374,6 +374,23 @@ else\r
+ errors=$((errors + 1))\r
+ fi\r
+ \r
++printf "Checking for python... "\r
++have_python=0\r
++\r
++for name in python python2 python3; do\r
++ if command -v $name > /dev/null 2>&1; then\r
++ have_python=1\r
++ python=$name\r
++ printf "Yes: $name.\n"\r
++ break\r
++ fi\r
++done\r
++\r
++if [ $have_python -eq 0 ]; then\r
++ printf "No.\n"\r
++ errors=$((errors + 1))\r
++fi\r
++\r
+ printf "Checking for valgrind development files... "\r
+ if pkg-config --exists valgrind; then\r
+ printf "Yes.\n"\r
+@@ -522,6 +539,9 @@ need to install the following packages before being able to compile\r
+ notmuch:\r
+ \r
+ EOF\r
++ if [ $have_python -eq 0 ]; then\r
++ echo " python interpreter"\r
++ fi\r
+ if [ $have_xapian -eq 0 ]; then\r
+ echo " Xapian library (including development files such as headers)"\r
+ echo " http://xapian.org/"\r
+@@ -787,6 +807,9 @@ WARN_CXXFLAGS=${WARN_CXXFLAGS}\r
+ # Flags to enable warnings when using the C compiler\r
+ WARN_CFLAGS=${WARN_CFLAGS}\r
+ \r
++# Name of python interpreter\r
++PYTHON = ${python}\r
++\r
+ # The prefix to which notmuch should be installed\r
+ # Note: If you change this value here, be sure to ensure that the\r
+ # LIBDIR_IN_LDCONFIG value below is still set correctly.\r
+@@ -958,6 +981,9 @@ NOTMUCH_HAVE_XAPIAN_COMPACT=${have_xapian_compact}\r
+ # Whether there's either sphinx or rst2man available for building\r
+ # documentation\r
+ NOTMUCH_HAVE_MAN=$((have_sphinx || have_rst2man))\r
++\r
++# Name of python interpreter\r
++NOTMUCH_PYTHON=${python}\r
+ EOF\r
+ \r
+ # Finally, after everything configured, inform the user how to continue.\r
+-- \r
+2.1.3\r
+\r