How can I tell if Fortran compiler is GNU ?

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

 



Hi,
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:

checking whether we are using the GNU Fortran compiler... (cached) no
checking whether /opt/sunstudio12.1/bin/f95 accepts -g... (cached) no
checking for Fortran flag needed to allow free-form source... -free

Is there anything I can test, that will indicate this is not a GNU compiler? It so happens it is the Sun compiler, but I don't care about that - I just want to know whether it is a GNU compiler.

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.


Dave





_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux