autoconf
[Top][All Lists]
Advanced

[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: Sebastien Maret
Subject: Re: Mixing Fortran and C: how to force the linking with CC?
Date: Wed, 28 May 2008 13:33:08 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (darwin)

Hello Ralf,

Ralf Wildenhues <address@hidden> writes:

>> Is there a way to force the final linking with CC instead of FC?
>
> Yes, you can munge with myprog_LINK if you have to, see
> <http://www.gnu.org/software/automake/manual/html_node/Program-and-Library-Variables.html>
>
> 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*.

Cheers,
Sébastien






reply via email to

[Prev in Thread] Current Thread [Next in Thread]