]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* aclang.m4 (AC_F77_NAME_MANGLING): Use AC_COMPILE_IFELSE.
authorAkim Demaille <akim@epita.fr>
Wed, 10 May 2000 17:11:21 +0000 (17:11 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 10 May 2000 17:11:21 +0000 (17:11 +0000)
Move the requirements at the top of the macro.

ChangeLog
aclang.m4
lib/autoconf/c.m4
lib/autoconf/fortran.m4
lib/autoconf/lang.m4

index c1492ec445a4fec15f1ef45bc4eef7ded30ed417..d1be6c948ec71a48269fbf11c84964960b333c80 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-05-10  Akim Demaille  <akim@epita.fr>
+
+       * aclang.m4 (AC_F77_NAME_MANGLING): Use AC_COMPILE_IFELSE.
+       Move the requirements at the top of the macro.
+
 2000-05-10  Akim Demaille  <akim@epita.fr>
 
        Update and polish the documentation.
index 5be23cb9d5a5719fd18eabc46a1aa026086d31fe..92e74c5a9356af76159735f014a721cee864c9ab 100644 (file)
--- a/aclang.m4
+++ b/aclang.m4
@@ -1364,28 +1364,22 @@ AC_SUBST(FLIBS)
 #                 underscores are appended to identifiers which
 #                 already contain an underscore somewhere in their
 #                 name, then the value is "double".
-#
-AC_DEFUN(AC_F77_NAME_MANGLING,
-[ AC_CACHE_CHECK([for Fortran 77 name-mangling scheme],
-                 ac_cv_f77_mangling,
+AC_DEFUN([AC_F77_NAME_MANGLING],
 [AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_PROG_F77])dnl
 AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS])dnl
-
-AC_LANG_SAVE()dnl
+AC_CACHE_CHECK([for Fortran 77 name-mangling scheme],
+               ac_cv_f77_mangling,
+[AC_LANG_SAVE()dnl
 AC_LANG(Fortran 77)
-
-cat >conftest.$ac_ext <<EOF
-      subroutine foobar()
+AC_COMPILE_IFELSE(
+[      subroutine foobar()
       return
       end
       subroutine foo_bar()
       return
-      end
-EOF
-
-if AC_TRY_EVAL(ac_compile); then
-  mv conftest.${ac_objext} cf77_test.${ac_objext}
+      end],
+[mv conftest.${ac_objext} cf77_test.${ac_objext}
 
   AC_LANG_SAVE()dnl
   AC_LANG(C)
@@ -1423,13 +1417,7 @@ if AC_TRY_EVAL(ac_compile); then
 
   LIBS=$ac_save_LIBS
   AC_LANG_RESTORE()dnl
-
-  rm -f conftest*
-  rm -f cf77_test*
-else
-  echo "configure: failed program was:" >&AC_FD_LOG
-  cat conftest.$ac_ext >&AC_FD_LOG
-fi
+  rm -f cf77_test*])
 AC_LANG_RESTORE()dnl
 ])
 dnl Get case/underscore from cache variable, in case above tests were skipped:
index 5be23cb9d5a5719fd18eabc46a1aa026086d31fe..92e74c5a9356af76159735f014a721cee864c9ab 100644 (file)
@@ -1364,28 +1364,22 @@ AC_SUBST(FLIBS)
 #                 underscores are appended to identifiers which
 #                 already contain an underscore somewhere in their
 #                 name, then the value is "double".
-#
-AC_DEFUN(AC_F77_NAME_MANGLING,
-[ AC_CACHE_CHECK([for Fortran 77 name-mangling scheme],
-                 ac_cv_f77_mangling,
+AC_DEFUN([AC_F77_NAME_MANGLING],
 [AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_PROG_F77])dnl
 AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS])dnl
-
-AC_LANG_SAVE()dnl
+AC_CACHE_CHECK([for Fortran 77 name-mangling scheme],
+               ac_cv_f77_mangling,
+[AC_LANG_SAVE()dnl
 AC_LANG(Fortran 77)
-
-cat >conftest.$ac_ext <<EOF
-      subroutine foobar()
+AC_COMPILE_IFELSE(
+[      subroutine foobar()
       return
       end
       subroutine foo_bar()
       return
-      end
-EOF
-
-if AC_TRY_EVAL(ac_compile); then
-  mv conftest.${ac_objext} cf77_test.${ac_objext}
+      end],
+[mv conftest.${ac_objext} cf77_test.${ac_objext}
 
   AC_LANG_SAVE()dnl
   AC_LANG(C)
@@ -1423,13 +1417,7 @@ if AC_TRY_EVAL(ac_compile); then
 
   LIBS=$ac_save_LIBS
   AC_LANG_RESTORE()dnl
-
-  rm -f conftest*
-  rm -f cf77_test*
-else
-  echo "configure: failed program was:" >&AC_FD_LOG
-  cat conftest.$ac_ext >&AC_FD_LOG
-fi
+  rm -f cf77_test*])
 AC_LANG_RESTORE()dnl
 ])
 dnl Get case/underscore from cache variable, in case above tests were skipped:
index 5be23cb9d5a5719fd18eabc46a1aa026086d31fe..92e74c5a9356af76159735f014a721cee864c9ab 100644 (file)
@@ -1364,28 +1364,22 @@ AC_SUBST(FLIBS)
 #                 underscores are appended to identifiers which
 #                 already contain an underscore somewhere in their
 #                 name, then the value is "double".
-#
-AC_DEFUN(AC_F77_NAME_MANGLING,
-[ AC_CACHE_CHECK([for Fortran 77 name-mangling scheme],
-                 ac_cv_f77_mangling,
+AC_DEFUN([AC_F77_NAME_MANGLING],
 [AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_PROG_F77])dnl
 AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS])dnl
-
-AC_LANG_SAVE()dnl
+AC_CACHE_CHECK([for Fortran 77 name-mangling scheme],
+               ac_cv_f77_mangling,
+[AC_LANG_SAVE()dnl
 AC_LANG(Fortran 77)
-
-cat >conftest.$ac_ext <<EOF
-      subroutine foobar()
+AC_COMPILE_IFELSE(
+[      subroutine foobar()
       return
       end
       subroutine foo_bar()
       return
-      end
-EOF
-
-if AC_TRY_EVAL(ac_compile); then
-  mv conftest.${ac_objext} cf77_test.${ac_objext}
+      end],
+[mv conftest.${ac_objext} cf77_test.${ac_objext}
 
   AC_LANG_SAVE()dnl
   AC_LANG(C)
@@ -1423,13 +1417,7 @@ if AC_TRY_EVAL(ac_compile); then
 
   LIBS=$ac_save_LIBS
   AC_LANG_RESTORE()dnl
-
-  rm -f conftest*
-  rm -f cf77_test*
-else
-  echo "configure: failed program was:" >&AC_FD_LOG
-  cat conftest.$ac_ext >&AC_FD_LOG
-fi
+  rm -f cf77_test*])
 AC_LANG_RESTORE()dnl
 ])
 dnl Get case/underscore from cache variable, in case above tests were skipped:
index 5be23cb9d5a5719fd18eabc46a1aa026086d31fe..92e74c5a9356af76159735f014a721cee864c9ab 100644 (file)
@@ -1364,28 +1364,22 @@ AC_SUBST(FLIBS)
 #                 underscores are appended to identifiers which
 #                 already contain an underscore somewhere in their
 #                 name, then the value is "double".
-#
-AC_DEFUN(AC_F77_NAME_MANGLING,
-[ AC_CACHE_CHECK([for Fortran 77 name-mangling scheme],
-                 ac_cv_f77_mangling,
+AC_DEFUN([AC_F77_NAME_MANGLING],
 [AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_PROG_F77])dnl
 AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS])dnl
-
-AC_LANG_SAVE()dnl
+AC_CACHE_CHECK([for Fortran 77 name-mangling scheme],
+               ac_cv_f77_mangling,
+[AC_LANG_SAVE()dnl
 AC_LANG(Fortran 77)
-
-cat >conftest.$ac_ext <<EOF
-      subroutine foobar()
+AC_COMPILE_IFELSE(
+[      subroutine foobar()
       return
       end
       subroutine foo_bar()
       return
-      end
-EOF
-
-if AC_TRY_EVAL(ac_compile); then
-  mv conftest.${ac_objext} cf77_test.${ac_objext}
+      end],
+[mv conftest.${ac_objext} cf77_test.${ac_objext}
 
   AC_LANG_SAVE()dnl
   AC_LANG(C)
@@ -1423,13 +1417,7 @@ if AC_TRY_EVAL(ac_compile); then
 
   LIBS=$ac_save_LIBS
   AC_LANG_RESTORE()dnl
-
-  rm -f conftest*
-  rm -f cf77_test*
-else
-  echo "configure: failed program was:" >&AC_FD_LOG
-  cat conftest.$ac_ext >&AC_FD_LOG
-fi
+  rm -f cf77_test*])
 AC_LANG_RESTORE()dnl
 ])
 dnl Get case/underscore from cache variable, in case above tests were skipped: