add config and depend checks for linux directory
authorFrank Mori Hess <fmhess@speakeasy.net>
Fri, 8 Aug 2003 21:56:41 +0000 (21:56 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Fri, 8 Aug 2003 21:56:41 +0000 (21:56 +0000)
m4/linux.m4

index 2f72e1a9daec0df07f941466acc5a3e76af622d5..37d33186305b3962e513fd648ebf69cb6a0380c7 100644 (file)
@@ -51,10 +51,17 @@ AC_DEFUN(DS_LINUX,
   DS_LINUX_DIR()
 
   AC_MSG_CHECKING([Linux version])
+
+       if [[ ! -f "${LINUX_DIR}/.config" ]];then
+    AC_MSG_ERROR([
+The kernel source tree at ${LINUX_DIR} is not configured.
+Fix before continuing.])
+  fi
+
   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.])
+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 | \
@@ -135,6 +142,11 @@ AC_DEFUN(DS_LINUX_2_4,
 [
   AC_MSG_CHECKING(for Linux CFLAGS)
 
+  if [[ ! -f "${LINUX_DIR}/.hdepend" ]];then
+    AC_MSG_ERROR([
+You need to run 'make dep' on the kernel source before continuing.])
+  fi
+
   tmpdir="`pwd`/tmp-noicrwa"
 
   rm -rf ${tmpdir}