2012-10-01 13:56:55 -07:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
. ${srcdir}/common
|
|
|
|
|
|
|
|
|
|
export PKG_CONFIG_SYSROOT_DIR=/sysroot
|
|
|
|
|
|
2013-03-27 01:58:15 +01:00
|
|
|
# MSYS mangles / paths to its own root in windows format. This probably
|
|
|
|
|
# means sysroot doesn't work there, but match what pkg-config passes
|
|
|
|
|
# back anyway.
|
|
|
|
|
[ "$OSTYPE" = msys ] && root=$(cd / && pwd -W) || root=
|
|
|
|
|
|
2012-10-01 13:56:55 -07:00
|
|
|
RESULT=""
|
|
|
|
|
run_test --cflags simple
|
|
|
|
|
|
2012-11-28 09:51:01 -08:00
|
|
|
RESULT="-lsimple"
|
|
|
|
|
if [ "$list_indirect_deps" = no ]; then
|
|
|
|
|
run_test --libs simple
|
2012-10-01 13:56:55 -07:00
|
|
|
fi
|
2012-11-28 09:51:01 -08:00
|
|
|
|
|
|
|
|
RESULT="-lsimple -lm"
|
|
|
|
|
if [ "$list_indirect_deps" = yes ]; then
|
|
|
|
|
run_test --libs simple
|
|
|
|
|
fi
|
|
|
|
|
run_test --libs --static simple
|
2012-10-01 13:56:55 -07:00
|
|
|
|
2013-03-27 01:58:15 +01:00
|
|
|
RESULT="-I$root/sysroot/public-dep/include"
|
2012-10-01 13:56:55 -07:00
|
|
|
run_test --cflags public-dep
|
|
|
|
|
|
2013-03-27 01:58:15 +01:00
|
|
|
RESULT="-L$root/sysroot/public-dep/lib -lpublic-dep"
|
2012-10-01 13:56:55 -07:00
|
|
|
run_test --libs public-dep
|
2016-09-23 20:35:15 -07:00
|
|
|
|
2016-09-23 20:05:01 -07:00
|
|
|
RESULT="-g -ffoo -I$root/sysroot/foo -isystem $root/sysroot/system1 -idirafter $root/sysroot/after1 -I$root/sysroot/bar -idirafter $root/sysroot/after2 -isystem $root/sysroot/system2"
|
2016-09-23 20:35:15 -07:00
|
|
|
run_test --cflags special-flags
|
|
|
|
|
|
|
|
|
|
RESULT="-L$root/sysroot/foo -L$root/sysroot/bar -framework Foo -lsimple -framework Bar -Wl,-framework -Wl,Baz"
|
|
|
|
|
run_test --libs special-flags
|