AC_ARG_ENABLE([kbuild], [ --enable-kbuild Force use (or not) of kernel's Kbuild system to build modules (needs recent 2.6 kernel)],
[ENABLE_KBUILD=$enableval], [])
AM_CONDITIONAL([CONFIG_KBUILD], [test ${ENABLE_KBUILD} = "yes"])
+COMEDI_CHECK_HAVE_MUTEX_H([$LINUX_DIR], [HAVE_MUTEX_H="yes"], [HAVE_MUTEX_H="no"])
AS_LINUX_CONFIG_OPTION_MODULE(CONFIG_ISA)
AS_LINUX_CONFIG_OPTION_MODULE(CONFIG_PCI)
$2
fi
])
+
+# COMEDI_CHECK_HAVE_MUTEX_H([LINUX_SOURCE_PATH], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# -------------------------------------------------------------
+#
+# Check if kernel has <linux/mutex.h> file.
+AC_DEFUN([COMEDI_CHECK_HAVE_MUTEX_H],
+[
+ AC_MSG_CHECKING([$1 for include/linux/mutex.h])
+ if test -f "$1/include/linux/mutex.h"; then
+ AC_MSG_RESULT([yes])
+ $2
+ else
+ AC_MSG_RESULT([no])
+ $3
+ fi
+])