--- /dev/null
+Return-Path: <too@guru.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 olra.theworths.org (Postfix) with ESMTP id A4F47431FBF\r
+ for <notmuch@notmuchmail.org>; Wed, 14 Mar 2012 08:00:09 -0700 (PDT)\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 oEdIfYhpxJgb for <notmuch@notmuchmail.org>;\r
+ Wed, 14 Mar 2012 08:00:07 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66])\r
+ by olra.theworths.org (Postfix) with ESMTP id 98714431FAF\r
+ for <notmuch@notmuchmail.org>; Wed, 14 Mar 2012 08:00:07 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+ id 156F668056; Wed, 14 Mar 2012 17:00:07 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 2/2] Allow selecting which version of gmime is used to build\r
+ notmuch.\r
+Date: Wed, 14 Mar 2012 17:00:00 +0200\r
+Message-Id: <1331737200-16570-2-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 1.7.6.1\r
+In-Reply-To: <1331737200-16570-1-git-send-email-tomi.ollila@iki.fi>\r
+References: <1331402091-15663-1-git-send-email-tom.prince@ualberta.net>\r
+ <1331737200-16570-1-git-send-email-tomi.ollila@iki.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: Wed, 14 Mar 2012 15:00:09 -0000\r
+\r
+This allows for testing against both versions of gmime on a single\r
+machine, without having to mess with pkg-config paths.\r
+\r
+This is rework of Tom Prince's patch submitted in\r
+id:"1331402091-15663-1-git-send-email-tom.prince@ualberta.net"\r
+---\r
+ configure | 15 ++++++++++++++-\r
+ 1 files changed, 14 insertions(+), 1 deletions(-)\r
+\r
+diff --git a/configure b/configure\r
+index 3b2b6b7..1fb6cb7 100755\r
+--- a/configure\r
++++ b/configure\r
+@@ -48,6 +48,11 @@ WITH_EMACS=1\r
+ WITH_BASH=1\r
+ WITH_ZSH=1\r
+ \r
++GMIME_24_VERSION='gmime-2.4'\r
++GMIME_26_VERSION='gmime-2.6 >= 2.6.7'\r
++\r
++WITH_GMIME_VERSIONS="$GMIME_26_VERSION;$GMIME_24_VERSION"\r
++\r
+ usage ()\r
+ {\r
+ cat <<EOF\r
+@@ -173,6 +178,12 @@ for option; do\r
+ fi\r
+ elif [ "${option}" = '--without-zsh-completion' ] ; then\r
+ WITH_ZSH=0\r
++ elif [ "${option%%=*}" = '--with-gmime-version' ] ; then\r
++ if [ "${option#*=}" = '2.4' ]; then\r
++ WITH_GMIME_VERSIONS=$GMIME_24_VERSION\r
++ elif [ "${option#*=}" = '2.6' ]; then\r
++ WITH_GMIME_VERSIONS=$GMIME_26_VERSION\r
++ fi\r
+ elif [ "${option%%=*}" = '--build' ] ; then\r
+ build_option="${option#*=}"\r
+ case ${build_option} in\r
+@@ -280,7 +291,8 @@ fi\r
+ # crypto bug. We need 2.6.7 for permissive "From " header handling.\r
+ printf "Checking for GMime development files... "\r
+ have_gmime=0\r
+-for gmimepc in 'gmime-2.6 >= 2.6.7' gmime-2.4; do\r
++IFS=';'\r
++for gmimepc in $WITH_GMIME_VERSIONS; do\r
+ if pkg-config --exists $gmimepc; then\r
+ printf "Yes ($gmimepc).\n"\r
+ have_gmime=1\r
+@@ -289,6 +301,7 @@ for gmimepc in 'gmime-2.6 >= 2.6.7' gmime-2.4; do\r
+ break\r
+ fi\r
+ done\r
++IFS=$DEFAULT_IFS\r
+ if [ "$have_gmime" = "0" ]; then\r
+ printf "No.\n"\r
+ errors=$((errors + 1))\r
+-- \r
+1.7.8.2\r
+\r