actually works now
authorDavid Schleef <ds@schleef.org>
Thu, 7 Aug 2003 01:02:20 +0000 (01:02 +0000)
committerDavid Schleef <ds@schleef.org>
Thu, 7 Aug 2003 01:02:20 +0000 (01:02 +0000)
configure.ac
modtool.in

index 727c87c612f7f4a0000ba843054befd55b31028a..8562181111b59ca85c387b6803d258b719635f6d 100644 (file)
@@ -16,22 +16,21 @@ AC_SUBST(VERSION)
 
 AC_PROG_CC
 
-LINUX="/home/ds/linux/condor-kernel-2.4.20/linux-2.4.21"
+#DS_LINUX_2_4()
+DS_LINUX_2_6()
 
-LINUX_LD="ld -m elf_i386 -r -e stext"
-LINUX_CFLAGS="-D__KERNEL__ -I/home/ds/linux/condor-kernel-2.4.20/linux-2.4.21/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon -DMODULE"
+#ERROR_CFLAGS="-Werror"
 
-AC_SUBST(LINUX_LD)
-AC_SUBST(LINUX_CFLAGS)
-
-
-COMEDI_CFLAGS="-Werror -I\$(top_srcdir)/include/"
+COMEDI_CFLAGS="$ERROR_CFLAGS -I\$(top_srcdir)/include/"
 AC_SUBST(COMEDI_CFLAGS)
 
-moduledir="\$(libdir)/comedi"
-
+moduledir="/lib/modules/${LINUX_KERNELRELEASE}/comedi"
+modulePROGRAMS_INSTALL="\$(top_srcdir)/modtool --install"
 AC_SUBST(moduledir)
+AC_SUBST(modulePROGRAMS_INSTALL)
 
+#DS_LINUX_CONFIG_OPTION_MODULE(CONFIG_PCMCIA)
+AM_CONDITIONAL(CONFIG_PCMCIA,false)
 
 AC_OUTPUT([
 Makefile
index 643e7de22319fee739843eccee53f5ac84e50b81..8b86ad949b7cd9ca390877e52d6d857e335bf777 100755 (executable)
@@ -2,9 +2,28 @@
 
 LINUX_LD="@LINUX_LD@"
 CC="@CC@"
+INSTALL="@INSTALL@"
+LINUX_MODULE_EXT="@LINUX_MODULE_EXT@"
 
-echo modtool $*
+#echo modtool $*
 
-$LINUX_LD $*
+mode=$1
+shift
+
+case $mode in
+--link)
+       echo $LINUX_LD -r $*
+       $LINUX_LD -r $*
+       ;;
+--install)
+       module_src=$1
+       module_dest=`echo $2 | sed "s/\.ko$/${LINUX_MODULE_EXT}/"`
+       echo $INSTALL "$module_src" "$module_dest"
+       $INSTALL "$module_src" "$module_dest"
+       ;;
+*)
+       echo Unknown mode $mode >&2
+       exit 1
+esac