1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2024-07-03 01:46:12 +02:00

Fixed -Werror in gfortran

This commit is contained in:
Anthony Scemama 2021-05-09 01:07:17 +02:00
parent c6388867a6
commit 8479039078
2 changed files with 34 additions and 14 deletions

View File

@ -83,9 +83,6 @@
/* Define to 1 if you have the `nl_langinfo' function. */ /* Define to 1 if you have the `nl_langinfo' function. */
#undef HAVE_NL_LANGINFO #undef HAVE_NL_LANGINFO
/* Define if OpenMP is enabled */
#undef HAVE_OPENMP
/* Define to 1 if you have the <pthread.h> header file. */ /* Define to 1 if you have the <pthread.h> header file. */
#undef HAVE_PTHREAD_H #undef HAVE_PTHREAD_H
@ -189,9 +186,6 @@
/* Define to 1 if strerror_r returns char *. */ /* Define to 1 if strerror_r returns char *. */
#undef STRERROR_R_CHAR_P #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 <sys/synch.h>, /* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
#define below would cause a syntax error. */ #define below would cause a syntax error. */

View File

@ -63,8 +63,8 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
CFLAGS="${SAVED_CFLAGS}"]) CFLAGS="${SAVED_CFLAGS}"])
AC_MSG_CHECKING(whether fPIC compiler option is accepted in Fortran) AC_MSG_CHECKING(whether fPIC compiler option is accepted in Fortran)
FCFLAGS="${FCFLAGS} -fPIC -Werror"
SAVED_FCFLAGS="${FCFLAGS}" SAVED_FCFLAGS="${FCFLAGS}"
FCFLAGS="${FCFLAGS} -fPIC -Werror"
AC_LANG_PUSH(Fortran) AC_LANG_PUSH(Fortran)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])],
[AC_MSG_RESULT(yes) [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]) AC_CHECK_LIB([pthread], [pthread_create])
# OpenMP # OpenMP
AC_ARG_WITH(openmp, [AC_HELP_STRING([--with-openmp],[enable OpenMP])], with_omp=$withval, with_omp=no) #AC_ARG_WITH(openmp, [AC_HELP_STRING([--with-openmp],[enable OpenMP])], with_omp=$withval, with_omp=no)
if test "x$with_omp" = xyes; then #if test "x$with_omp" = xyes; then
AC_DEFINE([USE_OPENMP], [1], [Define to use OpenMP threading.]) # AC_DEFINE([USE_OPENMP], [1], [Define to use OpenMP threading.])
AX_OPENMP([], # AX_OPENMP([],
[AC_MSG_ERROR([Could not find OpenMP flags; configure with --without-openmp])]) # [AC_MSG_ERROR([Could not find OpenMP flags; configure with --without-openmp])])
CFLAGS="${CFLAGS} ${OPENMP_CFLAGS}" # CFLAGS="${CFLAGS} ${OPENMP_CFLAGS}"
fi #fi
## BLAS ## BLAS
@ -206,3 +206,29 @@ AC_CONFIG_FILES([Makefile
AC_OUTPUT 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 @<:@<target>@:>@'
where the optional <target> is:
all - build the library
check - run tests
install - install ${PACKAGE_NAME}
--------------------------------------------------"