configure.sh 844 Bytes
Newer Older
IOhannes m zmölnig's avatar
IOhannes m zmölnig committed
1
#!/bin/sh
IOhannes m zmölnig's avatar
IOhannes m zmölnig committed
2
3
4
5
6
7
# this script is intended to be run by Travis
# see https://travis-ci.org/umlaeute/Gem

## it's based on avilleret's work:
# see https://travis-ci.org/avilleret/Gem

8
test -r ${0%/*}/common.source && . ${0%/*}/common.source
IOhannes m zmölnig's avatar
IOhannes m zmölnig committed
9

IOhannes m zmölnig's avatar
IOhannes m zmölnig committed
10
11
cd "${SCRIPTDIR}"

12
error "configuring Gem for $TRAVIS_OS_NAME"
13

IOhannes m zmölnig's avatar
IOhannes m zmölnig committed
14
15
16
17
debug ${GEMDIR}/autogen.sh  || exit 1
mkdir -p "${BUILDDIR}"
cd "${BUILDDIR}"

18
case "$TRAVIS_OS_NAME" in
IOhannes m zmölnig's avatar
IOhannes m zmölnig committed
19
    linux)
20
21
22
23
        if [ "x${ARCH}" != "x" -a "x${ARCH}" != "x$(uname -m)" ]; then
          error "unable to cross-compile for architecture ${ARCH}"
          exit 1
        fi
IOhannes m zmölnig's avatar
IOhannes m zmölnig committed
24
25
	CONFIGUREFLAGS=""
	#CONFIGUREFLAGS="--without-ftgl"
IOhannes m zmölnig's avatar
IOhannes m zmölnig committed
26
27
	;;
    osx)
28
	CONFIGUREFLAGS="--without-ftgl"
IOhannes m zmölnig's avatar
IOhannes m zmölnig committed
29
30
31
32
	if [ "x${ARCH}" != "x" ]; then
	    CONFIGUREFLAGS+=" --enable-fat-binary=${ARCH}"
	fi
	;;
IOhannes m zmölnig's avatar
IOhannes m zmölnig committed
33
34
esac

35
debug "${GEMDIR}/configure" --with-pd="${PDDIR}" ${CONFIGUREFLAGS}