2015-02-01 05:13:19 +01:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
|
|
|
./autogen.sh
|
|
|
|
|
|
|
|
if [ "x$ARCH" = "xnative" ]; then
|
2015-03-19 01:12:42 +01:00
|
|
|
./configure
|
2015-02-01 05:35:52 +01:00
|
|
|
if [ `uname` = "Darwin" ]; then
|
|
|
|
# OS X runs out of resources if we run 'make -j check'
|
|
|
|
make check
|
|
|
|
else
|
|
|
|
make -j distcheck
|
|
|
|
fi
|
2015-02-01 05:13:19 +01:00
|
|
|
else
|
2015-02-01 05:35:52 +01:00
|
|
|
CPU=i686
|
|
|
|
if [ "x$ARCH" = "xmingw64" ]; then
|
|
|
|
CPU=x86_64
|
|
|
|
fi
|
|
|
|
export CC=$CPU-w64-mingw32-gcc
|
2015-02-01 05:13:19 +01:00
|
|
|
|
|
|
|
if [ -z $(which $CC) ]; then
|
|
|
|
# Update Ubuntu 12.04 with current mingw toolchain
|
2015-02-01 05:24:31 +01:00
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y python-software-properties
|
|
|
|
sudo apt-add-repository -y ppa:tobydox/mingw-x-precise
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y $ARCH-x-gcc make
|
2015-02-01 05:13:19 +01:00
|
|
|
export PATH=$PATH:/opt/$ARCH/bin
|
|
|
|
fi
|
|
|
|
|
2015-03-19 01:12:42 +01:00
|
|
|
./configure --host=$CPU-w64-mingw32
|
2015-02-01 05:35:52 +01:00
|
|
|
make -j
|
2015-02-01 05:13:19 +01:00
|
|
|
fi
|