Re: [PATCH] configure: add --without-api-docs option
[notmuch-archives.git] / 7b / 09b0b5725680dcda8e384547e0338cab6e000a
1 Return-Path: <fraser@bacardi.hollandpark.frase.id.au>\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 17079431FC7\r
6         for <notmuch@notmuchmail.org>; Wed, 21 May 2014 02:15:27 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id Lh+AppB90J3F for <notmuch@notmuchmail.org>;\r
16         Wed, 21 May 2014 02:15:23 -0700 (PDT)\r
17 X-Greylist: delayed 937 seconds by postgrey-1.32 at olra;\r
18         Wed, 21 May 2014 02:15:22 PDT\r
19 Received: from captainmorgan.hollandpark.frase.id.au\r
20         (110-174-235-130.static.tpgi.com.au [110.174.235.130])\r
21         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
22         (No client certificate requested)\r
23         by olra.theworths.org (Postfix) with ESMTPS id DEA3A431FC4\r
24         for <notmuch@notmuchmail.org>; Wed, 21 May 2014 02:15:22 -0700 (PDT)\r
25 Received: from bacardi.hollandpark.frase.id.au\r
26         (bacardi.hollandpark.frase.id.au [192.168.0.100])\r
27         by captainmorgan.hollandpark.frase.id.au (8.14.5/8.14.5) with ESMTP id\r
28         s4L8xXlV023172; Wed, 21 May 2014 18:59:33 +1000 (EST)\r
29         (envelope-from fraser@bacardi.hollandpark.frase.id.au)\r
30 Received: from bacardi.hollandpark.frase.id.au (localhost [127.0.0.1])\r
31         by bacardi.hollandpark.frase.id.au (8.14.7/8.14.7) with ESMTP id\r
32         s4L8xXtQ068601\r
33         (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256\r
34         verify=NO); Wed, 21 May 2014 18:59:33 +1000 (EST)\r
35         (envelope-from fraser@bacardi.hollandpark.frase.id.au)\r
36 Received: (from fraser@localhost)\r
37         by bacardi.hollandpark.frase.id.au (8.14.7/8.14.7/Submit) id\r
38         s4L8xXt3068600; Wed, 21 May 2014 18:59:33 +1000 (EST)\r
39         (envelope-from fraser)\r
40 From: Fraser Tweedale <frase@frase.id.au>\r
41 To: notmuch@notmuchmail.org\r
42 Subject: [PATCH] configure: use cc/c++ when GCC not installed\r
43 Date: Wed, 21 May 2014 18:58:41 +1000\r
44 Message-Id: <1400662721-68562-1-git-send-email-frase@frase.id.au>\r
45 X-Mailer: git-send-email 1.9.2\r
46 X-Mailman-Approved-At: Wed, 21 May 2014 12:30:39 -0700\r
47 Cc: Fraser Tweedale <frase@frase.id.au>\r
48 X-BeenThere: notmuch@notmuchmail.org\r
49 X-Mailman-Version: 2.1.13\r
50 Precedence: list\r
51 List-Id: "Use and development of the notmuch mail system."\r
52         <notmuch.notmuchmail.org>\r
53 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
55 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
56 List-Post: <mailto:notmuch@notmuchmail.org>\r
57 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
58 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
59         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
60 X-List-Received-Date: Wed, 21 May 2014 09:15:27 -0000\r
61 \r
62 Some systems (e.g. FreeBSD 10) do not ship with the GNU Compiler\r
63 Collection.  Use generic cc/c++ as a fallback when gcc/g++ are not\r
64 available.\r
65 ---\r
66  configure | 12 ++++++++++--\r
67  1 file changed, 10 insertions(+), 2 deletions(-)\r
68 \r
69 diff --git a/configure b/configure\r
70 index 9bde2eb..3f4942b 100755\r
71 --- a/configure\r
72 +++ b/configure\r
73 @@ -43,8 +43,16 @@ fi\r
74  \r
75  # Set several defaults (optionally specified by the user in\r
76  # environment variables)\r
77 -CC=${CC:-gcc}\r
78 -CXX=${CXX:-g++}\r
79 +if which gcc >/dev/null 2>&1; then\r
80 +    CC=${CC:-gcc}\r
81 +else\r
82 +    CC=${CC:-cc}\r
83 +fi\r
84 +if which g++ >/dev/null 2>&1; then\r
85 +    CXX=${CXX:-g++}\r
86 +else\r
87 +    CXX=${CXX:-c++}\r
88 +fi\r
89  CFLAGS=${CFLAGS:--O2}\r
90  CPPFLAGS=${CPPFLAGS:-}\r
91  CXXFLAGS=${CXXFLAGS:-\$(CFLAGS)}\r
92 -- \r
93 1.9.2\r
94 \r