pkg-config/check/check-mixed-flags
Dan Nicholson 05f319d3e5 Output -L Libs flags before other Libs flags
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.
2012-12-04 13:04:57 -08:00

79 lines
2.9 KiB
Bash
Executable file

#! /bin/sh
set -e
. ${srcdir}/common
RESULT="-DOTHER -I/other/include -L/other/lib -Wl,--as-needed -lother"
run_test --cflags --libs other
run_test --libs --cflags other
run_test --cflags-only-I --cflags-only-other --libs-only-l --libs-only-L \
--libs-only-other other
RESULT="-I/other/include -lother"
run_test --cflags-only-I --libs-only-l other
run_test --libs-only-l --cflags-only-I other
RESULT="-DOTHER -lother"
run_test --cflags-only-other --libs-only-l other
run_test --libs-only-l --cflags-only-other other
RESULT="-I/other/include -L/other/lib"
run_test --cflags-only-I --libs-only-L other
run_test --libs-only-L --cflags-only-I other
RESULT="-DOTHER -L/other/lib"
run_test --cflags-only-other --libs-only-L other
run_test --libs-only-L --cflags-only-other other
RESULT="-I/other/include -Wl,--as-needed"
run_test --cflags-only-I --libs-only-other other
run_test --libs-only-other --cflags-only-I other
RESULT="-DOTHER -Wl,--as-needed"
run_test --cflags-only-other --libs-only-other other
run_test --libs-only-other --cflags-only-other other
RESULT="-I/other/include -L/other/lib -lother"
run_test --cflags-only-I --libs-only-L --libs-only-l other
run_test --libs-only-l --libs-only-L --cflags-only-I other
RESULT="-DOTHER -L/other/lib -lother"
run_test --cflags-only-other --libs-only-L --libs-only-l other
run_test --libs-only-l --libs-only-L --cflags-only-other other
RESULT="-I/other/include -Wl,--as-needed -lother"
run_test --cflags-only-I --libs-only-other --libs-only-l other
run_test --libs-only-l --libs-only-other --cflags-only-I other
RESULT="-DOTHER -Wl,--as-needed -lother"
run_test --cflags-only-other --libs-only-other --libs-only-l other
run_test --libs-only-l --libs-only-other --cflags-only-other other
RESULT="-I/other/include -L/other/lib -Wl,--as-needed"
run_test --cflags-only-I --libs-only-other --libs-only-L other
run_test --libs-only-L --libs-only-other --cflags-only-I other
RESULT="-DOTHER -L/other/lib -Wl,--as-needed"
run_test --cflags-only-other --libs-only-other --libs-only-L other
run_test --libs-only-L --libs-only-other --cflags-only-other other
RESULT="-DOTHER -I/other/include -lother"
run_test --cflags --libs-only-l other
run_test --cflags-only-I --cflags-only-other --libs-only-l other
RESULT="-DOTHER -I/other/include -L/other/lib"
run_test --cflags --libs-only-L other
run_test --cflags-only-I --cflags-only-other --libs-only-L other
RESULT="-DOTHER -I/other/include -Wl,--as-needed"
run_test --cflags --libs-only-other other
run_test --cflags-only-I --cflags-only-other --libs-only-other other
RESULT="-I/other/include -L/other/lib -Wl,--as-needed -lother"
run_test --cflags-only-I --libs other
run_test --cflags-only-I --libs-only-l --libs-only-L --libs-only-other other
RESULT="-DOTHER -L/other/lib -Wl,--as-needed -lother"
run_test --cflags-only-other --libs other
run_test --cflags-only-other --libs-only-l --libs-only-L --libs-only-other other