better handling of MKL check in configure
not prompted to ask MKL download if the var is set already remove unexpected exit when input is given by user
This commit is contained in:
parent
d5956e3e6a
commit
739718f95c
24
configure
vendored
24
configure
vendored
@ -195,15 +195,17 @@ done
|
|||||||
OSNAME=`uname -s`
|
OSNAME=`uname -s`
|
||||||
|
|
||||||
if [ "$TF_NEED_MKL" == "1" ]; then # TF_NEED_MKL
|
if [ "$TF_NEED_MKL" == "1" ]; then # TF_NEED_MKL
|
||||||
fromuser=""
|
while [ "$TF_DOWNLOAD_MKL" == "" ]; do
|
||||||
read -p "Do you wish to download MKL LIB from the web? [Y/n] " INPUT
|
fromuser=""
|
||||||
fromuser="1"
|
read -p "Do you wish to download MKL LIB from the web? [Y/n] " INPUT
|
||||||
case $INPUT in
|
fromuser="1"
|
||||||
[Yy]* ) TF_DOWNLOAD_MKL=1;;
|
case $INPUT in
|
||||||
[Nn]* ) TF_DOWNLOAD_MKL=0;;
|
[Yy]* ) TF_DOWNLOAD_MKL=1;;
|
||||||
"" ) TF_DOWNLOAD_MKL=1;;
|
[Nn]* ) TF_DOWNLOAD_MKL=0;;
|
||||||
* ) echo "Invalid selection: " $INPUT; exit 1;;
|
"" ) TF_DOWNLOAD_MKL=1;;
|
||||||
esac
|
* ) echo "Invalid selection: " $INPUT; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
if [[ "$TF_DOWNLOAD_MKL" == "1" ]]; then
|
if [[ "$TF_DOWNLOAD_MKL" == "1" ]]; then
|
||||||
DST=`dirname $0`
|
DST=`dirname $0`
|
||||||
@ -263,10 +265,6 @@ if [ "$TF_NEED_MKL" == "1" ]; then # TF_NEED_MKL
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$fromuser" ]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat > third_party/mkl/mkl.config <<EOF
|
cat > third_party/mkl/mkl.config <<EOF
|
||||||
# MKL_INSTALL_PATH refers to the location of MKL root folder. The MKL header and library
|
# MKL_INSTALL_PATH refers to the location of MKL root folder. The MKL header and library
|
||||||
# files can be either in this directory, or under include/ and lib64/
|
# files can be either in this directory, or under include/ and lib64/
|
||||||
|
Loading…
Reference in New Issue
Block a user