autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I tell if Fortran compiler is GNU ?


From: Noah Misch
Subject: Re: How can I tell if Fortran compiler is GNU ?
Date: Sat, 23 Jan 2010 03:35:10 -0500
User-agent: Mutt/1.5.18 (2008-05-17)

On Sat, Jan 23, 2010 at 02:22:45AM +0000, Dr. David Kirkby wrote:
> If using AC_PROG_CC and the compiler is the gcc, the variable GCC is set to 
> "yes".
>
> Likewise, if using AC_PROG_F77 and the Fortran 77 compiler is g77, then 
> the variable G77 is set to "yes".
>
> If however I call AC_PROG_FC, is there any simple way of knowing if that  
> compiler is a GNU compiler? The configure script shows:

You could use $ac_cv_fc_compiler_gnu for that, but

> What I am trying to do is test the C, C++ and Fortran compilers, to 
> ensure they are either
>
> 1) All GNU compilers   OR
> 2) All non-GNU compilers
>
> What I want is to avoid a mixture of the two. I would imagine trying to 
> mix object files from the Sun Fortran compiler and the GNU C++ compiler 
> is likely to end in tears.

the more Autoconfish approach would test making an executable using objects from
all three compilers and accept the combination if this works.




reply via email to

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