Skip to content
Snippets Groups Projects
Commit 4294a9f3 authored by Arnab Ghoshal's avatar Arnab Ghoshal
Browse files

quoting variables in string comparison in configure

git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@2502 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
parent 2261c7fa
No related branches found
No related tags found
No related merge requests found
......@@ -106,7 +106,7 @@ do
--omp-libdir=*)
OMPLIBDIR=`read_dirname $1`; shift ;;
--mathlib=*)
MATHLIB=`read_dirname $1`; shift ;;
MATHLIB=`expr "X$1" : '[^=]*=\(.*\)'`; shift ;;
--cudatk-dir=*)
CUDATKDIR=`read_dirname $1`; shift ;; #CUDA is used in src/cudamatrix and src/nnet{,bin} only
*) echo "Unknown argument: $1, exiting"; usage; exit 1 ;;
......@@ -497,16 +497,16 @@ if [ "`uname`" == "Darwin" ]; then
# posix_memalign and gcc -rdynamic options not present on OS X 10.5.*
osx_ver=`sw_vers | grep ProductVersion | awk '{print $2}' | sed -e 's?\.[^.]*$??'`
echo "Configuring for OS X version $osx_ver ..."
if [ $osx_ver == "10.5" ]; then
if [ "$osx_ver" == "10.5" ]; then
check_exists makefiles/darwin_10_5.mk
cat makefiles/darwin_10_5.mk >> kaldi.mk
elif [ $osx_ver == "10.6" ]; then
elif [ "$osx_ver" == "10.6" ]; then
check_exists makefiles/darwin_10_6.mk
cat makefiles/darwin_10_6.mk >> kaldi.mk
elif [ $osx_ver == "10.7" ]; then
elif [ "$osx_ver" == "10.7" ]; then
check_exists makefiles/darwin_10_7.mk
cat makefiles/darwin_10_7.mk >> kaldi.mk
elif [ $osx_ver == "10.8" ]; then
elif [ "$osx_ver" == "10.8" ]; then
check_exists makefiles/darwin_10_8.mk
cat makefiles/darwin_10_8.mk >> kaldi.mk
else
......@@ -537,7 +537,7 @@ if [ "`uname`" == "Linux" ]; then
echo FSTROOT = $FSTROOT >> kaldi.mk
echo "On Linux: Checking for linear algebra header files ..."
if [ $MATHLIB == "ATLAS" ]; then
if [ "$MATHLIB" == "ATLAS" ]; then
if [ ! -f $ATLASROOT/include/cblas.h ] || [ ! -f $ATLASROOT/include/clapack.h ] ; then
failure "Could not find required header files cblas.h or clapack.h in ATLAS dir '$ATLASROOT/include'"
fi
......@@ -560,13 +560,13 @@ if [ "`uname`" == "Linux" ]; then
linux_configure_debian_ubuntu || \
linux_atlas_failure "Failed to configure ATLAS lbiraries";
elif [ $MATHLIB == "MKL" ]; then
elif [ "$MATHLIB" == "MKL" ]; then
if [ "`uname -m`" != "x86_64" ]; then
failure "MKL on Linux only supported for Intel(R) 64 architecture (x86_64).
See makefiles/linux_64_mkl.mk to manually configure for other platforms."
fi
if is_set $MKLROOT -a ! is_set $MKLLIBDIR; then
if is_set "$MKLROOT" -a ! is_set "$MKLLIBDIR"; then
echo -n "Configuring MKL library directory: "
MKLLIBDIR=`linux_configure_mkllibdir $MKLROOT`
if [ $? -ne 0 ]; then
......@@ -620,14 +620,14 @@ if [ "`uname`" == "Linux" ]; then
echo "Successfully configured for Linux with MKL libs from $MKLROOT"
exit 0;
elif [ $MATHLIB == "CLAPACK" ]; then
if [ -z $CLAPACKROOT ]; then
elif [ "$MATHLIB" == "CLAPACK" ]; then
if [ -z "$CLAPACKROOT" ]; then
failure "Must specify the location of CLAPACK with --clapack-root option (and it must exist)"
fi
if [ ! -f ../tools/CLAPACK/clapack.h ]; then
failure could not find file ../tools/CLAPACK/clapack.h
fi
if [ ! -d $CLAPACKROOT ]; then
if [ ! -d "$CLAPACKROOT" ]; then
failure "The directory $CLAPACKROOT does not exist"
fi
# Also check for cblas.h and f2c.h
......@@ -640,9 +640,9 @@ if [ "`uname`" == "Linux" ]; then
$use_cuda && linux_configure_cuda
echo "Successfully configured for Linux with CLAPACK libs from $CLAPACKROOT"
exit 0
elif [ $MATHLIB == "OPENBLAS" ]; then
OPENBLASROOT=`rel2abs $OPENBLASROOT`
if [ -z $OPENBLASROOT ]; then
elif [ "$MATHLIB" == "OPENBLAS" ]; then
OPENBLASROOT=`rel2abs "$OPENBLASROOT"`
if [ -z "$OPENBLASROOT" ]; then
failure "Must specify the location of OPENBLAS with --openblas-root option (and it must exist)"
fi
if [ ! -f $OPENBLASROOT/lib/libopenblas.so ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment