* E. Rosten wrote on Thu, Feb 02, 2006 at 02:52:14PM CET:
> > How can I make sure user has at least gcc4 installed?
>
> (after establishing that the compiler is gcc), and doing AC_PROG_AWK:
>
> version=`$CXX -v 2>&1 | $AWK -F'[ .]' '/version/{print $3}'`
>
> should do the job. There are some reasons for doing this (bigish changes
> in standards compliance in g++ 4 compared to g++ 3), but you should
> probably check to see if you're not being overly restrictive before
> implementing this test.
I'm very much with Ralf C. about _not_ using compiler versions for
checks, only as a last resort.
But _if_ I were to need the last resort, for example as the
ACTION-IF-CROSS-COMPILE action, I would check GCC's version
with the preprocessor macros
__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__
Cheers,
Ralf
_______________________________________________
Autoconf mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/autoconf