File: kernel.m4

package info (click to toggle)
eagle-usb 2.1.1-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 5,108 kB
  • ctags: 2,612
  • sloc: ansic: 27,560; sh: 5,440; perl: 3,269; xml: 1,079; tcl: 915; makefile: 878
file content (29 lines) | stat: -rw-r--r-- 490 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
dnl
dnl Kernel related m4 macros
dnl

AC_DEFUN([AC_CHECK_KERNEL_VERSION],
[
AC_MSG_CHECKING([for kernel version])
cat <<EOF > conftest.c
#include <stdio.h>
#include "$KERNELSRC/include/linux/version.h"

int
main()
{
  fprintf(stdout, "%s\n", UTS_RELEASE);
}

EOF

gcc -I$KERNELSRC/include -o conftest conftest.c >> config.log 2>&1
if test -s ./conftest; then
    $1=`./conftest`
    AC_MSG_RESULT($KERNELVER)
else
    $1=none
    AC_MSG_RESULT([ not found ])
fi
rm -f conftest.c conftest
])