From: Frank Mori Hess Date: Sat, 24 May 2008 23:15:19 +0000 (+0000) Subject: Fixed configure check for linux/mutex.h X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0df7deaff0cac77b7601538f1c2c3b667c6b57bd;p=comedi.git Fixed configure check for linux/mutex.h --- diff --git a/configure.ac b/configure.ac index 6870c149..0673d8ae 100644 --- a/configure.ac +++ b/configure.ac @@ -135,6 +135,9 @@ AC_ARG_ENABLE([kbuild], [ --enable-kbuild Force use (or not) of kernel's Kbuild [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]) diff --git a/include/linux/mutex.h b/include/linux/mutex.h index 90218156..ee3f9ac5 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h @@ -25,7 +25,9 @@ #ifndef __COMPAT_LINUX_MUTEX_H_ #define __COMPAT_LINUX_MUTEX_H_ -#ifdef HAVE_MUTEX_H +#include + +#ifdef CONFIG_COMEDI_HAVE_MUTEX_H #include_next