Skip to content

Commit 5f70761

Browse files
committed
Add OPENBLAS_NO_F2C math library option
1 parent 93ef001 commit 5f70761

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/configure

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ auto_lib= # Deduced lib name, used when $MATHLIB is not set.
834834

835835
# Validate the (optionally) provided MATHLIB value.
836836
case $MATHLIB in
837-
''|ATLAS|CLAPACK|MKL|OPENBLAS|OPENBLAS_CLAPACK) : ;;
837+
''|ATLAS|CLAPACK|MKL|OPENBLAS|OPENBLAS_CLAPACK|OPENBLAS_NO_F2C) : ;;
838838
*) failure "Unknown --mathlib='${MATHLIB}'. Supported libs: ATLAS CLAPACK MKL OPENBLAS" ;;
839839
esac
840840

@@ -1301,7 +1301,7 @@ or try another math library, e.g. --mathlib=OPENBLAS (Kaldi may be slower)."
13011301
esac >> kaldi.mk
13021302
13031303
echo "Successfully configured for Linux with OpenBLAS from $OPENBLASROOT"
1304-
elif [ "$MATHLIB" == "OPENBLAS_CLAPACK" ]; then
1304+
elif [ "$MATHLIB" == "OPENBLAS_CLAPACK" ] || [ "$MATHLIB" == "OPENBLAS_NO_F2C" ]; then
13051305
if [[ ! $OPENBLASROOT ]]; then
13061306
# Either the user specified --mathlib=OPENBLAS or we've autodetected the
13071307
# system where OpenBLAS is the preferred option (the parser for
@@ -1345,7 +1345,11 @@ or try another math library, e.g. --mathlib=OPENBLAS (Kaldi may be slower)."
13451345
OPENBLASINCDIR="/usr/include"
13461346
fi
13471347
echo "Your math library seems to be OpenBLAS from $OPENBLASROOT. Configuring appropriately."
1348-
OPENBLASLIBS="-L$OPENBLASLIBDIR -l:libopenblas.a -l:libblas.a -l:liblapack.a -l:libf2c.a"
1348+
if [ "$MATHLIB" == "OPENBLAS_CLAPACK" ]; then
1349+
OPENBLASLIBS="-L$OPENBLASLIBDIR -l:libopenblas.a -l:libblas.a -l:liblapack.a -l:libf2c.a"
1350+
else
1351+
OPENBLASLIBS="-L$OPENBLASLIBDIR -l:libopenblas.a -l:libblas.a -l:liblapack.a"
1352+
fi
13491353
echo "OPENBLASINC = $OPENBLASINCDIR" >> kaldi.mk
13501354
echo "OPENBLASLIBS = $OPENBLASLIBS" >> kaldi.mk
13511355
echo >> kaldi.mk

0 commit comments

Comments
 (0)