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 90C706DE13EA
\r
6 for <notmuch@notmuchmail.org>; Wed, 20 May 2015 01:15:24 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=0.297 tagged_above=-999 required=5 tests=[AWL=0.287,
\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 jLMuswl6qLhB for <notmuch@notmuchmail.org>;
\r
16 Wed, 20 May 2015 01:15:22 -0700 (PDT)
\r
17 Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net
\r
19 by arlo.cworth.org (Postfix) with ESMTPS id C42486DE13DA
\r
20 for <notmuch@notmuchmail.org>; Wed, 20 May 2015 01:15:21 -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 1Yuz7m-0003UU-8B; Wed, 20 May 2015 08:13:10 +0000
\r
24 Received: (nullmailer pid 16941 invoked by uid 1000); Wed, 20 May 2015
\r
26 From: David Bremner <david@tethera.net>
\r
27 To: Tomi Ollila <tomi.ollila@iki.fi>, David Bremner <david@tethera.net>,
\r
28 Ronny Chevalier <chevalier.ronny@gmail.com>
\r
29 Subject: [PATCH] configure: Add sanity checking for environment variables
\r
30 Date: Wed, 20 May 2015 10:12:31 +0200
\r
31 Message-Id: <1432109551-16861-1-git-send-email-david@tethera.net>
\r
32 X-Mailer: git-send-email 2.1.4
\r
33 In-Reply-To: <m2617onuhh.fsf@guru.guru-group.fi>
\r
34 References: <m2617onuhh.fsf@guru.guru-group.fi>
\r
35 Cc: notmuch@notmuchmail.org
\r
36 X-BeenThere: notmuch@notmuchmail.org
\r
37 X-Mailman-Version: 2.1.18
\r
39 List-Id: "Use and development of the notmuch mail system."
\r
40 <notmuch.notmuchmail.org>
\r
41 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
42 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
43 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
44 List-Post: <mailto:notmuch@notmuchmail.org>
\r
45 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
46 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
47 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
48 X-List-Received-Date: Wed, 20 May 2015 08:15:24 -0000
\r
50 Passing in environment variables incompatible with the compiler may
\r
51 cause other parts of the configure script to fail in hard to
\r
52 understand ways, so we abort early.
\r
55 meh, the previous version was borken by lazy evaluation of CXXFLAGS
\r
56 using make syntax. Better suggestions for how to do this?
\r
58 configure | 31 +++++++++++++++++++++++++++++--
\r
59 1 file changed, 29 insertions(+), 2 deletions(-)
\r
61 diff --git a/configure b/configure
\r
62 index 4af7ba9..650b976 100755
\r
65 @@ -269,6 +269,35 @@ dependencies are available:
\r
69 +printf "int main(void){return 0;}\n" > minimal.c
\r
71 +printf "Sanity checking C compilation environment... "
\r
72 +if ${CC} ${CFLAGS} ${CPPFLAGS} minimal.c ${LDFLAGS} -o minimal > /dev/null 2>&1
\r
77 + errors=$((errors + 1))
\r
80 +printf "Sanity checking C++ compilation environment... "
\r
81 +if ${CXX} ${CXXFLAGS_for_sh} ${CPPFLAGS} minimal.c ${LDFLAGS} -o minimal > /dev/null 2>&1
\r
86 + errors=$((errors + 1))
\r
89 +if [ $errors -gt 0 ]; then
\r
91 +*** Error: Initial sanity checking of environment failed. Please try
\r
92 +running configure in a clean environment, and if the problem persists,
\r
95 + rm -f minimal minimal.c
\r
99 if pkg-config --version > /dev/null 2>&1; then
\r
101 @@ -690,8 +719,6 @@ else
\r
103 rm -f compat/check_asctime
\r
105 -printf "int main(void){return 0;}\n" > minimal.c
\r
107 printf "Checking for rpath support... "
\r
108 if ${CC} -Wl,--enable-new-dtags -Wl,-rpath,/tmp/ -o minimal minimal.c >/dev/null 2>&1
\r