#!/bin/sh -ex


./configure --disable-doxygen-doc

# Work around the make dependency:
touch saml/libsaml.la
# and ourselves carrying upstream aa876156 as a Debian patch, which
# touches configure.ac (otherwise make tries to remake the build system):
touch aclocal.m4 samltest/Makefile.in configure config.status samltest/Makefile

# Replace the linker option:
make samltest_LDADD="$(pkg-config --libs opensaml xmltooling xml-security-c xerces-c)" VERBOSE=1 SAMLTEST_NETWORKED=1 -C samltest check || ret=$?

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

exit $ret
