* [PATCH] Fix configure script to properly detect gmime-2.6 if available.
@ 2012-03-08 16:45 Jameson Graef Rollins
2012-03-10 17:54 ` [PATCH] Allow selecting which version of gmime is used to build notmuch Tom Prince
2012-03-11 1:48 ` [PATCH] Fix configure script to properly detect gmime-2.6 if available David Bremner
0 siblings, 2 replies; 7+ messages in thread
From: Jameson Graef Rollins @ 2012-03-08 16:45 UTC (permalink / raw)
To: Notmuch Mail
Previously, the configure script would appear to detect gmime-2.6 if
present. However, the binaries would end up being compiled against
gmime-2.4. The addition of a break fixes things so that now gmime-2.6
will be used if available, falling back to gmime-2.4.
---
I was wondering why I wasn't seeing any of the problems bremner is
reporting, even though I thought I had been using gmime-2.6 for the
last month. Apparently I had actually been using gmime-2.4 because of
this bug in the configure script. Linking will now be correct after
reconfigure.
configure | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/configure b/configure
index 8b85b9d..dedb7d8 100755
--- a/configure
+++ b/configure
@@ -281,6 +281,7 @@ for gmimepc in gmime-2.6 gmime-2.4; do
have_gmime=1
gmime_cflags=$(pkg-config --cflags $gmimepc)
gmime_ldflags=$(pkg-config --libs $gmimepc)
+ break
fi
done
if [ "$have_gmime" = "0" ]; then
--
1.7.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] Allow selecting which version of gmime is used to build notmuch.
2012-03-08 16:45 [PATCH] Fix configure script to properly detect gmime-2.6 if available Jameson Graef Rollins
@ 2012-03-10 17:54 ` Tom Prince
2012-03-14 14:59 ` [PATCH 1/2] configure: store $IFS to $DEFAULT_IFS readonly variable Tomi Ollila
2012-03-11 1:48 ` [PATCH] Fix configure script to properly detect gmime-2.6 if available David Bremner
1 sibling, 1 reply; 7+ messages in thread
From: Tom Prince @ 2012-03-10 17:54 UTC (permalink / raw)
To: Notmuch Mail
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] Fix configure script to properly detect gmime-2.6 if available.
2012-03-08 16:45 [PATCH] Fix configure script to properly detect gmime-2.6 if available Jameson Graef Rollins
2012-03-10 17:54 ` [PATCH] Allow selecting which version of gmime is used to build notmuch Tom Prince
@ 2012-03-11 1:48 ` David Bremner
1 sibling, 0 replies; 7+ messages in thread
From: David Bremner @ 2012-03-11 1:48 UTC (permalink / raw)
To: Jameson Graef Rollins, Notmuch Mail
On Thu, 8 Mar 2012 08:45:01 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> Previously, the configure script would appear to detect gmime-2.6 if
> present. However, the binaries would end up being compiled against
> gmime-2.4. The addition of a break fixes things so that now gmime-2.6
> will be used if available, falling back to gmime-2.4.
pushed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] configure: store $IFS to $DEFAULT_IFS readonly variable
2012-03-10 17:54 ` [PATCH] Allow selecting which version of gmime is used to build notmuch Tom Prince
@ 2012-03-14 14:59 ` Tomi Ollila
2012-03-14 15:00 ` [PATCH 2/2] Allow selecting which version of gmime is used to build notmuch Tomi Ollila
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Tomi Ollila @ 2012-03-14 14:59 UTC (permalink / raw)
To: notmuch; +Cc: Tomi Ollila
In the future, IFS value needs to be changed in a few places
in configure -- and then restored. Store the original value
to $DEFAULT_IFS for easy restoration.
---
configure | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index ee0ae73..3b2b6b7 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,8 @@
#! /bin/sh
+# Store original IFS value so it can be changed (and restored) in many places.
+readonly DEFAULT_IFS=$IFS
+
srcdir=$(dirname "$0")
# For a non-srcdir configure invocation (such as ../configure), create
@@ -379,7 +382,6 @@ elif [ $uname = "Linux" ] ; then
# IFS=$(printf '\n')
#
# because the shell's command substitution deletes any trailing newlines.
- OLD_IFS=$IFS
IFS="
"
for path in $ldconfig_paths; do
@@ -387,7 +389,7 @@ elif [ $uname = "Linux" ] ; then
libdir_in_ldconfig=1
fi
done
- IFS=$OLD_IFS
+ IFS=$DEFAULT_IFS
if [ "$libdir_in_ldconfig" = '0' ]; then
printf "No (will set RPATH)\n"
else
@@ -536,7 +538,7 @@ done
printf "\n\t${WARN_CFLAGS}\n"
rm -f minimal minimal.c
-
+
cat <<EOF
All required packages were found. You may now run the following
--
1.7.8.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] Allow selecting which version of gmime is used to build notmuch.
2012-03-14 14:59 ` [PATCH 1/2] configure: store $IFS to $DEFAULT_IFS readonly variable Tomi Ollila
@ 2012-03-14 15:00 ` Tomi Ollila
2012-03-18 13:31 ` [PATCH 1/2] configure: store $IFS to $DEFAULT_IFS readonly variable David Bremner
2012-03-20 11:19 ` David Bremner
2 siblings, 0 replies; 7+ messages in thread
From: Tomi Ollila @ 2012-03-14 15:00 UTC (permalink / raw)
To: notmuch; +Cc: Tomi Ollila
This allows for testing against both versions of gmime on a single
machine, without having to mess with pkg-config paths.
This is rework of Tom Prince's patch submitted in
id:"1331402091-15663-1-git-send-email-tom.prince@ualberta.net"
---
configure | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/configure b/configure
index 3b2b6b7..1fb6cb7 100755
--- a/configure
+++ b/configure
@@ -48,6 +48,11 @@ WITH_EMACS=1
WITH_BASH=1
WITH_ZSH=1
+GMIME_24_VERSION='gmime-2.4'
+GMIME_26_VERSION='gmime-2.6 >= 2.6.7'
+
+WITH_GMIME_VERSIONS="$GMIME_26_VERSION;$GMIME_24_VERSION"
+
usage ()
{
cat <<EOF
@@ -173,6 +178,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_24_VERSION
+ elif [ "${option#*=}" = '2.6' ]; then
+ WITH_GMIME_VERSIONS=$GMIME_26_VERSION
+ fi
elif [ "${option%%=*}" = '--build' ] ; then
build_option="${option#*=}"
case ${build_option} in
@@ -280,7 +291,8 @@ fi
# crypto bug. We need 2.6.7 for permissive "From " header handling.
printf "Checking for GMime development files... "
have_gmime=0
-for gmimepc in 'gmime-2.6 >= 2.6.7' gmime-2.4; do
+IFS=';'
+for gmimepc in $WITH_GMIME_VERSIONS; do
if pkg-config --exists $gmimepc; then
printf "Yes ($gmimepc).\n"
have_gmime=1
@@ -289,6 +301,7 @@ for gmimepc in 'gmime-2.6 >= 2.6.7' gmime-2.4; do
break
fi
done
+IFS=$DEFAULT_IFS
if [ "$have_gmime" = "0" ]; then
printf "No.\n"
errors=$((errors + 1))
--
1.7.8.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] configure: store $IFS to $DEFAULT_IFS readonly variable
2012-03-14 14:59 ` [PATCH 1/2] configure: store $IFS to $DEFAULT_IFS readonly variable Tomi Ollila
2012-03-14 15:00 ` [PATCH 2/2] Allow selecting which version of gmime is used to build notmuch Tomi Ollila
@ 2012-03-18 13:31 ` David Bremner
2012-03-20 11:19 ` David Bremner
2 siblings, 0 replies; 7+ messages in thread
From: David Bremner @ 2012-03-18 13:31 UTC (permalink / raw)
To: Tomi Ollila, notmuch
On Wed, 14 Mar 2012 16:59:59 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:
> In the future, IFS value needs to be changed in a few places
> in configure -- and then restored. Store the original value
> to $DEFAULT_IFS for easy restoration.
Both of these look sensible to me, I'll push them in few days unless I
hear objections.
d
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] configure: store $IFS to $DEFAULT_IFS readonly variable
2012-03-14 14:59 ` [PATCH 1/2] configure: store $IFS to $DEFAULT_IFS readonly variable Tomi Ollila
2012-03-14 15:00 ` [PATCH 2/2] Allow selecting which version of gmime is used to build notmuch Tomi Ollila
2012-03-18 13:31 ` [PATCH 1/2] configure: store $IFS to $DEFAULT_IFS readonly variable David Bremner
@ 2012-03-20 11:19 ` David Bremner
2 siblings, 0 replies; 7+ messages in thread
From: David Bremner @ 2012-03-20 11:19 UTC (permalink / raw)
To: Tomi Ollila, notmuch
On Wed, 14 Mar 2012 16:59:59 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:
> In the future, IFS value needs to be changed in a few places
> in configure -- and then restored. Store the original value
> to $DEFAULT_IFS for easy restoration.
pushed both,
d
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-03-20 11:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-08 16:45 [PATCH] Fix configure script to properly detect gmime-2.6 if available Jameson Graef Rollins
2012-03-10 17:54 ` [PATCH] Allow selecting which version of gmime is used to build notmuch Tom Prince
2012-03-14 14:59 ` [PATCH 1/2] configure: store $IFS to $DEFAULT_IFS readonly variable Tomi Ollila
2012-03-14 15:00 ` [PATCH 2/2] Allow selecting which version of gmime is used to build notmuch Tomi Ollila
2012-03-18 13:31 ` [PATCH 1/2] configure: store $IFS to $DEFAULT_IFS readonly variable David Bremner
2012-03-20 11:19 ` David Bremner
2012-03-11 1:48 ` [PATCH] Fix configure script to properly detect gmime-2.6 if available David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).