aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2009-12-01 18:33:23 -0800
committerGravatar Carl Worth <cworth@cworth.org>2009-12-01 18:33:23 -0800
commitea2d9a2cbfe6af2a1f7b664e998d09ac5d68d5e0 (patch)
tree8c840ca625919b1071b74502b22914b70c83fe8a /configure
parent4faf809578ca63edc9f23f92d7ce47d60dbc061e (diff)
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
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure11
1 files changed, 10 insertions, 1 deletions
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 <<EOF
Welcome to Notmuch, a system for indexing, searching and tagging your email.
@@ -139,7 +142,7 @@ EOF
fi
printf "Checking for getline... "
-if gcc -o config/have_getline config/have_getline.c > /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 <<EOF
# changes, (and this could happen by simply calling "make" if the
# configure script is updated).
+# The C compiler to use
+CC = ${CC}
+
+# The C++ compiler to use
+CXX = ${CXX}
+
# The prefix to which notmuch should be installed
prefix = /usr/local