aboutsummaryrefslogtreecommitdiff
path: root/scripts/travis
blob: 4d287825830681fd440912d9061562834dbe49d8 (plain)
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
#!/bin/sh
set -e

./autogen.sh

if [ "x$ARCH" = "xnative" ]; then
        ./configure --enable-libtls
	make clean
        make -j distcheck
else
        CPU=i686
        if [ "x$ARCH" = "xmingw64" ]; then
                CPU=x86_64
        fi
        export CC=$CPU-w64-mingw32-gcc

	if [ -z $(which $CC) ]; then
		# Update Ubuntu 12.04 with current mingw toolchain
		apt-get update && apt-get install -y python-software-properties
		apt-add-repository -y ppa:tobydox/mingw-x-precise
		apt-get update && apt-get install -y $ARCH-x-gcc make
		export PATH=$PATH:/opt/$ARCH/bin
	fi

        ./configure --host=$CPU-w64-mingw32 --enable-libtls
	make clean
        make -j
fi