aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgermeier <germeier>2004-03-21 18:09:09 +0000
committergermeier <germeier>2004-03-21 18:09:09 +0000
commitefe455139fa6d17aa74e71453870675bb67f6795 (patch)
tree5b31d8bdcf62dbadf736e9285f3449e29c0b4146
parent9394781b290a1305b36cad43025d6550cc9ddbd1 (diff)
downloadmpiosh-efe455139fa6d17aa74e71453870675bb67f6795.tar.gz
mpiosh-efe455139fa6d17aa74e71453870675bb67f6795.tar.bz2
mpiosh-efe455139fa6d17aa74e71453870675bb67f6795.zip
fixed build environment
-rw-r--r--ChangeLog5
-rw-r--r--Makefile.am2
-rw-r--r--configure.in33
3 files changed, 33 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index f41f2a2..ece8bbd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-21 Markus Germeier <mager@tzi.de>
+ * fixed build environment
+ * kernel module is (finally) deprecated
+ * may be enabled "--with-kernel-module"
+
2004-02-08 Markus Germeier <mager@tzi.de>
* added support for the new 128MB internal chip
reported by Karin. Thanks!
diff --git a/Makefile.am b/Makefile.am
index 231d4fb..e5b41be 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS=kernel libmpio mpiosh etc tools
+SUBDIRS=@MPIO_KERNEL@ libmpio mpiosh etc tools
sbin_SCRIPTS=mkmpiodev
EXTRA_DIST=mpio.spec mkmpiodev
diff --git a/configure.in b/configure.in
index 27ed75d..f96349f 100644
--- a/configure.in
+++ b/configure.in
@@ -92,19 +92,36 @@ esac
AC_SUBST(USB_CFLAGS)
AC_SUBST(USB_LIBS)
+dnl --- only use deprecated kernel module if requested
+
+AC_DEFUN([TEST_KERNEL],
+[AC_ARG_WITH([kernel-module],
+ AC_HELP_STRING([--with-kernel-module],
+ [enable the deprecated kernel module for 2.2.x and 2.4.x]),
+ [ac_cv_use_kernel=$withval], [ac_cv_use_kernel=no])
+AC_CACHE_CHECK([whether to build the kernel module],
+ [ac_cv_use_kernel], [ac_cv_use_kernel=no])])
+
+TEST_KERNEL
+
+if test "$ac_cv_use_kernel" = yes; then
+ MPIO_KERNEL=kernel
+
dnl --- check for kernel version
kernel_version=`uname -r 2>&1`
echo -n "checking for kernel version ... "
case "$kernel_version" in
- '') kernel_version="?.??"; _k_verc_fail=yes;;
- [0-1].[0-9].[0-9]*|2.[0-1].[0-9]*)
- _k_verc_fail=no;;
+ '') kernel_version="?.??"; _k_verc_fail=yes;;
+ [[0-1]].[[0-9]].[[0-9]]*|2.[[0-1]].[[0-9]]*|2.[[5-9]].[[0-9]]*|3.[[0-9]]*.[[0-9]]*)
+ _k_verc_fail=yes;;
+ *) k_ver_fail=no;;
esac
echo $kernel_version
if test "$_k_verc_fail" ; then
- echo " Your kernel version is too old."
- echo " Please update your system to a kernel version of 2.2.x or higher."
- AC_ERROR(too old)
+ echo " Your kernel version does not match."
+ echo " The kernel module only works for kernel 2.2.x and 2.4.x."
+ AC_ERROR(wrong kernel version)
+ unset MPIO_KERNEL
fi
MODULE_PATH="/lib/modules/${kernel_version}"
@@ -138,6 +155,10 @@ else
fi
AC_SUBST(KERNEL_INCLUDE)
+fi
+
+AC_SUBST(MPIO_KERNEL)
+
dnl ------------------------------------------------------------
# could not find a way to compile the kernel module correctly