[ENABLE_KBUILD=$enableval], [])
AM_CONDITIONAL([CONFIG_KBUILD], [test ${ENABLE_KBUILD} = "yes"])
COMEDI_CHECK_HAVE_MUTEX_H([$LINUX_SRC_DIR], [HAVE_MUTEX_H="yes"], [HAVE_MUTEX_H="no"])
+if test ${HAVE_MUTEX_H} = "yes" ; then
+ AC_DEFINE([CONFIG_COMEDI_HAVE_MUTEX_H], [true], [Define if Linux kernel has mutex.h header])
+fi
AS_LINUX_CONFIG_OPTION_MODULE(CONFIG_ISA)
AC_DEFINE(CONFIG_COMEDI_DEBUG, true, [Define if debugging is enabled])
#ifndef __COMPAT_LINUX_MUTEX_H_
#define __COMPAT_LINUX_MUTEX_H_
-#ifdef HAVE_MUTEX_H
+#include <linux/config.h>
+
+#ifdef CONFIG_COMEDI_HAVE_MUTEX_H
#include_next <linux/mutex.h>