[PATCH 2/2] Allow selecting which version of gmime is used to build notmuch.
[notmuch-archives.git] / 59 / 563b08a22ee92288cb886dcc8084c22dd6d02f
1 Return-Path: <too@guru.guru-group.fi>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id A4F47431FBF\r
6         for <notmuch@notmuchmail.org>; Wed, 14 Mar 2012 08:00:09 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id oEdIfYhpxJgb for <notmuch@notmuchmail.org>;\r
16         Wed, 14 Mar 2012 08:00:07 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66])\r
18         by olra.theworths.org (Postfix) with ESMTP id 98714431FAF\r
19         for <notmuch@notmuchmail.org>; Wed, 14 Mar 2012 08:00:07 -0700 (PDT)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id 156F668056; Wed, 14 Mar 2012 17:00:07 +0200 (EET)\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>\r
23 To: notmuch@notmuchmail.org\r
24 Subject: [PATCH 2/2] Allow selecting which version of gmime is used to build\r
25         notmuch.\r
26 Date: Wed, 14 Mar 2012 17:00:00 +0200\r
27 Message-Id: <1331737200-16570-2-git-send-email-tomi.ollila@iki.fi>\r
28 X-Mailer: git-send-email 1.7.6.1\r
29 In-Reply-To: <1331737200-16570-1-git-send-email-tomi.ollila@iki.fi>\r
30 References: <1331402091-15663-1-git-send-email-tom.prince@ualberta.net>\r
31         <1331737200-16570-1-git-send-email-tomi.ollila@iki.fi>\r
32 Cc: Tomi Ollila <tomi.ollila@iki.fi>\r
33 X-BeenThere: notmuch@notmuchmail.org\r
34 X-Mailman-Version: 2.1.13\r
35 Precedence: list\r
36 List-Id: "Use and development of the notmuch mail system."\r
37         <notmuch.notmuchmail.org>\r
38 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
39         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
40 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
41 List-Post: <mailto:notmuch@notmuchmail.org>\r
42 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
43 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
45 X-List-Received-Date: Wed, 14 Mar 2012 15:00:09 -0000\r
46 \r
47 This allows for testing against both versions of gmime on a single\r
48 machine, without having to mess with pkg-config paths.\r
49 \r
50 This is rework of Tom Prince's patch submitted in\r
51 id:"1331402091-15663-1-git-send-email-tom.prince@ualberta.net"\r
52 ---\r
53  configure |   15 ++++++++++++++-\r
54  1 files changed, 14 insertions(+), 1 deletions(-)\r
55 \r
56 diff --git a/configure b/configure\r
57 index 3b2b6b7..1fb6cb7 100755\r
58 --- a/configure\r
59 +++ b/configure\r
60 @@ -48,6 +48,11 @@ WITH_EMACS=1\r
61  WITH_BASH=1\r
62  WITH_ZSH=1\r
63  \r
64 +GMIME_24_VERSION='gmime-2.4'\r
65 +GMIME_26_VERSION='gmime-2.6 >= 2.6.7'\r
66 +\r
67 +WITH_GMIME_VERSIONS="$GMIME_26_VERSION;$GMIME_24_VERSION"\r
68 +\r
69  usage ()\r
70  {\r
71      cat <<EOF\r
72 @@ -173,6 +178,12 @@ for option; do\r
73         fi\r
74      elif [ "${option}" = '--without-zsh-completion' ] ; then\r
75         WITH_ZSH=0\r
76 +    elif [ "${option%%=*}" = '--with-gmime-version' ] ; then\r
77 +       if [ "${option#*=}" = '2.4' ]; then\r
78 +            WITH_GMIME_VERSIONS=$GMIME_24_VERSION\r
79 +        elif [ "${option#*=}" = '2.6' ]; then\r
80 +            WITH_GMIME_VERSIONS=$GMIME_26_VERSION\r
81 +       fi\r
82      elif [ "${option%%=*}" = '--build' ] ; then\r
83         build_option="${option#*=}"\r
84         case ${build_option} in\r
85 @@ -280,7 +291,8 @@ fi\r
86  # crypto bug. We need 2.6.7 for permissive "From " header handling.\r
87  printf "Checking for GMime development files... "\r
88  have_gmime=0\r
89 -for gmimepc in 'gmime-2.6 >= 2.6.7' gmime-2.4; do\r
90 +IFS=';'\r
91 +for gmimepc in $WITH_GMIME_VERSIONS; do\r
92      if pkg-config --exists $gmimepc; then\r
93         printf "Yes ($gmimepc).\n"\r
94         have_gmime=1\r
95 @@ -289,6 +301,7 @@ for gmimepc in 'gmime-2.6 >= 2.6.7' gmime-2.4; do\r
96         break\r
97      fi\r
98  done\r
99 +IFS=$DEFAULT_IFS\r
100  if [ "$have_gmime" = "0" ]; then\r
101      printf "No.\n"\r
102      errors=$((errors + 1))\r
103 -- \r
104 1.7.8.2\r
105 \r