+2000-12-05 Akim Demaille <akim@epita.fr>
+
+ * aclang.m4 (AC_PROG_F77): Temporarily set ac_ext to F to run
+ _AC_LANG_COMPILER_GNU.
+ From Steven G. Johnson.
+ * tests/compile.at (GNU Fortran 77): New test.
+
2000-12-05 Akim Demaille <akim@epita.fr>
* tests/tools.at (autoupdate): Strengthen and check autoupdate's
[g77 f77 xlf cf77 pgf77 fl32 fort77 f90 xlf90 f95 lf95 fc])])
_AC_LANG_COMPILER_WORKS
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file.
+ac_save_ext=$ac_ext
+ac_ext=F
_AC_LANG_COMPILER_GNU
+ac_ext=$ac_save_ext
G77=`test $ac_compiler_gnu = yes && echo yes`
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_EXPAND_ONCE([_AC_EXEEXT])
[g77 f77 xlf cf77 pgf77 fl32 fort77 f90 xlf90 f95 lf95 fc])])
_AC_LANG_COMPILER_WORKS
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file.
+ac_save_ext=$ac_ext
+ac_ext=F
_AC_LANG_COMPILER_GNU
+ac_ext=$ac_save_ext
G77=`test $ac_compiler_gnu = yes && echo yes`
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_EXPAND_ONCE([_AC_EXEEXT])
[g77 f77 xlf cf77 pgf77 fl32 fort77 f90 xlf90 f95 lf95 fc])])
_AC_LANG_COMPILER_WORKS
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file.
+ac_save_ext=$ac_ext
+ac_ext=F
_AC_LANG_COMPILER_GNU
+ac_ext=$ac_save_ext
G77=`test $ac_compiler_gnu = yes && echo yes`
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_EXPAND_ONCE([_AC_EXEEXT])
[g77 f77 xlf cf77 pgf77 fl32 fort77 f90 xlf90 f95 lf95 fc])])
_AC_LANG_COMPILER_WORKS
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file.
+ac_save_ext=$ac_ext
+ac_ext=F
_AC_LANG_COMPILER_GNU
+ac_ext=$ac_save_ext
G77=`test $ac_compiler_gnu = yes && echo yes`
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_EXPAND_ONCE([_AC_EXEEXT])
# primitive, so check those first.
-## ------------ ##
-## C keywords. ##
-## ------------ ##
-
-# GCC supports `const', `volatile', and `inline'.
-AT_CHECK_MACRO([C keywords],
-[[AC_PROG_CC
-AC_C_CONST
-AC_C_INLINE
-AC_C_VOLATILE
-case "$GCC,$ac_cv_c_const,$ac_cv_c_inline,$ac_cv_c_volatile" in
- yes,*no*)
- AC_MSG_ERROR([failed to detect `const', `inline' or `volatile' support]);;
-esac]])
-
-
-
## --------------------------- ##
## AC_PROG_CPP with warnings. ##
## --------------------------- ##
[AC_MSG_ERROR([cannot find `exit'])])
AC_TRY_LINK_FUNC(Be_doomed_if_your_libc_has_a_function_named_like_this,
[AC_MSG_ERROR([found a nonexistent function])])])
+
+
+
+## ------------ ##
+## C keywords. ##
+## ------------ ##
+
+# GCC supports `const', `volatile', and `inline'.
+AT_CHECK_MACRO([C keywords],
+[[AC_PROG_CC
+AC_C_CONST
+AC_C_INLINE
+AC_C_VOLATILE
+case "$GCC,$ac_cv_c_const,$ac_cv_c_inline,$ac_cv_c_volatile" in
+ yes,*no*)
+ AC_MSG_ERROR([failed to detect `const', `inline' or `volatile' support]);;
+esac]])
+
+
+
+## --------------------- ##
+## Fortran 77 Compiler. ##
+## --------------------- ##
+
+
+AT_CHECK_MACRO([GNU Fortran 77],
+[[AC_LANG(Fortran 77)
+AC_LANG_COMPILER
+
+case `$F77 --version`,$G77 in
+ *GNU*,yes) ;;
+ *GNU*,no ) AC_MSG_ERROR([failed to recognize GNU Fortran 77 compiler]);;
+ *,yes ) AC_MSG_ERROR([incorrectly recognized a GNU Fortran 77 compiler]);;
+esac
+exit 0]])