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

Add --without-munit

This commit is contained in:
Anthony Scemama 2021-05-07 13:16:46 +02:00
parent a84fca166d
commit c6388867a6
3 changed files with 55 additions and 44 deletions

View File

@ -27,7 +27,7 @@ jobs:
run: ./autogen.sh
- name: ./configure
run: ./configure
run: ./configure --without-munit
- name: make
run: make -C src/ doc && ls -sh ./share/doc/qmckl/html/

View File

@ -6,6 +6,9 @@
/* Define to use debugging malloc/free */
#undef DEBUG_MALLOC
/* Define when using munit */
#undef ENABLE_MUNIT
/* Define when using the profiler tool */
#undef ENABLE_PROF

View File

@ -99,49 +99,6 @@ fi
## LAPACK
#AX_LAPACK([], [AC_MSG_ERROR([LAPACK was not found.])])
# Checks for header files.
## qmckl
AC_CHECK_HEADERS([inttypes.h malloc.h stdint.h stdlib.h string.h strings.h unistd.h])
## munit
AC_CHECK_FILE([munit/munit.h], [],
AC_MSG_ERROR([
-------------------------------------------------
Error: Git submodule for munit is not downloaded.
$ git submodule update --init
-------------------------------------------------
]) )
AC_CHECK_HEADERS([fcntl.h langinfo.h limits.h locale.h mach/mach.h sys/time.h])
# Checks for typedefs, structures, and compiler characteristics.
## qmckl
AC_CHECK_HEADER_STDBOOL
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_SIZE_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
## munit
AC_TYPE_PID_T
AC_C_INLINE
AC_TYPE_SSIZE_T
# Checks for library functions.
## qmckl
AC_FUNC_MALLOC
AC_CHECK_FUNCS([memset strerror])
## munit
AC_FUNC_REALLOC
AC_FUNC_STRERROR_R
AC_FUNC_FORK
AC_CHECK_FUNCS([clock_gettime dup2 gettimeofday nl_langinfo setlocale strcasecmp strtoul])
# Options.
AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug],[compile for debugging])], ok=$enableval, ok=no)
@ -181,6 +138,57 @@ if test "$ok" = "yes"; then
AC_CHECK_LIB(efence, malloc)
fi
AC_ARG_WITH(munit, [AC_HELP_STRING([--without-munit],[use munit for testing])], ok=yes, ok=no)
if test "$ok" = "no"; then
AC_CHECK_FILE([munit/munit.h], [],
AC_MSG_ERROR([
-------------------------------------------------
Error: Git submodule for munit is not downloaded.
$ git submodule update --init
-------------------------------------------------
]) )
AC_DEFINE(ENABLE_MUNIT,1,[Define when using munit])
HAVE_MUNIT=1
fi
# Checks for header files.
## qmckl
AC_CHECK_HEADERS([inttypes.h malloc.h stdint.h stdlib.h string.h strings.h unistd.h])
## munit
AC_CHECK_HEADERS([fcntl.h langinfo.h limits.h locale.h mach/mach.h sys/time.h])
# Checks for typedefs, structures, and compiler characteristics.
## qmckl
AC_CHECK_HEADER_STDBOOL
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_SIZE_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
## munit
AC_TYPE_PID_T
AC_C_INLINE
AC_TYPE_SSIZE_T
# Checks for library functions.
## qmckl
AC_FUNC_MALLOC
AC_CHECK_FUNCS([memset strerror])
## munit
AC_FUNC_REALLOC
AC_FUNC_STRERROR_R
AC_FUNC_FORK
AC_CHECK_FUNCS([clock_gettime dup2 gettimeofday nl_langinfo setlocale strcasecmp strtoul])
#PKG-CONFIG
#mkl-dynamic-lp64-seq