2014-02-26 16:49:07 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# Build script for Travis CI
|
|
|
|
|
|
|
|
if test -z $TRAVIS_BUILD_DIR; then
|
|
|
|
TRAVIS_BUILD_DIR=$PWD
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd $TRAVIS_BUILD_DIR
|
|
|
|
|
|
|
|
TARGET=check
|
|
|
|
|
2014-03-01 07:49:52 +00:00
|
|
|
DEPS="libgmp-dev"
|
|
|
|
|
2014-02-26 16:49:07 +00:00
|
|
|
case "$TEST" in
|
|
|
|
default)
|
2014-03-03 17:44:29 +00:00
|
|
|
# should be the default, but lets make sure
|
|
|
|
CONFIG="--with-printf-hooks=glibc"
|
2014-02-26 16:49:07 +00:00
|
|
|
;;
|
|
|
|
openssl)
|
|
|
|
CONFIG="--disable-defaults --enable-tools --enable-openssl"
|
2014-03-01 07:49:52 +00:00
|
|
|
DEPS="libssl-dev"
|
2014-02-26 16:49:07 +00:00
|
|
|
;;
|
|
|
|
gcrypt)
|
|
|
|
CONFIG="--disable-defaults --enable-tools --enable-gcrypt --enable-pkcs1"
|
2014-03-01 07:49:52 +00:00
|
|
|
DEPS="libgcrypt11-dev"
|
2014-02-26 16:49:07 +00:00
|
|
|
;;
|
2014-03-03 17:44:29 +00:00
|
|
|
printf-builtin)
|
|
|
|
CONFIG="--with-printf-hooks=builtin"
|
|
|
|
;;
|
2014-02-26 16:49:07 +00:00
|
|
|
all)
|
|
|
|
CONFIG="--enable-all --disable-android-dns --disable-android-log
|
|
|
|
--disable-dumm --disable-kernel-pfroute --disable-keychain
|
|
|
|
--disable-lock-profiler --disable-maemo --disable-padlock
|
2014-05-07 12:11:35 +00:00
|
|
|
--disable-osx-attr --disable-tkm --disable-uci --disable-aikgen"
|
2014-03-25 10:46:17 +00:00
|
|
|
if test "$LEAK_DETECTIVE" = "yes"; then
|
|
|
|
# libgcrypt can't be deinitialized
|
|
|
|
CONFIG="$CONFIG --disable-gcrypt"
|
|
|
|
# libunwind causes threads to be cleaned up after LD is disabled
|
|
|
|
CONFIG="$CONFIG --disable-unwind-backtraces"
|
|
|
|
fi
|
2014-02-26 16:49:07 +00:00
|
|
|
# not enabled on the build server
|
|
|
|
CONFIG="$CONFIG --disable-af-alg"
|
|
|
|
# TODO: enable? perhaps via coveralls.io (cpp-coveralls)?
|
|
|
|
CONFIG="$CONFIG --disable-coverage"
|
2014-03-01 07:49:52 +00:00
|
|
|
DEPS="$DEPS libcurl4-gnutls-dev libsoup2.4-dev libunbound-dev libldns-dev
|
|
|
|
libmysqlclient-dev libsqlite3-dev clearsilver-dev libfcgi-dev
|
|
|
|
libnm-glib-dev libnm-glib-vpn-dev libpcsclite-dev libpam0g-dev
|
|
|
|
binutils-dev libunwind7-dev"
|
2014-02-26 16:49:07 +00:00
|
|
|
;;
|
|
|
|
dist)
|
|
|
|
TARGET=distcheck
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "$0: unknown test $TEST" >&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2014-03-01 07:49:52 +00:00
|
|
|
if test "$1" = "deps"; then
|
|
|
|
sudo apt-get install -qq $DEPS
|
|
|
|
exit $?
|
|
|
|
fi
|
|
|
|
|
2014-02-26 16:49:07 +00:00
|
|
|
CONFIG="$CONFIG
|
|
|
|
--enable-silent-rules
|
|
|
|
--enable-test-vectors
|
|
|
|
--enable-monolithic=${MONOLITHIC-no}
|
|
|
|
--enable-leak-detective=${LEAK_DETECTIVE-no}"
|
|
|
|
|
|
|
|
echo "$ ./configure $CONFIG && make $TARGET"
|
2014-03-18 14:25:56 +00:00
|
|
|
./configure $CONFIG && make -j4 $TARGET
|