mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2025-12-20 05:30:03 +01:00
Outputting other Libs flags such as -Wl,foo just prior to the -l Libs flags gives a better chance the --libs output will be correct. This should be no change in the usage of the output since pkg-config currently groups all flag types together.
51 lines
1.2 KiB
Bash
Executable file
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="-L/other/lib -Wl,--as-needed -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="-L/other/lib -Wl,--as-needed"
|
|
run_test --libs-only-L --libs-only-other other
|
|
run_test --libs-only-other --libs-only-L other
|
|
|
|
RESULT="-L/other/lib -Wl,--as-needed -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
|