Hi,

AC_FC_IMPLICIT_NONE and AC_F77_IMPLICIT_NONE accept two arguments:
([action-if-success], [action-if-failure = ‘AC_MSG_FAILURE’])

These are consumed by _AC_FC_IMPLICIT_NONE. _AC_FC_IMPLICIT_NONE, however, uses arguments $2 and $3, instead of $1 and $2, which leads to unexpected results.

A trivial fix is attached.

Best regards
Christian
--
Christian Feld
Jülich Supercomputing Centre
📧 c.f...@fz-juelich.de
http://www.fz-juelich.de/jsc

---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
Forschungszentrum Jülich GmbH
52425 Jülich
Sitz der Gesellschaft: Jülich
Eingetragen im Handelsregister des Amtsgerichts Düren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Stefan Müller
Geschäftsführung: Prof. Dr. Astrid Lambrecht (Vorsitzende),
Dr. Stephanie Bauer (stellvertretende Vorsitzende),
Prof. Dr. Ir. Pieter Jansens, Prof. Dr. Laurens Kuipers
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------

diff --git a/lib/autoconf/fortran.m4 b/lib/autoconf/fortran.m4
index 4c39607c..09459f07 100644
--- a/lib/autoconf/fortran.m4
+++ b/lib/autoconf/fortran.m4
@@ -1665,13 +1665,13 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 _AC_LANG_PREFIX[]FLAGS=$ac_fc_implicit_none_[]_AC_LANG_PREFIX[]FLAGS_save
 ])
 if test "x$ac_cv_[]_AC_LANG_ABBREV[]_implicit_none" = xunknown; then
-  m4_default([$3],
+  m4_default([$2],
     [AC_MSG_ERROR([no Fortran flag to disallow implicit declarations found], 77)])
 else
   if test "x$ac_cv_[]_AC_LANG_ABBREV[]_implicit_none" != xnone; then
     _AC_LANG_PREFIX[]FLAGS="$_AC_LANG_PREFIX[]FLAGS $ac_cv_[]_AC_LANG_ABBREV[]_implicit_none"
   fi
-  $2
+  $1
 fi
 ])# _AC_FC_IMPLICIT_NONE
 

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to