How to check Linux version with Autoconf?

Posted by Goofy on Stack Overflow See other posts from Stack Overflow or by Goofy
Published on 2010-06-06T13:51:47Z Indexed on 2010/06/06 14:12 UTC
Read the original article Hit count: 421

Filed under:
|

My program requires at least Linux 2.6.26 (I use timerfd and some other Linux-specific features).

I have an general idea how to write this macro but I don't have enough knowledge about writing test macros for Autoconf. Algorithm:

  1. Run "uname --release" and store output
  2. Parse output and subtract Linux version number (MAJOR.MINOR.MICRO)
  3. Compare version

I don't know how to run command, store output and parse it.

Maybe such macro already exists and it's available (I haven't found any)?

© Stack Overflow or respective owner

Related posts about linux

Related posts about autoconf