aboutsummaryrefslogtreecommitdiff
path: root/Src/external_dependencies/openmpt-trunk/build/autotools/test_tarball.sh
blob: 5226fb7442fd1abe43a9c5c3416bbac2624c11d1 (plain) (blame)
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
33
34
35
36
37
38
#!/usr/bin/env bash

set -e

# We want ccache
export PATH="/usr/lib/ccache:$PATH"

cd bin/dist-autotools/

if [ "x$1" = "x" ] ; then
	echo "Testing the tarball ..."
	mkdir test-tarball
	cd test-tarball
	gunzip -c ../libopenmpt*.tar.gz | tar -xvf -
	cd libopenmpt*
	./configure
	make
	make check
	cd ..
	cd ..
else
	echo "Testing tarball cross-compilation ..."
	mkdir test-tarball2
	cd test-tarball2
	gunzip -c ../libopenmpt*.tar.gz | tar -xvf -
	cd libopenmpt*
	if [ "x$2" = "x" ] ; then
		./configure --host=$1 --without-zlib --without-ogg --without-vorbis --without-vorbisfile --without-mpg123 --without-pulseaudio --without-portaudio -without-sndfile --without-flac --without-portaudiocpp
	else
		./configure --host=$1 CC=$1-gcc-$2 CXX=$1-g++-$2 --without-zlib --without-ogg --without-vorbis --without-vorbisfile --without-mpg123 --without-pulseaudio --without-portaudio -without-sndfile --without-flac --without-portaudiocpp
	fi
	make
	cd ..
	cd ..
fi

cd ../..