diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-04-17 08:38:53 -0700 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-04-17 08:39:17 -0700 |
commit | 396b551cca4cc4ac023a32f1261e359414fedb72 (patch) | |
tree | cb86059a32f6787cc6c708444beebf3e2e271a4e /setup-libraries.sh | |
parent | 7e3f374bd482e5d7a553482ad0e908cf2a1c0d2f (diff) | |
download | qtlocation-mapboxgl-396b551cca4cc4ac023a32f1261e359414fedb72.tar.gz |
make setup-libraries script work on linux
Diffstat (limited to 'setup-libraries.sh')
-rwxr-xr-x | setup-libraries.sh | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/setup-libraries.sh b/setup-libraries.sh index d3293165f6..9dbbeadb0e 100755 --- a/setup-libraries.sh +++ b/setup-libraries.sh @@ -1,9 +1,18 @@ -#!/bin/sh +#!/bin/bash set -e -u -if [ ! `which aclocal` ] || [ ! `which automake` ] || [ ! `which autoconf` ] || [ ! `which glibtool` ]; then - echo 'autotools commands not found: run "brew install autoconf automake libtool" before continuing' - exit 1 +UNAME=$(uname -s); + +if [ ${UNAME} = 'Darwin' ]; then + if [ ! `which aclocal` ] || [ ! `which automake` ] || [ ! `which autoconf` ] || [ ! `which glibtool` ]; then + echo 'autotools commands not found: run "brew install autoconf automake libtool" before continuing' + exit 1 + fi +elif [ ${UNAME} = 'Linux' ]; then + if [ ! `which aclocal` ] || [ ! `which automake` ] || [ ! `which autoconf` ] || [ ! `which libtool` ]; then + echo 'autotools commands not found: run "sudo apt-get install automake libtool xutils-dev" before continuing' + exit 1 + fi fi if [ ! -d 'mapnik-packaging' ]; then @@ -15,6 +24,7 @@ git pull export CXX11=true +if [ ${UNAME} = 'Darwin' ]; then source iPhoneOS.sh if [ ! -f out/build-cpp11-libcpp-armv7/lib/libpng.a ] ; then ./scripts/build_png.sh ; fi if [ ! -f out/build-cpp11-libcpp-armv7/lib/libuv.a ] ; then ./scripts/build_libuv.sh ; fi @@ -41,7 +51,7 @@ source MacOSX.sh if [ ! -f out/build-cpp11-libcpp-x86_64/lib/libuv.a ] ; then ./scripts/build_libuv.sh ; fi if [ ! -f out/build-cpp11-libcpp-x86_64/lib/libssl.a ] ; then ./scripts/build_openssl.sh ; fi if [ ! -f out/build-cpp11-libcpp-x86_64/lib/libcurl.a ] ; then ./scripts/build_curl.sh ; fi - if [ ! -d out/build-cpp11-libcpp-x86_64/include/boost ] ; then ./scripts/build_boost.sh `pwd`/../../src/ `pwd`/../../linux/ ; fi + if [ ! -d out/build-cpp11-libcpp-x86_64/include/boost ] ; then ./scripts/build_boost.sh `pwd`/../../src/ `pwd`/../../linux/ `pwd`/../../common/ ; fi echo ' ...done' ./scripts/make_universal.sh @@ -49,4 +59,21 @@ source MacOSX.sh cd ../../ ./configure \ --pkg-config-root=`pwd`/mapnik-packaging/osx/out/build-cpp11-libcpp-universal/lib/pkgconfig \ ---boost=`pwd`/mapnik-packaging/osx/out/build-cpp11-libcpp-universal/
\ No newline at end of file +--boost=`pwd`/mapnik-packaging/osx/out/build-cpp11-libcpp-universal/ + +elif [ ${UNAME} = 'Linux' ]; then + +source Linux.sh + if [ ! -f out/build-cpp11-libstdcpp-gcc-x86_64/lib/libpng.a ] ; then ./scripts/build_png.sh ; fi + if [ ! -f out/build-cpp11-libstdcpp-gcc-x86_64/lib/libglfw3.a ] ; then ./scripts/build_glfw.sh ; fi + if [ ! -f out/build-cpp11-libstdcpp-gcc-x86_64/lib/libuv.a ] ; then ./scripts/build_libuv.sh ; fi + if [ ! -f out/build-cpp11-libstdcpp-gcc-x86_64/lib/libssl.a ] ; then ./scripts/build_openssl.sh ; fi + if [ ! -f out/build-cpp11-libstdcpp-gcc-x86_64/lib/libcurl.a ] ; then ./scripts/build_curl.sh ; fi + if [ ! -d out/build-cpp11-libstdcpp-gcc-x86_64/include/boost ] ; then ./scripts/build_boost.sh `pwd`/../../src/ `pwd`/../../linux/ `pwd`/../../common/ ; fi + +cd ../../ +./configure \ +--pkg-config-root=`pwd`/mapnik-packaging/osx/out/build-cpp11-libstdcpp-gcc-x86_64/lib/pkgconfig \ +--boost=`pwd`/mapnik-packaging/osx/out/build-cpp11-libstdcpp-gcc-x86_64/ + +fi |