summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2013-05-22 18:53:26 -0700
committerDan Nicholson <dbn.lists@gmail.com>2013-05-31 05:31:02 -0700
commitdbf1b7cd093562b282c51ce89b8c5c978783153b (patch)
tree89bfdab8a6eed0a0c126697948384c7a281ad557 /check
parent719abc791036f1e2222f652966b0ad7dcf5dc837 (diff)
downloadpkg-config-dbf1b7cd093562b282c51ce89b8c5c978783153b.tar.gz
check: Convert paths to Windows format when using --define-prefix
When pkg-config redefines the .pc file's prefix variable, it will be in the platform's native format. Convert the expected results as necessary. This only affects the relocatable test because it explicitly sets --define-prefix or uses .pc files in a pkgconfig/ directory. Other tests do not have their prefixes redefined for this reason.
Diffstat (limited to 'check')
-rwxr-xr-xcheck/check-relocatable8
1 files changed, 8 insertions, 0 deletions
diff --git a/check/check-relocatable b/check/check-relocatable
index dc320c4..2aaab42 100755
--- a/check/check-relocatable
+++ b/check/check-relocatable
@@ -7,6 +7,14 @@ set -e
RESULT="-I${srcdir}/include -L${srcdir}/lib -lfoo"
run_test --cflags --libs pcfiledir
+# Convert abs_top_srcdir to Windows format if necessary.
+if [ "$native_win32" = yes ]; then
+ # Assume we have cmd to do the conversion, except we have to escape
+ # the command switch on MSYS.
+ [ "$OSTYPE" = msys ] && opt="\\/C" || opt="/C"
+ abs_top_srcdir=$($WINE cmd $opt echo "$abs_top_srcdir")
+fi
+
# Test prefix redefinition for .pc files in pkgconfig directory. Try .pc
# files with both unexpanded and expanded variables. Use the absolute
# directory for the search path so that pkg-config can strip enough