Skip to content
Snippets Groups Projects
Commit 27923cea authored by Sergey Kosukhin's avatar Sergey Kosukhin
Browse files

Update cfortran-related m4 macros: make them work when either FC or F77 is disabled.

parent 8dbaf838
No related branches found
No related tags found
2 merge requests!34Version 2.2.0,!13Consolidation with CDI-PIO (develop)
......@@ -150,13 +150,17 @@ dnl check f77 flag matches fc flag
AC_PROVIDE_IFELSE([AC_PROG_F77],
[AC_PROVIDE_IFELSE([AC_PROG_FC],
[dnl both FC and F77 are configured
AS_IF([test -z "$FC" -o X"$FC" != Xno],
[acx_cv_cf_flag="$acx_cv_fc_cf_flag (probed)"],
[test -z "$F77" -o X"$F77" != Xno],
[acx_cv_cf_flag="$acx_cv_f77_cf_flag (probed)"],
AS_IF([test -z "$FC" -o X"$FC" = Xno],
[dnl FC compiler is not available, take the flag for F77
acx_cv_cf_flag="$acx_cv_f77_cf_flag (probed)"],
[test -z "$F77" -o X"$F77" = Xno],
[dnl F77 compiler is not available, take the flag for FC
acx_cv_cf_flag="$acx_cv_fc_cf_flag (probed)"],
[AS_IF([test x"$acx_cv_f77_cf_flag" = x"$acx_cv_fc_cf_flag"],
[acx_cv_cf_flag="$acx_cv_f77_cf_flag (probed)"],
[AC_MSG_ERROR([cfortran.h flag for $F77 does not match the flag for $FC.
[dnl the flags for both compilers are the same
acx_cv_cf_flag="$acx_cv_f77_cf_flag (probed)"],
[dnl FC and F77 need different flags
AC_MSG_ERROR([cfortran.h flag for $F77 does not match the flag for $FC.
Have you configured compatible compilers?])])])
])],[acx_cv_cf_flag="$acx_cv_fc_cf_flag (probed)"])
])
......
......@@ -204,8 +204,7 @@ dnl
AC_DEFUN([ACX_CHECK_CFORTRAN],
[AC_CACHE_CHECK([if C externals constructed with cfortran.h work],
[acx_cv_cfortran_works],
[acx_cv_cfortran_works=no
save_CPPFLAGS=$CPPFLAGS
[save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="-I]m4_ifval([$1],[$1],[$srcdir/include])[ $CPPFLAGS"
dnl build C function
AC_LANG_PUSH([C])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment