From: Carl Worth Date: Wed, 2 Dec 2009 02:33:23 +0000 (-0800) Subject: configure: Allow user to specify compiler to be used. X-Git-Tag: 0.1~251 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ea2d9a2cbfe6af2a1f7b664e998d09ac5d68d5e0;p=notmuch.git configure: Allow user to specify compiler to be used. The environment variables CC and CXX can be set at configure time to specify what compiler to use. This compiler will be used for any configure-time compilation, and will also be recorded in Makefile.config to be used during the actual build. The compiler to be used can still be overridden at build time by using a make variable such as: make CC=gcc --- diff --git a/configure b/configure index 1097b7c4..cd4a30e2 100755 --- a/configure +++ b/configure @@ -1,5 +1,8 @@ #! /bin/sh +CC=${CC:-gcc} +CXX=${CXX:-g++} + cat < /dev/null 2>&1 +if ${CC} -o config/have_getline config/have_getline.c > /dev/null 2>&1 then printf "Yes.\n" have_getline=1 @@ -168,6 +171,12 @@ cat > Makefile.config <