summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-10-21 12:08:04 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-10-21 12:08:04 +0200
commitef1792fe470a6b280aa2864ae988561c4784ddb2 (patch)
treef4849437593bec0ac0ff4795eb548e9b95fe83ac /configure
parenta1c5e0cdc1ab89bd78953fe4c9d87b08ad8c652d (diff)
downloadqtlocation-mapboxgl-ef1792fe470a6b280aa2864ae988561c4784ddb2.tar.gz
properly detect boost root
[skip ci]
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure31
1 files changed, 23 insertions, 8 deletions
diff --git a/configure b/configure
index d02972d0a4..dc32be1356 100755
--- a/configure
+++ b/configure
@@ -6,17 +6,12 @@ set -o pipefail
. ~/.nvm/nvm.sh
nvm use 0.10
-LIBCURL_VERSION=system
-GLFW_VERSION=a21f2377
-LIBPNG_VERSION=1.6.13
-SQLITE_VERSION=system
-LIBUV_VERSION=0.10.28
-
case $MASON_PLATFORM in
'ios')
SQLITE_VERSION=system
LIBPNG_VERSION=1.6.13
LIBUV_VERSION=0.10.28
+ ZLIB_VERSION=system
;;
*)
GLFW_VERSION=a21f2377
@@ -24,12 +19,26 @@ case $MASON_PLATFORM in
LIBPNG_VERSION=system
LIBCURL_VERSION=system
LIBUV_VERSION=0.10.28
+ ZLIB_VERSION=system
;;
esac
+if [ -z "${BOOST_ROOT}" ]; then
+ if [ -d '/usr/local/include/boost' ]; then
+ BOOST_ROOT='/usr/local'
+ elif [ -d '/usr/include/boost' ]; then
+ BOOST_ROOT='/usr'
+ else
+ >&2 echo -e "\033[1m\033[31mCannot find Boost\033[0m";
+ fi
+fi
+
+if [ ! -d "${BOOST_ROOT}/include/boost" ]; then
+ >&2 echo -e "\033[1m\033[31mCannot find Boost at ${BOOST_ROOT}\033[0m";
+else
+ >&2 echo -e "\033[1m\033[32m* Using Boost installation at ${BOOST_ROOT}\033[0m";
+fi
-BOOST_ROOT=/usr
-if [ -d '/usr/local/boost' ]; then BOOST_ROOT='/usr/local' ; fi
function quote_flags {
python -c "import sys, re; print re.split('(?<!-framework)\s+', ' '.join(sys.argv[1:]))" "$@"
@@ -83,6 +92,12 @@ if [ ! -z ${LIBUV_VERSION} ]; then
CONFIG+=$" 'uv_libraries': $(quote_flags $(mason ldflags libuv ${LIBUV_VERSION})),"$LN
fi
+if [ ! -z ${ZLIB_VERSION} ]; then
+ mason install zlib ${ZLIB_VERSION}
+ CONFIG+=$" 'zlib_cflags': $(quote_flags $(mason cflags zlib ${ZLIB_VERSION})),"$LN
+ CONFIG+=$" 'zlib_libraries': $(quote_flags $(mason ldflags zlib ${ZLIB_VERSION})),"$LN
+fi
+
CONFIG+=" }
}
"