Upstream | cc2ee17 | 1970-01-12 13:46:40 +0000 | [diff] [blame^] | 1 | dnl AX_KERNEL_VERSION(major, minor, level, comparison, action-if-true, action-if-false) |
2 | AC_DEFUN([AX_KERNEL_VERSION], [ | ||||
3 | SAVE_CFLAGS=$CFLAGS | ||||
4 | CFLAGS="-I$KINC -D__KERNEL__ -Werror" | ||||
5 | AC_TRY_COMPILE( | ||||
6 | [ | ||||
7 | #include <linux/version.h> | ||||
8 | #include <linux/config.h> | ||||
9 | ], | ||||
10 | [ | ||||
11 | #if LINUX_VERSION_CODE $4 KERNEL_VERSION($1, $2, $3) | ||||
12 | break_me_hard(\\\); | ||||
13 | #endif | ||||
14 | ], | ||||
15 | [$5],[$6],) | ||||
16 | CFLAGS=$SAVE_CFLAGS | ||||
17 | ]) |