From f3ea83bac4cc55033a1db39a109bbf70b87f0578 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Wed, 7 Nov 2001 14:55:16 +0000 Subject: build and install fixes --- configure.in | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 7451681..8f3b279 100644 --- a/configure.in +++ b/configure.in @@ -18,16 +18,36 @@ if test -z "$kernelsrc"; then if test -e $buildlink; then kernelsrc=`(cd $buildlink; /bin/pwd)` else - AC_MSG_RESULT([not found]) + AC_MSG_RESULT([Not found]) AC_MSG_ERROR([ *** Please specify the location of the kernel source with *** the '--with-kernel=SRCDIR' option]) fi fi AC_MSG_RESULT([$kernelsrc]) +AC_MSG_CHECKING([kernel source version]) +kernsrcver=`AC_TRY_RUN([ +#include "$kernelsrc/include/linux/version.h" +#include + +int main() { +printf("%s\n", UTS_RELEASE); + return 0; +} +], , , true)` + +if test -z "$kernsrcver"; then + AC_MSG_RESULT([Not found]) + AC_MSG_ERROR([ +*** Cannot determine the version of the linux kernel source. Please +*** configure the kernel before running this script]) +fi +AC_MSG_RESULT([$kernsrcver]) KERNINCLUDE=$kernelsrc/include AC_SUBST(KERNINCLUDE) +kmoduledir=/lib/modules/$kernsrcver +AC_SUBST(kmoduledir) AC_OUTPUT([Makefile kernel/Makefile lib/Makefile example/Makefile include/Makefile include/linux/Makefile]) -- cgit v1.2.3