[libgfortran,patch] New autoconf test

François-Xavier Coudert fxcoudert@gmail.com
Tue Jan 9 10:40:00 GMT 2007


>> AC_MSG_CHECKING([whether the GNU Fortran compiler is working])
>> AC_COMPILE_IFELSE([[
>>     program foo
>>       real, parameter :: bar = sin(12.34)
>>     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])
>
> Except that you have to switch the language to Fortran, by putting it
> between AC_LANG_PUSH(Fortran) and  AC_LANG_POP(Fortran).

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

checking whether the GNU Fortran compiler is working... configure:
WARNING: : accepted by the compiler, rejected by the preprocessor!
configure: WARNING: : proceeding with the compiler's result
/home/fxcoudert/svn/trunk3/libgfortran/configure: line 4729: syntax
error near unexpected token `;;'
/home/fxcoudert/svn/trunk3/libgfortran/configure: line 4729: `    ;;'
make: *** [config.status] Error 2

FX
-------------- next part --------------
A non-text attachment was scrubbed...
Name: acinclude.m4
Type: application/x-m4
Size: 13613 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070109/18c7dd0e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure
Type: application/octet-stream
Size: 697060 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070109/18c7dd0e/attachment.obj>


More information about the Fortran mailing list