From efe455139fa6d17aa74e71453870675bb67f6795 Mon Sep 17 00:00:00 2001 From: germeier Date: Sun, 21 Mar 2004 18:09:09 +0000 Subject: fixed build environment --- ChangeLog | 5 +++++ Makefile.am | 2 +- configure.in | 33 +++++++++++++++++++++++++++------ 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 + * fixed build environment + * kernel module is (finally) deprecated + * may be enabled "--with-kernel-module" + 2004-02-08 Markus Germeier * 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 -- cgit v1.2.3