pkg-config/check/check-libs
Dan Nicholson d6337ec986 Always use --static test results for indirect depencency results
Often the expected results for the indirect dependency tests fell behind
because it's not a typical test scenario. However, since the results are
always the same as --static, they can just use the same results and the
test can be run conditionally without --static based on configuration.
2012-11-29 19:18:41 -08:00

51 lines
1.2 KiB
Bash
Executable file

#! /bin/sh
set -e
. ${srcdir}/common
RESULT="-lsimple"
if [ "$list_indirect_deps" = no ]; then
run_test --libs simple
fi
RESULT="-lsimple -lm"
if [ "$list_indirect_deps" = yes ]; then
run_test --libs simple
fi
run_test --libs --static simple
RESULT=""
run_test --libs fields-blank
RESULT="-Wl,--as-needed -L/other/lib -lother"
run_test --libs other
RESULT="-lother"
run_test --libs-only-l other
RESULT="-L/other/lib"
run_test --libs-only-L other
RESULT="-Wl,--as-needed"
run_test --libs-only-other other
# Try various mixed combinations
RESULT="-L/other/lib -lother"
run_test --libs-only-l --libs-only-L other
run_test --libs-only-L --libs-only-l other
RESULT="-Wl,--as-needed -lother"
run_test --libs-only-l --libs-only-other other
run_test --libs-only-other --libs-only-l other
RESULT="-Wl,--as-needed -L/other/lib"
run_test --libs-only-L --libs-only-other other
run_test --libs-only-other --libs-only-L other
RESULT="-Wl,--as-needed -L/other/lib -lother"
run_test --libs-only-l --libs-only-L --libs-only-other other
run_test --libs --libs-only-l --libs-only-L --libs-only-other other
run_test --libs --libs-only-l other
run_test --libs --libs-only-L other
run_test --libs --libs-only-other other