AS_IF([test -n "$sourcelink" && test -e ${sourcelink}], [
kernelsrc=`readlink -f ${sourcelink}`
], [
- AC_MSG_RESULT([Not found])
- AC_MSG_ERROR([
- *** Please make sure the kernel devel package for your distribution
- *** is installed then try again. If that fails you can specify the
- *** location of the kernel source with the '--with-linux=PATH' option.])
+ kernelsrc="[Not found]"
])
], [
AS_IF([test "$kernelsrc" = "NONE"], [
])
AC_MSG_RESULT([$kernelsrc])
+ AS_IF([test ! -d "$kernelsrc"], [
+ AC_MSG_ERROR([
+ *** Please make sure the kernel devel package for your distribution
+ *** is installed then try again. If that fails you can specify the
+ *** location of the kernel source with the '--with-linux=PATH' option.])
+ ])
+
AC_MSG_CHECKING([kernel build directory])
AS_IF([test -z "$kernelbuild"], [
AS_IF([test -e "/lib/modules/$(uname -r)/build"], [