+SUMMON_DIR=$(pwd)
+SOURCES=${SUMMON_DIR}/sources
+STAMPS=${SUMMON_DIR}/stamps
+
+
+##############################################################################
+# Tool section
+##############################################################################
+TAR=tar
+
+##############################################################################
+# OS and Tooldetection section
+# Detects which tools and flags to use
+##############################################################################
+
+case "$(uname)" in
+ Linux)
+ echo "Found Linux OS."
+ ;;
+ Darwin)
+ echo "Found Darwin OS."
+
+ # darwin dependencies
+ DARWINDEPS="gnu-tar wget mpfr libmpc gmp"
+ DARWINDEPSCOUNT=4
+
+ echo "Installing dependencies"
+ if ! which brew > /dev/null; then
+ echo "homebrew not installed."
+ else
+ brew install ${DARWINDEPS} | grep -v '^Warning: Formula already installed: '
+ fi
+
+ GCCFLAGS="${GCCFLAGS} \
+ --with-gmp=$(brew --prefix gmp) \
+ --with-mpfr=$(brew --prefix mpfr) \
+ --with-mpc=$(brew --prefix mpc)
+ -with-libiconv-prefix=$(brew --prefix libiconv)"