summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure140
1 files changed, 0 insertions, 140 deletions
diff --git a/configure b/configure
deleted file mode 100755
index c3a3ae3191..0000000000
--- a/configure
+++ /dev/null
@@ -1,140 +0,0 @@
-#!/usr/bin/env bash
-
-set -euo pipefail
-
-INPUT_FILE=$1
-OUTPUT_FILE=$2
-export MASON_PLATFORM=$3
-export MASON_PLATFORM_VERSION=${4:-}
-
-if [ "${MASON_PLATFORM}" = "macos" ]; then
- export MASON_PLATFORM=osx
-fi
-
-if [ -z ${INPUT_FILE} ]; then
- abort 'You need to specify an input path for the configure.sh file'
-fi
-
-if [ -z ${OUTPUT_FILE} ]; then
- abort 'You need to specify an output path for the configuration file'
-fi
-
-# Make sure we clear all colors
-trap '>&2 echo -en "\033[0m"' TERM INT
-
-function abort { >&2 echo -e "\033[1m\033[31m$1\033[0m"; exit 1; }
-function info { >&2 echo -e "\033[1m\033[33m$1\033[0m"; }
-function warn { >&2 echo -e "\033[1m\033[33m$1\033[0m"; }
-
-if [ -e "`pwd`/.git" ]; then
- export MASON_DIR="`pwd`/.mason"
- export PATH="${MASON_DIR}:${PATH}"
-else
- which mason || abort "You must install mason to build mapbox-gl-native (https://github.com/mapbox/mason)"
- export MASON_DIR="$(dirname $(readlink $(which mason)))"
-fi
-
-# You can override the function for a particular set of flags by defining a
-# print_XXX_flags function in your dependencies.sh file
-function print_flags {
- local NAME=$1; shift
- if [ "$(type -t print_${NAME}_flags)" = 'function' ]; then
- print_${NAME}_flags
- else
- local VERSION=`echo "${NAME}_VERSION" | tr "[:lower:]-." "[:upper:]__"`
- if [ ! -z ${!VERSION:-} ] ; then
- mason install ${NAME} ${!VERSION}
- for FLAGS in "$@" ; do
- flags=$(mason ${FLAGS} ${NAME} ${!VERSION}) || exit 1
- CONFIG+=" '${NAME}_${FLAGS}%': $(quote_flags $flags),"$LN
- done
- else
- warn "* Not using ${NAME}"
- for FLAGS in "$@" ; do
- CONFIG+=" '${NAME}_${FLAGS}%': [],"$LN
- done
- fi
- fi
-}
-
-function print_default_flags {
- :
-}
-
-function print_opengl_flags {
- CONFIG+=" 'opengl_cflags%': [],"$LN
- CONFIG+=" 'opengl_ldflags%': [],"$LN
-}
-
-function print_qt_flags {
- :
-}
-
-# Load dependencies
-source ${INPUT_FILE}
-
-PYTHON=`which python || abort 'Cannot find python'`
-
->&2 echo -en "\033[1m\033[32m* Using "
->&2 ${PYTHON} --version
->&2 echo -en "\033[0m";
-
-function quote_flags {
- ${PYTHON} -c "import sys, re; print filter(None, re.split('(?<!-framework)\s+', ' '.join(sys.argv[1:])))" "$@"
-}
-
-LN=$'\n'
-
-CONFIG="# Do not edit. Generated by the configure script.
-{
- 'target_defaults': {
- 'cflags%': [],
- 'default_configuration': 'Release',
- 'defines': [],
- 'include_dirs': [],
- 'libraries': [],
-"
-
-print_default_flags
-
-CONFIG+=" },"$LN
-CONFIG+=" 'variables': {"$LN
-
-print_opengl_flags
-print_qt_flags
-
-print_flags unique_resource cflags
-print_flags protozero cflags
-print_flags boost cflags
-print_flags boost_libprogram_options static_libs
-print_flags openssl static_libs cflags ldflags
-print_flags libcurl static_libs cflags ldflags
-print_flags glfw static_libs cflags ldflags
-print_flags libpng static_libs cflags ldflags
-print_flags libjpeg-turbo static_libs cflags ldflags
-print_flags sqlite static_libs cflags ldflags
-print_flags libuv static_libs cflags ldflags
-print_flags zlib static_libs cflags ldflags
-print_flags nunicode static_libs cflags ldflags
-print_flags libzip static_libs cflags ldflags
-print_flags geometry cflags
-print_flags geojson static_libs cflags ldflags
-print_flags geojsonvt cflags
-print_flags supercluster cflags
-print_flags kdbush cflags
-print_flags variant cflags
-print_flags rapidjson static_libs cflags ldflags
-print_flags gtest static_libs cflags ldflags
-print_flags pixelmatch static_libs cflags ldflags
-print_flags webp static_libs cflags ldflags
-print_flags jni.hpp cflags
-print_flags earcut cflags
-print_flags benchmark static_libs cflags ldflags
-
-CONFIG+=" }
-}
-"
-
-mkdir -p $(dirname "${OUTPUT_FILE}")
-echo "${CONFIG}" > ${OUTPUT_FILE}
-cat ${OUTPUT_FILE}