Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / 27 / af0ef208d6b6614ee604e31c4c5a75bf92ba76
1 Return-Path: <tomi.ollila@iki.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 arlo.cworth.org (Postfix) with ESMTP id D55076DE13DA\r
6  for <notmuch@notmuchmail.org>; Tue, 19 May 2015 14:11:34 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 1.062\r
10 X-Spam-Level: *\r
11 X-Spam-Status: No, score=1.062 tagged_above=-999 required=5 tests=[AWL=0.410, \r
12  SPF_NEUTRAL=0.652] 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 C64P4DqSDwxl for <notmuch@notmuchmail.org>;\r
16  Tue, 19 May 2015 14:11:32 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18  by arlo.cworth.org (Postfix) with ESMTP id 06AA96DE137E\r
19  for <notmuch@notmuchmail.org>; Tue, 19 May 2015 14:11:31 -0700 (PDT)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21  by guru.guru-group.fi (Postfix) with ESMTP id B22C11000F2;\r
22  Wed, 20 May 2015 00:11:06 +0300 (EEST)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: David Bremner <david@tethera.net>,\r
25  Ronny Chevalier <chevalier.ronny@gmail.com>\r
26 Subject: Re: [PATCH] configure: Add sanity checking for environment variables\r
27 In-Reply-To: <1432068728-26587-1-git-send-email-david@tethera.net>\r
28 References:\r
29  <CABPZE7+zDwFj7Y1OMU0DVwpwUedK6qUZLQcKEZTMNdRr0A=NeQ@mail.gmail.com>\r
30  <1432068728-26587-1-git-send-email-david@tethera.net>\r
31 User-Agent: Notmuch/0.19+115~g9a981cb (http://notmuchmail.org) Emacs/24.3.1\r
32  (x86_64-unknown-linux-gnu)\r
33 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
34  $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
35  !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
36 Date: Wed, 20 May 2015 00:11:06 +0300\r
37 Message-ID: <m2617onuhh.fsf@guru.guru-group.fi>\r
38 MIME-Version: 1.0\r
39 Content-Type: text/plain\r
40 Cc: notmuch@notmuchmail.org\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.18\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45  <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Tue, 19 May 2015 21:11:34 -0000\r
54 \r
55 On Tue, May 19 2015, David Bremner <david@tethera.net> wrote:\r
56 \r
57 > Passing in environment variables incompatible with the compiler may\r
58 > cause other parts of the configure script to fail in hard to\r
59 > understand ways, so we abort early.\r
60 > ---\r
61 >\r
62 > This doesn't actually fix the problem Ronny points out, but a more\r
63 > serious one where configure can actually fail when using gcc, if\r
64 > e.g. nonsense is passed in CFLAGS.\r
65 >\r
66 >  configure | 30 ++++++++++++++++++++++++++++--\r
67 >  1 file changed, 28 insertions(+), 2 deletions(-)\r
68 >\r
69 > diff --git a/configure b/configure\r
70 > index 4af7ba9..cf618e8 100755\r
71 > --- a/configure\r
72 > +++ b/configure\r
73 > @@ -269,6 +269,34 @@ dependencies are available:\r
74 >  EOF\r
75 >  \r
76 >  errors=0\r
77 > +printf "int main(void){return 0;}\n" > minimal.c\r
78 > +\r
79 > +printf "Sanity checking C compilation environment... "\r
80 > +if ${CC} ${CFLAGS} ${CPPFLAGS}  minimal.c ${LDFLAGS} -o minimal > /dev/null 2>&1\r
81 \r
82 Looks good, but there is 2 spcs  ^^ there (and same in CXX part)...\r
83 \r
84 ... also minimal.c is not removed if we exit early.\r
85 \r
86 \r
87 In the future we could think of writing all temp files to a subdirectory\r
88 which is cleared out using trap -- then we could drop all temp file\r
89 deletions... but now simple rm -f minimal minimal.c suffices\r
90 \r
91 Tomi\r
92 \r
93 \r
94 > +then\r
95 > +    printf "Ok.\n"\r
96 > +else\r
97 > +    printf "Fail.\n"\r
98 > +    errors=$((errors + 1))\r
99 > +fi\r
100 > +\r
101 > +printf "Sanity checking C++ compilation environment... "\r
102 > +if ${CXX} ${CXXFLAGS} ${CPPFLAGS}  minimal.c ${LDFLAGS} -o minimal > /dev/null 2>&1\r
103 > +then\r
104 > +    printf "Ok.\n"\r
105 > +else\r
106 > +    printf "Fail.\n"\r
107 > +    errors=$((errors + 1))\r
108 > +fi\r
109 > +\r
110 > +if [ $errors -gt 0 ]; then\r
111 > +    cat <<EOF\r
112 > +*** Error: Initial sanity checking of environment failed.  Please try\r
113 > +running configure in a clean environment, and if the problem persists,\r
114 > +report a bug.\r
115 > +EOF\r
116 > +    exit 1\r
117 > +fi\r
118 >  \r
119 >  if pkg-config --version > /dev/null 2>&1; then\r
120 >      have_pkg_config=1\r
121 > @@ -690,8 +718,6 @@ else\r
122 >  fi\r
123 >  rm -f compat/check_asctime\r
124 >  \r
125 > -printf "int main(void){return 0;}\n" > minimal.c\r
126 > -\r
127 >  printf "Checking for rpath support... "\r
128 >  if ${CC} -Wl,--enable-new-dtags -Wl,-rpath,/tmp/ -o minimal minimal.c >/dev/null 2>&1\r
129 >  then\r
130 > -- \r
131 > 2.1.4\r
132 >\r
133 > _______________________________________________\r
134 > notmuch mailing list\r
135 > notmuch@notmuchmail.org\r
136 > http://notmuchmail.org/mailman/listinfo/notmuch\r