From dc9d49a12cd8f9462bb7762813a770dbaa03dfa3 Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Mon, 7 Nov 2011 21:39:11 +0000 Subject: [PATCH] GCC is not required to merely install Cappuccino. --- bootstrap.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index ec80fad39..0b9e1f780 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -81,7 +81,7 @@ function check_and_exit () { fi } -function check_build_environment () { +function check_install_environment () { # make sure dependencies are installed and on the $PATH CAPP_BUILD_DEPS=(java gcc unzip) @@ -113,7 +113,19 @@ function check_build_environment () { fi } -check_build_environment +function check_build_environment () { + CAPP_BUILD_DEPS=(gcc) + + for dep in ${CAPP_BUILD_DEPS[@]}; do + which "$dep" &> /dev/null + if [ ! "$?" = "0" ]; then + echo "Error: $dep is required to build Cappuccino components. Please install $dep and re-run bootstrap.sh." + exit 1 + fi + done +} + +check_install_environment if [ -w "/usr/local" ]; then default_directory="/usr/local/narwhal" @@ -297,6 +309,8 @@ if [ `uname` = "Darwin" ]; then echo "This is optional but will make building and running Cappuccino and Objective-J " echo "much faster." if prompt "yes"; then + check_build_environment + # The narwhal-jsc package is already installed within the base kit. if ! (cd "$install_directory/packages/narwhal-jsc" && make webkit); then rm -rf "$install_directory/packages/narwhal-jsc"