]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* aclang.m4 (AC_PROG_F77): Temporarily set ac_ext to F to run
authorAkim Demaille <akim@epita.fr>
Tue, 5 Dec 2000 14:08:35 +0000 (14:08 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 5 Dec 2000 14:08:35 +0000 (14:08 +0000)
_AC_LANG_COMPILER_GNU.
From Steven G. Johnson.
* tests/compile.at (GNU Fortran 77): New test.

ChangeLog
aclang.m4
lib/autoconf/c.m4
lib/autoconf/fortran.m4
lib/autoconf/lang.m4
tests/compile.at

index 414c6f5df54ac9fc9747690f7173011ba5583db8..ba9f5f9e432e1b9e53e6b16935aef1915a21b41d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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
index e9d4e76645c3b4ae7918f1adb890c333ef474f77..37158c9af6648448755e33883a1a3a7506037d92 100644 (file)
--- a/aclang.m4
+++ b/aclang.m4
@@ -1030,7 +1030,12 @@ AC_CHECK_TOOLS(F77,
                   [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])
index e9d4e76645c3b4ae7918f1adb890c333ef474f77..37158c9af6648448755e33883a1a3a7506037d92 100644 (file)
@@ -1030,7 +1030,12 @@ AC_CHECK_TOOLS(F77,
                   [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])
index e9d4e76645c3b4ae7918f1adb890c333ef474f77..37158c9af6648448755e33883a1a3a7506037d92 100644 (file)
@@ -1030,7 +1030,12 @@ AC_CHECK_TOOLS(F77,
                   [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])
index e9d4e76645c3b4ae7918f1adb890c333ef474f77..37158c9af6648448755e33883a1a3a7506037d92 100644 (file)
@@ -1030,7 +1030,12 @@ AC_CHECK_TOOLS(F77,
                   [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])
index 10582741ca7b4d4f378850063a69db80351481d6..f72f0f40f15cbb0149ce13d41956323a2909294d 100644 (file)
@@ -7,23 +7,6 @@ AT_BANNER([Low level compiling/preprocessing macros.])
 # 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.  ##
 ## --------------------------- ##
@@ -99,3 +82,38 @@ AT_CHECK_MACRO([AC_TRY_LINK_FUNC],
                   [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]])