[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mixing Fortran and C: how to force the linking with CC?
From: |
Ralf Wildenhues |
Subject: |
Re: Mixing Fortran and C: how to force the linking with CC? |
Date: |
Wed, 28 May 2008 22:44:14 +0200 |
User-agent: |
Mutt/1.5.17+20080114 (2008-01-14) |
* Sebastien Maret wrote on Wed, May 28, 2008 at 01:33:08PM CEST:
> Ralf Wildenhues <address@hidden> writes:
>
> > However, in this special case, I think you can get away with using
> > AC_FC_DUMMY_MAIN as described in
> > <http://www.gnu.org/software/autoconf/manual/html_node/Fortran-Compiler.html>
> > which is better in that it alleviates you from redoing the choice for
> > every compiler combination out there.
>
> Thanks for your answer. I am now using the myprog_LINK variable in
> Makefile.am and it works fine with both gcc/gfortran and icc/ifort. I
> am not sure if AC_FC_DUMMY_MAIN helps in my case though. According to
> the documentation, this checks whether or not a dummy main program is
> needed for the link. The problem I had was that _main was defined
> *twice*.
Ah yes, you want the ACX_F77_CMAIN_FFLAGS macro from the Autoconf Macro
Archive, <http://autoconf-archive.cryp.to/acx_f77_cmain_fflags.html>,
except that you want it for FC and not F77. Somebody should generalize
the macro for that, I suppose, and send it to Steven (the author).
Cheers,
Ralf