Commit ecbd0e81 authored by Camille Coti's avatar Camille Coti
Browse files

Make it possible to use OpenBLAS with the if-found case

parent d7d2b132
......@@ -2699,6 +2699,7 @@ AC_ARG_ENABLE(blas-lib,
none [default]: no BLAS lib is used
atlas: use ATLAS library
goto: use GotoBLAS library
openblas: use OpenBLAS library
mkl: use MKL library (you may need to set specific CFLAGS and LDFLAGS with --with-mkl-cflags and --with-mkl-ldflags)],
[
if test "x$enableval" = "xatlas" ; then
......@@ -2772,6 +2773,12 @@ fi
if test x$blas_lib = xmaybe -o x$blas_lib = xopenblas; then
PKG_CHECK_MODULES([OPENBLAS], [openblas],
[AC_DEFINE([STARPU_OPENBLAS], [1], [Define to 1 if you use the openblas library.])
AC_SUBST([STARPU_OPENBLAS], [1])
CFLAGS="${CFLAGS} ${OPENBLAS_CFLAGS} ${BLAS_OPENBLAS_CFLAGS} "
LIBS="${LIBS} ${OPENBLAS_LIBS} ${BLAS_OPENBLAS_LIBS} "
blas_lib=openblas
],
[PKG_CHECK_MODULES([BLAS_OPENBLAS], [blas-openblas],
[AC_DEFINE([STARPU_OPENBLAS], [1], [Define to 1 if you use the openblas library.])
AC_SUBST([STARPU_OPENBLAS], [1])
......@@ -2780,7 +2787,9 @@ if test x$blas_lib = xmaybe -o x$blas_lib = xopenblas; then
blas_lib=openblas
],
[ if test x$blas_lib = xopenblas; then
STARPU_CHECK_LIB(OPENBLAS, blas-openblas, cblas_sgemm,,AC_MSG_ERROR([cannot find blas-openblas lib]),[-lblas-openblas])
STARPU_CHECK_LIB(OPENBLAS, blas-openblas, cblas_sgemm,,
STARPU_CHECK_LIB(OPENBLAS, openblas, cblas_sgemm,,
AC_MSG_ERROR([cannot find blas-openblas or openblas lib]),[-lblas-openblas]))
AC_DEFINE([STARPU_OPENBLAS], [1], [Define to 1 if you use the openblas library.])
AC_SUBST([STARPU_OPENBLAS], [1])
fi
......@@ -2899,6 +2908,7 @@ AM_CONDITIONAL(STARPU_ATLAS_BLAS_LIB, test x$blas_lib = xatlas)
AM_CONDITIONAL(STARPU_GOTO_BLAS_LIB, test x$blas_lib = xgoto)
AM_CONDITIONAL(STARPU_MKL_BLAS_LIB, test x$blas_lib = xmkl)
AM_CONDITIONAL(STARPU_SYSTEM_BLAS_LIB, test x$blas_lib = xsystem)
AM_CONDITIONAL(STARPU_OPEN_BLAS_LIB, test x$blas_lib = xopenbas)
AM_CONDITIONAL(STARPU_NO_BLAS_LIB, test x$blas_lib = xnone -a x$enable_simgrid = xno)
AC_SUBST(STARPU_BLAS_LDFLAGS)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment