1 dnl Find the kernel and handle 2.6 settings 2 AC_DEFUN([AX_FIND_KERNEL], 3 [ 4 AC_MSG_CHECKING([for kernel OProfile support]) 5 AC_ARG_WITH(kernel-support, [ --with-kernel-support Use 2.6 kernel (no kernel source tree required)], 6 if test "$withval" = "yes"; then 7 OPROFILE_26=yes 8 fi 9 ) 10 11 if 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) 22 fi 23 AC_MSG_RESULT($OPROFILE_26) 24 25 AM_CONDITIONAL(kernel_support, test "$OPROFILE_26" = yes) 26 ] 27 ) 28