[libgfortran,patch] New autoconf test

Paolo Bonzini paolo.bonzini@lu.unisi.ch
Tue Jan 9 11:41:00 GMT 2007


> I did just that (acinclude.m4 and regenerated configure attached), but
> it fails in the weirdest way:

As Andreas noticed, you had missed a parenthesis.  There were a couple 
of other nits, in particular `pwd` is escaped by autoconf so you need to 
use $PWD.  The result looks like this:

AC_MSG_CHECKING([whether the GNU Fortran compiler is working])
AC_LANG_PUSH([Fortran])
AC_COMPILE_IFELSE([[
       program foo
       real, parameter :: bar = sin (12.34 / 2.5)
       end program foo]],
     [AC_MSG_RESULT([yes])],
     [AC_MSG_RESULT([no])
      AC_MSG_ERROR([GNU Fortran is not working; please report a bug in
http://gcc.gnu.org/bugzilla, attaching $PWD/config.log])
     ])
AC_LANG_POP([Fortran])


In general, if I write "something like this should work", it means 
"double check on the manual if you get some weird result".  :-)

Paolo



More information about the Fortran mailing list