-if [ -e $srcpath/configure ]; then
- assign buildpath $releasepath/_build
- mkdir $buildpath
- cd $buildpath
- run $srcpath/configure
-else
- info "no configure script"
- assign buildpath $srcpath
- cd $srcpath
-fi
+case "$vpath,$(yesno [ -e $srcpath/configure ])" in
+ yes,yes)
+ assign buildpath $releasepath/_build
+ mkdir $buildpath
+ cd $buildpath
+ run $srcpath/configure
+ ;;
+ no,yes)
+ info "VPATH build disabled"
+ assign buildpath $srcpath
+ distcheck=no
+ cd $srcpath
+ run ./configure
+ ;;
+ *,no)
+ info "no configure script"
+ assign buildpath $srcpath
+ cd $srcpath
+ ;;
+esac