From c6388867a69dae3f4624939cf2fb296ab783f912 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 7 May 2021 13:16:46 +0200 Subject: [PATCH] Add --without-munit --- .github/workflows/gh-pages.yml | 2 +- config.h.in | 3 ++ configure.ac | 94 ++++++++++++++++++---------------- 3 files changed, 55 insertions(+), 44 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index c4ce10f..a0b7d3e 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -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/ diff --git a/config.h.in b/config.h.in index df3a73d..2a46bab 100644 --- a/config.h.in +++ b/config.h.in @@ -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 diff --git a/configure.ac b/configure.ac index 316c107..ebb8975 100644 --- a/configure.ac +++ b/configure.ac @@ -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