From: Ian Abbott Date: Wed, 12 Dec 2007 14:51:57 +0000 (+0000) Subject: Check for include/linux/mutex.h in kernel source. X-Git-Tag: v0_7_76~19 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=22c197a98d48b1ee7f7ec688e8c95330ee07966d;p=comedi.git Check for include/linux/mutex.h in kernel source. --- diff --git a/configure.ac b/configure.ac index aa52bd3a..e62d5f15 100644 --- a/configure.ac +++ b/configure.ac @@ -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) diff --git a/m4/as-linux.m4 b/m4/as-linux.m4 index 524589c4..bad20262 100644 --- a/m4/as-linux.m4 +++ b/m4/as-linux.m4 @@ -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 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 +])