Remove kernel dependencies from 'configure' (as we now use 'prepmod').
authorshort <>
Wed, 20 Aug 2003 20:24:04 +0000 (20:24 +0000)
committershort <>
Wed, 20 Aug 2003 20:24:04 +0000 (20:24 +0000)
configure.in
kernel/Linux/prepmod.in

index e9a2ab8..a352b7c 100644 (file)
@@ -31,87 +31,9 @@ AC_ARG_WITH(cxx,
        CXX=false
     ])
 
-AC_ARG_ENABLE(kernel-support,
-    [  --enable-kernel-support enable building of the kernel module (default=yes)],
-    [  KERNEL_SUPPORT=$enableval ],)
-
-if test "$KERNEL_SUPPORT" != "no"
-then
-
-    dnl Checking os
-    AC_MSG_CHECKING(OS)
-    OS_DIR=`uname -s`
-    if test ! -d kernel/$OS_DIR
-    then
-       AC_MSG_ERROR($OS_DIR - not supported!)
-    else
-       AC_MSG_RESULT($OS_DIR)
-    fi
-
-    dnl LINUX kernel configuration
-    if test "$OS_DIR"="Linux"
-    then
-
-       dnl Checking kernel & headers
-        AC_MSG_CHECKING(kernel)
-       AC_ARG_WITH(kernel, 
-           [  --with-kernel=VERSION   specify a kernel version to compile for], 
-           [KERNEL_VERSION=$withval],
-           [KERNEL_VERSION=`uname -r`])    
-        MODULES_DIR=/lib/modules/$KERNEL_VERSION
-       AC_MSG_RESULT($KERNEL_VERSION)
-
-        AC_MSG_CHECKING(kernel support)
-       KERNEL_DIR=`echo $KERNEL_VERSION | cut -d'.' -f1,2`
-        if test ! -d kernel/$OS_DIR/$KERNEL_DIR
-       then
-           AC_MSG_ERROR([$KERNEL_DIR not supported!])
-        else
-           AC_MSG_RESULT([supported in kernel/$OS_DIR/$KERNEL_DIR])
-       fi
-
-        AC_MSG_CHECKING(kernel headers)
-       AC_ARG_WITH(kheaders,
-           [  --with-kheaders=DIR     specify the location of the kernel headers],
-           [KERNEL_HDR=$withval],
-           [KERNEL_HDR=$MODULES_DIR/build/include])
-        if test ! -f $KERNEL_HDR/linux/fs.h
-       then 
-           AC_MSG_ERROR([not found in $KERNEL_HDR. please install them!])
-        else
-           AC_MSG_RESULT([found in $KERNEL_HDR])
-       fi
-
-        AC_MSG_CHECKING(kernel configuration)
-       if test -f $MODULES_DIR/build/.config
-        then
-           tmp=`cat $MODULES_DIR/build/.config | grep CONFIG_MODVERSIONS=y`
-           if test "$tmp"
-           then
-               AC_MSG_RESULT([found, using modversions])
-               MODV_FLAGS="-DMODVERSIONS -include $KERNEL_HDR/linux/modversions.h"
-           else
-               AC_MSG_RESULT([found, not using modversions])
-           fi
-       else
-           AC_MSG_RESULT([not found at $MODULES_DIR/build/.config, assuming modversions support])
-           MODV_FLAGS="-DMODVERSIONS -include $KERNEL_HDR/linux/modversions.h"        
-       fi
-
-       AC_ARG_ENABLE(modversions, 
-           [  --enable-modversions    enable modeversions support (default=auto-detect)],
-           [ if test $enableval = "yes"; then MODV_FLAGS="-DMODVERSIONS -include $KERNEL_HDR/linux/modversions.h"; else MODV_FLAGS=""; fi ],)
-    
-       AC_SUBST(MODV_FLAGS)
-       AC_SUBST(KERNEL_DIR)
-        AC_SUBST(MODULES_DIR)
-       AC_SUBST(KERNEL_HDR)
-
-    fi
-fi
+OS_DIR=Linux
 AC_SUBST(OS_DIR)
 
-
 dnl options
 AC_ARG_ENABLE(debug,
     [  --enable-debug          enable debug messages to stdout (default=no)],
@@ -312,7 +234,6 @@ AC_OUTPUT(\
        lufs.spec \
        kernel/Linux/prepmod \
         )
-chmod +x kernel/Linux/prepmod
 
 echo "###############################################################################"
 echo " supported filesystems: $opt_fs"
index d138bdb..e499904 100755 (executable)
@@ -140,10 +140,13 @@ my($kernel,$uname_r,$destmodule)=@_;
        print STDERR "Using kernel sources: $kernel\n" if !$quiet;
        confess "Kernel sources $kernel do not contain 'include' subdirectory" if ! -d $kernel."/include";
 
+       my $kdebug="";
+       do { $kdebug=$_ if !/^@/; } for ('@KDEBUG_FLAGS@');
        my $cmdline="gcc"
                        .($quiet ? " 2>/dev/null" : "")
                        ." -O2 -pipe -fomit-frame-pointer -fno-strict-aliasing -mpreferred-stack-boundary=2 -Wall"
                        ." -D__KERNEL__ -DMODULE -DLINUX -DKBUILD_MODNAME=lufs"
+                       ." ".$kdebug
                        ." ".$kernel_gcc_args
                        ." -I$kernel/include"
                        ." -I$kernel/include/asm-i386/mach-default";    # gcc should not care if this 2.5 dir does not exist