mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-02-03 14:50:31 +01:00
MSYS mangles UNIX paths on execution such that it prepends its root in Windows format. This affects PKG_CONFIG_SYSROOT_DIR and thus the check-sysroot test. Detect MSYS from the OSTYPE environment variable and adjust the expected test results to match. This likely means that sysroot support doesn't actually work on MSYS, but there probably aren't any toolchains that support sysroot there, anyway.
32 lines
698 B
Bash
Executable file
32 lines
698 B
Bash
Executable file
#! /bin/sh
|
|
|
|
set -e
|
|
|
|
. ${srcdir}/common
|
|
|
|
export PKG_CONFIG_SYSROOT_DIR=/sysroot
|
|
|
|
# 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=
|
|
|
|
RESULT=""
|
|
run_test --cflags simple
|
|
|
|
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="-I$root/sysroot/public-dep/include"
|
|
run_test --cflags public-dep
|
|
|
|
RESULT="-L$root/sysroot/public-dep/lib -lpublic-dep"
|
|
run_test --libs public-dep
|