2015-04-27 22:25:09 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# This is a replacement for pkg-config that compares the string passed
|
|
|
|
# to the --exists argument with the PKG_CONFIG_PATH environment variable
|
|
|
|
# and returns 1 if they are different.
|
|
|
|
|
|
|
|
case $1 in
|
|
|
|
--version)
|
|
|
|
echo "0.0-cmake-dummy"
|
|
|
|
;;
|
|
|
|
--exists)
|
|
|
|
shift
|
2016-03-13 13:35:51 +01:00
|
|
|
eval last=\${$#}
|
|
|
|
echo "Expected: ${last}"
|
2015-04-27 22:25:09 +02:00
|
|
|
echo "Found: ${PKG_CONFIG_PATH}"
|
2016-03-13 13:35:51 +01:00
|
|
|
[ "${last}" = "${PKG_CONFIG_PATH}" ] || exit 1
|
2015-04-27 22:25:09 +02:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
exit 255
|
|
|
|
;;
|
|
|
|
esac
|