autoconf
[Top][All Lists]
Advanced

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

Re: macro which returns found compiler for given language?


From: Diab Jerius
Subject: Re: macro which returns found compiler for given language?
Date: Mon, 11 May 2015 13:14:04 -0400

On Mon, May 11, 2015 at 12:40 PM, Daily, Jeff A <address@hidden> wrote:
>> -----Original Message-----
>> From: address@hidden [mailto:autoconf-
>> address@hidden On Behalf Of Diab Jerius
>> Sent: Monday, May 11, 2015 8:59 AM
>> To: address@hidden
>> Subject: macro which returns found compiler for given language?
>>
>> I'm trying to determine the version of GNU Fortran by parsing the
>> compiler's standard output when passed the --version option.
>>
>> I cannot use AC_COMPILE_IFELSE, as the compiler doesn't generate an
>> object file when passed --version, and AC_COMPILE_IFELSE requires that
>> for success.
>>
>> I've resorted to using the _AC_CC macro to get the name of the
>> compiler so that I can execute it directly, but that's not good
>> practice.
>>
>> Is there a public macro which provides the compiler for a given language?
>
> Why do you need an autoconf macro to provide this?
>
> If a shell variable is sufficient, then use the following:
>
> C -> $CC
> C++ -> $CXX
> Fortran77 -> $F77
> Fortran -> $FC
>
> These output variables are documented in the autoconf manual under 
> AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77, AC_PROG_FC, respectively.


D'oh! You know, I think I knew that once upon a time.

Thanks!.

Diab



reply via email to

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