• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1dnl Find the kernel and handle 2.6 settings
2AC_DEFUN([AX_FIND_KERNEL],
3[
4AC_MSG_CHECKING([for kernel OProfile support])
5AC_ARG_WITH(kernel-support, [  --with-kernel-support        Use 2.6 kernel (no kernel source tree required)],
6if test "$withval" = "yes"; then
7	OPROFILE_26=yes
8fi
9)
10
11if test "$OPROFILE_26" != "yes"; then
12	dnl  --- Find the Linux kernel, at least the headers ---
13
14	AC_SUBST(KSRC)
15	KSRC=/lib/modules/`uname -r`/build
16	AC_ARG_WITH(linux, [  --with-linux=dir             Path to Linux source tree], KSRC=$withval)
17	KINC=$KSRC/include
18	AC_SUBST(KINC)
19
20	AX_KERNEL_OPTION(CONFIG_OPROFILE, OPROFILE_26=yes, OPROFILE_26=no)
21	AX_KERNEL_OPTION(CONFIG_OPROFILE_MODULE, OPROFILE_26=yes, OPROFILE_26=$OPROFILE_26)
22fi
23AC_MSG_RESULT($OPROFILE_26)
24
25AM_CONDITIONAL(kernel_support, test "$OPROFILE_26" = yes)
26]
27)
28