From: Fraser Tweedale Date: Wed, 21 May 2014 08:58:41 +0000 (+1000) Subject: [PATCH] configure: use cc/c++ when GCC not installed X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f16eb76f8bf52f37cf9f2c0b325874c41bfe432e;p=notmuch-archives.git [PATCH] configure: use cc/c++ when GCC not installed --- diff --git a/7b/09b0b5725680dcda8e384547e0338cab6e000a b/7b/09b0b5725680dcda8e384547e0338cab6e000a new file mode 100644 index 000000000..a71844d88 --- /dev/null +++ b/7b/09b0b5725680dcda8e384547e0338cab6e000a @@ -0,0 +1,94 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 17079431FC7 + for ; Wed, 21 May 2014 02:15:27 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id Lh+AppB90J3F for ; + Wed, 21 May 2014 02:15:23 -0700 (PDT) +X-Greylist: delayed 937 seconds by postgrey-1.32 at olra; + Wed, 21 May 2014 02:15:22 PDT +Received: from captainmorgan.hollandpark.frase.id.au + (110-174-235-130.static.tpgi.com.au [110.174.235.130]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id DEA3A431FC4 + for ; Wed, 21 May 2014 02:15:22 -0700 (PDT) +Received: from bacardi.hollandpark.frase.id.au + (bacardi.hollandpark.frase.id.au [192.168.0.100]) + by captainmorgan.hollandpark.frase.id.au (8.14.5/8.14.5) with ESMTP id + s4L8xXlV023172; Wed, 21 May 2014 18:59:33 +1000 (EST) + (envelope-from fraser@bacardi.hollandpark.frase.id.au) +Received: from bacardi.hollandpark.frase.id.au (localhost [127.0.0.1]) + by bacardi.hollandpark.frase.id.au (8.14.7/8.14.7) with ESMTP id + s4L8xXtQ068601 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 + verify=NO); Wed, 21 May 2014 18:59:33 +1000 (EST) + (envelope-from fraser@bacardi.hollandpark.frase.id.au) +Received: (from fraser@localhost) + by bacardi.hollandpark.frase.id.au (8.14.7/8.14.7/Submit) id + s4L8xXt3068600; Wed, 21 May 2014 18:59:33 +1000 (EST) + (envelope-from fraser) +From: Fraser Tweedale +To: notmuch@notmuchmail.org +Subject: [PATCH] configure: use cc/c++ when GCC not installed +Date: Wed, 21 May 2014 18:58:41 +1000 +Message-Id: <1400662721-68562-1-git-send-email-frase@frase.id.au> +X-Mailer: git-send-email 1.9.2 +X-Mailman-Approved-At: Wed, 21 May 2014 12:30:39 -0700 +Cc: Fraser Tweedale +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Wed, 21 May 2014 09:15:27 -0000 + +Some systems (e.g. FreeBSD 10) do not ship with the GNU Compiler +Collection. Use generic cc/c++ as a fallback when gcc/g++ are not +available. +--- + configure | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index 9bde2eb..3f4942b 100755 +--- a/configure ++++ b/configure +@@ -43,8 +43,16 @@ fi + + # Set several defaults (optionally specified by the user in + # environment variables) +-CC=${CC:-gcc} +-CXX=${CXX:-g++} ++if which gcc >/dev/null 2>&1; then ++ CC=${CC:-gcc} ++else ++ CC=${CC:-cc} ++fi ++if which g++ >/dev/null 2>&1; then ++ CXX=${CXX:-g++} ++else ++ CXX=${CXX:-c++} ++fi + CFLAGS=${CFLAGS:--O2} + CPPFLAGS=${CPPFLAGS:-} + CXXFLAGS=${CXXFLAGS:-\$(CFLAGS)} +-- +1.9.2 +