-AC_DEFUN([LC_PERCPU_COUNTER],
-[AC_MSG_CHECKING([if have struct percpu_counter defined])
-LB_LINUX_TRY_COMPILE([
- #include <linux/percpu_counter.h>
-],[],[
- AC_DEFINE(HAVE_PERCPU_COUNTER, 1, [percpu_counter found])
- AC_MSG_RESULT([yes])
-
- AC_MSG_CHECKING([if percpu_counter_inc takes the 2nd argument])
- LB_LINUX_TRY_COMPILE([
- #include <linux/percpu_counter.h>
- ],[
- struct percpu_counter c;
- percpu_counter_init(&c, 0);
- ],[
- AC_DEFINE(HAVE_PERCPU_2ND_ARG, 1, [percpu_counter_init has two
- arguments])
- AC_MSG_RESULT([yes])
- ],[
- AC_MSG_RESULT([no])
- ])
-],[
- AC_MSG_RESULT([no])
-])
-])
-