-# LB_LINUX_STRUCT_PAGE_LIST
-#
-# 2.6.4 no longer has page->list
-#
-AC_DEFUN([LB_LINUX_STRUCT_PAGE_LIST],
-[AC_MSG_CHECKING([if struct page has a list field])
-LB_LINUX_TRY_COMPILE([
- #include <linux/mm.h>
-],[
- struct page page;
- &page.list;
-],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_PAGE_LIST, 1, [struct page has a list field])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-#
-# LB_LINUX_STRUCT_SIGHAND
-#
-# red hat 2.4 adds sighand to struct task_struct
-#
-AC_DEFUN([LB_LINUX_STRUCT_SIGHAND],
-[AC_MSG_CHECKING([if task_struct has a sighand field])
-LB_LINUX_TRY_COMPILE([
- #include <linux/sched.h>
-],[
- struct task_struct p;
- p.sighand = NULL;
-],[
- AC_DEFINE(CONFIG_RH_2_4_20, 1, [this kernel contains Red Hat 2.4.20 patches])
- AC_MSG_RESULT([yes])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-#
-# LB_LINUX_FUNC_CPU_ONLINE
-#
-# cpu_online is different in rh 2.4, vanilla 2.4, and 2.6
-#
-AC_DEFUN([LB_LINUX_FUNC_CPU_ONLINE],
-[AC_MSG_CHECKING([if kernel defines cpu_online()])
-LB_LINUX_TRY_COMPILE([
- #include <linux/sched.h>
-],[
- cpu_online(0);
-],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_CPU_ONLINE, 1, [cpu_online found])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-#
-# LB_LINUX_TYPE_CPUMASK_T
-#
-# same goes for cpumask_t
-#
-AC_DEFUN([LB_LINUX_TYPE_CPUMASK_T],
-[AC_MSG_CHECKING([if kernel defines cpumask_t])
-LB_LINUX_TRY_COMPILE([
- #include <linux/sched.h>
-],[
- return sizeof (cpumask_t);
-],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_CPUMASK_T, 1, [cpumask_t found])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-#
-# LB_LINUX_FUNC_SHOW_TASK
-#
-# we export show_task(), but not all kernels have it (yet)
-#
-AC_DEFUN([LB_LINUX_FUNC_SHOW_TASK],
-[AC_MSG_CHECKING([if kernel exports show_task])
-have_show_task=0
-for file in ksyms sched ; do
- if grep -q "EXPORT_SYMBOL(show_task)" \
- "$LINUX/kernel/$file.c" 2>/dev/null ; then
- have_show_task=1
- break
- fi
-done
-if test x$have_show_task = x1 ; then
- AC_DEFINE(HAVE_SHOW_TASK, 1, [show_task is exported])
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-])
-
-#
-# LB_LINUX_CONFIG_EXT3
-#
-# that ext3 is enabled in the kernel
-#
-AC_DEFUN([LB_LINUX_CONFIG_EXT3],
-[LB_LINUX_CONFIG([EXT3_FS],[],[
- LB_LINUX_CONFIG([EXT3_FS_MODULE],[],[$2])
-])
-LB_LINUX_CONFIG([EXT3_FS_XATTR],[$1],[$3])
-])
-
-#
-# LB_LINUX_FSHOOKS
-#
-# If we have (and can build) fshooks.h
-#
-AC_DEFUN([LB_LINUX_FSHOOKS],
-[AC_MSG_CHECKING([if this compiler can build a SuSE 2.6 kernel])
-# an excerpt from fshooks.h, which doesn't build with fedora's gcc 3.4
-LB_LINUX_TRY_COMPILE([
- /* for the lack of a kernel-wide definition */
- typedef enum {
- false,
- true
- } boolean_t __attribute__((__mode__(__QI__)));
-],[],[
- AC_MSG_RESULT([yes])
-],[
- AC_MSG_RESULT([no])
- AC_MSG_WARN([We suggest trying gcc 3.3.x.])
- AC_MSG_WARN([You can set CC=gcc33 before running configure.])
- AC_MSG_ERROR([Your compiler cannot build a SuSE 2.6 kernel.])
-])
-AC_MSG_CHECKING([if fshooks are present])
-LB_LINUX_TRY_COMPILE([
- #include <linux/fshooks.h>
-],[],[
- AC_MSG_RESULT([yes])
-$1
-],[
- AC_MSG_RESULT([no])
-$2
-])
-])
-
-#
-# LB_LINUX_STRUCT_KIOBUF
-#
-# rh 2.4.18 has iobuf->dovary, but other kernels do not
-#
-AC_DEFUN([LB_LINUX_STRUCT_KIOBUF],
-[AC_MSG_CHECKING([if struct kiobuf has a dovary field])
-LB_LINUX_TRY_COMPILE([
- #include <linux/iobuf.h>
-],[
- struct kiobuf iobuf;
- iobuf.dovary = 1;
-],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_KIOBUF_DOVARY, 1, [struct kiobuf has a dovary field])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-#
-# LB_LINUX_FUNC_COND_RESCHED
-#
-# cond_resched() was introduced in 2.4.20
-#
-AC_DEFUN([LB_LINUX_FUNC_COND_RESCHED],
-[AC_MSG_CHECKING([if kernel offers cond_resched])
-LB_LINUX_TRY_COMPILE([
- #include <linux/sched.h>
-],[
- cond_resched();
-],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_COND_RESCHED, 1, [cond_resched found])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-#
-# LB_LINUX_FUNC_ZAP_PAGE_RANGE
-#
-# if zap_page_range() taks a vma arg
-#
-AC_DEFUN([LB_LINUX_FUNC_ZAP_PAGE_RANGE],
-[AC_MSG_CHECKING([if zap_pag_range with vma parameter])
-ZAP_PAGE_RANGE_VMA="`grep -c 'zap_page_range.*struct vm_area_struct' $LINUX/include/linux/mm.h`"
-if test "$ZAP_PAGE_RANGE_VMA" != 0 ; then
- AC_DEFINE(ZAP_PAGE_RANGE_VMA, 1, [zap_page_range with vma parameter])
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-])
-
-#
-# LB_LINUX_FUNC_PDE
-#
-# if proc_fs.h defines PDE()