Re: macro which returns found compiler for given language?

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

 



On 2015-05-11 13:35 -0400, Diab Jerius wrote:
> On Mon, May 11, 2015 at 1:14 PM, Diab Jerius <djerius@xxxxxxxxxxxxxxx> wrote:
> > On Mon, May 11, 2015 at 12:40 PM, Daily, Jeff A <jeff.daily@xxxxxxxx> wrote:
> >> 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.
> 
> Unfortunately, after further thought, the output variables aren't
> sufficient for what I need.
>
> As the code cannot assume which flavor of Fortran is being tested,
> without more information it cannot choose between F77 or FC.
>
> If the current language were known, the code could choose
> appropriately, but the only macro available (AFAIK)  to query the
> current language is AC_LANG_ASSERT, which is inappropriate in this
> context.  It'd be much cleaner if one could get the compiler for the
> current language, or have _AC_CC exposed as part of the public API.

There is AC_LANG_CASE:

  AC_LANG_CASE(
    [Fortran], [...do stuff with $FC],
    [Fortran 77], [...do stuff with $F77],
    [neither option])

It seems this function is not documented in the manual, but it probably
should be.

Cheers,
-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://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