+2006-01-23 Steven G. Johnson <stevenj@fftw.org>
+
+ * lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS, _AC_FC_DUMMY_MAIN):
+ (_AC_FC_MAIN, __AC_FC_NAME_MANGLING): Use _AC_LANG in check
+ messages to differentiate Fortran and Fortran 77 tests.
+ (AC_FC_SRCEXT, AC_FC_FREEFORM): Use AC_LANG_PUSH/POP instead of
+ AC_LANG_ASSERT, to allow use in mixed-language projects.
+
2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
* lib/autoconf/c.m4 (AC_LANG_FUNC_LINK_TRY(C)): Prefer "defined
AC_DEFUN([_AC_FC_LIBRARY_LDFLAGS],
[_AC_FORTRAN_ASSERT()dnl
_AC_PROG_FC_V
-AC_CACHE_CHECK([for Fortran libraries of $[]_AC_FC[]], ac_cv_[]_AC_LANG_ABBREV[]_libs,
+AC_CACHE_CHECK([for _AC_LANG libraries of $[]_AC_FC[]], ac_cv_[]_AC_LANG_ABBREV[]_libs,
[if test "x$[]_AC_LANG_PREFIX[]LIBS" != "x"; then
ac_cv_[]_AC_LANG_ABBREV[]_libs="$[]_AC_LANG_PREFIX[]LIBS" # Let the user override the test.
else
]AC_LANG_CASE([Fortran], [#endif])
[#endif
])
-AC_CACHE_CHECK([for dummy main to link with Fortran libraries],
+AC_CACHE_CHECK([for dummy main to link with _AC_LANG libraries],
ac_cv_[]_AC_LANG_ABBREV[]_dummy_main,
[ac_[]_AC_LANG_ABBREV[]_dm_save_LIBS=$LIBS
LIBS="$LIBS $[]_AC_LANG_PREFIX[]LIBS"
#
AC_DEFUN([_AC_FC_MAIN],
[_AC_FORTRAN_ASSERT()dnl
-AC_CACHE_CHECK([for alternate main to link with Fortran libraries],
+AC_CACHE_CHECK([for alternate main to link with _AC_LANG libraries],
ac_cv_[]_AC_LANG_ABBREV[]_main,
[ac_[]_AC_LANG_ABBREV[]_m_save_LIBS=$LIBS
LIBS="$LIBS $[]_AC_LANG_PREFIX[]LIBS"
#
AC_DEFUN([__AC_FC_NAME_MANGLING],
[_AC_FORTRAN_ASSERT()dnl
-AC_CACHE_CHECK([for Fortran name-mangling scheme],
+AC_CACHE_CHECK([for _AC_LANG name-mangling scheme],
ac_cv_[]_AC_LANG_ABBREV[]_mangling,
[AC_COMPILE_IFELSE(
[ subroutine foobar()
# some versions), the $FCFLAGS_<EXT> variable *must* go immediately before
# the source file on the command line, unlike other $FCFLAGS. Ugh.
AC_DEFUN([AC_FC_SRCEXT],
-[AC_LANG_ASSERT(Fortran)dnl
+[AC_LANG_PUSH(Fortran)dnl
AC_CACHE_CHECK([for Fortran flag to compile .$1 files],
ac_cv_fc_srcext_$1,
[ac_ext=$1
AC_SUBST(FCFLAGS_[]$1)
$2
fi
+AC_LANG_POP(Fortran)dnl
])# AC_FC_SRCEXT
# We try to test the "more popular" flags first, by some prejudiced
# notion of popularity.
AC_DEFUN_ONCE([AC_FC_FREEFORM],
-[AC_LANG_ASSERT([Fortran])dnl
+[AC_LANG_PUSH(Fortran)dnl
AC_CACHE_CHECK([for Fortran flag needed to allow free-form source],
ac_cv_fc_freeform,
[ac_cv_fc_freeform=unknown
fi
$1
fi
+AC_LANG_POP(Fortran)dnl
])# AC_FC_FREEFORM