1 Return-Path: <bremner@tesseract.cs.unb.ca>
\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 arlo.cworth.org (Postfix) with ESMTP id 274616DE137E
\r
6 for <notmuch@notmuchmail.org>; Tue, 19 May 2015 13:54:59 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=0.3 tagged_above=-999 required=5 tests=[AWL=0.290,
\r
12 T_HEADER_FROM_DIFFERENT_DOMAINS=0.01] autolearn=disabled
\r
13 Received: from arlo.cworth.org ([127.0.0.1])
\r
14 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id Uji9Xiw_BS80 for <notmuch@notmuchmail.org>;
\r
16 Tue, 19 May 2015 13:54:57 -0700 (PDT)
\r
17 Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net
\r
19 by arlo.cworth.org (Postfix) with ESMTPS id 4230F6DE10F8
\r
20 for <notmuch@notmuchmail.org>; Tue, 19 May 2015 13:54:56 -0700 (PDT)
\r
21 Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim
\r
22 4.80) (envelope-from <bremner@tesseract.cs.unb.ca>)
\r
23 id 1YuoVn-0001Py-6M; Tue, 19 May 2015 20:53:15 +0000
\r
24 Received: (nullmailer pid 26675 invoked by uid 1000); Tue, 19 May 2015
\r
26 From: David Bremner <david@tethera.net>
\r
27 To: Ronny Chevalier <chevalier.ronny@gmail.com>, David Bremner
\r
29 Subject: [PATCH] configure: Add sanity checking for environment variables
\r
30 Date: Tue, 19 May 2015 22:52:08 +0200
\r
31 Message-Id: <1432068728-26587-1-git-send-email-david@tethera.net>
\r
32 X-Mailer: git-send-email 2.1.4
\r
34 <CABPZE7+zDwFj7Y1OMU0DVwpwUedK6qUZLQcKEZTMNdRr0A=NeQ@mail.gmail.com>
\r
36 <CABPZE7+zDwFj7Y1OMU0DVwpwUedK6qUZLQcKEZTMNdRr0A=NeQ@mail.gmail.com>
\r
37 Cc: notmuch@notmuchmail.org
\r
38 X-BeenThere: notmuch@notmuchmail.org
\r
39 X-Mailman-Version: 2.1.18
\r
41 List-Id: "Use and development of the notmuch mail system."
\r
42 <notmuch.notmuchmail.org>
\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
44 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
46 List-Post: <mailto:notmuch@notmuchmail.org>
\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
50 X-List-Received-Date: Tue, 19 May 2015 20:54:59 -0000
\r
52 Passing in environment variables incompatible with the compiler may
\r
53 cause other parts of the configure script to fail in hard to
\r
54 understand ways, so we abort early.
\r
57 This doesn't actually fix the problem Ronny points out, but a more
\r
58 serious one where configure can actually fail when using gcc, if
\r
59 e.g. nonsense is passed in CFLAGS.
\r
61 configure | 30 ++++++++++++++++++++++++++++--
\r
62 1 file changed, 28 insertions(+), 2 deletions(-)
\r
64 diff --git a/configure b/configure
\r
65 index 4af7ba9..cf618e8 100755
\r
68 @@ -269,6 +269,34 @@ dependencies are available:
\r
72 +printf "int main(void){return 0;}\n" > minimal.c
\r
74 +printf "Sanity checking C compilation environment... "
\r
75 +if ${CC} ${CFLAGS} ${CPPFLAGS} minimal.c ${LDFLAGS} -o minimal > /dev/null 2>&1
\r
80 + errors=$((errors + 1))
\r
83 +printf "Sanity checking C++ compilation environment... "
\r
84 +if ${CXX} ${CXXFLAGS} ${CPPFLAGS} minimal.c ${LDFLAGS} -o minimal > /dev/null 2>&1
\r
89 + errors=$((errors + 1))
\r
92 +if [ $errors -gt 0 ]; then
\r
94 +*** Error: Initial sanity checking of environment failed. Please try
\r
95 +running configure in a clean environment, and if the problem persists,
\r
101 if pkg-config --version > /dev/null 2>&1; then
\r
103 @@ -690,8 +718,6 @@ else
\r
105 rm -f compat/check_asctime
\r
107 -printf "int main(void){return 0;}\n" > minimal.c
\r
109 printf "Checking for rpath support... "
\r
110 if ${CC} -Wl,--enable-new-dtags -Wl,-rpath,/tmp/ -o minimal minimal.c >/dev/null 2>&1
\r