mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2025-12-26 22:30:03 +01:00
Add a test for pkg-config's path handling. The first test covers PKG_CONFIG_PATH, and the second covers the built-in path. For this one we need to unset the PKG_CONFIG_LIBDIR that normally is set during the tests. Since we can't rely on the contents of the default path, we just check to see that the built-in path matches what was specified in configure. To do this, we need to add a bunch of variables to config.sh so the variable resolves. These variables don't need to be exported, though.
22 lines
443 B
Bash
Executable file
22 lines
443 B
Bash
Executable file
#! /bin/sh
|
|
|
|
set -e
|
|
. ${srcdir}/common
|
|
|
|
# PKG_CONFIG_PATH
|
|
RESULT=""
|
|
PKG_CONFIG_PATH="$srcdir/sub" run_test --exists sub1
|
|
|
|
# default pkg-config path, making sure to resolve the variables fully
|
|
eval pc_path="$pc_path"
|
|
case ${MACHTYPE} in
|
|
*-msys)
|
|
# Make sure path doesn't get mangled on MSYS
|
|
RESULT=$(echo $pc_path | sed 's,/,\\/,g')
|
|
;;
|
|
*)
|
|
RESULT=$pc_path
|
|
;;
|
|
esac
|
|
unset PKG_CONFIG_LIBDIR
|
|
run_test --variable=pc_path pkg-config
|