orbea / zippy / sofort

Forked from zippy/sofort 2 years ago
Clone

131c6a build system: pkgconf.sh: properly handle empty prefix variable.

Authored and Committed by midipix 5 years ago
    build system: pkgconf.sh: properly handle empty prefix variable.
    
        
file modified
+8 -0
sofort/tools/pkgconf.sh CHANGED
@@ -20,6 +20,10 @@ else
20
20
prefix=$(dirname "$PKGCONF_INCLUDEDIR")
21
21
base=$(basename "$PKGCONF_INCLUDEDIR")
22
22
23
+ if [ "$prefix" = '/' ]; then
24
+ prefix=
25
+ fi
26
+
23
27
if [ "$prefix/$base" = "$PKGCONF_PREFIX/$base" ]; then
24
28
pkgconf_includedir='${prefix}/'"${base}"
25
29
pkgconf_cflags='-I${includedir}'
@@ -37,6 +41,10 @@ else
37
41
prefix=$(dirname "$PKGCONF_LIBDIR")
38
42
base=$(basename "$PKGCONF_LIBDIR")
39
43
44
+ if [ "$prefix" = '/' ]; then
45
+ prefix=
46
+ fi
47
+
40
48
if [ "$prefix/$base" = "$PKGCONF_EXEC_PREFIX/$base" ]; then
41
49
pkgconf_libdir='${exec_prefix}/'"${base}"
42
50
else