File: configure

package info (click to toggle)
mapnik 4.2.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,548 kB
  • sloc: cpp: 163,861; python: 1,190; sh: 690; xml: 161; makefile: 123; perl: 28; lisp: 13
file content (32 lines) | stat: -rwxr-xr-x 1,102 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#! /usr/bin/env bash

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

# 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

if [ -f mapnik-settings.env ]; then
    echo "Inheriting from mapnik-settings.env"
    . ./mapnik-settings.env
    VARS=( $(cat mapnik-settings.env) )
fi

$PYTHON scons/scons.py --implicit-deps-changed configure ${VARS[*]:-} "$@"