 -  fi
 -  echo OPENFSTLIBS = $OPENFSTLIBS >> kaldi.mk
 -  echo OPENFSTLDFLAGS = $OPENFSTLDFLAGS >> kaldi.mk
-+  # if  $static_fst ; then
-+  #     OPENFSTLIBS="$FSTROOT/lib/libfst.a"
-+  #     fst_type='a'
-+  # else
-+  #     OPENFSTLIBS="-L${FSTROOT}/lib -lfst"
-+  #     OPENFSTLDFLAGS="-Wl,-rpath=${FSTROOT}/lib"
-+  #     fst_type='so'
-+  # fi
-+  # if [ ! -f "$FSTROOT/lib/libfst.${fst_type}" ]; then
-+  #   failure "Static=[$static_fst] OpenFST library not found:  See ../tools/INSTALL"
-+  # fi
-+  # echo OPENFSTLIBS = $OPENFSTLIBS >> kaldi.mk
-+  # echo OPENFSTLDFLAGS = $OPENFSTLDFLAGS >> 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
+-    echo "Using ATLAS as the linear algebra library."
+-
+-    # Finding out where the libraries are located:
+-    # First we look for the static libraries and then look for dynamic ones.
+-    # We're looking for four libraries, all in the same directory, named
+-    # libcblas.a, libatlas.a, libf77blas.a, and a library that's variously
+-    # named liblapack.a, libclapack.a, or liblapack_atlas.a, but which exports
+-    # the symbol ATL_cgetrf.
+-    # Note: there is a different type of ATLAS installation that is not
+-    # covered.  We saw a case where there was a directory called /usr/lib/atlas
+-    # containing {liblapack.a,libblas.a}, and linking against just these two
+-    # libraries worked.
+-
+-    if $static_math; then
+-      # Prefer static to dynamic math.
+-      linux_configure_static || \
+-        linux_configure_debian_ubuntu3 || \
+-        linux_configure_dynamic || \
+-        linux_configure_debian_ubuntu 64 || \
+-        linux_configure_debian_ubuntu || \
+-        linux_configure_debian7 || \
+-        linux_configure_redhat 64 || \
+-        linux_configure_redhat || \
+-        linux_configure_redhat_fat 64 || \
+-        linux_configure_redhat_fat || \
+-        linux_atlas_failure "Failed to configure ATLAS lbiraries";
+-    else
+-      # Prefer dynamic to static math.
+-      linux_configure_debian_ubuntu3 || \
+-        linux_configure_dynamic || \
+-        linux_configure_static || \
+-        linux_configure_debian_ubuntu 64 || \
+-        linux_configure_debian_ubuntu || \
+-        linux_configure_debian7 || \
+-        linux_configure_redhat 64 || \
+-        linux_configure_redhat || \
+-        linux_configure_redhat_fat 64 || \
+-        linux_configure_redhat_fat || \
+-        linux_atlas_failure "Failed to configure ATLAS lbiraries";
+-    fi
+-
+-  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" && ! is_set "$MKLLIBDIR" ); then
+-      echo -n "Configuring MKL library directory: "
+-      MKLLIBDIR=`linux_configure_mkllibdir $MKLROOT`
+-      if [ $? -ne 0 ]; then
+-        failure "MKL libraries could not be found. Please use the switch --mkl-libdir "
+-      else
+-        echo "Found: $MKLLIBDIR"
+-      fi
+-    fi
+-
+-    MKL_LINK_LINE=`linux_configure_mkl_libraries "$MKLLIBDIR" $static_math $mkl_threading` || exit 1
+-    echo "MKL configured with threading: $mkl_threading, libs: $MKL_LINK_LINE"
+-
+-    MKL_COMPILE_LINE=`linux_configure_mkl_includes "$MKLROOT" "$MKLLIBDIR"` || exit 1
+-    echo "MKL include directory configured as: $MKL_COMPILE_LINE"
+-    MKL_COMPILE_LINE=" -I${MKL_COMPILE_LINE} "
+-
+-    THREADING_LINE=`linux_configure_mkl_threading $MKLROOT $MKLLIBDIR $static_math $mkl_threading` || exit 1
+-    EXTRA_LIBS=`linux_configure_mkl_extra $static_math $mkl_threading` || exit 1
+-    if [ ! -z "$THREADING_LINE" ] || [ ! -z "$EXTRA_LIBS" ]; then
+-      echo "MKL threading libraries configured as $THREADING_LINE $EXTRA_LIBS"
+-    fi
+-
+-    echo "Using Intel MKL as the linear algebra library."
+-    (
+-      cd probe; rm -f mkl-test;
+-      g++ mkl-test.cc -o mkl-test $MKL_COMPILE_LINE $MKL_LINK_LINE $THREADING_LINE $EXTRA_LIBS || exit 1
+-      test -f ./mkl-test || exit 1
+-      ./mkl-test || exit 1
+-      cd ..
+-    ) || failure "Cannot validate the MKL switches"
+-
+-    echo MKLROOT = $MKLROOT >> kaldi.mk
+-    if [ ! -z $MKLLIBDIR ]; then
+-      echo MKLLIB = $MKLLIBDIR >> kaldi.mk
+-    fi
+-    check_exists makefiles/linux_x86_64_mkl.mk
+-    cat makefiles/linux_x86_64_mkl.mk >> kaldi.mk
+-    fix_cxx_flag
+-    echo "MKLFLAGS = ${MKL_LINK_LINE} ${THREADING_LINE} $EXTRA_LIBS " >> kaldi.mk
+-
+-    $use_cuda && configure_cuda
+-    linux_configure_speex
+-    echo "Successfully configured for Linux with MKL libs from $MKLROOT"
+-    exit_success;
+-
+-  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
+-      failure "The directory $CLAPACKROOT does not exist"
+-    fi
+-    # Also check for cblas.h and f2c.h
+-    echo "Using CLAPACK as the linear algebra library."
+-    if [ ! -f makefiles/linux_clapack.mk ]; then
+-      failure "makefiles/linux_clapack.mk not found."
+-    fi
+-    cat makefiles/linux_clapack.mk >> kaldi.mk
+-    fix_cxx_flag
+-    echo "Warning (CLAPACK): this part of the configure process is not properly tested and will not work."
+-    $use_cuda && configure_cuda
+-    linux_configure_speex
+-    echo "Successfully configured for Linux with CLAPACK libs from $CLAPACKROOT"
+-    exit_success;
+-  elif [ "$MATHLIB" == "OPENBLAS" ]; then
++  if [ "$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)"
+@@ -1053,8 +360,6 @@ if [ "`uname`" == "Linux" ]; then
+     echo "OPENBLASROOT = $OPENBLASROOT" >> kaldi.mk
+     cat makefiles/linux_openblas.mk >> kaldi.mk
+     fix_cxx_flag
+-    $use_cuda && configure_cuda
+-    linux_configure_speex
+     echo "Successfully configured OpenBLAS from $OPENBLASROOT."
+     exit_success;
+   else
 diff --git src/makefiles/darwin_10_10.mk src/makefiles/darwin_10_10.mk
 index 4314397..f13befa 100644
 --- src/makefiles/darwin_10_10.mk

 fi
 echo "CONFIGURE_VERSION := $CONFIGURE_VERSION" >> kaldi.mk
-echo "FSTROOT = $FSTROOT" >> kaldi.mk
+# echo "FSTROOT = $FSTROOT" >> kaldi.mk
 
 # Check installed OpenFst version and add C++11 flags if OpenFst >= 1.4
-OPENFST_VER="${OPENFST_VER:-`grep 'PACKAGE_VERSION' $FSTROOT/Makefile | sed -e 's:.*= ::'`}"
-echo "OPENFST_VER = $OPENFST_VER" >> kaldi.mk
-OPENFST_VER_NUM=`echo $OPENFST_VER | sed 's/\./ /g' | xargs printf "%d%02d%02d"`

 
 ifndef OPENBLASLIBS
 $(error OPENBLASLIBS not defined.)
@@ -17,19 +17,18 @@ DOUBLE_PRECISION = 0
 CXXFLAGS = -msse -msse2 -Wall -I.. \
            -pthread \
       -DKALDI_DOUBLEPRECISION=$(DOUBLE_PRECISION) -DHAVE_POSIX_MEMALIGN \
-      -Wno-sign-compare -Wno-unused-local-typedefs -Winit-self \
+      -Wno-sign-compare -Winit-self \
       -DHAVE_EXECINFO_H=1 -rdynamic -DHAVE_CXXABI_H \
       -DHAVE_OPENBLAS -I $(OPENBLASROOT)/include \
-      -I $(FSTROOT)/include \
-      $(EXTRA_CXXFLAGS) \
-      -g # -O0 -DKALDI_PARANOID 
+      $(EXTRA_CXXFLAGS) -Wabi-tag \
+      -g -D_GLIBCXX_USE_CXX11_ABI=0 # -O0 -DKALDI_PARANOID 
 
 ifeq ($(KALDI_FLAVOR), dynamic)
 CXXFLAGS += -fPIC
 endif
 
