1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2024-12-22 20:36:01 +01:00

Prepare configure for trexio

This commit is contained in:
Anthony Scemama 2021-10-06 13:01:11 +02:00
parent 71ad7abb7f
commit 97cdfa6df8
2 changed files with 34 additions and 9 deletions

View File

@ -92,12 +92,30 @@ AC_CHECK_LIB([pthread], [pthread_create])
# OpenMP
#AC_ARG_WITH(openmp, [AC_HELP_STRING([--with-openmp],[enable OpenMP])], with_omp=$withval, with_omp=no)
#if test "x$with_omp" = xyes; then
# AC_DEFINE([USE_OPENMP], [1], [Define to use OpenMP threading.])
# AC_DEFINE([HAVE_OPENMP], [1], [Define to use OpenMP threading.])
# AX_OPENMP([],
# [AC_MSG_ERROR([Could not find OpenMP flags; configure with --without-openmp])])
# CFLAGS="${CFLAGS} ${OPENMP_CFLAGS}"
#fi
# TREXIO
AC_ARG_WITH(trexio, [AC_HELP_STRING([--without-trexio],[disable support for TREXIO])],
with_trexio=$withval, with_trexio=yes)
AS_IF([test "x$with_trexio" != xno], [
AC_DEFINE([HAVE_TREXIO], [1], [Define if your have libtrexio])
ARGS="${ARGS} trexio"
AC_CHECK_LIB([trexio], [trexio_open],
[],
[AS_IF([test "x$with_trexio" != xcheck],
[PKG_CHECK_MODULES([TREXIO], [trexio]) ])
])
])
PKG_CFLAGS="$PKG_CFLAGS $TREXIO_CFLAGS"
PKG_LIBS="$PKG_LIBS $TREXIO_LIBS"
## BLAS
#AX_BLAS([], [AC_MSG_ERROR([BLAS was not found.])])
@ -199,8 +217,9 @@ fi
#PKG-CONFIG
#mkl-dynamic-lp64-seq
LIBS="${LAPACK_LIBS} ${BLAS_LIBS} ${LIBS}"
PKG_LIBS="${PKG_LIBS} ${LIBS}"
PKG_LIBS="$PKG_LIBS $LIBS"
LIBS="$LAPACK_LIBS $BLAS_LIBS $PKG_LIBS"
CFLAGS="$CFLAGS $PKG_CFLAGS"
AC_SUBST([PKG_LIBS])
AC_SUBST([PKG_CFLAGS])
AC_SUBST([HAS_CPPCHECK])

View File

@ -30,6 +30,9 @@
/* Define to 1 if you have the `pthread' library (-lpthread). */
#undef HAVE_LIBPTHREAD
/* Define to 1 if you have the `trexio' library (-ltrexio). */
#undef HAVE_LIBTREXIO
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#undef HAVE_MALLOC
@ -76,6 +79,9 @@
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define if your have libtrexio */
#undef HAVE_TREXIO
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H