#! /bin/sh

set -e

. ${srcdir}/common

# expect cflags from requires-test and public-dep
RESULT="-I/requires-test/include -I/private-dep/include -I/public-dep/include"
run_test --cflags requires-test
run_test --static --cflags requires-test

# expect libs for just requires-test and public-dep
RESULT="-L/requires-test/lib -L/public-dep/lib -lrequires-test -lpublic-dep"
if [ "$list_indirect_deps" = no ]; then
    run_test --libs requires-test
fi

# expect libs for requires-test, public-dep and private-dep in static case
RESULT="-L/requires-test/lib -L/private-dep/lib -L/public-dep/lib \
-lrequires-test -lprivate-dep -lpublic-dep"
if [ "$list_indirect_deps" = yes ]; then
    run_test --libs requires-test
fi
run_test --static --libs requires-test
