diff options
author | midipix <writeonce@midipix.org> | 2019-08-21 09:31:15 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2019-08-21 09:35:30 +0000 |
commit | 794058a4af18344b05122f84b40982e0a0fd7cd3 (patch) | |
tree | a055a32247c0dbc2254f0c4de7e4471613c7dd69 | |
parent | 8a50fd265b83c9a8393c97e7c9667f545c1a3150 (diff) | |
download | mmglue-794058a4af18344b05122f84b40982e0a0fd7cd3.tar.bz2 mmglue-794058a4af18344b05122f84b40982e0a0fd7cd3.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 |