#!/bin/sh -ex

# Some of the Debian patches touch the build system, so
autoreconf -f -i

./configure --disable-doxygen-doc

# Work around the make dependency:
touch shibsp/libshibsp.la

# Replace the linker option:
make shibsptest_LDADD="$(pkg-config --libs shibsp opensaml xmltooling xerces-c)" VERBOSE=1 -C unittests check || ret=$?

if [ "$AUTOPKGTEST_ARTIFACTS" ]; then
    mv unittests/*.log unittests/*.trs "$AUTOPKGTEST_ARTIFACTS"
fi

exit $ret
