added check for include/linux/version.h
authorFrank Mori Hess <fmhess@speakeasy.net>
Fri, 8 Aug 2003 21:42:16 +0000 (21:42 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Fri, 8 Aug 2003 21:42:16 +0000 (21:42 +0000)
m4/linux.m4

index e7958bb4ac49193f3bfcee369ef391d4f2de5b34..2f72e1a9daec0df07f941466acc5a3e76af622d5 100644 (file)
@@ -51,6 +51,11 @@ AC_DEFUN(DS_LINUX,
   DS_LINUX_DIR()
 
   AC_MSG_CHECKING([Linux version])
+  if [[ ! -f "${LINUX_DIR}/include/linux/version.h" ]];then
+    AC_MSG_ERROR([The header file include/linux/version.h does not exist.
+      For 2.6 kernels, it can be generated by running 'make prepare' in
+      the kernel source directory.])
+  fi
 
   LINUX_VERSION=$(grep UTS_RELEASE ${LINUX_DIR}/include/linux/version.h | \
        sed 's/[[^"]]*"\(.*\)\{1\}"/\1/')
@@ -82,7 +87,7 @@ AC_DEFUN(DS_LINUX_2_6,
 
   rm -rf ${tmpdir}
   mkdir ${tmpdir}
-  
+
   cat >${tmpdir}/Makefile <<EOF
 obj-m += fake.o