[PATCH] Allow selecting which version of gmime is used to build notmuch.

Tom Prince tom.prince at ualberta.net
Sat Mar 10 09:54:51 PST 2012


This allows for testing against both versions of gmime on a single
machine, without having to mess with pkg-config paths.
---
 configure |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index 8b85b9d..630d647 100755
--- a/configure
+++ b/configure
@@ -44,6 +44,7 @@ LIBDIR=
 WITH_EMACS=1
 WITH_BASH=1
 WITH_ZSH=1
+WITH_GMIME_VERSIONS='gmime-2.6 gmime-2.4'
 
 usage ()
 {
@@ -170,6 +171,12 @@ for option; do
 	fi
     elif [ "${option}" = '--without-zsh-completion' ] ; then
 	WITH_ZSH=0
+    elif [ "${option%%=*}" = '--with-gmime-version' ] ; then
+	if [ "${option#*=}" = '2.4' ]; then
+	    WITH_GMIME_VERSIONS='gmime-2.4'
+        elif [ "${option#*=}" = '2.6' ]; then
+	    WITH_GMIME_VERSIONS='gmime-2.6'
+	fi
     elif [ "${option%%=*}" = '--build' ] ; then
 	build_option="${option#*=}"
 	case ${build_option} in
@@ -275,7 +282,7 @@ fi
 
 printf "Checking for GMime development files... "
 have_gmime=0
-for gmimepc in gmime-2.6 gmime-2.4; do
+for gmimepc in $WITH_GMIME_VERSIONS; do
     if pkg-config --exists $gmimepc; then
 	printf "Yes ($gmimepc).\n"
 	have_gmime=1
-- 
1.7.8.4



More information about the notmuch mailing list