1 Return-Path: <ethan.glasser.camp@gmail.com>
\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 D44FE431FB6
\r
6 for <notmuch@notmuchmail.org>; Mon, 25 Jun 2012 13:42:44 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=1.061 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_BL_SPAMCOP_NET=1.246,
\r
14 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_SORBS_WEB=0.614] autolearn=disabled
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id VhjAPrpK3bT3 for <notmuch@notmuchmail.org>;
\r
18 Mon, 25 Jun 2012 13:42:44 -0700 (PDT)
\r
19 Received: from mail-we0-f181.google.com (mail-we0-f181.google.com
\r
20 [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
21 (No client certificate requested)
\r
22 by olra.theworths.org (Postfix) with ESMTPS id D7D04431FAF
\r
23 for <notmuch@notmuchmail.org>; Mon, 25 Jun 2012 13:42:43 -0700 (PDT)
\r
24 Received: by werj55 with SMTP id j55so3641437wer.26
\r
25 for <notmuch@notmuchmail.org>; Mon, 25 Jun 2012 13:42:42 -0700 (PDT)
\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
27 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
28 bh=X6hLOJsWOhhBvyxEGXCGI+3zWvDOb1uiOQcr8AYYYcw=;
\r
29 b=Nj9Rs9twK1+5mm7lmCFT7FIl4swU6WN7iSg7i+iL9kxIlRULl2ZWkPTkO/KtyVc0qe
\r
30 9H4M2xVgK9owhi9Og58d458bCUgKwaIkd9cKdTVKcKY5MtiUeqdtn3RJj6fMrYjbJM+3
\r
31 Oe+Z9aMoO3f+S/Hc5axnUb8Lhy6nU+n7K0jCbwo+QBBbw9yqxfoyKGVQLfgjI29KEsyv
\r
32 4qRJlHEk9pfJ+dpAgndQpxrxOqZbfw9xJqs22iQcA6d6n9RAkQUxzXVw45BAc2nTxZFM
\r
33 iZo4seu2sMxwVQPKOkdHjPXaaOx6HbL2iawftNNNlUF1XAY+vCkkL4UHfmJr4li/axC8
\r
35 Received: by 10.216.144.199 with SMTP id n49mr6604139wej.25.1340656962506;
\r
36 Mon, 25 Jun 2012 13:42:42 -0700 (PDT)
\r
37 Received: from localhost ([195.24.209.21])
\r
38 by mx.google.com with ESMTPS id db7sm18744596wib.6.2012.06.25.13.42.33
\r
39 (version=TLSv1/SSLv3 cipher=OTHER);
\r
40 Mon, 25 Jun 2012 13:42:41 -0700 (PDT)
\r
41 From: Ethan Glasser-Camp <ethan.glasser.camp@gmail.com>
\r
42 To: notmuch@notmuchmail.org
\r
43 Subject: [RFC PATCH 02/14] Introduce uriparser
\r
44 Date: Mon, 25 Jun 2012 16:41:27 -0400
\r
45 Message-Id: <1340656899-5644-3-git-send-email-ethan@betacantrips.com>
\r
46 X-Mailer: git-send-email 1.7.9.5
\r
47 In-Reply-To: <1340656899-5644-1-git-send-email-ethan@betacantrips.com>
\r
48 References: <1340656899-5644-1-git-send-email-ethan@betacantrips.com>
\r
49 X-Mailman-Approved-At: Tue, 26 Jun 2012 03:51:54 -0700
\r
50 X-BeenThere: notmuch@notmuchmail.org
\r
51 X-Mailman-Version: 2.1.13
\r
53 List-Id: "Use and development of the notmuch mail system."
\r
54 <notmuch.notmuchmail.org>
\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
56 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
58 List-Post: <mailto:notmuch@notmuchmail.org>
\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
61 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
62 X-List-Received-Date: Mon, 25 Jun 2012 20:42:45 -0000
\r
64 Seeing as there is no glib-standard way to parse URIs, an external
\r
65 library is needed. This commit introduces another program in compat/
\r
66 and a stanza in ./configure to test if uriparser is there.
\r
68 Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>
\r
70 Makefile.local | 2 +-
\r
71 compat/have_uriparser.c | 17 +++++++++++++++++
\r
72 configure | 23 ++++++++++++++++++++---
\r
73 3 files changed, 38 insertions(+), 4 deletions(-)
\r
74 create mode 100644 compat/have_uriparser.c
\r
76 diff --git a/Makefile.local b/Makefile.local
\r
77 index a890df2..084f44e 100644
\r
78 --- a/Makefile.local
\r
79 +++ b/Makefile.local
\r
80 @@ -41,7 +41,7 @@ PV_FILE=bindings/python/notmuch/version.py
\r
81 # Smash together user's values with our extra values
\r
82 FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CFLAGS) $(WARN_CFLAGS) $(CONFIGURE_CFLAGS) $(extra_cflags)
\r
83 FINAL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(CONFIGURE_CXXFLAGS) $(extra_cflags) $(extra_cxxflags)
\r
84 -FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Lutil -lutil -Llib -lnotmuch $(AS_NEEDED_LDFLAGS) $(GMIME_LDFLAGS) $(TALLOC_LDFLAGS)
\r
85 +FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Lutil -lutil -Llib -lnotmuch $(AS_NEEDED_LDFLAGS) $(GMIME_LDFLAGS) $(TALLOC_LDFLAGS) $(URIPARSER_LDFLAGS)
\r
86 FINAL_NOTMUCH_LINKER = CC
\r
87 ifneq ($(LINKER_RESOLVES_LIBRARY_DEPENDENCIES),1)
\r
88 FINAL_NOTMUCH_LDFLAGS += $(CONFIGURE_LDFLAGS)
\r
89 diff --git a/compat/have_uriparser.c b/compat/have_uriparser.c
\r
90 new file mode 100644
\r
91 index 0000000..d79e51d
\r
93 +++ b/compat/have_uriparser.c
\r
95 +#include <uriparser/Uri.h>
\r
98 +main (int argc, char *argv[])
\r
100 + UriParserStateA state;
\r
102 + char *uriS = NULL;
\r
104 + state.uri = &uri;
\r
105 + if (uriParseUriA (&state, uriS) != URI_SUCCESS) {
\r
107 + uriFreeUriMembersA (&uri);
\r
112 diff --git a/configure b/configure
\r
113 index 3fad424..80aa13c 100755
\r
116 @@ -313,6 +313,19 @@ else
\r
117 errors=$((errors + 1))
\r
120 +printf "Checking for uriparser... "
\r
121 +if ${CC} -o compat/have_uriparser "$srcdir"/compat/have_uriparser.c -luriparser > /dev/null 2>&1
\r
124 + uriparser_ldflags="-luriparser"
\r
129 + errors=$((errors + 1))
\r
131 +rm -f compat/have_uriparser
\r
133 printf "Checking for valgrind development files... "
\r
134 if pkg-config --exists valgrind; then
\r
136 @@ -431,11 +444,11 @@ case a simple command will install everything you need. For example:
\r
138 On Debian and similar systems:
\r
140 - sudo apt-get install libxapian-dev libgmime-2.6-dev libtalloc-dev
\r
141 + sudo apt-get install libxapian-dev libgmime-2.6-dev libtalloc-dev liburiparser-dev
\r
143 Or on Fedora and similar systems:
\r
145 - sudo yum install xapian-core-devel gmime-devel libtalloc-devel
\r
146 + sudo yum install xapian-core-devel gmime-devel libtalloc-devel uriparser-devel
\r
148 On other systems, similar commands can be used, but the details of the
\r
149 package names may be different.
\r
150 @@ -669,6 +682,9 @@ GMIME_LDFLAGS = ${gmime_ldflags}
\r
151 TALLOC_CFLAGS = ${talloc_cflags}
\r
152 TALLOC_LDFLAGS = ${talloc_ldflags}
\r
154 +# Flags needed to link against uriparser
\r
155 +URIPARSER_LDFLAGS = ${uriparser_ldflags}
\r
157 # Flags needed to have linker set rpath attribute
\r
158 RPATH_LDFLAGS = ${rpath_ldflags}
\r
160 @@ -698,5 +714,6 @@ CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\
\r
161 \$(TALLOC_CFLAGS) -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \\
\r
162 \$(VALGRIND_CFLAGS) \$(XAPIAN_CXXFLAGS) \\
\r
163 -DHAVE_STRCASESTR=\$(HAVE_STRCASESTR)
\r
164 -CONFIGURE_LDFLAGS = \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(XAPIAN_LDFLAGS)
\r
165 +CONFIGURE_LDFLAGS = \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(XAPIAN_LDFLAGS) \\
\r
166 + \$(URIPARSER_LDFLAGS)
\r