From 7290f6194fbf25dabf5598b3fdd45ddcfd538431 Mon Sep 17 00:00:00 2001 From: midipix Date: Aug 21 2019 09:35:31 +0000 Subject: build system: pkgconf.sh: properly handle empty prefix variable. --- 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