I would like to detect the major version of gcc in configure.ac. A guy
told me to use sed like that:
GCC_MAJOR_VERSION=`$CC -dumpversion | sed "s/\..*//"`
Is there a better way to do that with autoconf macros ?
What about using preprocessor macros and AC_COMPILE_IFELSE? For example,
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
int dummy;
#else
not gcc, or gcc is too old
#endif
But in general, version number checks tend to be counterproductive; the
autoconf philosophy favors feature checks over version number checks.
now that you mention it, i indeed prefer to check the feature
thank you
Vincent Torri
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf