* [CLEAN] always define ICB.

* [BUG FIX] Can't call AC_PROG_CXX conditionally.
https://lists.gnu.org/archive/html/bug-automake/2002-11/msg00020.html

* [BUG FIX] ICB: set default value.

* Check options are set as expected.
Note: before previous fix, options were NOT set correctly !...
This commit is contained in:
Franck HOUSSEN
2018-06-26 17:35:32 +02:00
committed by Sylvestre Ledru
parent eb9d23dd3f
commit c61bb2c16a
2 changed files with 10 additions and 4 deletions
+2
View File
@@ -600,6 +600,8 @@ endfunction(cprsummary)
message("-- Configuration summary for arpack-ng-${arpack_ng_VERSION}:")
message(" -- prefix: ${CMAKE_INSTALL_PREFIX}")
message(" -- MPI: ${MPI}")
message(" -- ICB: ${ICB}")
cprsummary("FC" "${CMAKE_Fortran_COMPILER}"
"${CMAKE_Fortran_FLAGS_DEBUG}"
"${CMAKE_Fortran_FLAGS_MINSIZEREL}"
+8 -4
View File
@@ -8,8 +8,10 @@ AM_INIT_AUTOMAKE([foreign])
AM_MAINTAINER_MODE
dnl Checks for standard programs.
dnl Autoconf was designed with the fundamental fact that compiler (= language support) is NOT an option.
AC_PROG_FC
AC_PROG_CC
AC_PROG_CXX
dnl Check for BLAS libraries
AX_BLAS([], [AC_MSG_ERROR([cannot find BLAS libraries])])
@@ -112,7 +114,10 @@ AC_ARG_ENABLE([icb],
[AC_HELP_STRING([--enable-icb],
[build support for *[ae]upd_c with ISO_C_BINDING])],
[AS_VAR_SET([enable_icb], [$enableval])],
[])
[AS_VAR_SET([enable_icb], [no])])
AM_CONDITIONAL([ICB], [test x"$enable_icb" != x"no"])
if test x"$enable_icb" != x"no"; then
AC_LANG_PUSH([Fortran])
AC_MSG_CHECKING([for iso_c_binding module compilation])
@@ -136,9 +141,6 @@ if test x"$enable_icb" != x"no"; then
)
AC_LANG_POP([Fortran])
AC_PROG_CC
AC_PROG_CXX
AM_CONDITIONAL([ICB], [true])
AC_CONFIG_FILES([arpack.h:arpack.h])
AC_CONFIG_FILES([arpack.hpp:arpack.hpp])
if test x"$enable_mpi" != x"no"; then
@@ -226,6 +228,8 @@ AC_MSG_RESULT([
Configuration summary for $PACKAGE_NAME ($VERSION)
--------------------------------------------------
Installation prefix : $prefix
MPI enabled : $enable_mpi
ICB enabled : $enable_icb
FC : $FC
FCFLAGS : $FCFLAGS
CC : $CC