summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2018-08-20 11:32:38 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2018-08-20 11:32:38 +0000
commitf7dbe98429c770ace1e45188a56d7a917d907bca (patch)
treeda9c62f95c5de0e2752f8c8623cdb92785aaa412
parente67047c58a78216e8b84abf2a412d589479b8734 (diff)
downloadbcnm-f7dbe98429c770ace1e45188a56d7a917d907bca.tar.xz
Support conditional slashpackage builds
-rwxr-xr-xconfigure19
1 files changed, 13 insertions, 6 deletions
diff --git a/configure b/configure
index de87b55..9686932 100755
--- a/configure
+++ b/configure
@@ -246,12 +246,19 @@ if $slashpackage ; then
libdir=${home}/library
libexecdir=$bindir
includedir=${home}/include
- while read dep ; do
- addincpath="$addincpath -I${sproot}${dep}/include"
- vpaths="$vpaths ${sproot}${dep}/library"
- addlibspath="$addlibspath -L${sproot}${dep}/library"
- vpathd="$vpathd ${sproot}${dep}/library.so"
- addlibdpath="$addlibdpath -L${sproot}${dep}/library.so"
+ while read dep condvar ; do
+ if test -n "$condvar" ; then
+ eval "cond=$condvar"
+ else
+ cond=true
+ fi
+ if $cond ; then
+ addincpath="$addincpath -I${sproot}${dep}/include"
+ vpaths="$vpaths ${sproot}${dep}/library"
+ addlibspath="$addlibspath -L${sproot}${dep}/library"
+ vpathd="$vpathd ${sproot}${dep}/library.so"
+ addlibdpath="$addlibdpath -L${sproot}${dep}/library.so"
+ fi
done < package/deps-build
fi