From: Fraser Tweedale Date: Thu, 22 May 2014 10:12:22 +0000 (+1000) Subject: [PATCH v3] configure: use cc/c++ when GCC not installed X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=84e13eb823446f4b58833ad9439512d5d15faa3a;p=notmuch-archives.git [PATCH v3] configure: use cc/c++ when GCC not installed --- diff --git a/f5/feccb1fd045a08a7192ba218f35dc20d60ab1e b/f5/feccb1fd045a08a7192ba218f35dc20d60ab1e new file mode 100644 index 000000000..f4d590285 --- /dev/null +++ b/f5/feccb1fd045a08a7192ba218f35dc20d60ab1e @@ -0,0 +1,93 @@ +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 20F9F431FC4 + for ; Thu, 22 May 2014 03:12:41 -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 fEpVZM5D6mQQ for ; + Thu, 22 May 2014 03:12:36 -0700 (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 648F3431FAE + for ; Thu, 22 May 2014 03:12:35 -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 + s4MACRAL032448; Thu, 22 May 2014 20:12:27 +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 + s4MACRUT098842 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 + verify=NO); Thu, 22 May 2014 20:12:27 +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 + s4MACRFK098841; Thu, 22 May 2014 20:12:27 +1000 (EST) + (envelope-from fraser) +From: Fraser Tweedale +To: notmuch@notmuchmail.org +Subject: [PATCH v3] configure: use cc/c++ when GCC not installed +Date: Thu, 22 May 2014 20:12:22 +1000 +Message-Id: <1400753542-98803-1-git-send-email-frase@frase.id.au> +X-Mailer: git-send-email 1.9.2 +In-Reply-To: +References: +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: Thu, 22 May 2014 10:12:41 -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..59ab87b 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 command -v gcc >/dev/null; then ++ CC=${CC:-gcc} ++else ++ CC=${CC:-cc} ++fi ++if command -v g++ >/dev/null; then ++ CXX=${CXX:-g++} ++else ++ CXX=${CXX:-c++} ++fi + CFLAGS=${CFLAGS:--O2} + CPPFLAGS=${CPPFLAGS:-} + CXXFLAGS=${CXXFLAGS:-\$(CFLAGS)} +-- +1.9.2 +