Check for include/linux/mutex.h in kernel source.
authorIan Abbott <abbotti@mev.co.uk>
Wed, 12 Dec 2007 14:51:57 +0000 (14:51 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Wed, 12 Dec 2007 14:51:57 +0000 (14:51 +0000)
configure.ac
m4/as-linux.m4

index aa52bd3ae24c4c31e43dfc9aa10ca67ccac5ba46..e62d5f15f3d228b245b245349b455a19d9334517 100644 (file)
@@ -90,6 +90,7 @@ COMEDI_CHECK_LINUX_KBUILD([$LINUX_DIR], [ENABLE_KBUILD="yes"], [ENABLE_KBUILD="n
 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)
 
index 524589c47c32896c2c37075bd3e82137bdbe85cf..bad202624b4e9b47224f3568307d6ddaa6c7d7fe 100644 (file)
@@ -709,3 +709,19 @@ AC_DEFUN([COMEDI_CHECK_PCMCIA_PROBE],
                $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
+])