pkg-config/check/check-duplicate-flags
Dan Nicholson e0d3ce93a0 Sort -other Libs and Cflags by package order instead of path order
For some flags, pkg-config will sort them by the depth of their .pc path
before outputting. The idea is that flags from a deeper path should come
earlier in the command line. This makes sense for -L and -I flags, but
not for generic linker and compiler flags. For these flags and -l flags,
it makes sense to sort them only by package order.
2012-12-04 13:04:57 -08:00

14 lines
353 B
Bash
Executable file

#! /bin/sh
set -e
. ${srcdir}/common
RESULT="-DPATH2 -DPATH1 -DFOO -I/path/include"
run_test --cflags flag-dup-1 flag-dup-2
run_test --cflags flag-dup-2 flag-dup-1
RESULT="-Wl,--whole-archive --Wl,--no-whole-archive -R -Xlinker /path/lib \
-L/path/lib -lpath2 -lpath1 -lm"
run_test --libs flag-dup-1 flag-dup-2
run_test --libs flag-dup-2 flag-dup-1