mapnik/configure

33 lines
1.1 KiB
Text
Raw Normal View History

#! /usr/bin/env bash
2017-09-10 17:19:04 +02:00
set -eu
: ${PYTHON:=python}
# Only some shells (Bash and Z shell) support arrays. Therefore,
# the following code provides an alternative for users calling the script
# with shells other than Bash or Z shell (e.g. Debian users using Dash).
THE_SHELL=$(basename $SHELL)
if [ "$THE_SHELL" != "bash" ] && [ "$THE_SHELL" != "zsh" ]; then
if [ -f mapnik-settings.env ]; then
echo "WARNING: Reading from mapnik-settings.env is supported with Bash or Z shell only."
fi
$PYTHON scons/scons.py --implicit-deps-changed configure "$@"
exit 0
fi
2017-09-10 17:19:04 +02:00
# mapnik-settings.env is an optional file to store
# environment variables that should be used before
# running tests like PROJ_LIB, GDAL_DATA, and ICU_DATA
# These do not normally need to be set except when
# building against binary versions of dependencies like
# done via bootstrap.sh
VARS=()
if [ -f mapnik-settings.env ]; then
2017-09-10 17:19:04 +02:00
echo "Inheriting from mapnik-settings.env"
. ./mapnik-settings.env
VARS=( $(cat mapnik-settings.env) )
2017-09-10 17:19:04 +02:00
fi
$PYTHON scons/scons.py --implicit-deps-changed configure ${VARS[*]} "$@"