From 8479039078d3a2a0f0dd12dcfebe5f53c653daf2 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Sun, 9 May 2021 01:07:17 +0200 Subject: [PATCH] Fixed -Werror in gfortran --- config.h.in | 6 ------ configure.ac | 42 ++++++++++++++++++++++++++++++++++-------- 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/config.h.in b/config.h.in index 2a46bab..a044e0d 100644 --- a/config.h.in +++ b/config.h.in @@ -83,9 +83,6 @@ /* Define to 1 if you have the `nl_langinfo' function. */ #undef HAVE_NL_LANGINFO -/* Define if OpenMP is enabled */ -#undef HAVE_OPENMP - /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H @@ -189,9 +186,6 @@ /* Define to 1 if strerror_r returns char *. */ #undef STRERROR_R_CHAR_P -/* Define to use OpenMP threading. */ -#undef USE_OPENMP - /* Define for Solaris 2.5.1 so the uint32_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ diff --git a/configure.ac b/configure.ac index ebb8975..dfe5344 100644 --- a/configure.ac +++ b/configure.ac @@ -63,8 +63,8 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return 0;])], CFLAGS="${SAVED_CFLAGS}"]) AC_MSG_CHECKING(whether fPIC compiler option is accepted in Fortran) -FCFLAGS="${FCFLAGS} -fPIC -Werror" SAVED_FCFLAGS="${FCFLAGS}" +FCFLAGS="${FCFLAGS} -fPIC -Werror" AC_LANG_PUSH(Fortran) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [AC_MSG_RESULT(yes) @@ -84,13 +84,13 @@ AC_CHECK_HEADERS([assert.h errno.h malloc.h math.h pthread.h stdbool.h stdint.h 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.]) - AX_OPENMP([], - [AC_MSG_ERROR([Could not find OpenMP flags; configure with --without-openmp])]) - CFLAGS="${CFLAGS} ${OPENMP_CFLAGS}" -fi +#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.]) +# AX_OPENMP([], +# [AC_MSG_ERROR([Could not find OpenMP flags; configure with --without-openmp])]) +# CFLAGS="${CFLAGS} ${OPENMP_CFLAGS}" +#fi ## BLAS @@ -206,3 +206,29 @@ AC_CONFIG_FILES([Makefile AC_OUTPUT + +echo \ +"------------------------------------------------- + +${PACKAGE_NAME} Version ${PACKAGE_VERSION} + +Prefix: '${prefix}'. + +CC: ${CC} +CPPFLAGS: ${CPPFLAGS} +CFLAGS: ${CFLAGS} +FC: ${FC} +FCLAGS: ${FCFLAGS} +LDFLAGS: ${LDFLAGS} +LIBS: ${LIBS} + +Package features: + Compilation with HDF5: ${hdf5} + +Now type 'make @<:@@:>@' +where the optional is: + all - build the library + check - run tests + install - install ${PACKAGE_NAME} +--------------------------------------------------" +