diff options
author | midipix <writeonce@midipix.org> | 2019-08-21 09:31:15 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2019-08-21 09:35:31 +0000 |
commit | 665f8f4c95e62ca09dcff20da76b5126f755683e (patch) | |
tree | cdaae980fe9175636c1da3a2e8abfb2c31fac7e8 | |
parent | 0a3fc4563bb82a172c51cc9f5ec2ec90d6a5c823 (diff) | |
download | pemagine-665f8f4c95e62ca09dcff20da76b5126f755683e.tar.bz2 pemagine-665f8f4c95e62ca09dcff20da76b5126f755683e.tar.xz |
build system: pkgconf.sh: properly handle empty prefix variable.
-rwxr-xr-x | sofort/tools/pkgconf.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sofort/tools/pkgconf.sh b/sofort/tools/pkgconf.sh index 614fdec..392647a 100755 --- a/sofort/tools/pkgconf.sh +++ b/sofort/tools/pkgconf.sh @@ -20,6 +20,10 @@ else prefix=$(dirname "$PKGCONF_INCLUDEDIR") base=$(basename "$PKGCONF_INCLUDEDIR") + if [ "$prefix" = '/' ]; then + prefix= + fi + if [ "$prefix/$base" = "$PKGCONF_PREFIX/$base" ]; then pkgconf_includedir='${prefix}/'"${base}" pkgconf_cflags='-I${includedir}' @@ -37,6 +41,10 @@ else prefix=$(dirname "$PKGCONF_LIBDIR") base=$(basename "$PKGCONF_LIBDIR") + if [ "$prefix" = '/' ]; then + prefix= + fi + if [ "$prefix/$base" = "$PKGCONF_EXEC_PREFIX/$base" ]; then pkgconf_libdir='${exec_prefix}/'"${base}" else |