diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2021-12-05 06:34:26 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2021-12-05 06:34:26 +0000 |
commit | 4ce99a8f29023cf4d4173b43b5f5e71cf7febc7f (patch) | |
tree | 14c6415d3f63a2d2d0b060485cb6ca940c7a435c /configure | |
parent | a912857f51c3b7705eca8a844ce7ed1c3e7250dc (diff) | |
download | nsss-4ce99a8f29023cf4d4173b43b5f5e71cf7febc7f.tar.xz |
configure: add var control tweak and DESTDIR support for slashpackage
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 21 |
1 files changed, 14 insertions, 7 deletions
@@ -200,7 +200,7 @@ for arg ; do --host=*|--target=*) target=${arg#*=} ;; --build=*) build=${arg#*=} ;; -* ) echo "$0: unknown option $arg" ;; - *=*) ;; + *=*) eval "$arg" ;; *) target=$arg ;; esac done @@ -257,12 +257,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${DESTDIR}${sproot}${dep}/include" + vpaths="$vpaths ${DESTDIR}${sproot}${dep}/library" + addlibspath="$addlibspath -L${DESTDIR}${sproot}${dep}/library" + vpathd="$vpathd ${DESTDIR}${sproot}${dep}/library.so" + addlibdpath="$addlibdpath -L${DESTDIR}${sproot}${dep}/library.so" + fi done < package/deps-build fi |